OSDN Git Service

Convert ChangeLog files to UTF-8.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2008-08-21  David Daney  <ddaney@avtrex.com>
2
3         * class.c (make_class_data): Don't add field_index when
4         flag_reduced_reflection set.
5
6 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
7
8         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
9
10 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
11
12         PR 28875
13         * lang.c (java_handle_option): Replace set_Wunused with
14         warn_unused.
15
16 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
17
18         * gcj.texi: Update copyright years.  Do not list GPL as
19         Invariant Section.
20
21 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
22
23         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
24         from ctype's sizes.
25
26         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
27         alignment.
28
29 2008-07-29  Jan Hubicka  <jh@suse.cz>
30
31         * lang.c (java_post_options): Remove handling of flag_no_inline.
32
33 2008-07-28  Richard Guenther  <rguenther@suse.de>
34
35         Merge from gimple-tuples-branch.
36
37         2008-07-18  Richard Guenther  <rguenther@suse.de>
38
39         * expr.c: Include tree-iterator.h.
40         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
41
42         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
43
44         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
45         * expr.c: Same.
46
47         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
48
49         * java-gimplify.c (java_gimplify_expr): Same.
50         (java_gimplify_modify_expr): Same.
51         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
52
53         2008-05-02  Diego Novillo  <dnovillo@google.com>
54
55         * expr.c (build_java_throw_out_of_bounds_exception): Fix
56         mixed declarations and code.
57
58         2008-05-02  Doug Kwan  <dougkwan@google.com>
59         
60         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
61         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
62
63         2008-02-19  Diego Novillo  <dnovillo@google.com>
64
65         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
66
67         * java-gimplify.c (java_gimplify_self_mod_expr): Change
68         gimple_seq arguments to gimple_seq *.  Update all users.
69
70         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
71
72         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
73         sequences.
74         (java_gimplify_self_mod_expr): Same.                                    
75         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
76         sequences.
77
78 2008-07-24  Jan Hubicka  <jh@suse.cz>
79
80         * java/decl.c: Include cgraph.h
81         (end_java_method): Remove non-unit-at-a-time code.
82         (java_mark_decl_local): Likewise; sanity check that we don't touch
83         finalized nodes.
84
85 2008-07-15  Jan Hubicka  <jh@suse.cz>
86
87         * lang.c (java_init_options): Enable unit-at-a-time by default.
88
89 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
90
91         * Make-lang.in (jvspec.o): Fix dependencies.
92
93 2008-07-06  Tom Tromey  <tromey@redhat.com>
94
95         * Make-lang.in (java/parse.o-warn): Remove.
96         (java/jcf-io.o-warn): Remove.
97
98 2008-07-05  Tom Tromey  <tromey@redhat.com>
99
100         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
101         (compare_path): Remove.
102         (java_or_class_file): Likewise.
103         (memoized_dirlist_entry): Likewise.
104         (memoized_dirlist_hash): Likewise.
105         (memoized_dirlist_lookup_eq): Likewise.
106         (memoized_dirlists): Likewise.
107         (caching_stat): Likewise.
108         (find_class): Use stat.
109         * jcf.h (JCF_USE_SCANDIR): Remove.
110
111 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
112
113         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
114         doc/rebuild-gcj-db.1
115         (java.uninstall): Likewise.
116         (java.maintainer-clean): Likewise.
117         (aot-compile.pod): New rule.
118         (rebuild-gcj-db.pod): New rule.
119         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
120         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
121
122 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
123
124         * Make-lang.in (java/jcf-io.o-warn): New.
125
126 2008-06-24  Tom Tromey  <tromey@redhat.com>
127
128         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
129         * expr.c (add_type_assertion): Rename argument.
130         (build_java_arrayaccess): Don't name variable 'throw'.
131         (ARRAY_NEW_MULTI): Don't name variable 'class'.
132         * jcf-io.c (find_class): Don't name variable 'class'.
133         * mangle.c (compression_table_add): Don't name variable 'new'.
134         * constants.c (cpool_for_class): Rename argument.
135         (alloc_constant_fieldref): Likewise.
136         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
137         'class'.
138         (read_class): Likewise.
139         (parse_zip_file_entries): Likewise.
140         (process_zip_dir): Likewise.
141         * decl.c (java_mark_class_local): Rename argument.
142         * class.c (GEN_TABLE): Use type_name, not typename.
143         (gen_indirect_dispatch_tables): Likewise.
144         (add_field): Rename argument.
145         (is_compiled_class): Likewise.
146         (safe_layout_class): Likewise.
147         (emit_assertion_table): Likewise.
148         * typeck.c (has_method): Rename argument.
149
150 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
151
152         * class.c (ident_subst, mangled_classname, unmangle_classname,
153         gen_indirect_dispatch_tables, add_method_1,
154         build_fieldref_cache_entry, make_local_function_alias,
155         layout_class, java_treetreehash_find, java_treetreehash_new,
156         split_qualified_name): Fix for -Wc++-compat.
157         * constants.c (set_constant_entry, cpool_for_class): Likewise.
158         * decl.c (make_binding_level, java_dup_lang_specific_decl,
159         start_java_method): Likewise.
160         * except.c (prepare_eh_table_type): Likewise.
161         * expr.c (type_assertion_hash, note_instructions): Likewise.
162         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
163         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
164         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
165         Likewise.
166         * jcf-parse.c (reverse, java_read_sourcefilenames,
167         annotation_grow, rewrite_reflection_indexes, java_parse_file,
168         process_zip_dir): Likewise.
169         * jcf-path.c (add_entry, add_path, jcf_path_init,
170         jcf_path_extdirs_arg): Likewise.
171         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
172         * jvgenmain.c (do_mangle_classname): Likewise.
173         * lang.c (put_decl_string): Likewise.
174         * verify-impl.c (make_state_copy, make_state, add_new_state):
175         Likewise.
176
177 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
178
179         * gcj.texi: Expand TABs, remove whitespace from blank lines.
180
181 2008-06-14  Tom Tromey  <tromey@redhat.com>
182
183         PR java/36247:
184         * class.c (build_class_ref): Initialize this_classdollar when
185         needed.
186
187 2008-05-23  Andrew Haley  <aph@redhat.com>
188
189         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
190         pathname of source file.
191
192 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
193
194         * jcf-dump.c (print_constant): Use
195         HOST_LONG_LONG_FORMAT.
196
197 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
198
199         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
200         DECL_PURE_P.
201
202 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
203
204         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
205         (build_classdollar_field): Don't set TREE_INVARIANT.
206         (get_dispatch_table): Don't set TREE_INVARIANT.
207         (make_class_data): Don't set TREE_INVARIANT.
208         (build_symbol_entry): Don't set TREE_INVARIANT.
209         (emit_symbol_table): Don't set TREE_INVARIANT.
210         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
211         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
212         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
213         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
214
215 2008-04-03  Tom Tromey  <tromey@redhat.com>
216
217         * Make-lang.in (java_OBJS): New variable.
218
219 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
220
221         * java-tree.h (insert_block): Kill.
222         * decl.c (insert_block): Kill.
223                 
224 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
225
226         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
227         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
228         gpl.texi.
229
230 2008-03-27  Tom Tromey  <tromey@redhat.com>
231
232         * Make-lang.in: Revert automatic dependency patch.
233
234 2008-03-25  Tom Tromey  <tromey@redhat.com>
235
236         * Make-lang.in: Removed most explicit .o targets.
237         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
238         ($(GCJ)$(exeext)): Update.
239         (JAVA_OBJS): New variable.
240         (JCFDUMP_OBJS): Reformat.
241         (java_OBJS): New variable.
242         (java/jvspec.o-warn): Update.
243         (java/parse.o-warn): Remove.
244         (JAVA_TREE_H): Remove.
245         (java/jcf-io.o): Reduce to variable setting.
246         (ALL_CPPFLAGS): Likewise.
247
248 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
249
250         * mangle.c (java_mangle_decl): Remove dead check.
251
252 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
253
254         * jcf-parse.c (java_parse_file): Assert binding levels are
255         left in order.
256         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
257         Delete.
258
259 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
260
261         * jcf-dump.c (version): Update copyright notice dates.
262
263 2008-02-29  Tom Tromey  <tromey@redhat.com>
264
265         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
266         method.
267         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
268
269 2008-02-26  Tom Tromey  <tromey@redhat.com>
270
271         * lang.c (java_post_options): Remove conditional.
272         * expr.c (expand_byte_code): Remove old location code.
273         * jcf-parse.c (set_source_filename): Remove old location code.
274         (give_name_to_class): Likewise.
275         (jcf_parse): Likewise.
276         (duplicate_class_warning): Likewise.
277         (parse_class_file): Likewise.
278         (java_parse_file): Likewise.
279         * decl.c (finish_method): Remove old location code.
280         * class.c (push_class): Remove old location code.
281
282 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
283
284         PR other/35107
285         * Make-lang.in (jc1): Add $(GMPLIBS).
286
287 2008-01-23  David Daney  <ddaney@avtrex.com>
288
289         * class.c (hide)  Rename to...
290         (java_hide_decl) ... this throughout, and make public.
291         * resource.c (Jr_count): Remove.
292         (compile_resource_data): Call java_mangle_resource_name to generate
293         decl name.  Make resource decl public and hidden.
294         * mangle.c (java_mangle_resource_name): New function.
295         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
296         functions.
297
298 2008-01-04  Andrew Haley  <aph@redhat.com>
299
300         PR java/17779
301         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
302         C90.
303
304 2008-01-03  Andrew Haley  <aph@redhat.com>
305
306         PR java/17779
307         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
308         we're about to re-layout the type.
309
310 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
311
312         * lang.c (java_classify_record): Don't return
313         RECORD_IS_INTERFACE for now.
314
315 2007-12-18  Andrew Haley  <aph@redhat.com>
316
317         PR java/27643
318         * jcf-parse.c (java_parse_file): Remove call to
319         java_mark_class_local.
320         (parse_class_file): Reinstate call to java_mark_class_local here.
321         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
322         already set, call java_mangle_decl() and make_decl_rtl() to
323         rewrite its name as a hidden alias.
324
325 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
326
327         PR debug/7081
328         * lang.c (java_classify_record): New.
329         (LANG_HOOKS_CLASSIFY_RECORD): Override.
330
331 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
332
333         PR 34081/C++
334         * decl.c (finish_method): Pass 'false' for the new
335         allocate_struct_function parameter.
336
337 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
338
339         * expr.c (build_jni_stub): Use the computed jni func type for
340         variable meth.
341
342 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
343
344         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
345
346 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
347
348         * expr.c (type_assertion_hash): Hash type uids rather than
349         tree pointers.
350
351 2007-11-17  David Daney  <ddaney@avtrex.com>
352             Andrew Haley  <aph@redhat.com>
353
354         * constants.c (build_constants_constructor):  Use POINTER_SIZE
355         insead of BITS_PER_WORD in big-endian work around.
356
357 2007-11-07  Tom Tromey  <tromey@redhat.com>
358
359         PR java/34019:
360         * gcj.texi (Input Options): Add missing noun.
361
362 2007-11-02  Tom Tromey  <tromey@redhat.com>
363
364         PR java/33765:
365         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
366         * zipfile.h (ZIPEMPTYMAGIC): New define.
367
368 2007-11-01  Tom Tromey  <tromey@redhat.com>
369
370         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
371         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
372         (java/jcf-io.o): Depend on zipfile.h.
373
374 2007-10-17  Richard Guenther  <rguenther@suse.de>
375
376         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
377         dependencies.
378
379 2007-10-03  Andrew Haley  <aph@redhat.com>
380
381         PR java/33639
382         * class.c (mangled_classname): Detect and replace illegal
383         characters in assembly language symbols.
384         (gen_indirect_dispatch_tables): Call mangled_classname() on
385         the type.
386
387 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
388
389         * lang.c (java_print_error_function): Add third argument.
390
391 2007-09-15  Tom Tromey  <tromey@redhat.com>
392
393         * java-tree.h (struct lang_decl_func) <function_decl_body>:
394         Remove.
395         <init_final>: Likewise.
396         * lang.c (java_dump_tree): Update.
397         * java-tree.h (DECL_FUNCTION_BODY): Remove.
398
399 2007-09-11  Jan Hubicka <jh@suse.cz>
400
401         * decl.c (java_expand_body): Kill.
402         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
403
404 2007-09-06  Tom Tromey  <tromey@redhat.com>
405
406         * jcf-parse.c (parse_class_file): Re-enter the current file.
407
408 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
409
410         * boehm.c (mark_reference_fields): Move misaligned pointer check
411         after JREFERENCE_TYPE_P test
412
413 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
414
415         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
416         if pointer is misaligned.
417
418 2007-09-06  Tom Tromey  <tromey@redhat.com>
419
420         * lang.c (java_post_options): Update.
421         * jcf-parse.c (set_source_filename): Update.
422         (give_name_to_class): Update.
423         (jcf_parse): Update.
424         (duplicate_class_warning): Update.
425         (parse_class_file): Update.
426         (java_parse_file): Update.
427         * expr.c (expand_byte_code): Update.
428
429 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
430
431         * decl.c (finish_method): Use set_cfun.
432
433 2007-09-04  Andrew Haley  <aph@redhat.com>
434
435         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
436         when using the ARM EABI.
437
438 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
439
440         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
441
442 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
443
444         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
445         CONST_CAST.
446         * jcf.h (JCF_FINISH): Likewise.
447
448 2007-08-28  Tom Tromey  <tromey@redhat.com>
449
450         * Make-lang.in (java.tags): Don't tag '*.y' files.
451
452 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
453
454         * lang.c (java_decl_ok_for_sibcall): Likewise.
455
456 2007-08-21  Paul Brook  <paul@codesourcery.com>
457             Nathan Sidwell  <nathan@codesourcery.com>
458             Mark Mitchell  <mark@codesourcery.com>
459             Joseph Myers  <joseph@codesourcery.com>
460
461         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
462         date.
463
464 2007-08-20  Richard Guenther  <rguenther@suse.de>
465
466         * lang.c (java_tree_inlining_walk_subtrees): Remove.
467         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
468
469 2007-08-17  Tom Tromey  <tromey@redhat.com>
470
471         * typeck.c (find_method_in_interfaces): Update.
472         * jcf-parse.c (load_class): Update.
473         * java-gimplify.c (java_gimplify_component_ref): Removed.
474         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
475         arguments.
476         (java_gimplify_expr): Update.
477         * decl.c (java_init_decl_processing): Update.
478         * class.c (set_constant_value): Update.
479         (make_class_data): Update.
480         (finish_class): Update.
481         (build_static_field_ref): Update.
482         (is_compiled_class): Update.
483         (maybe_layout_super_class): Update.
484         (layout_class): Update.
485         (layout_class_method): Update.
486         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
487         (lang_decl_var) <am, final_iud, cif>: Removed fields.
488         (lang_decl_func) <init_calls_this>: Removed field.
489         (lang_type) <dot_class, verify_method>: Removed fields.
490         (FIELD_NESTED_ACCESS): Removed.
491         (FIELD_NESTED_ACCESS_P): Removed.
492         (DECL_FIELD_FINAL_IUD): Removed.
493         (DECL_LOCAL_FINAL_IUD): Removed
494         (LOCAL_FINAL_P): Removed.
495         (FINAL_VARIABLE_P): Removed.
496         (CLASS_FINAL_VARIABLE_P): Removed.
497         (DECL_BIT_INDEX): Removed.
498         (DECL_INIT_CALLS_THIS): Removed.
499         (FIELD_LOCAL_ALIAS): Removed.
500         (FIELD_LOCAL_ALIAS_USED): Removed.
501         (FIELD_THISN): Removed.
502         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
503         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
504         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
505         (TYPE_DOT_CLASS): Removed.
506         (TYPE_VERIFY_METHOD): Removed.
507         (ID_CLASSDOLLAR_P): Removed.
508         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
509         Removed.
510         (classdollar_identifier_node): Removed.
511         (TYPE_UNKNOWN): Removed.
512         (CLASS_FROM_SOURCE_P): Removed.
513         * expr.c (build_jni_stub): Update.
514         (force_evaluation_order): Update.
515         (build_java_empty_stmt): Update.
516         (build_class_init): Update.
517         (java_stack_swap): Update.
518         (build_jni_stub): Update.
519
520 2007-08-17  Tom Tromey  <tromey@redhat.com>
521
522         * java-tree.h (LABEL_TYPE_STATE): Removed.
523         (load_type_state): Removed.
524         (LABEL_PC): Removed.
525         (LABEL_VERIFIED): Removed.
526         (type_states): Declare.
527         * expr.c (type_states): New global.
528         (load_type_state): Now static.  Use type_states.  Changed
529         argument.
530         (lookup_label): Don't set LABEL_PC.
531         (expand_byte_code): Don't use LABEL_VERIFIED.
532         (note_instructions): Initialize type_states.
533         * verify-glue.c (vfy_note_stack_depth): Rewrote.
534         (vfy_note_stack_type): Use type_states.
535         (vfy_note_local_type): Likewise.
536
537 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
538
539         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
540         * jcf.h (JCF_FINISH): Likewise.
541
542 2007-07-31  Nick Clifton  <nickc@redhat.com>
543
544         * java-gimplify.c: Change copyright header to refer to version 3
545         of the GNU General Public License and to point readers at the
546         COPYING3 file and the FSF's license web page.
547         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
548         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
549         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
550         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
551         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
552         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
553         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
554
555 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
556
557         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
558
559 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
560
561         * lang.c (java_get_callee_fndecl): Constify.
562
563 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
564
565         * mangle.c (set_type_package_list): Constify.
566         * verify-glue.c (vfy_make_string): Delete.
567         * verify.h (vfy_make_string): Likewise.
568
569 2007-07-26  Tom Tromey  <tromey@redhat.com>
570
571         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
572         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
573         EXIT_BLOCK_LABELED_BLOCK): Likewise.
574         * lang.c (java_tree_inlining_walk_subtrees): Update.
575         (java_dump_tree): Likewise.
576         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
577         Remove.
578         * decl.c (push_labeled_block, pop_labeled_block): Remove.
579         * java-gimplify.c (java_gimplify_labeled_block_expr,
580         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
581         (java_gimplify_expr): Update.
582
583 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
584
585         * class.c (java_treetreehash_hash, java_treetreehash_compare):
586         Constify. 
587         * expr.c (type_assertion_eq): Likewise.
588         * jcf-io.c (compare_path): Likewise.
589         * jcf-parse.c (cmpstringp): Likewise.
590         * verify-impl.c (get_one_type, compute_argument_types,
591         compute_return_type): Likewise. 
592
593 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
594
595         PR target/32462
596         PR libgcj/32465
597         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
598
599 2007-07-12  Richard Guenther  <rguenther@suse.de>
600
601         * expr.c (expand_java_return): RETURN_EXPR has void type.
602         (build_jni_stub): Likewise.  Use a comparison against zero
603         for null-pointer test in COND_EXPR.
604         (build_field_ref): Build POINTER_PLUS_EXPR with correct
605         type.  Convert result instead.
606         (build_invokevirtual): Likewise.
607
608 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
609
610         PR 32617
611         * lang.c (java_init): Remove setting of force_align_functions_log.
612         * class.c (add_method_1): Set DECL_ALIGN of non-static method
613         to cope with ptrmemfunc_vbit_in_pfn.
614
615 2007-07-03  David Daney  <ddaney@avtrex.com>
616
617         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
618         include path.
619         (doc/gcj.dvi): Same.
620         (doc/gcj.pdf): Same.
621         (java/index.html): Same.
622
623 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
624
625         * class.c (make_class_data): Build the index in sizetype.
626         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
627         adding to a pointer type.
628         (build_symbol_entry): Likewise.
629         * expr.c (build_java_arrayaccess): Likewise.
630         (build_field_ref): Likewise.
631         (build_known_method_ref): Likewise.
632         (build_invokevirtual): Likewise.
633         * except.c (build_exception_object_ref): Do a
634         NEGATIVE and then a POINTER_PLUS_EXPR instead
635         of a MINUS_EXPR.
636
637 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
638
639         * typeck.c (java_signed_type): Remove.
640         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
641         * java-tree.h (java_signed_type): Remove.
642
643 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
644
645         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
646         (print_constant): Likewise.
647
648 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
649
650         * expr.c (build_java_binop): Use unsigned_type_for instead of
651         java_unsigned_type.
652         * java-tree.h (java_unsigned_type): Remove.
653         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
654         * typeck.c (java_unsigned_type): Remove.
655
656 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
657
658         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
659         instead of checking GIMPLE_STMT_P in chain_next.
660
661 2007-04-06  Colin Walters  <walters@redhat.com>
662
663         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
664         * jcf-io.c (open_class): Copy 'filename'.
665
666 2007-04-03  Andrew Haley  <aph@redhat.com>
667
668         * jvgenmain.c (main): Change main to use class$, not class$$.
669         (do_mangle_classname): Likewise.
670         * class.c (hide): New function.
671         (add_field): Hide everything that shouldn't be visible outside a
672         DSO.
673         (build_static_class_ref): Likewise.
674         (build_classdollar_field): Likewise.
675         (make_class_data): Likewise.
676         (layout_class_method): Likewise.
677         * expr.c (special_method_p): New function.
678
679         * class.c (push_class): Don't bogusly guess the source filename.
680         * jcf-parse.c (give_name_to_class): Don't set input_location from
681         DECL_ARTIFICIAL decls.
682
683 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
684
685         * typeck.c (java_signed_or_unsigned_type): Removed.
686         (java_signed_type): use get_signed_or_unsigned_type instead of
687         java_signed_or_unsigned_type.
688         (java_unsigned_type): Ditto.
689         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
690         * java-tree.h (java_signed_or_unsigned_type): Removed.
691
692 2007-03-26  Tom Tromey  <tromey@redhat.com>
693
694         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
695         (java.maintainer-clean): Likewise.
696         (java.install-man): Likewise.
697         (.INTERMEDIATE): Removed grmiregistry.pod.
698         (grmiregistry.pod): Removed.
699         * gcj.texi (Invoking gcjh): Removed.
700         (Invoking gjnih): Likewise.
701         (Invoking grmiregistry): Likewise.
702         (direntry): Updated.
703         (Top): Likewise.
704         (which-gcj): Removed.
705
706 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
707
708         * Make-lang.in: Add install-pdf target as copied from
709         automake v1.10 rules.
710
711 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
712
713         * gcj.texi: Standardize title page.
714
715 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
716
717         * class.c: Fix a comment typo.
718
719 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
720             Brooks Moses  <brooks.moses@codesourcery.com>
721             Lee Millward  <lee.millward@codesourcery.com>
722
723         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
724         of build3.
725         (BUILD_MONITOR_EXIT): Likewise.
726
727         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
728         (java_gimplify_modify_expr): Likewise.
729
730         * class.c (cache_this_class_ref): Use build_call_expr.
731         (build_static_field_ref): Likewise.
732         (emit_indirect_register_classes): Likewise.
733         (emit_register_classes): Likewise.
734
735         * resource.c (write_resource_constructor): Use build_call_expr.
736
737         * builtins.c (builtin_creator_function): Change interpretation of
738         the second parameter to be the whole CALL_EXPR instead of the arglist.
739         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
740         (min_builtin): Likewise.
741         (abs_builtin): Likewise.
742         (java_build_function_call_expr): Likewise.
743         (convert_real): Likewise.
744         (UNMARSHAL3): Likewise.
745         (UNMARSHAL4): Likewise.
746         (UNMARSHAL5): Likewise.
747         (build_arglist_for_builtin): Delete.  Fix callers to use
748         build_call_expr instead.
749         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
750         accessors.
751         (compareAndSwapInt_builtin): Likewise.
752         (compareAndSwapLong_builtin): Likewise.
753         (compareAndSwapObject_builtin): Likewise.
754         (putVolatile_builtin): Likewise.
755         (getVolatile_builtin): Likewise.
756         (VMSupportsCS8_builtin): Likewise.
757         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
758         instead of arglist.
759
760         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
761         (build_java_throw_out_of_bounds_exception): Likewise.
762         (java_check_reference): Likewise.
763         (build_java_arraystore_check): Likewise.
764         (build_newarray): Likewise.
765         (build_anewarray): Likewise.
766         (expand_java_multinewarray): Use build_call_list instead of build3.
767         (build_java_monitor): Use build_call_nary instead of build3.
768         (java_create_object): Likewise.
769         (expand_java_NEW): Likewise.
770         (build_instanceof): Likewise.
771         (expand_java_CHECKCAST): Likewise.
772         (build_java_soft_divmod): Likewise.
773         (build_java_binop): Likewise.
774         (build_field_ref): Likewise.
775         (build_class_init): Likewise.
776         (rewrite_arglist_getcaller): Use build_call_expr.
777         (build_invokeinterface):  Use build_call_nary instead of build3.
778         (expand_invoke): Use build_call_list instead of build3.
779         (build_jni_stub): Use build_call_nary, build_call_list, or
780         build_call_expr instead of build3.
781         (expand_java_field_op): Use build_call_expr instead of build3.
782         (force_evaluation_order): Use new CALL_EXPR accessors.
783
784         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
785
786 2007-02-15  David Daney  <ddaney@avtrex.com>
787
788         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
789         (java.maintainer-clean):Add gc-analyze.1.
790         (.INTERMEDIATE): Add gc-analyze.pod.
791         (gc-analyze.pod): New rule.
792         (java.install-man): Install gc-analyze.1
793         * gcj.texi: Add new section for the gc-analyze program.
794
795 2007-02-07  Andrew Haley  <aph@redhat.com>
796
797         * class.c (uncache_this_class_ref): New.
798         * expr.c (build_jni_stub): Initialize the class.
799         (expand_byte_code): Call uncache_this_class_ref after generating
800         code.
801
802 2007-02-06  Tom Tromey  <tromey@redhat.com>
803
804         PR java/30714:
805         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
806
807 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
808
809         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
810
811 2007-02-02  Andrew Haley  <aph@redhat.com>
812
813         * expr.c (expand_byte_code): Call cache_this_class_ref() and
814         cache_cpool_data_ref().
815         Set TYPE_CPOOL_DATA_REF.
816         (cache_cpool_data_ref): New function.
817         * constants.c (build_ref_from_constant_pool): Remove special-case
818         code for flag_indirect_classes.
819         (build_constant_data_ref): Move special-case code for
820         flag_indirect_classes here from build_ref_from_constant_pool.
821         * decl.c (finish_method): Move class initialization from here to
822         cache_this_class_ref.
823         * class.c (cache_this_class_ref): New function.
824         (build_class_ref): Use this_classdollar for the ouput class.
825
826 2007-02-02  David Daney  <ddaney@avtrex.com>
827
828         * class.c (is_compiled_class): Move check to avoid reloading
829         current class.
830         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
831         already set.
832
833 2007-02-01  Andrew Haley  <aph@redhat.com>
834
835         PR java/30641
836         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
837
838 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
839
840         * class.c, jcf-parse.c: Fix comment typos.
841
842 2007-01-30  Tom Tromey  <tromey@redhat.com>
843
844         * gcj.texi (Strings): Fix documentation for JvNewString.
845
846 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
847
848         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
849         typos.
850
851 2007-01-30  Ben Elliston  <bje@au.ibm.com>
852
853         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
854
855 2007-01-29  Tom Tromey  <tromey@redhat.com>
856
857         PR java/30607:
858         * jvspec.c (lang_specific_driver): Handle separate -I argument.
859         * lang.opt (-I): Add 'Separate'.
860
861 2007-01-29  Andrew Haley  <aph@redhat.com>
862
863         * class.c (add_method_1): Mark fndecl as external unless we are
864         compiling it into this object file.
865
866 2007-01-24  Andrew Haley  <aph@redhat.com>
867
868         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
869         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
870
871 2007-01-22  Andrew Haley  <aph@redhat.com>
872
873         * builtins.c (VMSupportsCS8_builtin): New function.
874
875 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
876
877         PR java/30454
878         * jcf-io.c (opendir_in_zip): Close the file
879         and free zipf before returning after an error.
880
881 2007-01-16  Tom Tromey  <tromey@redhat.com>
882
883         * java-tree.def: Added copyright header.
884
885 2007-01-15  Tom Tromey  <tromey@redhat.com>
886
887         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
888         case.
889         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
890         Removed case.
891         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
892         (EXPR_WFL_NODE): Likewise.
893         (EXPR_WFL_LINECOL): Likewise.
894         (EXPR_WFL_FILENAME): Likewise.
895         (EXPR_WFL_LINENO): Likewise.
896         (build_expr_wfl, expr_add_location): Don't declare.
897         (build_unknown_wfl): Removed.
898         (EXPR_WFL_FILENAME_NODE): Removed.
899         (EXPR_WFL_COLNO): Removed.
900         (EXPR_WFL_SET_LINECOL): Removed.
901         (DECL_FUNCTION_WFL): Removed.
902         (DECL_FIELD_FINAL_WFL): Removed.
903         (struct lang_decl_func) <wfl>: Removed field.
904         <called_constructor>: Likewise.
905         <inner_access>: Likewise.
906         (struct lang_decl_var) <wfl>: Removed field.
907         (DECL_CONSTRUCTOR_CALLS): Removed.
908         (DECL_FUNCTION_ACCESS_DECL): Likewise.
909         (DECL_FUNCTION_INNER_ACCESS): Likewise.
910         (DECL_SPECIFIC_COUNT): Likewise.
911         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
912         * expr.c (build_expr_wfl): Removed.
913         (expr_add_location): Likewise.
914
915 2007-01-12  Tom Tromey  <tromey@redhat.com>
916
917         * jcf-dump.c (main): Updated call to find_class.
918         * lang.c (java_init): Removed dead code.
919         * jcf-parse.c (read_class): Don't use java_source field.  Removed
920         dead code.
921         (parse_zip_file_entries): Don't use java_source field.
922         (process_zip_dir): Likewise.
923         (jcf_parse): Removed dead code.
924         (java_parse_file): Likewise.
925         (read_class): Updated call to find_class.
926         * jcf-io.c (find_class): Don't use java_source field.  Removed
927         'source_ok' argument, .java logic.
928         * jcf.h (JCF) <java_source>: Removed field.
929         (JCF_ZERO): Updated.    (find_class): Updated.
930         * decl.c: Removed dead code.
931         * class.c: Removed dead code.
932
933 2007-01-11  Tom Tromey  <tromey@redhat.com>
934
935         * typeck.c (convert): Don't use flag_emit_class_files.
936         * lang.c (java_post_options): Don't use flag_emit_class_files.
937         (java_handle_option): Don't use flag_extraneous_semicolon or
938         flag_redundant.
939         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
940         flag_emit_class_files.
941         (load_class): Likewise.
942         * java-tree.h (flag_emit_class_files): Don't declare.
943         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
944         (flag_extraneous_semicolon): Don't declare.
945         (flag_not_overriding): Likewise.
946         (flag_static_local_jdk1_1): Likewise.
947         (flag_redundant): Likewise.
948         * expr.c (build_newarray): Don't use flag_emit_class_files.
949         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
950         flag_emit_class_files.
951         (build_class_ref): Likewise.
952         * builtins.c (check_for_builtin): Don't use
953         flag_emit_class_files.
954
955 2007-01-10  Tom Tromey  <tromey@redhat.com>
956
957         * lang.c (java_can_use_bit_fields_p): Removed.
958         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
959
960 2007-01-09  Andrew Haley  <aph@redhat.com>
961
962         * expr.c (build_java_arrayaccess): Rewrite to generate array
963         access in canonical form.
964         (expand_java_arraystore): Use build_fold_addr_expr() on address of
965         array access.
966
967 2007-01-03  Andrew Haley  <aph@redhat.com>
968
969         PR java/28754
970         * expr.c (expand_java_field_op): If we're initializing a field's
971         declaring interface we should not also initialize the class
972         context in which it was referenced.
973
974 2007-01-02  Tom Tromey  <tromey@redhat.com>
975
976         * java-tree.h (compiling_from_source, current_encoding,
977         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
978         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
979         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
980         JTI_WFL_OPERATOR): Removed
981         (finit_identifier_node, instinit_identifier_node,
982         length_identifier_node, super_identifier_node,
983         continue_identifier_node, access0_identifier_node, wfl_operator):
984         Removed.
985         (cyclic_inheritance_report,
986         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
987         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
988         DECL_FIXED_CONSTRUCTOR_P): Removed.
989         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
990         Removed.
991         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
992         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
993         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
994         import_list, import_demand_list>: Removed.
995         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
996         cxx_keyword_p): Removed.
997         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
998         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
999         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1000         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1001         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1002         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1003         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1004         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1005         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1006         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1007         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1008         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1009         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1010         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1011         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1012         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1013         java_parse_abort_on_error, extract_field_decl): Removed.
1014         (finput): Declare.
1015         * lang.c: (compiling_from_source, current_encoding): Removed.
1016         (java_handle_option): Ignore -fencoding.
1017         * parse.h: Don't include lex.h.
1018         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1019         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1020         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1021         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1022         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1023         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1024         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1025         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1026         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1027         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1028         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1029         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1030         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1031         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1032         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1033         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1034         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1035         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1036         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1037         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1038         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1039         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1040         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1041         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1042         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1043         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1044         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1045         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1046         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1047         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1048         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1049         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1050         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1051         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1052         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1053         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1054         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1055         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1056         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1057         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1058         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1059         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1060         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1061         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1062         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1063         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1064         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1065         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1066         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1067         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1068         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1069         SET_CPC_STATIC_INITIALIZER_STMT,
1070         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1071         java_complete_class, java_check_circular_reference,
1072         java_fix_constructors, java_layout_classes, java_reorder_fields,
1073         java_method_add_stmt, java_get_line_col, reset_report,
1074         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1075         java_finish_classes, ctxp, ctxp_for_generation,
1076         ctxp_for_generation_last): Removed.
1077         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1078         * mangle.c (utf8_cmp): New function.
1079         (cxx_keywords): New global.
1080         (cxx_keyword_p): New function.
1081         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1082         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1083         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1084         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1085         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1086         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1087         * Make-lang.in (java.srcextra): Do nothing.
1088         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1089         (JAVA_OBJS): Don't mention deleted files.
1090         (java.mostlyclean): Likewise.
1091         (java.clean): Likewise.
1092         (JAVA_LEX_C): Removed.
1093         (buffer.o, check-init.o, parse.o): Remove unused targets.
1094         (typeck.o): Updated.
1095         * jcf-parse.c (read_class): Comment out unused code.
1096         (java_layout_seen_class_methods): New function.
1097         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1098         Removed.
1099         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
1100         (init_jcf_parse): Removed.
1101         * config-lang.in (gtfiles): Remove deleted files.
1102         * decl.c (java_init_decl_processing): Don't initialize
1103         finit_identifier_node, instinit_identifier_node,
1104         length_identifier_node, super_identifier_node,
1105         continue_identifier_node, access0_identifier_node.  Don't call
1106         init_jcf_parse.
1107         * class.c (cyclic_inheritance_report): New global.
1108         (add_method_1): Don't use
1109         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1110         (maybe_layout_super_class): Comment out code.
1111         (safe_layout_class): New function.
1112         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1113         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1114         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1115         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1116         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1117         (java_gimplify_case_expr): Removed.
1118         (java_gimplify_default_expr): Likewise.
1119         (java_gimplify_new_array_init): Likewise.
1120         * parse.y: Removed.
1121         * keyword.gperf, keyword.h: Removed.
1122         * chartables.h: Removed.
1123         * check-init.c: Removed.
1124         * buffer.c, buffer.h: Removed.
1125         * convert.h: Removed.
1126         * gen-table.pl: Removed.
1127         * lex.c, lex.h: Removed.
1128
1129 2007-01-02  Andrew Haley  <aph@redhat.com>
1130
1131         * expr.c (expand_java_arraystore): Make sure we perform a bounds
1132         check at runtime before we perform a type check.
1133
1134 2006-12-19  Andrew Haley  <aph@redhat.com>
1135
1136         * decl.c: Bump minor BC ABI version.
1137
1138 2006-12-13  Gary Benson  <gbenson@redhat.com>
1139
1140         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1141
1142 2006-12-12  Tom Tromey  <tromey@redhat.com>
1143
1144         * lang-specs.h: Pass -M options to jc1.
1145         * jcf-depend.c (jcf_dependency_add_file): Don't emit
1146         dependencies.
1147
1148 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
1149
1150         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1151
1152 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
1153
1154         * lang-specs.h: Pass '%U'-based options as separate arguments.
1155
1156 2006-12-05  Tom Tromey  <tromey@redhat.com>
1157
1158         PR java/29495:
1159         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1160         classes as well.
1161         * class.c (add_field): Handle ACC_SYNTHETIC.
1162         (add_method_1): Likewise.  Handle bridge and varargs.
1163         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1164         annotation.
1165         (set_class_decl_access_flags): Handle synthetic and annotation.
1166         * java-tree.h (METHOD_BRIDGE): New macro.
1167         (METHOD_VARARGS): Likewise.
1168         (TYPE_SYNTHETIC): Likewise.
1169         (TYPE_ANNOTATION): Likewise.
1170         (lang_type): New fields 'synthetic' and 'annotation'.
1171         (lang_decl_func): New fields 'varargs' and 'bridge'.
1172
1173 2006-12-04  Andrew Haley  <aph@redhat.com>
1174
1175         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1176         there's no map.
1177
1178 2006-11-29  Gary Benson  <gbenson@redhat.com>
1179
1180         * expr.c (rewrite_arglist_getcaller): Reorder.
1181
1182 2006-11-29  Andrew Haley  <aph@redhat.com>
1183
1184         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1185         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1186
1187 2006-11-23  Andrew Haley  <aph@redhat.com>
1188
1189         * expr.c (rewrite_arglist_getcaller): New.
1190         (rewrite_arglist_getclass): Fix indentation.
1191         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
1192         gnu.classpath.VMStackWalker.getCallingClassLoader().
1193         * builtins.c (initialize_builtins): Remove duplicate def'n of
1194         __sync_synchronize.
1195         Add __builtin_return_address.
1196
1197 2006-11-22  Andrew Haley  <aph@redhat.com>
1198
1199         * jcf-reader.c (get_attribute): Mark attr_type unused.
1200
1201         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1202
1203 2007-01-08  Richard Guenther  <rguenther@suse.de>
1204
1205         * lex.c (do_java_lex): Use build_int_cst_wide_type.
1206         * jcf-parse.c (get_constant): Likewise.
1207
1208 2006-11-12  Jan Hubicka  <jh@suse.cz>
1209
1210         * resource.c (compile_resource_data): Update for new varpool names.
1211         * java/class.c (build_utf8_ref): Likewise.
1212
1213 2006-11-12  David Daney  <ddaney@avtrex.com>
1214
1215         PR java/29805
1216         * typeck.c (build_java_array_type): Increase buffer sizes.
1217
1218 2006-11-11  Richard Guenther  <rguenther@suse.de>
1219
1220         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1221         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1222
1223 2006-11-06  Andrew Haley  <aph@redhat.com>
1224
1225         * java-tree.h (CONSTANT_LazyFlag): New.
1226         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1227         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1228         reflection_data.
1229         (handle_constant): Return 0 for dummy cpool entries.
1230         Handle constants of kind Class.
1231         Handle constants of kind NameAndType.
1232         (handle_enclosingmethod_attribute): New.
1233         (handle_signature_attribute): New.
1234         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1235         (HANDLE_SIGNATURE_ATTRIBUTE): New.
1236         (handle_constant): Use unmangle_classname()rather than calling
1237         identifier_subst() directly.
1238
1239 2006-11-02  Andrew Haley  <aph@redhat.com>
1240
1241         * java-tree.h (FIELD_ENUM): New.
1242         (lang_decl_var.field_enum): New.
1243         (lang_type.enum_class): New.
1244         (CLASS_ENUM): New.
1245         * class.c (set_class_decl_access_flags): Handle enum types.
1246         (add_field): Handle enum fields.
1247         (get_access_flags_from_decl): Likewise.
1248
1249         * class.c (make_class_data): Put reflection_data into rodata.
1250
1251 2006-11-01  Andrew Haley  <aph@redhat.com>
1252
1253         * jcf-parse.c (field_offsets, bit_obstack): New variables.
1254         (jcf_parse): Write end marker to annotation_data.
1255         (java_parse_file): Create field_offsets bitmap.  Destroy it.
1256         (annotation_grow, annotation_rewrite_byte) 
1257         (annotation_rewrite_short, annotation_rewrite_int) 
1258         (annotation_read_short, annotation_write_byte) 
1259         (annotation_write_short, annotation_write_int) 
1260         (handle_long_constant, handle_constant, handle_element_value) 
1261         (handle_annotation, handle_annotations) 
1262         (handle_annotation_attribute, rewrite_reflection_indexes) 
1263         (handle_member_annotations, handle_parameter_annotations) 
1264         (handle_default_annotation): New functions.
1265         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
1266         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
1267         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1268         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1269         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1270         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
1271         (TYPE_REFLECTION_DATA): New.
1272         (TYPE_REFLECTION_DATASIZE): New.
1273         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1274         an enum.
1275         * jcf-reader.c (get_attribute): Pass field/method index and
1276         attribute type to get_attribute().
1277         * constants.c (find_class_or_string_constant): Make nonstatic.
1278         (cpool_for_class): Likewise.
1279         (build_constants_constructor): Separate string and scalar types.
1280         * class.c (make_class_data): Generate field_indexes permutation.
1281         Pass it to rewrite_reflection_indexes().
1282         (make_class_data): Generate constructor for reflection_data field.
1283
1284 2006-10-20  Tom Tromey  <tromey@redhat.com>
1285
1286         * gcj.texi (Top): Don't mention jv-scan.
1287         (Invoking gcj): Likewise.
1288         (Invoking gcjh): Likewise.
1289         (Invoking gjnih): Likewise.
1290         (Invoking gij): Likewise.
1291         (Invoking gcj-dbtool): Likewise.
1292         (Invoking jv-scan): Removed.
1293         * parse-scan.y: Removed.
1294         * jv-scan.c: Removed.
1295         * config-lang.in (stagestuff): Don't mention jv-scan.
1296         * Make-lang.in (java): Removed jv-scan.
1297         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1298         (JVSCAN_OBJS): Removed.
1299         (jv-scan$(exeext)): Likewise.
1300         (JAVA_MANFILES): Removed jv-scan.1.
1301         (java.uninstall): Don't mention jv-scan.
1302         (java.mostlyclean): Likewise.
1303         (java.maintainer-clean): Likewise.
1304         (.INTERMEDIATE): Likewise.
1305         (java/jv-scan.o): Removed.
1306         (jv-scan.pod): Likewise.
1307         (java.srcextra): Don't mention parse-scan.c.
1308         (java.mostlyclean): Likewise.
1309         (java/parse-scan.c): Removed.
1310         (java/parse-scan.o-warn): Removed.
1311         (java/parse-scan.o): Removed.
1312
1313 2006-10-20  Tom Tromey  <tromey@redhat.com>
1314
1315         * lang.c (java_handle_option): Don't use
1316         jcf_write_base_directory.
1317         * jcf.h (jcf_write_base_directory): Removed.
1318         * parse.y (java_expand_classes): Don't call write_classfile.
1319         * config-lang.in (gtfiles): Removed jcf-write.c.
1320         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1321         (java/jcf-write.o): Removed.
1322         * jcf-parse.c (parse_class_file): Don't call write_classfile.
1323         * java-tree.h (write_classfile): Removed declaration.
1324         * jcf-write.c: Removed.
1325
1326 2006-10-20  Tom Tromey  <tromey@redhat.com>
1327
1328         * Make-lang.in (java): Removed gjnih, gcjh.
1329         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1330         (GCJH_OBJS): Removed.
1331         (GJNIH_OBJS): Likewise.
1332         (gjnih$(exeext)): Likewise.
1333         (gcjh$(exeext)): Likewise.
1334         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1335         (java.install-common): Don't special case gcjh.
1336         (java.uninstall): Don't mention gcjh, gjnih.
1337         (java.mostlyclean): Likewise.
1338         (java.maintainer-clean): Likewise.
1339         (.INTERMEDIATE): Likewise.
1340         (gcjh.pod): Removed.
1341         (gjnih.pod): Likewise.
1342         (GCJH_TARGET_INSTALL_NAME): Removed.
1343         (java/gjavah-jni.o): Removed.
1344         (java/gjavah.o): Likewise.
1345         * config-lang.in (stagestuff): Removed gjnih, gcjh.
1346         * gjavah.c: Removed.
1347
1348 2006-10-17  Tom Tromey  <tromey@redhat.com>
1349
1350         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1351         "string" case.
1352
1353 2006-10-17  Tom Tromey  <tromey@redhat.com>
1354
1355         * jvgenmain.c (main): Handle -findirect-dispatch.
1356         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1357         jvgenmain.
1358
1359 2006-10-06  Andrew Haley  <aph@redhat.com>
1360
1361         * builtins.c (compareAndSwapInt_builtin): Check that we really do
1362         have a compare_and_swap builtin.
1363         (compareAndSwapLong_builtin): Likewise.
1364         (compareAndSwapObject_builtin): Likewise.
1365
1366 2006-10-04  Andrew Haley  <aph@redhat.com>
1367
1368         * builtins.c (java_builtins): Add compareAndSwapInt,
1369         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1370         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1371         putObjectVolatile, getObjectVolatile, getIntVolatile,
1372         getLongVolatile, getLong.
1373         (UNMARSHAL3): New macro.
1374         (UNMARSHAL4): Likewise.
1375         (UNMARSHAL5): Likewise.
1376         (build_arglist_for_builtin): New function.
1377         (build_addr_sum, build_check_this): New functions.
1378         (putObject_builtin. compareAndSwapInt_builtin,
1379         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1380         putVolatile_builtin, getVolatile_builtin): New builtins.
1381
1382 2006-06-08  Andrew Haley  <aph@redhat.com>
1383  
1384         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1385         get_symbol_table_index().
1386         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1387         private method.
1388         (build_known_method_ref): New arg: special.  Pass it to
1389         get_symbol_table_index.
1390         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1391         the method list.
1392         (build_invokevirtual): New arg: special.  Pass it to
1393         get_symbol_table_index.
1394         (expand_invoke): New variable: special.
1395         Pass it to maybe_rewrite_invocation().
1396         Pass it to build_known_method_ref().
1397         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1398         build the symbol table conbstructor.
1399         (emit_symbol_table): Extract SPECIAL from the method list and pass
1400         it to build_symbol_entry().
1401         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1402         special accordingly.
1403  
1404 2006-09-08  Andrew Haley  <aph@redhat.com>
1405
1406         * class.c (layout_class_method): Use build_java_signature, not
1407         build_java_argument_signature.  Use lookup_java_method, not
1408         lookup_argument_method.
1409
1410 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1411             Bryce McKinlay  <bryce@mckinlay.net.nz>
1412
1413         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1414
1415 2006-07-18  Tom Tromey  <tromey@redhat.com>
1416
1417         * lang.opt: Added missing -W options.
1418
1419 2006-07-12  Tom Tromey  <tromey@redhat.com>
1420
1421         PR java/28329:
1422         * lang-specs.h: Pass '%U'-based options as separate arguments.
1423         Use -faux-classpath.
1424         * lang.c (java_handle_option): Handle OPT_faux_classpath.
1425         * lang.opt (faux-classpath): New option.
1426
1427 2006-07-07  Tom Tromey  <tromey@redhat.com>
1428
1429         * class.c (make_class_data): Set value for reflection_data field.
1430         * decl.c (java_init_decl_processing): Add reflection_data field.
1431
1432 2006-07-07  Tom Tromey  <tromey@redhat.com>
1433
1434         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1435         earlier.
1436         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1437
1438 2006-07-07  Andrew Haley  <aph@redhat.com>
1439
1440         * jcf-parse.c (set_source_filename): Don't check for
1441         CLASS_FROM_CURRENTLY_COMPILED_P.
1442         Remove // comments.
1443
1444 2006-07-07  Andrew Haley  <aph@redhat.com>
1445
1446         * java-tree.h (java_read_sourcefilenames): Declare.
1447         * lang.c (java_handle_option): Call java_read_sourcefilenames().
1448         * lang.opt (fsource-filename): New opt.
1449         * lang-specs.h: Add -fsource-filename.
1450         * jcf-parse.c (num_files, filenames): New variables.
1451         (reverse, cmpstringp, java_read_sourcefilenames,
1452         find_sourcefile): New.
1453         (set_source_filename): Call find_sourcefile to find the real name
1454         of a source file.
1455
1456 2006-06-27  Tom Tromey  <tromey@redhat.com>
1457
1458         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1459         Signature, LocalVariableTypeTable, annotation attributes.
1460         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1461         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1462         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1463         (HANDLE_METHOD): Likewise.
1464         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1465         (print_annotation): New function.
1466         (print_element_value): Likewise.
1467         (indent): Likewise.
1468         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1469         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1470         (print_parameter_annotations): New function.
1471         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1472         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1473         Likewise.
1474         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1475         (print_annotations): New function.
1476
1477 2006-06-23  Tom Tromey  <tromey@redhat.com>
1478
1479         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
1480         emitting class files, always use 1.5.
1481         * gcj.texi (Input Options): Document -fsource.
1482         (Code Generation): Document -ftarget.
1483
1484 2006-06-21  Tom Tromey  <tromey@redhat.com>
1485
1486         PR java/28089:
1487         * expr.c (expand_java_field_op): Initialize field's declaring
1488         class.
1489
1490 2006-06-20  Tom Tromey  <tromey@redhat.com>
1491
1492         * expr.c (push_value): Always flush quick stack.
1493
1494 2006-06-19  Tom Tromey  <tromey@redhat.com>
1495
1496         * expr.c (push_value): Also flush quick stack if value is a
1497         component_ref.
1498
1499 2006-06-19  Tom Tromey  <tromey@redhat.com>
1500
1501         * expr.c (push_value): Flush quick stack if value has side
1502         effects.
1503
1504 2006-06-13  Tom Tromey  <tromey@redhat.com>
1505
1506         * class.c (is_compiled_class): Explicitly check for current
1507         class.
1508
1509 2006-06-09  Tom Tromey  <tromey@redhat.com>
1510
1511         * gjavah.c (decompile_method): Don't decompile a static field
1512         accessor method.
1513
1514 2006-06-06  Tom Tromey  <tromey@redhat.com>
1515
1516         * lang-specs.h <jc1>: Add .jar file to command line if
1517         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
1518
1519 2006-06-05  Tom Tromey  <tromey@redhat.com>
1520
1521         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1522         synthetic, enum, annotation.
1523         * jcf.h (ACC_BRIDGE): New macro.
1524         (ACC_VARARGS): Likewise.
1525         (ACC_SYNTHETIC): Likewise.
1526         (ACC_ENUM): Likewise.
1527         (ACC_ANNOTATION): Likewise.
1528
1529 2006-06-04  Tom Tromey  <tromey@redhat.com>
1530
1531         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1532         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1533         and -ftarget.
1534         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1535         when needed.  Handle classpath-setting.
1536         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1537         * lang-specs.h: Rewrote.
1538
1539 2006-06-04  Tom Tromey  <tromey@redhat.com>
1540
1541         * jcf-io.c (find_class): Set source_ok to 0.
1542         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1543         (parse_class_file): Don't call java_mark_class_local.
1544         (java_parse_file): Skip .java files.  Call java_mark_class_local
1545         before lowering any code.
1546         (parse_zip_file_entries): Don't call duplicate_class_warning
1547         here.
1548         (process_zip_dir): ... call it here.
1549         * class.c (add_field): Don't mark field external if it is being
1550         compiled into this object.
1551         (make_class_data): Handle situation where class_dtable_decl is
1552         created before Class is compiled.
1553         (is_compiled_class): Don't assume files in zip are compiled into
1554         this object.
1555         (layout_class_method): Don't mark method external if it is being
1556         compiled into this object.
1557
1558 2006-06-04  Tom Tromey  <tromey@redhat.com>
1559
1560         * jcf-path.c (jcf_path_compute): New function.
1561         * jcf.h (jcf_path_compute): Declare.
1562
1563 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1564
1565         * decl.c: Include langhooks.h.
1566         (builtin_function): Remove.
1567         (java_init_decl_processing): Replace calls to builtin_function
1568         with add_builtin_function.
1569         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1570         (java/decl.o): Depend on langhooks.h.
1571         * java-tree.h (builtin_function): Remove.
1572
1573 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1574
1575         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1576
1577 2006-09-12  Tom Tromey  <tromey@redhat.com>
1578
1579         * expr.c (push_value): Always flush quick stack.
1580
1581 2006-09-12  Tom Tromey  <tromey@redhat.com>
1582
1583         PR java/29013:
1584         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1585         the push of the called method's return result.
1586
1587 2006-09-12  Tom Tromey  <tromey@redhat.com>
1588
1589         * jvspec.c (lang_specific_driver): Read spec file even if
1590         -fsyntax-only.
1591
1592 2006-09-12  Tom Tromey  <tromey@redhat.com>
1593
1594         PR java/28754:
1595         * expr.c (expand_java_field_op): Initialize field's declaring
1596         interface if necessary.
1597
1598 2006-09-12  Tom Tromey  <tromey@redhat.com>
1599
1600         PR java/28892:
1601         * expr.c (expand_java_field_op): No error for assignments not in
1602         class initializer or constructor.
1603
1604 2006-08-22  Andrew Haley  <aph@redhat.com>
1605
1606         * decl.c (java_add_stmt): Give the statement list a type.
1607
1608 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1609             Bryce McKinlay  <bryce@mckinlay.net.nz>
1610
1611         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1612
1613 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1614
1615         PR java/8923
1616         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1617         or '--' is used with a constant operand.
1618         (java_complete_lhs): When processing a '++' or '--' expression,
1619         don't call java_complete_tree but java_complete_lhs, so that a
1620         static final variable operand is never replaced by its value. This
1621         avoids an ICE later on.
1622         (patch_unaryop): Fixed typo in comment.
1623
1624 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1625
1626         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1627
1628 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1629
1630         * builtins.c (check_for_builtin): If a builtin could result in a
1631         direct call being generated, don't use it if flag_indirect_dispatch
1632         is set.
1633
1634 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1635
1636         * gcj.texi (Invocation): Corrections for Invocation API example.
1637
1638 2006-07-04  Andrew Haley  <aph@redhat.com>
1639
1640         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1641         entry.
1642
1643 2006-06-21  Andrew Haley  <aph@redhat.com>
1644
1645         * java-tree.h (update_aliases): Remove
1646         * expr.c (expand_iinc): Remove call to update_aliases().
1647         (STORE_INTERNAL): Likewise.
1648         * decl.c (update_aliases, initialize_local_variable) 
1649         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1650
1651 2006-06-19  Andrew Haley  <aph@redhat.com>
1652
1653         PR java/1305
1654         PR java/27908
1655         * expr.c (java_modify_addr_for_volatile): New function.
1656         (expand_java_field_op): Handle volatile fields.
1657         * java-gimplify.c (java_gimplify_component_ref): Call
1658         java_modify_addr_for_volatile to give the field_ref the correct
1659         volatile type.
1660         (java_gimplify_modify_expr): Likewise.
1661         * java-tree.h (java_modify_addr_for_volatile): New decl.
1662
1663 2006-06-17  Karl Berry  <karl@gnu.org>
1664
1665         * gcj.texi (@dircategory): Use "Software development" instead
1666         of "Programming", following the Free Software Directory.
1667
1668 2006-06-16  Andrew Haley  <aph@redhat.com>
1669
1670         * class.c (make_class_data): When using flag_indirect_classes,
1671         don't initialize the vtable of Class instances.
1672
1673 2006-06-09  Andrew Haley  <aph@redhat.com>
1674
1675         PR java/1305
1676         PR java/27908
1677         * builtins.c (initialize_builtins): Add __sync_synchronize().
1678         * class.c (add_field): Mark volatile fields.
1679         * java-gimplify.c (java_gimplify_expr): Call new functions to
1680         handle self-modifying exprs and COMPONENT_REFs.
1681         (java_gimplify_component_ref): New.
1682         (java_gimplify_modify_expr): Add handling for volatiles.
1683
1684 2006-06-08  Tom Tromey  <tromey@redhat.com>
1685
1686         * gcj.texi (libgcj Runtime Properties): Document
1687         gnu.gcj.user.realname.
1688
1689 2006-06-08  Andrew Haley  <aph@redhat.com>
1690
1691         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1692         get_symbol_table_index().
1693         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1694         private method.
1695         (build_known_method_ref): New arg: special.  Pass it to
1696         get_symbol_table_index.
1697         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1698         the method list.
1699         (build_invokevirtual): New arg: special.  Pass it to
1700         get_symbol_table_index.
1701         (expand_invoke): New variable: special.
1702         Pass it to maybe_rewrite_invocation().
1703         Pass it to build_known_method_ref().
1704         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1705         build the symbol table conbstructor.
1706         (emit_symbol_table): Extract SPECIAL from the method list and pass
1707         it to build_symbol_entry().
1708         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1709         special accordingly.
1710
1711 2006-06-06  David Daney  <ddaney@avtrex.com>
1712
1713         * gcj.texi (libgcj Runtime Properties): Document
1714         gnu.gcj.runtime.NameFinder.show_raw and
1715         gnu.gcj.runtime.NameFinder.remove_unknown.
1716
1717 2006-06-06  Tom Tromey  <tromey@redhat.com>
1718
1719         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1720         synthetic, enum, annotation.
1721         * jcf.h (ACC_BRIDGE): New macro.
1722         (ACC_VARARGS): Likewise.
1723         (ACC_SYNTHETIC): Likewise.
1724         (ACC_ENUM): Likewise.
1725         (ACC_ANNOTATION): Likewise.
1726
1727 2006-06-06  Mike Stump  <mrs@apple.com>
1728
1729         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
1730         installing during build.
1731
1732 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
1733
1734         * gcj.texi (Extensions): Document the new gcj-dbtool-based
1735         classname-to-library resolution mechanism.
1736         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
1737         mechanism deprecated.
1738         (libgcj Runtime Properties): Document
1739         gnu.gcj.runtime.VMClassLoader.library_control's new default.
1740
1741 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
1742
1743         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
1744         bit wide type.
1745         (jword): Define to uint64 on 64-bit arches.
1746         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
1747
1748 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
1749
1750         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
1751         typos.
1752
1753 2006-05-26  Tom Tromey  <tromey@redhat.com>
1754
1755         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
1756         * verify-glue.c (vfy_class_type): New function.
1757         * verify-impl.c (check_constant): Allow 'ldc class'.
1758         * verify.h (vfy_class_type): Declare.
1759
1760 2006-05-25  Andrew Haley  <aph@redhat.com>
1761
1762         PR java/27756
1763         * decl.c (maybe_pushlevels): When variable ranges are non-nested
1764         update all lifetimes, not just the first one.
1765
1766 2006-05-24  Tom Tromey  <tromey@redhat.com>
1767
1768         * java-tree.h: Fixed flag documentation.
1769
1770 2006-05-24  Tom Tromey  <tromey@redhat.com>
1771
1772         PR libgcj/27729:
1773         * jcf.h (ACC_INVISIBLE): Changed value.
1774
1775 2006-05-24  Andrew Haley  <aph@redhat.com>
1776
1777         PR java/27754
1778         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
1779         COMPOUND_EXPR.
1780
1781 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1782
1783         * lang.opt (femit-class-file): Remove VarExists.
1784
1785 2006-05-16  Tom Tromey  <tromey@redhat.com>
1786
1787         * verify-impl.c (verify_instructions_0) <op_return>: Special case
1788         for Object.<init>.
1789
1790 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1791
1792         PR driver/26885
1793         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
1794         $(GCC_OBJS).
1795
1796 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1797
1798         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
1799         (java/expr.o): Replace target.h with $(TARGET_H).
1800         (java/parse.o): Likewise.
1801
1802 2006-05-10  Andrew Haley  <aph@redhat.com>
1803
1804         * class.c (emit_indirect_register_classes): Fix comment.
1805
1806 2006-05-04  Tom Tromey  <tromey@redhat.com>
1807
1808         * java-tree.h (uses_jv_markobj_p): Declare.
1809         * class.c (uses_jv_markobj_p): Removed.
1810         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
1811         (get_boehm_type_descriptor): Use it.
1812         (uses_jv_markobj_p): Moved from class.c.  Return bool.
1813
1814 2006-05-04  Tom Tromey  <tromey@redhat.com>
1815
1816         * java-tree.def (THIS_EXPR): Now a tcc_expression.
1817
1818 2006-05-04  Andrew Haley  <aph@redhat.com>
1819
1820         * class.c (make_field_value): Always build_address_of fdecl if
1821         there is an initializer.
1822
1823 2006-05-03  Andrew Haley  <aph@redhat.com>
1824
1825         PR libgcj/27352
1826         * expr.c (maybe_rewrite_invocation): New function.
1827         (rewrite_arglist_getclass): Likewise.
1828         (rules): New.
1829         (expand_invoke): Call maybe_rewrite_invocation.
1830         * parse.y (patch_invoke): Likewise.
1831         * java-tree.h: (maybe_rewrite_invocation): New function.
1832
1833 2006-04-21  Andrew Haley  <aph@redhat.com>
1834
1835         * lang.c (java_init): Handle flag_indirect_classes.
1836         * jvgenmain.c: Use "class$$" instead of "class$".
1837         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
1838         DECLs.
1839         (mangle_class_field): Special case "class$$" as well as "class$".
1840         * constants.c (build_ref_from_constant_pool): If
1841         flag_indirect_classes, generate a ref into the heap.
1842         * decl.c (constants_field_decl_node,
1843         constants_data_field_decl_node): New.
1844         * class.c (build_static_class_ref): New.
1845         (build_classdollar_field): Factor out from build_class_ref().
1846         (make_field_value): Handle static fields in heap.
1847         (make_class_data): Make sure we get a static ref to class.
1848         Make class initializer const if flag_indirect_classes.
1849         (register_class): Build a class_ref for initialization if
1850         flag_indirect_classes.
1851         (emit_indirect_register_classes): New.
1852
1853 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
1854
1855         * expr.c, gjavah.c: Fix comment typos.
1856
1857 2006-04-03  Andrew Haley  <aph@redhat.com>
1858
1859         PR java/26858
1860         * expr.c (build_field_ref): Don't check the field offset if
1861         flag_syntax_only.
1862
1863 2006-03-30  Andrew Haley  <aph@redhat.com>
1864
1865         PR java/26858
1866         * lang.c (java_attribute_table): New.
1867         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
1868         * expr.c (build_field_ref): Add a null pointer check for all
1869         fields of offset > 4k.  Don't do so for accesses via the this
1870         pointer, which we know can never be null.
1871         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
1872         methods nonnull.
1873
1874 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
1875
1876         * Make-lang.in: Rename docdir to gcc_docdir.
1877
1878 2006-03-30  Tom Tromey  <tromey@redhat.com>
1879
1880         PR java/26042:
1881         * parse.y (java_reorder_fields): Reset superclass field's size as
1882         well.
1883
1884 2006-03-28  Tom Tromey  <tromey@redhat.com>
1885
1886         PR java/26390:
1887         * parse.y (find_most_specific_methods_list): Added 'class'
1888         argument.
1889         (lookup_method_invoke): Updated.
1890
1891 2006-03-15  Tom Tromey  <tromey@redhat.com>
1892
1893         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
1894         non-static method calls.
1895
1896 2006-03-15  David Daney  <ddaney@avtrex.com>
1897
1898         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
1899         declaration.
1900
1901 2006-03-15  David Daney  <ddaney@avtrex.com>
1902
1903         * lang.opt (-freduced-reflection): New option.
1904         * lang.c (java_post_options): Generate an error if
1905         -freduced-reflection used with -fjni or -findirect-dispatch.
1906         * java-tree.h (flag_reduced_reflection): Declare new variable.
1907         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
1908         if bitmap overflows and flag_reduced_reflection set.
1909         * class.c (uses_jv_markobj_p): New function.
1910         (make_class_data): Moved generation of vtable to before
1911         reflection data, generate less reflection data if
1912         flag_reduced_reflection set.
1913         * gcj.texi: Document -freduced-reflection.
1914
1915 2006-03-15  Tom Tromey  <tromey@redhat.com>
1916
1917         PR java/26638:
1918         * class.c (get_interface_method_index): Don't put <clinit> into
1919         interface table.
1920
1921 2006-03-15  Tom Tromey  <tromey@redhat.com>
1922
1923         * parse.y (analyze_clinit_body): Ignore empty statements.
1924
1925 2006-03-08  David Daney  <ddaney@avtrex.com>
1926
1927         * gcj.texi: Document -static-libgcj option.
1928
1929 2006-02-20  Andrew Haley  <aph@redhat.com>
1930
1931         * jcf-parse.c (parse_class_file): Set input_location from
1932         current_class.
1933
1934 2006-02-15  Andrew Haley  <aph@redhat.com>
1935
1936         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
1937         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
1938         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
1939
1940 2006-02-09  Andrew Haley  <aph@redhat.com>
1941
1942         PR java/26192
1943         * expr.c (expand_invoke): Allow methods in arrays to be resolved
1944         in their superclass.
1945
1946         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
1947         array types.
1948         
1949 2006-02-08  Tom Tromey  <tromey@redhat.com>
1950
1951         PR java/22578:
1952         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
1953         * builtins.c (convert_real): New function.
1954         (java_builtins): Handle Float.intBitsToFloat,
1955         Float.floatToRawIntBits, Double.longBitsToDouble,
1956         Double.doubleToRawLongBits.
1957
1958 2006-02-07  Andrew Haley  <aph@redhat.com>
1959
1960         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
1961         class other than the one in which we expected to find it, ignore
1962         the result.
1963
1964         PR java/25535
1965         * constants.c (build_constants_constructor): move initializer into
1966         first halfword on a 64-bit big-endian machine.
1967
1968 2006-02-04  Tom Tromey  <tromey@redhat.com>
1969
1970         PR java/25676:
1971         * builtins.c (max_builtin): Skip floating point 'max'.
1972         (min_builtin): Skip floating point 'min'.
1973         (check_for_builtin): Never return NULL_TREE.
1974
1975 2006-02-04  Tom Tromey  <tromey@redhat.com>
1976
1977         PR java/26097:
1978         * expr.c (push_type): Avoid side effect in gcc_assert.
1979
1980 2006-02-04  Roger Sayle  <roger@eyesopen.com>
1981
1982         * decl.c (java_init_decl_processing): Create char_type_node as a
1983         regular INTEGER_TYPE node.
1984         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
1985         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
1986         test for char_type_node and promoted_char_type_node as special
1987         instances of INTEGER_TYPE tree codes.
1988         (promote_type,build_java_signature): Likewise.
1989         * jcf-write.c (adjust_typed_op): Likewise.
1990         * mangle.c (mangle_type): Likewise.
1991         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
1992         * parse.h (JINTEGRAL_TYPE_P): Likewise.
1993
1994 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
1995
1996         * expr.c (java_stack_swap): Revert gcc_assert patch.
1997
1998 2006-02-03  Ben Elliston  <bje@au.ibm.com>
1999
2000         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2001         * typeck.c: Likewise.
2002         * verify-impl.c: Likewise.
2003         * class.c: Likewise.
2004         * decl.c: Likewise.
2005         * jcf-parse.c: Likewise.
2006         * constants.c: Likewise.
2007         * check-init.c: Likewise.
2008         * jcf-write.c: Likewise.
2009         * verify-glue.c: Likewise.
2010         * mangle.c: Likewise.
2011         * expr.c: Likewise.
2012         * lang.c: Likewise.
2013         * boehm.c: Likewise.
2014
2015 2006-02-01  Jan Hubicka  <jh@suse.cz>
2016
2017         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2018         * lang.c (java_init_options): Set no_unit_at_a_time_default.
2019
2020 2006-01-30  Andrew Haley  <aph@redhat.com>
2021
2022         PR java/21428
2023         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2024
2025 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
2026
2027         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2028         Update copyright notice dates.
2029
2030 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2031
2032         * jvspec.c (lang_specific_spec_functions): Remove.
2033
2034 2006-01-06  Tom Tromey  <tromey@redhat.com>
2035
2036         * gcj.texi (Arrays): Added more documentation for
2037         JvNewObjectArray.
2038         (Primitive types): Correct information about primitive classes.
2039         (Reference types): New node.
2040         (Index): New node.
2041
2042 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
2043
2044         * jcf-parse.c (set_source_filename): Set the decl source location
2045         even when returning early.
2046
2047 2005-12-15  Tom Tromey  <tromey@redhat.com>
2048             Andrew Haley  <aph@redhat.com>
2049
2050         PR java/25429
2051         * parse.y (resolve_expression_name): Don't generate accessor
2052         methods for constant fields.
2053
2054 2005-12-13  Andrew Haley  <aph@redhat.com>
2055
2056         PR java/25366
2057         PR java/25368
2058         * class.c (maybe_layout_super_class): Update current_class before
2059         calling do_resolve_class.
2060
2061 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
2062
2063         PR java/25330
2064         * jcf-write.c (write_classfile): Use PID in temporary class
2065         file. Save/restore errno when reporting error.
2066
2067 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2068
2069         PR java/9861
2070         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2071         to bare_function_type and including the return type
2072         * builtins.c (initialize_builtins) : Change builtin mangled name
2073         constants to conform to new mangling scheme
2074
2075 2005-12-08  Andrew Haley  <aph@redhat.com>
2076
2077         PR libgcj/25265
2078         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2079         (soft_abstractmethod_node): New.
2080         * expr.c (build_field_ref): Add in-line check for missing field.
2081         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2082
2083 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2084
2085         * Make-lang.in (java.all.build, java.install-normal): Remove.
2086
2087 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2088
2089         * Make-lang.in: Remove all dependencies on s-gtype, except for
2090         gt-java-parse.h.
2091
2092 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
2093
2094         * class.c (build_utf8_ref, emit_register_classes): Use
2095         switch_to_section and get_section.
2096
2097 2005-12-06  Tom Tromey  <tromey@redhat.com>
2098
2099         PR java/25283:
2100         * parse.y (patch_new_array_init): Revert previous patch.
2101         (lookup_method_invoke): Use size-less array type when creating an
2102         anonymous constructor.
2103
2104 2005-12-05  Tom Tromey  <tromey@redhat.com>
2105
2106         * parse.y (patch_new_array_init): Don't set length on array.
2107
2108 2005-12-02  Richard Guenther  <rguenther@suse.de>
2109
2110         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2111         buildN instead of build.
2112         * class.c (finish_class): Likewise.
2113         * expr.c (java_create_object): Likewise.
2114
2115 2005-11-28  Tom Tromey  <tromey@redhat.com>
2116
2117         PR java/18278:
2118         * expr.c (build_jni_stub): Unwrap the return value.
2119         * java-tree.h (soft_unwrapjni_node): New define.
2120         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2121         * decl.c (java_init_decl_processing): Initialize
2122         soft_unwrapjni_node.
2123
2124 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
2125
2126         * gcj.texi (gij options): Add -Xss documentation.
2127
2128 2005-11-08  Wil Mahan  <wmahan@gmail.com>
2129
2130         PR java/23617
2131         * zextract.c (read_zip_archive): Fix out of memory error when
2132         reading jar files with zip-style comments.
2133
2134 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
2135
2136         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2137         formats.
2138         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2139
2140 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2141             Wil Mahan <wmahan@gmail.com>
2142
2143         PR java/23620
2144         * class.c (make_class): Create empty binfo here.
2145         (set_super_info): Only create binfo if we have superclasses.
2146
2147 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
2148
2149         PR java/24127
2150         * parse.y (method_header): Make the result of the rule a NULL_TREE
2151         when a parsing error occurs.
2152
2153 2005-09-29  Tom Tromey  <tromey@redhat.com>
2154
2155         PR java/24120:
2156         * jcf-io.c (memoized_dirlist_hash): New function.
2157         (caching_stat): Use it.
2158
2159 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
2160
2161         PR java/21418
2162         * class.c (inherits_from_p): Try to lay out super class
2163         if it is not already laid out.
2164         (maybe_layout_super_class): Handle the case where SUPER_CLASS
2165         is a NULL_TREE.
2166
2167 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
2168
2169         * builtins.c (max_builtin, min_builtin, abs_builtin,
2170         java_build_function_call_expr): Use fold_buildN.
2171         * class.c (layout_class_method): Likewise.
2172         * expr.c (java_truthvalue_conversion, build_java_jsr,
2173         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2174         build_java_binop, build_field_ref, expand_compare,
2175         build_known_method_ref, build_invokevirtual,
2176         process_jvm_instruction): Likewise.
2177         * parse.y (patch_binop, patch_exit_expr): Likewise.
2178         * typeck.c (convert_ieee_real_to_integer): Likewise.
2179         (convert): Don't call fold after convert_ieee_real_to_integer.
2180
2181 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
2182
2183         PR java/23891
2184         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2185         the newly created type. Set import lists here, not in create_class.
2186         (jdep_resolve_class): Set current_class.
2187         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
2188         the current package context, not ctxp->package.
2189         (cicp_cache): Removed.
2190         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2191         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2192         * java-tree.h (TYPE_PACKAGE): New macro.
2193         (struct lang_type): New member 'package'.
2194
2195 2005-09-09  Andrew Haley  <aph@redhat.com>
2196
2197         PR libgcj/23182 
2198         * expr.c (pop_type_0): If the expected type is object or ptr
2199         (i.e. void*), return the type of the object we just popped from
2200         the stack.
2201
2202 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
2203
2204         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2205         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2206
2207 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
2208
2209         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2210         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2211         typos.  Follow spelling conventions.
2212
2213 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
2214
2215         PR java/23431
2216         * typeck.c (lookup_do): Look up interfaces for the original class,
2217         not the base class.
2218         * parse.y (java_check_regular_methods): Fix diagnostic message for
2219         more restrictive overriding of a method from an interface.
2220
2221 2005-08-16  Tom Tromey  <tromey@redhat.com>
2222
2223         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2224         class' initial state.
2225
2226 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2227
2228         PR java/22113
2229         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2230         `literal_token' for large numeric input tokens.
2231
2232 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2233
2234         PR java/19870
2235         * parse.y (nested_field_access_p): Rename to nested_member_access_p
2236         and expand to handle method accesses across nested classes.
2237         (build_outer_method_access_method): Rename to
2238         build_nested_method_access_method.  Minor adjustments to comments.
2239         (resolve_expression_name): Use the newly-renamed
2240         nested_member_access_p method.
2241         (resolve_qualified_expression_name): Likewise.
2242         (patch_method_invocation): Also consider static methods for access
2243         method generation.  Minor adjustments to comments.
2244         (maybe_use_access_method): Use the more general
2245         nested_memeber_access_p to determine access across nested class
2246         boundaries.  Allow THIS_ARG to be NULL (for static methods).
2247
2248 2005-08-15  Tom Tromey  <tromey@redhat.com>
2249
2250         PR java/23300.
2251         * expr.c (build_field_ref): Don't generate otable reference when
2252         DECL_FIELD_OFFSET is 0.
2253         * class.c (maybe_layout_super_class): Pass outer class to
2254         do_resolve_class.
2255
2256 2005-08-15  Tom Tromey  <tromey@redhat.com>
2257
2258         * java-tree.h (LABEL_IN_SUBR): Removed.
2259         (LABEL_IN_SUBR): Likewise.
2260         (LABEL_IS_SUBR_START): Likewise.
2261         (LABEL_SUBR_START): Likewise.
2262         (LABEL_SUBR_CONTEXT): Likewise.
2263         (LABEL_CHANGED): Likewise.
2264         (LABEL_RETURN_LABEL): Likewise.
2265         (LABEL_RETURN_TYPE_STATE): Likewise.
2266         (LABEL_RETURN_LABELS): Likewise.
2267         (RETURN_MAP_ADJUSTED): Likewise.
2268         (LABEL_PENDING_CHAIN): Likewise.
2269
2270 2005-08-15  Tom Tromey  <tromey@redhat.com>
2271
2272         * Make-lang.in (JAVA_OBJS): Removed verify.o
2273         (java/verify.o): Removed.
2274         * verify.c: Removed.
2275         * lang.c (flag_new_verifier): Removed.
2276         (java_post_options): Updated.
2277         * java-tree.h (flag_new_verifier): Removed.
2278         (verify_jvm_instructions): Removed.
2279         * expr.c (pop_type_0): Assume flag_new_verifier is true.
2280         (build_java_check_indexed_type): Likewise.
2281         (expand_java_arraystore): Likewise.
2282         (expand_java_arrayload): Likewise.
2283         (pop_arguments): Likewise.
2284         (expand_byte_code): Likewise.
2285         (process_jvm_instruction): Likewise.
2286
2287 2005-08-10  Andrew Haley  <aph@redhat.com>
2288
2289         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2290         type mismatches to make legal GIMPLE.
2291
2292 2005-08-10  Robin Green <greenrd@greenrd.org>
2293
2294         PR java/23230:
2295         * parse.y (maybe_use_access_method): Generalize check from
2296         java.lang.Object to any superclass of current_class
2297
2298 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2299
2300         * class.c (build_class_ref): Wrap the primary class type in a
2301         NOP_EXPR.
2302         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2303         primary class type from the NOP_EXPR in which it was placed.
2304
2305 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
2306
2307         * expr.c (expand_load_internal): Fix missing parens in
2308         predicate.
2309
2310 2005-07-28  Andrew Haley  <aph@redhat.com>
2311
2312         * expr.c (expand_load_internal): Convert to destination type.
2313
2314 2005-07-22  Manfred Hollstein  <mh@suse.com>
2315
2316         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2317         (check_constant): Likewise.
2318         (check_wide_constant): Likewise.
2319
2320 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2321
2322         Make CONSTRUCTOR use VEC to store initializers.
2323         * check-init.c (check_init): Update to cope with VEC in
2324         CONSTRUCTOR_ELTS.
2325         * class.c (make_field_value, make_method_value, get_dispatch_table,
2326         make_class_data, emit_symbol_table, emit_catch_table,
2327         emit_assertion_table): Use build_constructor_from_list instead of
2328         build_constructor.
2329         * constants.c (build_constants_constructor): Likewise.
2330         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2331         VEC in CONSTRUCTOR_ELTS.
2332         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2333         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2334         of a TREE_LIST.
2335         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2336         CONSTRUCTOR_ELTS.
2337         * parse.y (build_new_array_init): Use build_constructor_from_list
2338         instead of build_constructor.
2339         (patch_new_array_init): Update to cope with VEC in
2340         CONSTRUCTOR_ELTS.
2341         (array_constructor_check_entry): Likewise.
2342
2343 2005-07-12  Tom Tromey  <tromey@redhat.com>
2344
2345         * jvspec.c (lang_specific_driver): Put filelist_filename first on
2346         command line.
2347
2348 2005-07-12  Tom Tromey  <tromey@redhat.com>
2349
2350         PR java/19674:
2351         * parse-scan.y (interface_member_declaration): Added
2352         empty_statement.
2353
2354 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2355         
2356         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2357         (LABEL_PENDING_CHAIN): Ditto.
2358         (LABEL_PC): Ditto.
2359         (DECL_BIT_INDEX): Ditto.        
2360
2361 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2362
2363         PR java/18119
2364         * parse.y (inner_class_accessible): New function. Logic moved from
2365         check_inner_class_access.
2366         (check_inner_class_access): Use inner_class_accessible.
2367         (resolve_inner_class): Simplify arguments. Create circularity hash
2368         here. Keep looking for classes if we found one that was inaccessible. 
2369         Return the inaccessible class only if there is no other match.
2370         (do_resolve_class): Update for new resolve_inner_class arguments.
2371         Don't create circularity_hash here.
2372
2373 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2374
2375         PR java/21045
2376         * parse.y (add_exception_to_throws): New function.
2377         (purge_unchecked_exceptions): Removed.
2378         (get_constructor_super): Renamed from verify_constructor_super. Now
2379         returns the super constructor after verification.
2380         (java_complete_expand_method): Don't use purge_unchecked_exceptions
2381         or save/restore the exception list.
2382         (check_thrown_exceptions): Add uncaught exceptions in anonymous
2383         class initializers and constructors to the throws clause of the method. 
2384
2385 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
2386
2387         PR java/19674
2388         * parse.y (interface_member_declaration): Allow empty statements in
2389         interface declarations.
2390
2391 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2392
2393         * Makefile.in (parse.o): Adjust dependencies.
2394         * parse.y: Include tree-dump.h.
2395
2396 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2397
2398         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
2399         flag for quoting.
2400
2401 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2402
2403         * parse.y (issue_warning_error_from_context): Call
2404         pp_output_formatted_text to be able to get the buffer.
2405
2406 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
2407
2408         * parse.y (issue_warning_error_from_context): Update for the
2409         renaming of pp_format_text to pp_format.
2410
2411 2005-06-28  Paul Brook  <paul@codesourcery.com>
2412
2413         * decl.c (java_init_decl_processing): Call
2414         default_init_unwind_resume_libfunc.
2415
2416 2005-06-27  Tom Tromey  <tromey@redhat.com>
2417
2418         PR java/21540, PR java/13788:
2419         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2420         fold_constant_for_init.
2421         (patch_binop): Added 'folding' argument.  Updated all callers.
2422         (patch_unaryop) <NOP_EXPR>: New case.
2423         (fold_constant_for_init) <NOP_EXPR>: Likewise.
2424         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2425
2426 2005-06-25  Jan Hubicka  <jh@suse.cz>
2427
2428         * builtins.c (define_builtin): Accept new flags parameter.
2429         (initialize_builtins): Mark the builtins const and nothrow accordingly.
2430
2431 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2432
2433         * all files: Update FSF address in copyright headers.
2434
2435 2005-06-24  Tom Tromey  <tromey@redhat.com>
2436
2437         * verify-impl.c (verify_instructions_0): Correctly handle
2438         situation where PC falls off end.
2439
2440 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2441
2442         PR java/20697
2443         * parse.y (find_most_specific_methods_list): Remove special case for
2444         inner classes.
2445
2446 2005-06-15  Tom Tromey  <tromey@redhat.com>
2447
2448         PR libgcj/21906:
2449         * class.c (make_method_value): Use soft_abstractmethod_node for
2450         abstract method.
2451         * java-tree.h (soft_abstractmethod_node): New define.
2452         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2453         * decl.c (java_init_decl_processing): Initialize
2454         soft_abstractmethod_node.
2455
2456 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
2457
2458         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2459
2460 2005-06-13  Per Bothner  <per@bothner.com>
2461
2462         * expr.c (int highest_label_pc_this_method,
2463         start_label_pc_this_method): New globals.
2464         (lookup_label): Add start_label_pc_this_method to pc for label, and
2465         update highest_label_pc_this_method.  This prevents conflicts between
2466         labels from different methods.
2467         * java-tree.h: Declare new globals.
2468         * jcf-parse.c (parse_class_file): If needed bump
2469         start_label_pc_this_method and reset highest_label_pc_this_method.
2470
2471 2005-06-13  Tom Tromey  <tromey@redhat.com>
2472
2473         PR java/21844:
2474         * parse.y (nested_field_access_p): Handle case where outer field
2475         is inherited by enclosing class.
2476
2477 2005-06-12  Per Bothner  <per@bothner.com>
2478
2479         * class.c (inherits_from_p): Do load_class if needed.
2480
2481 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2482
2483         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2484         * java-tree.h (parse_error_context): Move...
2485         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2486         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2487         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2488
2489 2005-06-08  Roger Sayle  <roger@eyesopen.com>
2490
2491         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2492
2493 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
2494
2495         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2496         msgid for argument name.
2497         * gjavah.c (error): Likewise.
2498         * java-tree.h (parse_error_context): Likewise.
2499         * parse.y (parse_error_context, parse_warning_context,
2500         issue_warning_error_from_context): Likewise.
2501
2502 2005-06-01  Tom Tromey  <tromey@redhat.com>
2503
2504         PR java/21722:
2505         * class.c (build_static_field_ref): Don't fold constant fields if
2506         current class is from a .class file and we're using indirect
2507         dispatch.
2508
2509 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2510
2511         * java/verify-glue.c: Don't include errors.h and include toplev.h.
2512         * java/Make-lang.in: Updates dependencies.
2513
2514 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
2515
2516         PR java/19870.
2517         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2518         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2519         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2520         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2521         * jcf-write.c (generate_classfile): Use
2522         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2523         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2524         * parse.y (build_outer_field_access): Rename to
2525         build_nested_field_access. Support static fields and outer-to-inner
2526         class accesses.
2527         (outer_field_access_p): Rename to nested_field_access_p. Support
2528         static fields and generalise to outer-to-inner class and sibling
2529         inner class accesses.
2530         (outer_field_expanded_access_p): Rename to
2531         nested_field_expanded_access_p and support static fields.
2532         (outer_field_access_fix): Rename to nested_field_access_fix and
2533         support static fields.
2534         (build_outer_field_access_expr): Rename to
2535         build_nested_field_access_expr and support static fields.
2536         (build_outer_field_access_methods): Rename to
2537         build_nested_field_access_methods and support static fields. For
2538         static fields, generate accessors without class instance parameters.
2539         (build_outer_field_access_method): Rename to
2540         build_nested_field_access_method and support static fields.
2541         (build_outer_method_access_method): Use
2542         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2543         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2544         (resolve_expression_name): Consider static field accesses across
2545         nested classes.
2546         (resolve_qualified_expression_name): Likewise.
2547         (java_complete_lhs): Use nested_field_access_fix instead of
2548         outer_field_access_fix.
2549         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2550         Use nested_field_expanded_access_p instead of
2551         outer_field_expanded_access_p. Use nested_field_access_fix instead
2552         of outer_field_access_fix.
2553         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2554         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2555
2556 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2557
2558         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2559         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2560         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2561         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2562         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2563         (parse_version): Calculate version ID using new method. Use bit-flags
2564         for flag_indirect_dispatch and flag_bootstrap_classes.
2565
2566 2005-05-25  Richard Henderson  <rth@redhat.com>
2567
2568         PR libgcj/21692
2569         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2570         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2571         DECL_CONTEXT; avoid pushdecl_top_level.
2572         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2573         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2574         (layout_class_method): Likewise.
2575         * decl.c (java_mark_cni_decl_local): New.
2576         (java_mark_class_local): Use it.
2577         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2578         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2579         (struct lang_decl_func): Add local_cni;
2580         (struct lang_decl_var): Add class_field, vtable.
2581         (java_mangle_decl): Declare.
2582         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2583         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2584         (mangle_obstack_1): New.
2585         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2586         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2587         lhd_set_decl_assembler_name for things that don't need mangling.
2588         (mangle_class_field): Rename from java_mangle_class_field, make
2589         static, don't call init_mangling or finish_mangling.
2590         (mangle_vtable): Similarly.
2591         (mangle_local_cni_method_decl): New.
2592         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2593         gcc_assert, and MANGLE_RAW_STRING.
2594         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2595
2596 2005-05-25  DJ Delorie  <dj@redhat.com>
2597
2598         * class.c (set_constant_value): Move warning control from if() to
2599         warning(OPT_*).
2600
2601 2005-05-24  Richard Henderson  <rth@redhat.com>
2602
2603         * builtins.c (define_builtin): Don't call make_decl_rtl.
2604         * constants.c (build_constant_data_ref): Likewise.
2605         * class.c (build_utf8_ref): Likewise.
2606         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2607         (get_dispatch_table, layout_class_method): Likewise.
2608         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2609         by hand.
2610         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2611         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2612         to determine if we need a non-zero address.
2613         * decl.c (builtin_function): Don't call make_decl_rtl.
2614         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2615         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2616         * resource.c (compile_resource_data): Likewise.
2617         * parse.y (resolve_field_access): Re-word comment to avoid
2618         building DECL_RTL.
2619
2620 2005-05-24  Richard Henderson  <rth@redhat.com>
2621
2622         * class.c (registered_class): Take it out of class_roots; turn into
2623         a vec of trees.
2624         (register_class): Make static.  Don't duplicate decl node.  Use
2625         VEC_safe_push.
2626         (emit_register_classes): Use VEC_iterate.  Use output_constant
2627         instead of assemble_integer.  Don't call mark_decl_referenced
2628         directly.
2629         * java-tree.h (register_class): Remove decl.
2630
2631 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2632
2633         PR java/17845
2634
2635         * parse.y (register_package, package_list): Remove.
2636         (package_declaration): Do not call register_package.
2637         (do_resolve_class): Do not use package_list.
2638
2639 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2640
2641         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2642         unused variable.
2643
2644 2005-05-15  Tom Tromey  <tromey@redhat.com>
2645
2646         PR java/21519:
2647         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2648         NOTE_PUSH.
2649
2650 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2651
2652         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2653
2654 2005-05-11  Tom Tromey  <tromey@redhat.com>
2655
2656         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2657         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2658         (parse_version): Use it.
2659         * lang.opt (-fbootstrap-classes): New option.
2660
2661 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2662
2663         PR java/21436
2664         * class.c (maybe_layout_super_class): Look for imports in this_class.
2665         * parse.h (ctxp_for_generation_last): New.
2666         (do_resolve_class): Add a parameter.
2667         * parse.y (ctxp_for_generation_last): New.
2668         (java_pop_parser_context): Add at end of list.
2669         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2670         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2671         the given type are NULL.
2672         (do_resolve_class): Look into the imports of the new second parameter.
2673         Adjust recursive calls.
2674         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
2675         calls to do_resolve_class.
2676         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
2677         (java_complete_class): Do not do that here.
2678
2679 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
2680
2681         PR java/20309
2682         * Make-lang.in (java): Add gjnih.
2683         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2684         (GJNIH_OBJS): New variable.
2685         (gjnih$(exeext)): New target.
2686         (JAVA_MANFILES): Add gjnih.1.
2687         (java.uninstall): Add gjnih.1.
2688         (java.mostlyclean): Add gjnih.
2689         (java.maintainer-clean): Add gjnih.1.
2690         (java/gjavah-jni.o): New target.
2691         (.INTERMEDIATE): Add gjnih.pod.
2692         (gjnih.pod): New target.
2693         * config-lang.in (stagestuff): Add gjnih.
2694         * gcj.texi (Top): Add gjnih node.
2695         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
2696         -bootclasspath options.
2697         (Invoking gjnih): New node.
2698         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
2699         (TOOLNAME): New macro.
2700         (error): Replace hard-coded gcjh with TOOLNAME.
2701         (process_file): Likewise.
2702         (usage): Likewise.
2703         (version): Likewise.
2704         (help): Likewise.  Add help output for -force, -old, -trace and -J
2705         options.
2706         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
2707         (options): Add force, old, trace and J fields.
2708         (main): Handle -force, -old, -trace and -J options.
2709
2710 2005-05-03  Tom Tromey  <tromey@redhat.com>
2711
2712         PR java/21245:
2713         * gjavah.c (main): Unlink output file on error.
2714
2715 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
2716
2717         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
2718         copyright.
2719
2720 2005-04-29  Tom Tromey  <tromey@redhat.com>
2721
2722         * expr.c (build_jni_stub): Updated for change to build_block.
2723
2724 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
2725
2726         * expr.c (force_evaluation_order): Declare 'saved' earlier.
2727
2728 2005-04-28  Andrew Haley  <aph@redhat.com>
2729
2730         PR java/19285
2731         * java-tree.h (soft_resolvepoolentry_node): New.
2732         (alloc_constant_fieldref): Declare.
2733         * expr.c (expand_java_field_op): Don't call class_init for
2734         accesses to static fields with indirect dispatch.
2735         * builtins.c (initialize_builtins): Add "__builtin_expect".
2736         * decl.c (soft_resolvepoolentry_node): New variable.
2737         (java_init_decl_processing): Create a decl for
2738         "_Jv_ResolvePoolEntry".
2739         * class.c (build_fieldref_cache_entry): New function.
2740         (build_static_field_ref): Rewrite for indirect dispatch.
2741         * constants.c (find_name_and_type_constant_tree): New function.
2742         (alloc_constant_fieldref): Likewise.
2743         (build_constants_constructor): Handle CONSTANT_Fieldref and
2744         CONSTANT_NameAndType.
2745
2746         PR java/21115
2747         * expr.c (force_evaluation_order): Convert outgoing args smaller
2748         than integer.
2749
2750 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
2751
2752         * gcj.texi (libgcj Runtime Properties): Remove obsolete
2753         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
2754         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
2755
2756 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2757
2758         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
2759         to `unlock_stream' with `unlock_std_streams'.
2760
2761 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
2762
2763         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
2764         instead of just expr.h.
2765
2766 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2767
2768         * gjavah.c (main): Unlock the stdio streams.
2769         * jcf-dump.c (main): Likewise.
2770         * jv-scan.c (main): Likewise.
2771         * jvgenmain.c (main): Likewise.
2772
2773 2005-04-23  DJ Delorie  <dj@redhat.com>
2774
2775         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
2776         parse.y: Adjust warning() callers.
2777
2778 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
2779
2780         * gcj.texi (Object fields): Change "Integer" to "Int" in example
2781         contructor.
2782
2783 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
2784
2785         * gcj.texi: Fix typos and bogus example.
2786
2787 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
2788
2789         * except.c: Fix a comment typo.
2790
2791 2005-04-19  Julian Brown  <julian@codesourcery.com>
2792
2793         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
2794         indirect dispatch with PIC.
2795
2796 2005-04-18  Andrew Haley  <aph@redhat.com>
2797
2798         * java-except.h (struct eh_range.handler): Remove unused field.
2799         (handle_nested_ranges): Remove function declaration.
2800         (sanity_check_exception_range): Add function declaration.       
2801         * verify.c (verify_jvm_instructions): Remove call to
2802         handle_nested_ranges.
2803         * verify-glue.c (verify_jvm_instructions_new): Call
2804         sanity_check_exception_range.
2805         * except.c (link_handler, eh_range_freelist, link_handler,
2806         handle_nested_ranges): Remove.
2807         (add_handler): Rewrite.
2808         (sanity_check_exception_range): New function.
2809         (print_ranges): New function.
2810
2811 2005-04-13  Julian Brown  <julian@codesourcery.com>
2812
2813         * decl.c (finish_method): Give methods once-only linkage.
2814
2815 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
2816
2817         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
2818
2819 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2820
2821         * java-tree.h: Don't use PARAMS().
2822
2823 2005-04-07  Per Bothner  <per@bothner.com>
2824
2825         * class.c (push_class): By default, suppress debug output.
2826         (finish_class): Enable debug output for classes we're emitting.
2827
2828 2005-04-07  Andrew Haley  <aph@redhat.com>
2829
2830         * gcj.texi: Correct gcj-dbtool instructions.
2831
2832 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
2833
2834         * gcj.texi: Fix a typo.
2835         * lang.c: Fix a comment typo.
2836
2837 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
2838
2839         * gcj.texi (Invoking gij): Add descriptions of new -X options.
2840         Mention recognized-and-ignored compatibility options.
2841         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
2842         JvFree.
2843         (About CNI): Add Memory allocation section.
2844
2845 2005-04-01  Tom Tromey  <tromey@redhat.com>
2846
2847         * decl.c (java_init_decl_processing): Fix types of
2848         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
2849         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
2850         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
2851
2852 2005-03-31  Jan Hubicka  <jh@suse.cz>
2853
2854         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
2855         * class.c: Include cgraph.h
2856         (make_local_functoin_alias): Mark aslias as needed.
2857         * resource.c: Include cgraph.h
2858         (compile_resource_data): Go via cgraph interface.
2859
2860 2005-03-30  Ian Lance Taylor  <ian@airs.com>
2861
2862         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
2863
2864 2005-03-30  Tom Tromey  <tromey@redhat.com>
2865
2866         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
2867         inner_class_info_index==0 or outer_class_info_index==0.
2868
2869 2005-03-29  Tom Tromey  <tromey@redhat.com>
2870
2871         * gcj.texi (libgcj Runtime Properties): Document
2872         gnu.gcj.runtime.endorsed.dirs.
2873
2874 2005-03-24  Anthony Green  <green@redhat.com>
2875
2876         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
2877         'gcj-dbtool -p'.
2878
2879 2005-03-23  Tom Tromey  <tromey@redhat.com>
2880
2881         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
2882         (parse_version): Use it.
2883
2884 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
2885
2886         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
2887
2888 2005-03-18  Andrew Haley  <aph@redhat.com>
2889
2890         PR java/20522
2891         * decl.c (update_aliases): Don't update variables that are about
2892         to die.
2893         (maybe_poplevels): Add comment.
2894
2895 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
2896
2897         PR java/20502
2898         * jcf-parse.c (duplicate_class_warning): New function.
2899         (java_parse_file): Call duplicate_class_warning if 
2900         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
2901         (parse_zip_file_entries): Likewise. Also set
2902         CLASS_FROM_CURRENTLY_COMPILED_P.
2903
2904 2005-03-16  Andrew Haley  <aph@redhat.com>
2905
2906         * expr.c (expand_java_arrayload): Don't generate a
2907         NullPointerException based on the type of the node.
2908         (build_java_array_length_access): Likewise.
2909
2910 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
2911
2912         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
2913
2914 2005-03-11  Tom Tromey  <tromey@redhat.com>
2915
2916         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
2917         (libgcj Runtime Properties): Document the default .db.
2918
2919 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
2920
2921         PR java/20312
2922         * parse.y (checks_throws_clauses): Check exceptions list even when
2923         the base class does not come from a source file being compiled.
2924         (java_complete_lhs): Remove unused variable 'wfl'.
2925
2926 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
2927
2928         PR java/20338
2929         * decl.c (finish_method): Emit _Jv_InitClass for private static
2930         methods inside inner classes as well.
2931
2932 2005-03-08  Julian Brown  <julian@codesourcery.com>
2933         * Revert patch from 2005-03-08 for causing bootstrap failure on
2934         ppc-darwin.
2935
2936 2005-03-08  Julian Brown  <julian@codesourcery.com>
2937
2938         * decl.c (finish_method): Give methods once-only linkage.
2939
2940 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2941
2942         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
2943
2944 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
2945
2946         * verify-glue.c (vfy_is_assignable_from): Perform static check using
2947         can_widen_reference_to if the C++ ABI is in use.
2948         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
2949         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
2950         type_isresolved, init_state, set_pc, state_get_pc,
2951         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
2952         (verify_fail): Report the current PC from the verifier context.
2953         (free_state): Remove #if 0 block to enable this function.
2954         (free_verifier_context): Call free_state on state_list iterator
2955         values before freeing them.
2956         * expr.c (pop_type_0): Pop correct type for error message when stack
2957         contains a multi-word type.
2958
2959 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
2960
2961         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
2962         for known NULL array length access.
2963
2964 2005-03-07  Tom Tromey  <tromey@redhat.com>
2965
2966         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
2967
2968 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
2969
2970         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
2971         typeck.c: Update copyright.
2972
2973 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
2974
2975         Remove xref code.
2976         * xref.c, xref.h: Remove file.
2977         * Make-lang.in (java/xref.o): Remove.
2978         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
2979         * lang.c (flag_emit_xref): Remove definition.
2980         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
2981         * typeck.c (convert): Remove use of do_not_fold.
2982         * parse.y (do_not_fold): Remove definition.
2983         (parser grammar): Remove xref code.
2984         (maybe_create_class_interface_decl, create_class): Likewise.
2985         (register_fields, method_header, finish_method_declaration): Likewise.
2986         (declare_local_variables, source_end_java_method): Likewise.
2987         (java_complete_expand_classes): Do not set do_not_fold.
2988         (java_complete_expand_method): Remove xref code.
2989         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
2990         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
2991         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
2992         (patch_synchronized_statement, patch_throw_statement): Likewise.
2993         (maybe_build_class_init_for_field): Likewise.
2994
2995 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
2996
2997         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
2998         instead of IS_NON_TYPE_CODE_CLASS.
2999
3000 2005-03-04  Andrew Haley  <aph@redhat.com>
3001
3002         PR java/18362
3003         * class.c (set_method_index): Don't set method_index if it is
3004         NULL_TREE.
3005         (layout_class_method): Don't complain about "non-static method foo
3006         overrides static method" in the case of indirect dispatch.
3007
3008 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3009
3010         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3011         warning.
3012         * Make-lang.in: Don't elide warnings in jcf-io.c.
3013
3014 2005-03-01  Per Bothner  <per@bothner.com>
3015
3016         PR java/8608
3017         * check-init.c (wfl): Remove static.
3018         (final_assign_error, check_init): Replace calls to parse_error_context
3019         by plain error.
3020         (check_init): Save, set, and restore input_location for each exp.
3021
3022 2005-03-01  Per Bothner  <per@bothner.com>
3023
3024         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3025         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3026         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3027
3028 2005-03-01  Per Bothner  <per@bothner.com>
3029
3030         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3031
3032 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3033
3034         PR libgcj/16923
3035         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3036         JvVMOption.
3037
3038 2005-02-22  Tom Tromey  <tromey@redhat.com>
3039
3040         PR java/20056:
3041         * verify-impl.c (EITHER): New define.
3042         (types_compatible): Handle it.
3043         (check_field_constant): Use it.
3044
3045 2005-02-18  Tom Tromey  <tromey@redhat.com>
3046
3047         PR java/20056:
3048         * verify-impl.c (types_equal): Fixed test.
3049
3050         PR java/20056:
3051         * verify-glue.c (vfy_class_has_field): New function.
3052         * verify.h (vfy_class_has_field): Declare.
3053         * verify-impl.c (check_field_constant): Added 'putfield'
3054         argument.
3055         (verify_instructions_0): Updated.
3056         (types_equal): New function.
3057
3058 2005-02-14  Tom Tromey  <tromey@redhat.com>
3059
3060         PR java/19921:
3061         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3062         stack effect of multianewarray.
3063
3064 2005-02-14  Andrew Haley  <aph@redhat.com>
3065
3066         PR java/19907
3067         * expr.c (expand_byte_code): Call promote_arguments().
3068         (promote_arguments): New function.
3069         * decl.c (check_local_unnamed_variable): Remove special case for
3070         new verifier.
3071         (find_local_variable): Promote all boolean types to int
3072         when searching for local variable decls.
3073
3074 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
3075
3076         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3077         parse-scan.y: Update copyright.
3078
3079 2005-02-11  Per Bothner  <per@bothner.com>
3080
3081         PR java/15543
3082         * parse-scan.y (input_location): Remove variable.
3083         (main_input_filename): New - replaces input_filename, which isn't
3084         settable if USE_MAPPED_LOCATION.
3085         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3086         so we don't reference input_location or wfl_operator in that case.
3087         * jv-scan.c (expand_location): Remove - no longer used.
3088         (main): Set main_input_filename rather than input_filename.
3089
3090 2005-02-09  Richard Henderson  <rth@redhat.com>
3091
3092         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3093         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3094
3095 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
3096
3097         * expr.c (add_type_assertion): Use the proper enumeration type,
3098         since this is what htab_find_slot() is expecting.
3099
3100 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
3101
3102         * gcj.texi: Update copyright dates.
3103
3104 2005-02-02  Tom Tromey  <tromey@redhat.com>
3105
3106         * gcj.texi (libgcj Runtime Properties): Default library_control
3107         to 'cache'.
3108
3109 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
3110
3111         PR java/15543
3112         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3113         (modifiers) when square brackets are present in a declaration for
3114         a final paramter.
3115         * jv-scan.c (main): Set input_filename and input_line.
3116
3117 2005-02-01  Tom Tromey  <tromey@redhat.com>
3118
3119         PR java/19742:
3120         * gjavah.c (get_field_name): Don't override name for JNI header.
3121
3122 2005-02-01  Roger Sayle  <roger@eyesopen.com>
3123
3124         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3125         of unsigned types using iushr and lushr JVM bytecodes.
3126
3127 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3128
3129         PR java/19738
3130         * gjavah.c (jni_print_float): Do not emit floating-point
3131         initialiser for a static final field.
3132         (jni_print_double): Likewise.
3133
3134 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
3135
3136         Revert:
3137         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3138         * gjavah.c (print_field_info): Mark static data members of
3139         floating-point type with "__extension__".
3140
3141 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3142
3143         * gjavah.c (print_field_info): Mark static data members of
3144         floating-point type with "__extension__".
3145
3146 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3147
3148         PR java/9157
3149         * parse.y (build_string_concatenation): Remove redundant if.
3150         (patch_conditional_expr): Attempt to patch_string() the condition
3151         of a ?: as well, in addition to its other operands.
3152
3153 2005-01-25  Tom Tromey  <tromey@redhat.com>
3154
3155         * Make-lang.in (java/java-tree-inline.o): Removed.
3156
3157 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
3158
3159         PR java/19070
3160         * parse.y (patch_binop): Allow comparisons against NULL only
3161         if the other operand is of a reference type.
3162
3163 2005-01-24  Tom Tromey  <tromey@redhat.com>
3164
3165         * java-tree.h (gcj_abi_version): Declare.
3166         * class.c (make_class_data): Push gcj_abi_version into "next"
3167         field.  Renamed field.
3168         * decl.c (gcj_abi_version): New global.
3169         (parse_version): New function.
3170         (java_init_decl_processing): Call it.  Renamed 'next' field.
3171         Include version.h.
3172         (GCJ_BINARYCOMPAT_ADDITION): New define.
3173
3174 2005-01-24  Roger Sayle  <roger@eyesopen.com>
3175
3176         PR java/19295
3177         * jcf-write.c (generate_bytecode_insns): Conversions between
3178         integer types of the same precision shouldn't generate widening
3179         or narrowing conversion bytecodes.
3180
3181 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
3182
3183         * java-except.h, java-tree.h: Remove unused prototypes.
3184
3185 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
3186
3187         PR java/18091:
3188         * jcf-write.c (perform_relocations): Don't call memcpy if source
3189         and destination are the same.
3190
3191 2005-01-17  Tom Tromey  <tromey@redhat.com>
3192
3193         * verify-impl.c (get_short): Sign extend.
3194         (get_int): Likewise.
3195
3196 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
3197
3198         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3199         with TYPE_SIZE.
3200
3201 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3202
3203         * verify.c: Revert to the version before the BC-ABI merge.
3204
3205 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3206
3207         PR java/19277
3208         * check-init.c (check_init): Take care of references that do not
3209         have an explicit final variable declaration (e.g. array length
3210         access) for pre/post in/de-crement operators.
3211
3212 2005-01-08  Mark Wielaard  <mark@klomp.org>
3213
3214         * parse.y (process_imports): Allocate (and free) original_name only
3215         when not already defined.
3216         * jcf-parse.c (read_class): Free results of find_class() and
3217         lrealpath().
3218         (java_parse_file): Keep pointer to head of file_list and free when
3219         done. Free result of lrealpath().
3220
3221 2005-01-05  Tom Tromey  <tromey@redhat.com>
3222
3223         * gcj.texi (Standard Properties): java.ext.dirs is now used.
3224
3225 2004-12-20  Andrew Haley  <aph@redhat.com>
3226
3227         * typeck.c: Use fold_convert for ints and booleans.
3228
3229 2004-12-17  Andrew Haley  <aph@redhat.com>
3230
3231         PR java/18931
3232         * typeck.c (convert): Use a CONVERT_EXPR when converting to
3233         BOOLEAN_TYPE or CHAR_TYPE.
3234         (convert_to_boolean, convert_to_char) : Remove.
3235         * convert.h (convert_to_boolean, convert_to_char) : Remove.
3236         * expr.c (expand_load_internal): Do type conversion if type is not
3237         as required.
3238
3239 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
3240
3241         PR target/18459
3242         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3243         Update comment.
3244
3245 2004-12-07  Andrew Haley  <aph@redhat.com>
3246
3247         PR java/18811:
3248         * jcf-parse.c (load_class): Remove sanity test for missing inner
3249         class file.
3250
3251 2004-12-06  Tom Tromey  <tromey@redhat.com>
3252
3253         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3254         (java.uninstall): Likewise.
3255         (java.maintainer-clean): Likewise.
3256         (.INTERMEDIATE): Likewise.
3257         (java.install-man): Likewise.
3258         (gcj-dbtool.pod): New target.
3259         * gcj.texi (Code Generation): Document -findirect-dispatch.
3260         (libgcj Runtime Properties): Document
3261         gnu.gcj.precompiled.db.path.
3262         (Top): Link to "Invoking gcj-dbtool".
3263
3264 2004-12-06  Tom Tromey  <tromey@redhat.com>
3265
3266         PR java/14853:
3267         * java-tree.h (extract_field_decl): Declare.
3268         * parse.y (extract_field_decl): Renamed from
3269         strip_out_static_field_access_decl.  No longer static.
3270         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3271
3272 2004-12-03  Tom Tromey  <tromey@redhat.com>
3273
3274         * lang.c (flag_new_verifier): Define.
3275         (java_post_options): Set flag_new_verifier if indirect dispatch
3276         is being used.
3277         * lang.opt (fnew-verifier): Removed.
3278
3279 2004-12-03  Tom Tromey  <tromey@redhat.com>
3280
3281         PR bootstrap/14614:
3282         * Make-lang.in (java.install-common): Only install transformed
3283         gcjh if gcj-cross exists.
3284
3285 2004-12-03  Andrew Haley  <aph@redhat.com>
3286
3287         PR java/18812
3288         * except.c (link_handler): Patch 'outer' field of siblings of the
3289         range we're demoting.
3290
3291 2004-12-03  Andrew Haley  <aph@redhat.com>
3292
3293         PR java/18697
3294         * class.c (layout_class_method): Don't fail to override a method
3295         simply because it has DECL_ARTIFICIAL set.
3296
3297 2004-12-02  Tom Tromey  <tromey@redhat.com>
3298
3299         PR java/16675:
3300         * parse.y (craft_constructor): Special case null_pointer_node.
3301
3302 2004-12-02  Tom Tromey  <tromey@redhat.com>
3303
3304         PR java/18741:
3305         * java-gimplify.c (java_gimplify_expr): Don't call
3306         SET_EXPR_LOCATION unless wrapped tree is an expression.
3307
3308 2004-11-27  Per Bothner  <per@bothner.com>
3309
3310         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
3311         Fix fencepost error in 'i', which got executed one too many times.
3312         Also, fold memcpy into explicit loop, as originally intended.
3313         Also, free temporary 'buf' which otherwise leaks.
3314
3315 2004-11-27  Per Bothner  <per@bothner.com>
3316
3317         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3318         local static variables if not USE_MAPPED_LOCATION.
3319
3320 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
3321
3322         * class.c, decl.c, expr.c: Fix comment typos.
3323
3324 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
3325
3326         PR java/18305
3327         * decl.c (end_java_method): Call
3328         attach_init_test_initialization_flags on all the init_decls.
3329         * parse.y (attach_init_test_initialization_flags): Move to ...
3330         * expr.c (attach_init_test_initialization_flags): here and
3331         support BIND_EXPR also.
3332         * java-tree.h (attach_init_test_initialization_flags): Prototype.
3333         * jcf-parse.c (parse_class_file): Don't disable class init
3334         optimization.
3335
3336 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
3337
3338         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3339         in diagnostics.
3340
3341 2004-11-24  Richard Henderson  <rth@redhat.com>
3342
3343         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3344         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3345
3346 2004-11-24  Tom Tromey  <tromey@redhat.com>
3347
3348         * verify.c (defer_merging): Don't use C++-style comment.
3349         * verify.h (java_opcode): Added java_opcode_end.
3350         * class.c (build_class_ref): Remove C++ comment and old FIXME.
3351
3352         * verify-impl.c (vfy_push_type): Removed bogus "return".
3353         (initialize_stack): Use vfy_alloc and vfy_free.
3354         (verify_instructions_0): Likewise.
3355
3356         * Merged gcj-abi-2-dev-branch to trunk.
3357
3358 2004-11-24  Andrew Haley  <aph@redhat.com>
3359
3360         * jcf-parse.c (parse_class_file): Set file_start_location.
3361
3362 2004-11-10  Tom Tromey  <tromey@redhat.com>
3363
3364         * class.c (make_field_value): Don't call build_static_field_ref.
3365         (build_static_field_ref): Don't emit direct references when using
3366         indirect dispatch.
3367
3368         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
3369         -verbose:class into man page synopsis.
3370
3371 2004-11-09  Tom Tromey  <tromey@redhat.com>
3372
3373         * expr.c (build_java_arraystore_check): Still generate check if
3374         element type is itself an array.
3375
3376 2004-11-08  Tom Tromey  <tromey@redhat.com>
3377
3378         * java-tree.h (soft_check_assignment_node): Removed.
3379         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3380         * decl.c (java_init_decl_processing): Don't initialize
3381         soft_check_assignment_node.
3382
3383 2004-11-05  Tom Tromey  <tromey@redhat.com>
3384
3385         * class.c (layout_class_methods): Don't add Miranda methods when
3386         using indirect dispatch.
3387
3388 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
3389
3390         * class.c (make_class_data): Call emit_assertion_table to set the
3391         'assertion_table' field.
3392         (build_signature_for_libgcj): Move here from expr.c.
3393         (add_assertion_table_entry): New function. Callback for assertion
3394         hashtable traversal.
3395         (emit_assertion_table): New. Take class argument, and generate
3396         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3397         * decl.c (init_decl_processing): Define assertion_entry_type record.
3398         Push 'assertion_table' class field instead of 'verify'.
3399         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3400         (type_assertion_hash): Include 'assertion_code' in hash.
3401         (add_type_assertion): Rewritten. Take class and assertion_code
3402         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3403         (can_widen_reference_to): Use new add_type_assertion() arguments.
3404         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3405         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3406         (verify_identifier_node): Removed.
3407         (assertion_entry_type, assertion_table_type): New.
3408         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3409         assertion code definitions.
3410         (struct type_assertion): Add assertion_code. Rename 'source_type' and
3411         'target_type' to 'op1' and 'op2'.
3412         (add_type_assertion): Declare.
3413         (lang_printable_name_wls): Remove unused definition.
3414         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3415         to emit runtime assertion.
3416         (vfy_note_stack_type): Clean up non-C90 declarations.
3417         (vfy_note_local_type): Likewise.
3418         * verify.h (vfy_is_assignable_from): Declare.
3419         * verify-impl.c (is_assignable_from_slow): Remove unused function.
3420         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3421         instead of is_assignable_from_slow().
3422         (types_compatible): Reinstate ref_compatible() call.
3423
3424 2004-11-04  Tom Tromey  <tromey@redhat.com>
3425
3426         * class.c (build_static_field_ref): Reverted previous patch.
3427
3428         * class.c (build_static_field_ref): Don't emit direct references
3429         when using indirect dispatch.
3430
3431 2004-11-03  Tom Tromey  <tromey@redhat.com>
3432
3433         * expr.c (expand_java_arrayload): Set lhs_type_node.
3434         (expand_java_arraystore): Set rhs_type_node.
3435
3436 2004-11-02  Tom Tromey  <tromey@redhat.com>
3437
3438         * jcf-parse.c (compute_class_name): Use filename length from zip
3439         directory, not strlen.
3440
3441         * expr.c (expand_invoke): Mark new interface methods as abstract.
3442
3443 2004-11-01  Tom Tromey  <tromey@redhat.com>
3444
3445         * verify-impl.c (push_jump): Removed check for uninitialized
3446         objects.
3447         (push_exception_jump): Likewise.
3448         (handle_ret_insn): Likewise.
3449         (handle_jsr_insn): Likewise.
3450         (state_check_no_uninitialized_objects): Removed.
3451
3452         * decl.c (check_local_unnamed_variable): Recognize
3453         promoted-to-int parameters when using the new verifier.
3454         * expr.c (expand_java_arraystore): Explicitly request array type
3455         when using new verifier.
3456         (expand_java_arrayload): Likewise.
3457         (invoke_build_dtable): Don't pass object_type_node as
3458         expression argument to build_java_indirect_ref.
3459         (build_java_check_indexed_type): Do nothing.
3460         (build_java_arraystore_check): Handle case where array doesn't
3461         have array type.
3462         (build_java_array_length_access): Likewise.
3463         (expand_invoke): Handle case where interface overrides a method
3464         from Object.
3465         (pop_type_0): Always succeed for reference types.
3466         (process_jvm_instruction): Don't pop a value in a dead
3467         exception handler.
3468         (pop_arguments): Convert arguments to correct types.
3469
3470 2004-10-29  Andrew Haley  <aph@redhat.com>
3471
3472         * jcf-parse.c (give_name_to_class): Remove line that was
3473         incorrectly merged.
3474
3475 2004-10-29  Andrew Haley  <aph@redhat.com>
3476
3477         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3478
3479 2004-10-20  Andrew Haley  <aph@redhat.com>
3480
3481         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3482
3483 2004-10-26  Tom Tromey  <tromey@redhat.com>
3484
3485         * verify.h (vfy_notify_verified): Removed.
3486         * verify-glue.c (vfy_notify_verified): Removed.
3487
3488 2004-10-26  Tom Tromey  <tromey@redhat.com>
3489
3490         * verify-impl.c (debug_print_state): Declare `i' before code.
3491         (merge_types): Modify `t' when it is null_type.
3492
3493 2004-10-26  Tom Tromey  <tromey@redhat.com>
3494
3495         * verify-impl.c (type_print): Renamed from print.  Now static and
3496         takes an argument.
3497         (debug_print_state): Use type_print.
3498
3499 2004-10-25  Tom Tromey  <tromey@redhat.com>
3500
3501         * expr.c (build_invokeinterface): Compute correct offset for
3502         index into interface methods.
3503
3504 2004-10-20  Tom Tromey  <tromey@redhat.com>
3505
3506         * java-tree.h (verify_jvm_instructions_new): Declare.
3507
3508         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3509         command line.
3510
3511         * verify-impl.c (verify_instructions): Correctly handle wide
3512         types on the stack.
3513         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3514         (vfy_get_component_type): Strip pointer types.
3515         (vfy_find_class): Use get_type_from_signature.  Strip pointer
3516         types.
3517         Include java-except.h.
3518
3519 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3520
3521         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3522         vfy_push_type_t, set_variable, add_new_state, merge_into,
3523         handle_jsr_insn, branch_prepass, check_class_constant,
3524         check_wide_constant, get_one_type, compute_static_types,
3525         verify_instructions_0): Clean up C99 declarations after statements.
3526
3527 2004-10-20  Tom Tromey  <tromey@redhat.com>
3528
3529         * verify-impl.c (merge_refs): Compare reference against iterator,
3530         not ref2.
3531
3532         * verify-glue.c (vfy_tag): Mask off resolved flag.
3533
3534 2004-10-19  Tom Tromey  <tromey@redhat.com>
3535
3536         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3537         (init_state_with_stack): Initialize `this_type' in state.
3538         (verify_method): Use debug_print.
3539         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3540         (vfy_note_stack_depth): Reverted last patch.
3541         (vfy_note_stack_type): Note pointer to Object, not Object.
3542         (vfy_note_local_type): Likewise.
3543
3544         * verify.h (vfy_note_instruction_seen): Declare.
3545         * verify-glue.c (verify_jvm_instructions_new): Set
3546         BCODE_EXCEPTION_TARGET on target instruction.
3547         (vfy_note_instruction_seen): New function.
3548         * verify-impl.c (FLAG_INSN_SEEN): New define.
3549         (verify_instructions_0): Set flag on instruction.  Save state for
3550         PC=0 later.
3551         (verify_instructions): Call vfy_note_instruction_seen.
3552
3553         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3554         (verify_jvm_instructions_new): Call method_init_exceptions,
3555         add_handler, and handle_nested_ranges.
3556         * verify-impl.c (verify_method): Return 1 on success.
3557         (verify_instructions_0): Save the state at PC=0.
3558
3559         * verify-impl.c (init_type_from_class): Set is_resolved and
3560         ref_next on new ref_intersection.
3561         (init_type_from_string): Likewise.
3562
3563 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3564
3565         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3566         if flag_new_verifier is set.
3567         * java-tree.h (flag_new_verifier): Declare.
3568         * lang.opt (fnew-verifier): New option.
3569         * verify-impl.c: Work around namespace pollution by undef'ing
3570         'current_class'.
3571         (struct verifier_context): Make 'bytecode' const.
3572         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3573         (types_compatible): For the BC-ABI, always consider reference types
3574         compatible.
3575         (check_class_constant): Use vfr->current_class.
3576         (check_constant): Likewise.
3577         (check_wide_constant): Likewise.
3578         (check_field_constant): Check for 'L' at start of type name.
3579         (get_one_type): Return pointer instead of type. Set type result in
3580         caller via passed type pointer.
3581         (compute_argument_types): Update to use new get_one_type arguments.
3582         (compute_return_type): Likewise.
3583         (make_verifier_context): New. Allocate and initialize 'vfr'.
3584         (free_verifier_context): New. Free 'vfr' and its contents.
3585         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3586         and free_verifier_context.
3587
3588 2004-10-15  Tom Tromey  <tromey@redhat.com>
3589
3590         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3591         * verify.h (vfy_fail): Fixed formatting.
3592
3593         * verify-impl.c (vfr): Fixed comment formatting.
3594         (collapse_type): New function.
3595         (verify_instructions): Notify compiler about type map.
3596         * verify.h (vfy_note_stack_depth): Updated.
3597         (vfy_note_stack_type): Likewise.
3598         (vfy_note_local_type): Likewise.
3599         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3600         Declare.
3601         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3602         state.  Added `method' argument.
3603         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3604         argument.
3605         (vfy_note_local_type): New function.
3606         (vfy_unsuitable_type): Likewise.
3607         (vfy_return_address_type): Likewise.
3608         (vfy_null_type): Likewise.
3609
3610         * verify.h (VFY_IN_GCC): Removed.
3611         (VFY_WANT_TYPEMAP): Removed.
3612         * verify-impl.c (verify_instructions_0): Removed useless "\".
3613         (struct state) <next>: Uncomment.
3614
3615 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3616
3617         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3618         C-style.
3619
3620 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3621
3622         * Make-lang.in (verify.o): Re-enabled this target.
3623         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3624         (vfy_get_interface): Likewise.
3625         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3626         * verify.h (verify_jvm_instructions_new): Declare.
3627         * verify-impl.c (free_state): Temporarily comment out unused
3628         function.
3629
3630 2004-10-06  Tom Tromey  <tromey@redhat.com>
3631
3632         * java-tree.h (JV_STATE_READ): New enum value.
3633
3634 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3635
3636         * verify.h: New file.
3637
3638 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3639
3640         * verify-impl.c, verify-glue.c, verify.h: New files.
3641         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3642
3643 2004-09-24  Andrew Haley  <aph@redhat.com>
3644
3645         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3646         for a slot if it's of pointer type.
3647
3648 2004-09-14  Tom Tromey  <tromey@redhat.com>
3649
3650         * class.c (make_class_data): Correctly initialize "state" field.
3651         Initialize "engine" field.
3652         * decl.c (java_init_decl_processing): Add "engine" field.
3653
3654 2004-09-10  Andrew Haley  <aph@redhat.com>
3655
3656         PR java/12760
3657         * expr.c (build_invokeinterface): Use fast method for interface
3658         dispatch.
3659         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3660         JTI_ITABLE_PTR_TYPE.
3661         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3662         (emit_symbol_table): Add new arg, element_size.
3663         * decl.c (java_init_decl_processing): Initialize Class.itable.
3664         * class.c (GEN_TABLE): New macro.
3665         (gen_indirect_dispatch_tables): Use it.  Add itable.
3666         (make_class_data): Add new arg for emit_symbol_table().
3667         Emit itable.
3668         (add_miranda_methods): Make sure search_class has been parsed.
3669         (emit_symbol_table): Add new arg, element_size.
3670
3671 2004-09-06  Andrew Haley  <aph@redhat.com>
3672
3673         * verify.c (merge_types): Return Object for all merges of
3674         interfaces.
3675         * expr.c (add_type_assertion): Don't generate assertions when
3676         source type is array of Object.
3677
3678 2004-09-03  Andrew Haley  <aph@redhat.com>
3679
3680         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
3681
3682         * lang.c (java_post_options): Force flag_verify_invocations if
3683         we're not using indirect dispatch.
3684
3685         * expr.c (pop_type_0): Move test for interfaces before call to
3686         can_widen_reference_to().
3687         (build_signature_for_libgcj): Remove generation of canonical array
3688         type.
3689         (add_type_assertion): Canonicalize both arrays.
3690         Don't assert that type X can be assigned to Object.
3691         Don't assert that type X an be assigned to type X.
3692         Don't assert that Object can be assigned to type X.
3693         (can_widen_reference_to): Warn whenever we generate an assertion.
3694         (process_jvm_instruction): Use throwable_type_node for the type of
3695         an exception class.
3696
3697 2004-09-01  Andrew Haley  <aph@redhat.com>
3698
3699         * decl.c (java_init_decl_processing): Change
3700         verify_identifier_node to "__verify".
3701         * expr.c (add_type_assertion): Use verify_identifier_node for name.
3702         * java-tree.h (verify_identifier_node): Change to "__verify".
3703
3704         * expr.c (build_signature_for_libgcj): New function.
3705         (add_type_assertion): Use it to construct signatures for
3706         source_type and target_type.
3707
3708 2004-08-27  Andrew Haley  <aph@redhat.com>
3709
3710         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
3711         (verify_identifier_node): New.
3712         (TYPE_VERIFY_METHOD): New.
3713         (struct type_assertion): New type.
3714         * expr.c (type_assertion_eq): New function.
3715         (type_assertion_hash): New function.
3716         (add_type_assertion): New function.
3717         (can_widen_reference_to): Call add_type_assertion().
3718         * decl.c (java_init_decl_processing): Add verify_identifier_node.
3719         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
3720         (finish_class): Output TYPE_VERIFY_METHOD (type).
3721
3722         * decl.c (end_java_method): Nullify unused fields.
3723
3724 2004-08-17  Andrew Haley  <aph@redhat.com>
3725
3726         * verify.c (defer_merging): Quieten.
3727         * jcf-parse.c (load_class): Only try to open a class file if it's
3728         java.lang.Object or if it's part of the current compilation.
3729         Check that the class we just tried to load is the class we just
3730         loaded.  Quieten.
3731         (java_parse_file): Set flag_verify_invocations off if we're
3732         compiling from .class.
3733         (parse_zip_file_entries): Abort if we try to read a dummy class.
3734         * expr.c (can_widen_reference_to): Quieten.
3735         (build_invokevirtual): Abort if we try to invokevirtual an
3736         interface.
3737         (expand_invoke): Don't build a non-interface call to an interface.
3738         (build_instanceof): Don't do premature optimization if
3739         flag_verify_invocations is not set.
3740         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
3741         from superclass.
3742         (build_static_field_ref): Add correct type conversion for
3743         field_address.
3744         (add_miranda_methods): Disable generation of Miranda methods for
3745         dummy classes.
3746         (layout_class_method): Don't complain about non-static method
3747         overrides static method with dummy classes.
3748
3749 2004-08-13  Tom Tromey  <tromey@redhat.com>
3750
3751         * class.c (build_static_field_ref): Re-enable atable lookups for
3752         static fields.
3753
3754         * parse.y (strip_out_static_field_access_decl): Indentation fix.
3755
3756 2004-08-11  Tom Tromey  <tromey@redhat.com>
3757
3758         * gcj.texi (libgcj Runtime Properties): Document new properties.
3759
3760 2004-08-06  Andrew Haley  <aph@redhat.com>
3761
3762         * jcf-parse.c (load_class): Check that we really have loaded the
3763         class we're looking for.
3764
3765 2004-07-19  Andrew Haley  <aph@redhat.com>
3766
3767         * verify.c (verify_jvm_instructions): Comment change only.
3768
3769         * typeck.c (build_java_array_type): Add size field to array name.
3770
3771         * java-tree.h (LOCAL_SLOT_P): New.
3772         (update_aliases): Add PC argument.
3773         (pushdecl_function_level): New function.
3774
3775         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
3776         MODIFY_EXPR, and SAVE_EXPR.
3777         (java_gimplify_modify_expr): New function.
3778
3779         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
3780         (expand_iinc): Pass PC to update_aliases().
3781         (STORE_INTERNAL): Likewise.
3782         (process_jvm_instruction): Likewise.
3783
3784         * decl.c (base_decl_map): New variable.
3785         (uniq): New variable.
3786         (update_aliases): Rewrite with more thorough checking.
3787         (debug_variable_p): New function.
3788         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
3789         (check_local_named_variable): Delete whole function.
3790         (initialize_local_variable): New function.
3791         (check_local_unnamed_variable): Add checks and comments.
3792         (find_local_variable): Rewrite.
3793         (java_replace_reference): New function.
3794         (function_binding_level): New variable.
3795         (pushdecl_function_level): New function.
3796         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
3797         (maybe_pushlevels): Call pushdecl() on each of the new decls.
3798         (start_java_method): Reset uniq.  Create base_decl_map.  Set
3799         function_binding_level.
3800         (end_java_method): Null unused fields to save memory.
3801
3802 2004-06-29  Andrew Haley  <aph@redhat.com>
3803
3804         * except.c (expand_start_java_handler): Push a new binding level.
3805         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
3806         register_exception_range() to register where we'll do it.
3807         (expand_end_java_handler): Remove old bogus code.  Replace with
3808         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
3809         the top of the expression we're curently building.
3810         (maybe_end_try): Delete.
3811         * decl.c (binding_level.exception_range): New field.
3812         (clear_binding_level): Add field exception_range.  Reformat.
3813         (poplevel): Call expand_end_java_handler().
3814         (poplevel): Call java_add_stmt only if functionbody is false.
3815         (maybe_poplevels): Don't call maybe_end_try() from here.
3816         (end_java_method): Clear no longer used trees in function decl.
3817         (register_exception_range): New function.
3818         * java-tree.h (register_exception_range, struct eh_range): Declare.
3819
3820 2004-06-22  Andrew Haley  <aph@redhat.com>
3821
3822         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
3823         the otable.
3824         * check-init.c (get_variable_decl): Teach check-init about
3825         FIELD_DECLs addressed via the otable.
3826         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
3827         CLASS_PARSED_P.
3828
3829 2004-05-28  Andrew Haley  <aph@redhat.com>
3830
3831         * jcf-parse.c (load_class): Don't try to read a class that we've
3832         already read.
3833
3834         * expr.c (build_invokeinterface): Use the old-fashioned way of
3835         doing indirect dispatch: look up interfaces by name.
3836         * java-tree.h (enum java_tree_index): Add
3837         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
3838         * decl.c (java_init_decl_processing): Add
3839         soft_lookupinterfacemethodbyname_node.
3840
3841         * gjavah.c (print_method_info): Final methods have vtable entries,
3842         so gjavah needs to output them.
3843         * class.c (layout_class_method): Generate vtable entries for final
3844         methods.
3845         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
3846         dispatch, even if a method is final.
3847
3848 2004-05-25  Andrew Haley  <aph@redhat.com>
3849
3850         * class.c (build_symbol_entry): Convert the names of constructors
3851         to init_identifier_node when generating an entry for the indirect
3852         dispatch table.
3853
3854         * expr.c (build_known_method_ref): Generate indirect calls for
3855         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
3856
3857 2004-05-24  Andrew Haley  <aph@redhat.com>
3858
3859         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
3860         atable element is of the right type.
3861
3862         * class.c (build_static_field_ref): Cast pointer to correct type
3863         for field.
3864
3865 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3866
3867         * Merged with HEAD as of 20040514. Diff against
3868         gcj-abi-2-merge-20040514.
3869
3870 2004-04-16  Andrew Haley  <aph@redhat.com>
3871
3872         * verify.c (check_pending_block): Disable subroutine checks.
3873         (defer_merging): New function.
3874         (merge_types): If types are dummy, use defer_merging to combine them.
3875         (verify_jvm_instructions): If invocation is invokeinterface and
3876         target is dummy, assume target really is an interface.
3877
3878         * parse.y (patch_invoke): Break out call to java_create_object.
3879
3880         * lang.c (flag_verify_invocations): New.
3881
3882         * jcf-parse.c (load_class): If we've already failed to load a
3883         class, don't try again.
3884         (load_class): If we can't find a .class file, don't fail, but emit
3885         a warning.
3886         (parse_class_file): Don't act on dummy methods.
3887
3888         * java-tree.h (flag_verify_invocations): New.
3889         (TYPE_DUMMY): New.
3890         (lang_type.dummy_class): New field.
3891         (java_create_object): New function.
3892         (METHOD_DUMMY): New.
3893
3894         * expr.c (build_field_ref): Widen field offset.
3895         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
3896         that each of its elements is compatible with the one we're
3897         popping.
3898         (pop_type_0): Issue a warning to say that we need to generate a
3899         runtime check.
3900         (java_create_object): New function.
3901         (build_field_ref): Only generate hard refs if we're not using
3902         indirect dispatch.
3903         (expand_java_field_op): If we're using !verify_invocations and we
3904         see a missing field, generate a decl for it.
3905
3906         (expand_invoke): If a class doesn't have the method we seek and
3907         we're using !flag_verify_invocations, generate a decl for the
3908         method now.
3909
3910         (build_known_method_ref): Always use indirect dispatch via the
3911         atable for static methods.
3912
3913         (expand_java_NEW): Break out object creation into new function,
3914         java_create_object.
3915
3916         (can_widen_reference_to): Issue a warning to say that we need to
3917         generate a runtime check.
3918
3919         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
3920         (make_method_value): Also use index for interfaces.
3921         (make_class_data): Skip dummy field for inherited data.
3922         Don't build method array for dummy methods.
3923         Set size_in_byte to -1 when using inirect dispatch
3924         Don't build a hard class ref if we don't have a hard ref to our
3925         superclass, or if we're using inirect dispatch.
3926         Null out dispatch tables.
3927
3928         (layout_class_method): Don't complain about non-static method
3929         overrides static method is method is artificial.
3930
3931         (build_static_field_ref): Disable atable references to static
3932         fields for the time being.
3933
3934         (layout_class_methods): Check for CLASS_INTERFACE as
3935         well as CLASS_ABSTRACT.
3936
3937 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3938
3939         * class.c (make_class_data): Don't check flag_inline_functions.
3940         * lang.c (flag_really_inline): Remove unused flag.
3941         (java_handle_option): Don't set it here.  Remove special handling
3942         of flag_inline_functions for Java.
3943         (java_init): Don't set flag_inline_trees here.  Already done...
3944         (java_post_options): ...here.  Don't clear flag_inline_functions.
3945
3946 2004-11-24  Steven Bosscher  <stevenb@suse.de>
3947
3948         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
3949         (java_gimplify_exit_block_expr): New function.
3950         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
3951         LABELED_BLOCK_EXPR.
3952         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
3953         (EXIT_BLOCK_EXPR): Likewise.
3954         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
3955         (LABELED_BLOCK_BODY): Likewise.
3956         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
3957         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
3958         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
3959         TREE_OPERAND.
3960         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
3961         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
3962         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
3963         second operand of EXIT_BLOCK_EXPR.
3964         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
3965         TREE_OPERAND.
3966         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
3967
3968 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3969
3970         * xref.h (xref_flag_value): Remove.
3971         (xref_set_data, xref_get_data): Likewise.
3972         (xref_set_current_fp): Likewise.
3973         (XREF_NONE): Likewise.
3974         (XREF_GET_DATA): Likewise.
3975         * xref.c (xref_flag_value): Remove.
3976         (xref_set_data, xref_get_data): Likewise.
3977         (xref_set_current_fp): Likewise.
3978
3979 2004-11-23  Ben Elliston  <bje@au.ibm.com>
3980
3981         * gjavah.c (output_directory): Make static.
3982         (temp_directory): Likewise.
3983
3984 2004-11-15  Tom Tromey  <tromey@redhat.com>
3985
3986         * decl.c (instn_ptr_type_node): Removed.
3987         (lineNumbers_ptr_type_node): Removed.
3988         (jint_type): Removed.
3989         (jint_ptr_type): Removed.
3990
3991 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
3992
3993         PR java/15576
3994         * check-init.c (check_init): Ignore DECL_EXPR.
3995         * expr.c (always_initialize_class_p): Reenable.
3996         (build_class_init): Use a variable to store the decl.  Also use
3997         boolean_false_node instead of integer_zero_node.
3998         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
3999         to the block.
4000
4001 2004-11-08  Tom Tromey  <tromey@redhat.com>
4002
4003         PR java/16843:
4004         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4005         generating a JNI header.
4006         (print_field_info): Handle JNI headers.
4007         (jni_print_float): Likewise.
4008         (jni_print_double): Likewise.
4009
4010 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
4011
4012         * decl.c (end_java_method): Remove duplicated code.
4013
4014 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
4015             Gerald Pfeifer  <gerald@pfeifer.com>
4016
4017         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4018         as well.
4019
4020 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
4021
4022         PR java/17265
4023         * class.c: Reinstate 2004-08-18 patch.
4024         (make_local_function_alias): Don't create an alias for extern (native)
4025         functions.
4026
4027 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4028
4029         PR java/17265
4030         * class.c (make_local_function_alias): Revert 2004-08-18 change.
4031         (make_method_value): Likewise.
4032
4033 2004-10-21  Andrew Haley  <aph@redhat.com>
4034
4035         PR java/18091:
4036         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4037
4038 2004-10-20  Andrew Haley  <aph@redhat.com>
4039
4040         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4041         Remove duplicated code block.
4042
4043 2004-10-18  Steven Bosscher  <stevenb@suse.de>
4044
4045         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4046         New rules to work around old Bison warnings.
4047
4048 2004-10-17  Steven Bosscher  <stevenb@suse.de>
4049
4050         * class.c (ident_subst): Always alloca buffer.
4051         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4052         opcode after including javaop.def.
4053         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4054         conditional expression that exits, to avoid warnings.
4055         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4056         a user of an extension.
4057         * win32-host.c: Move check down to have non-empty file when
4058         WIN32 is not defined.
4059
4060         * Make-lang.in (java-warn): Add STRICT_WARN.
4061         (java/jcf-io.o-warn): Don't have Werror for this file.
4062         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4063
4064 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
4065
4066         * expr.c (expr_add_location): Move declaration to before all
4067         statements.
4068         * parse.y (java_expand_classes): Ditto.
4069         * lex.c (java_peek_unicode): Ditto.
4070
4071 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4072
4073         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4074         if possible, else convert `foo' to 'foo'.
4075         * class.c: Likewise.
4076         * decl.c: Likewise.
4077         * expr.c: Likewise.
4078         * jcf-io.c: Likewise.
4079         * jcf-parse.c: Likewise.
4080         * lang.c: Likewise.
4081         * lex.c: Likewise.
4082         * parse.h: Likewise.
4083
4084 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4085
4086         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4087         rename parameter 'msg' to 'msgid' in function declaration.
4088         (issue_warning_error_from_context): Likewise.
4089         (yyerror): Rename parameter 'msg' to 'msgid'.
4090         (all over): Use new quoting style for diagnostics.
4091
4092 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
4093
4094         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4095         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4096         Update copyright.
4097
4098 2004-10-14  Matt Austern  <austern@apple.com>
4099
4100         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4101         pointer_set_t* now.
4102
4103 2004-10-13  Tom Tromey  <tromey@redhat.com>
4104
4105         PR java/15578:
4106         * lang.opt (--extdirs): Document.
4107         * jvspec.c (lang_specific_driver): Recognize -encoding and
4108         -extdirs.
4109
4110 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
4111
4112         * parse.y (issue_warning_error_from_context): Use va_list *
4113         instead of va_list parameter.
4114         (parse_error_context): Update call.
4115         (parse_warning_context): Likewise.
4116
4117 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
4118
4119         * parse.y, parse-scan.y: Add list of diagnostic messages to
4120         insulate translation template from version of yacc/bison used
4121         to compile the grammar.
4122
4123 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
4124
4125         Prepare for %q, %< and %> in diagnostic message strings.
4126         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4127         Name second parameter 'msgid'.
4128         * parse.y: Additionally include pretty-print.h and diagnostic.h.
4129         (issue_warning_error_from_context): Use pretty-printer functions
4130         instead of vsprintf for constructing formatted messages. Rename
4131         parameter 'msg' to 'msgid'.
4132         (parse_error_context): Rename parameter 'msg' to 'msgid'.
4133         (parse_warning_context): Likewise.
4134
4135 2004-10-05  Andrew Haley  <aph@redhat.com>
4136
4137         PR java/17779
4138         * jcf-parse.c (parse_zip_file_entries): If a class has a
4139         superclass and a TYPE_SIZE of zero, lay it out.
4140
4141 2004-09-30  Andrew Haley  <aph@redhat.com>
4142
4143         PR java/17733
4144         * jcf-parse.c (compute_class_name): Rewrite.
4145
4146 2004-10-01  Jan Hubicka  <jh@suse.cz>
4147
4148         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4149
4150 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4151
4152         * lex.c: Fix a comment typo.
4153
4154 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4155
4156         * java-tree.h: Fix a comment typo.
4157
4158 2004-09-30  Per Bothner  <per@bothner.com>
4159
4160         Simplify lexer.  Implement --enable-mapped-location support.
4161         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
4162         (parse_source_file_1): Pass filename as extra parameter, so we can call
4163         linemap_add and set input_location here, rather than in both callers.
4164         (read_class): Pass copied filename to parse_source_file_1.
4165         Don't initialize wfl_operator - only needed for source compilation.
4166         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
4167         * lex.h:  Remove a bunch of debugging macros.
4168         * lex.h (struct_java_line, struct java_error):  Remove types.
4169         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
4170         (struct java_lc_s):  Remove prev_col field.
4171         (struct java_lexer):  New fields next_unicode, next_columns, and
4172         avail_unicode.  New position field, and maybe token_start field.
4173         Don't need hit_eof field - use next_unicode == -1 instead.
4174         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
4175         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
4176         * parse.h:  Various changes for USE_MAPPED_LOCATION.
4177         (EXPR_WFL_EMIT_LINE_NOTE): XXX
4178         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4179         (struct parser_ctxt):  New file_start_location field.
4180         Remove p_line, c_line fields since we no longer save lines.
4181         Remove elc, lineno, and current_jcf fields - no longer used.
4182         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
4183         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4184         source_location and is probably not needed anymore anyway.
4185         Use new expr_add_Location function.
4186         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
4187         (java_pop_parser_context):  Minor cleanup.
4188         (java_parser_context_save_global, java_parser_context_restore_global,
4189         java_pop_parser_context):  Save/restore input_location as a unit.
4190         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
4191         a source_location instead of a wfl context node.
4192         (check_class_interface_creation):  input_filename is not addressable.
4193         (create_artificial_method):  Calling java_parser_context_save_global
4194         and java_parser_context_restore_global is overkill.  Instead,
4195         temporarily set input_location from class decl.
4196         (java_layout_seen_class_methods): Set input_location from method decl.
4197         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4198         (finish_loop_body):  Likewise.
4199         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
4200         (java_sprint_unicode):  Take a character, not index in line.
4201         (java_sneak_uncode):  Replaced by java_peek_unicode.
4202         (java_unget_unicode):  No longer used.
4203         (java_allocate_new_line. java_store_unicode):  Removed, since we
4204         no longer remember "lines".
4205         (java_new_lexer):  Update for new data structures.
4206         (java_read_char):  Move unget_value checking to java_read_unicode.
4207         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4208         efficient functions that are used directly when lexing.
4209         (java_read_unicode_collapsing_terminators):  No longer needed.
4210         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4211         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4212         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
4213         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
4214         combine switch branches, and test for common token kinds earlier.
4215         (java_lex_error):  Rewrite.
4216         * jv-scan.c (expand_location): New function, copied from tree.c.
4217         (main): Set ctxp->filename instead of setting input_filename directly.
4218
4219 2004-09-30  Per Bothner  <per@bothner.com>
4220
4221         More cleanup for --enable-mapped-location.
4222         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
4223         input_location here.  Instead do it in give_name_to_class.
4224         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4225         * expr.c (expand_byte_code): Call linemap_line_start.
4226         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
4227         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
4228         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
4229         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
4230         to USE_MAPPED_LOCATION case.
4231
4232         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
4233         * jcf-parse.c (java_parse_file): Don't set input_filename.
4234         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4235         Create a list of TRANSLATION_UNIT_DECL.
4236         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
4237         reason is so we can set a DECL_SOURCE_LOCATION for each file.
4238         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4239         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4240         (file_start_location):  New static.
4241         (set_source_filename):  Avoid extra access to input_filename macro.
4242         Concatenate new name with class's package prefix.
4243         (set_source_filename, give_name_to_class): Update.
4244         (give_name_to_class):  Set class's "line 0" input_location here.
4245         (parse_class_file):  Set input_location as a unit.
4246
4247         * jcf-parse.c (load_class): Sanity test if missing inner class file.
4248
4249 2004-09-29  Per Bothner  <per@bothner.com>
4250
4251         * java-tree.h:  Redefine some macros and add some declaration
4252         to handle the USE_MAPPED_LOCATION case.
4253         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
4254         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
4255         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4256         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4257
4258         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4259         * decl.c (finish_method, java_add_stmt): Likewise.
4260         * java-gimplify.c (java-gimplify.c):  Likewise.
4261         * jcf-write.c (generate_bytecode_insns):  Likewise.
4262         * lang.c (java_post_options): Likewise - call linemap_add.
4263
4264 2004-09-29  Andrew Haley  <aph@redhat.com>
4265
4266         PR java/17007
4267         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4268         result of TRUNC_MOD_EXPR.
4269         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4270         * decl.c (java_init_decl_processing): Mark
4271         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4272
4273 2004-09-28  Tom Tromey  <tromey@redhat.com>
4274
4275         PR java/15710:
4276         * class.c (add_miranda_methods): Load superinterface if not
4277         already loaded.
4278
4279 2004-09-28  Andrew Haley  <aph@redhat.com>
4280
4281         PR java/17586
4282         * jcf-parse.c (load_class): Don't try to read a class that we've
4283         already read.
4284
4285 2004-09-28  Andrew Haley  <aph@redhat.com>
4286
4287         * jcf-parse.c (load_class): Back out previous broken patch.
4288
4289 2004-09-28  Andrew Haley  <aph@redhat.com>
4290
4291         PR java/17586
4292         * jcf-parse.c (load_class): Don't try to read a class that we've
4293         already read.
4294         Check that we really did read the right class.
4295
4296 2004-09-25  Tom Tromey  <tromey@redhat.com>
4297
4298         PR java/17500:
4299         * parse.y (create_artificial_method): Use add_method_1.
4300
4301 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
4302
4303         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4304         comment typos.
4305         * gcj.texi: Fix typos.
4306
4307 2004-09-24  Tom Tromey  <tromey@redhat.com>
4308
4309         PR java/15656:
4310         * parse.y (class_instance_creation_expression): Set `$$' to NULL
4311         in error parts of rule.
4312         (unary_expression): Don't call error_if_numeric_overflow when $1
4313         is NULL.
4314
4315 2004-09-24  Tom Tromey  <tromey@redhat.com>
4316
4317         PR java/16789:
4318         * parse.y (resolve_qualified_expression_name): Set
4319         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4320         * expr.c (force_evaluation_order): Check for empty argument list
4321         after stripping COMPOUND_EXPR.
4322
4323 2004-09-23  Andrew Haley  <aph@redhat.com>
4324
4325         PR java/16927:
4326         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4327         COND_EXPRs.
4328
4329 2004-09-23  Tom Tromey  <tromey@redhat.com>
4330
4331         PR java/17329:
4332         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4333         where operand is null.
4334
4335 2004-09-23  Tom Tromey  <tromey@redhat.com>
4336
4337         PR java/17380:
4338         * parse.y (not_accessible_p): Allow access to protected members
4339         even when class is not static.
4340
4341 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
4342
4343         * Make-lang.in: Revert the gcc-none.o change.
4344
4345 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
4346
4347         * parse.y (patch_anonymous_class): VEC_space returns true if there
4348         is space.
4349
4350 2004-09-21  Matt Austern  <austern@apple.com>
4351
4352         Fix bootstrap.
4353         * gjavah.c (free_method_name_list): Fix function definition so
4354         it's a proper C prototype.
4355
4356 2004-09-21  Tom Tromey  <tromey@redhat.com>
4357
4358         PR java/17575:
4359         * gjavah.c (free_method_name_list): New method.
4360         (main): Call it.
4361
4362 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
4363             Zack Weinberg  <zack@codesourcery.com>
4364
4365         * java-tree.def: Use tree_code_class enumeration constants
4366         instead of code letters.
4367         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4368         new tree-class enumeration constants.
4369
4370 2004-09-13  Tom Tromey  <tromey@redhat.com>
4371
4372         PR java/17216:
4373         * class.c (layout_class_method): Put synthetic methods into the
4374         vtable.
4375
4376 2004-09-11  Andrew Pinski  <apinski@apple.com>
4377
4378         * Make-lang.in (java/ggc-none.c): Change dependency
4379         for ggc.h into $(GGC_H).
4380
4381 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4382
4383         * Make-lang.in (java/win32-host.o): Add dependency on
4384         coretypes.h.
4385         * win32-host.c: Add includes for coretypes.h, jcf.h
4386
4387 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4388
4389         * Make-lang.in (GCJH_OBJS): Change dependency from
4390         ggc-none.o to java/ggc-none.o
4391         (JCFDUMP_OBJS): Likewise.
4392         (java/ggc-none.o): New target.
4393
4394 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4395
4396         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
4397         * class.c (build_utf8_ref, build_static_field_ref,
4398         make_field_value, make_method_value, get_dispatch_table,
4399         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4400         * constants.c (get_tag_node, build_ref_from_constant_pool,
4401         build_constants_constructor): Likewise.
4402         * decl.c (java_init_decl_processing): Likewise.
4403         * expr.c (build_java_array_length_access, build_newarray,
4404         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4405         build_java_binop, build_field_ref, expand_java_add_case,
4406         expand_java_call, build_known_method_ref, build_invokevirtual,
4407         build_invokeinterface, build_jni_stub): Likewise.
4408         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4409         * jcf-parse.c (get_constant): Likewise.
4410         * lex.c (do_java_lex): Likewise.
4411         * parse.y (patch_binop, patch_unaryop, patch_cast,
4412         build_newarray_node, patch_newarray): Likewise.
4413         * resource.c (compile_resource_data): Likewise.
4414         * typeck.c (build_prim_array_type): Likewise.
4415
4416 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4417
4418         * decl.c (java_init_decl_processing): Adjust
4419         initialize_sizetypes call.
4420
4421 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4422
4423         * jv-scan.c (fancy_abort): Add.
4424
4425 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4426
4427         * expr.c (build_java_arrayaccess): Use convert to change
4428         len's type.
4429
4430 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
4431
4432         * class.c (make_local_function_alias): Allocate extra space for 'L'
4433         in name buffer. Reported by Thomas Neumann.
4434
4435 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4436
4437         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4438         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
4439         * lex.c (do_java_lex): Adjust.
4440         (error_if_numeric_overflow): Likewise.
4441
4442 2004-08-18  Andrew Pinski  <apinski@apple.com>
4443
4444         * class.c (make_local_function_alias): Only make a new decl if we
4445         support alias attribute on all decls.
4446
4447 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
4448
4449         * class.c (make_local_function_alias): New function. Create local
4450         alias for public method DECL.
4451         (make_method_value): Use make_local_function_alias.
4452         * parse.y (craft_constructor): Don't special-case anonymous classes.
4453         Always set ctor_name to init_identifier_node.
4454         (lookup_method_invoke): Call layout_class_method when creating
4455         anonymous class constructor.
4456
4457 2004-08-18  Richard Henderson  <rth@redhat.com>
4458
4459         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4460         default case.  Treat '<' similarly.  Update for
4461         is_gimple_formal_tmp_var name change.
4462
4463 2004-08-17  Andrew Haley  <aph@redhat.com>
4464
4465         * lang.c (lang_printable_name): Obey verbose flag.
4466         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4467         lang_printable_name().
4468         (verify_constructor_circularity, get_printable_method_name,
4469         check_abstract_method_definitions, java_check_regular_methods,
4470         java_check_abstract_methods, check_inner_class_access,
4471         fix_constructors, patch_method_invocation, patch_return):
4472         Likewise.
4473         * expr.c (pop_type_0): Likewise.
4474
4475         * java-tree.h (lang_printable_name_wls): Delete.
4476
4477 2004-08-16  Tom Tromey  <tromey@redhat.com>
4478
4479         PR java/8473:
4480         * parse.y (primary): Changed for initialized and uninitialized
4481         array creations.
4482         (array_access): Handle array_creation_initialized.
4483         (array_creation_expression): Split into
4484         array_creation_initialized and array_creation_uninitialized.
4485
4486 2004-08-16  Andrew Haley  <aph@redhat.com>
4487
4488         * jcf-write.c (find_constant_index): Canonicalize NaNs when
4489         generating bytecode.
4490
4491 2004-08-16  Elliot Lee <sopwith@redhat.com>
4492
4493         PR java/9677
4494         * jcf-parse.c (java_parse_file): Handle filenames with embedded
4495         spaces, and quoted filelists.
4496
4497 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4498
4499         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4500         * class.c (build_utf8_ref, build_static_field_ref,
4501         make_field_value, make_method_value, get_dispatch_table,
4502         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4503         * constants.c (get_tag_node,  build_ref_from_constant_pool,
4504         build_constants_constructor): Likewise.
4505         * decl.c (java_init_decl_processing): Likewise.
4506         * expr.c (build_java_array_length_access, build_newarray,
4507         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4508         build_java_binop, build_field_ref, expand_java_add_case,
4509         expand_java_call, build_known_method_ref, build_invokevirtual,
4510         build_invokeinterface, build_jni_stub): Likewise.
4511         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4512         * jcf-parse.c (get_constant): Likewise.
4513         * lex.c (do_java_lex): Likewise.
4514         * parse.y (patch_binop, patch_unaryop, patch_cast,
4515         build_null_of_type, patch_newarray): Likewise.
4516         * resource.c (compile_resource_data): Likewise.
4517         * typeck.c (build_prim_array_type): Likewise.
4518
4519 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4520
4521         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4522         Don't create BLOCK here or call java_gimplify_block.
4523
4524 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4525
4526         * java-tree.h (flag_deprecated): Removed.
4527         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4528         * parse.y (check_deprecation): Check warn_deprecated instead of
4529         flag_deprecated.
4530
4531 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4532
4533         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4534         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4535         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4536         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4537         flag_force_classes_archive_check, flag_optimize_sci,
4538         flag_indirect_dispatch): Remove explicit declarations.
4539         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4540         final comment.
4541
4542 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4543
4544         PR bootstrap/14893
4545         * Make-lang.in (java.install-man): Install from either build
4546         tree or source tree, whichever has the file first.
4547
4548 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4549
4550         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4551         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4552         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4553         (do_java_lex): Likewise. Adjust force_fit_type call.
4554
4555 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4556             Andrew Haley  <aph@redhat.com>
4557
4558         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4559         checking trees as they're being built.
4560         (convert): Call convert_ieee_real_to_integer if we're
4561         converting a constant, even if we're writing a class file.
4562
4563 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4564
4565         PR java/16701
4566         * parse.y (fold_constant_for_init): Call resolve_field_access with
4567         correct current_class context.
4568
4569 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4570
4571         * decl.c (update_aliases, initialize_local_variable): Replace calls
4572         to build with calls to buildN.
4573         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4574         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4575         * parse.h (BUILD_THROW): Likewise.
4576         * parse.y (switch_expression, synchronized_statement,
4577         catch_clause_parameter, array_creation_expression,
4578         conditional_expression, make_qualified_name,
4579         resolve_qualified_expression_name, patch_method_invocation,
4580         patch_invoke, build_method_invocation, build_new_invocation,
4581         build_assignment, patch_assignment, build_binop, patch_binop,
4582         build_string_concatenation, build_incdec, patch_unaryop,
4583         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4584         patch_return, build_if_else_statement, build_labeled_block,
4585         build_new_loop, build_loop_body, build_bc_statement,
4586         build_assertion, encapsulate_with_try_catch, build_try_statement,
4587         build_try_finally_statement, patch_synchronized_statement,
4588         emit_test_initialization): Likewise, replace build with buildN.
4589
4590 2004-07-28  Eric Christopher  <echristo@redhat.com>
4591
4592         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4593         (java_unsafe_for_reeval): Ditto.
4594
4595 2004-07-26    <hp@bitrange.com>
4596
4597         * parse.y (build_super_invocation): Adjust declaration order to
4598         avoid declaration after statement.
4599
4600 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4601
4602         * decl.c: Rename all identifiers named `class' to `cl'.
4603
4604 2004-07-25  Richard Henderson  <rth@redhat.com>
4605
4606         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4607
4608 2004-07-23  Mike Stump  <mrs@apple.com>
4609
4610         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4611         * gjavah.c (throwable_p, decode_signature_piece,
4612         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4613         process_file): Likewise.
4614         * jcf-dump.c (main): Likewise.
4615         * jcf-io.c (read_zip_member): Likewise.
4616         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4617         give_name_to_class, get_class_constant): Likewise.
4618         * jcf-write.c (find_constant_wide, push_long_const,
4619         generate_classfile): Likewise.
4620         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4621         * parse.y (read_import_dir): Likewise.
4622         * typeck.c (parse_signature_type): Likewise.
4623         * verify.c (verify_jvm_instructions): Likewise.
4624         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4625
4626 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4627
4628         * Make-lang.in: Replace rmic and rmiregistry references with
4629         grmic and grmiregistry.
4630         * gcj.texi: Likewise.
4631
4632 2004-07-20  Andrew Haley  <aph@redhat.com>
4633
4634         PR java/16431.
4635         * verify.c (verify_jvm_instructions): Comment change only.
4636
4637         * typeck.c (build_java_array_type): Add size field to array name.
4638
4639         * java-tree.h (LOCAL_SLOT_P): New.
4640         (update_aliases): Add PC argument.
4641         (pushdecl_function_level): New function.
4642
4643         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4644         MODIFY_EXPR, and SAVE_EXPR.
4645         (java_gimplify_modify_expr): New function.
4646
4647         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4648         (expand_iinc): Pass PC to update_aliases().
4649         (STORE_INTERNAL): Likewise.
4650         (process_jvm_instruction): Likewise.
4651
4652         * decl.c (base_decl_map): New variable.
4653         (uniq): New variable.
4654         (update_aliases): Rewrite with more thorough checking.
4655         (debug_variable_p): New function.
4656         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4657         (check_local_named_variable): Delete whole function.
4658         (initialize_local_variable): New function.
4659         (check_local_unnamed_variable): Add checks and comments.
4660         (find_local_variable): Rewrite.
4661         (java_replace_reference): New function.
4662         (function_binding_level): New variable.
4663         (pushdecl_function_level): New function.
4664         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4665         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4666         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4667         function_binding_level.
4668         (end_java_method): Null unused fields to save memory.
4669
4670 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4671
4672         * class.c (add_interface_do): Remove.
4673         (set_super_info, interface_of_p, maybe_add_interface,
4674         add_interface, make_class_data, layout_class,
4675         add_miranda_methods): Adjust BINFO accessors and addition.
4676         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
4677         accessors.
4678         * jcf-write.c (generate_classfile): Likewise.
4679         * parse.y (patch_anonymous_class, check_inner_circular_reference,
4680         check_circular_reference, java_complete_class,
4681         check_abstract_method_definitions,
4682         java_check_abstract_method_definitions,
4683         check_interface_throws_clauses, java_check_abstract_methods,
4684         lookup_java_interface_method2,
4685         find_applicable_accessible_methods_list): Adjust BINFO accessors
4686         and addition.
4687         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
4688
4689 2004-07-18  Roger Sayle  <roger@eyesopen.com>
4690
4691         * builtins.c (max_builtin, min_builtin,
4692         java_build_function_call_expr): Replace calls to build with buildN.
4693         * class.c (build_class_ref, build_static_field_ref,
4694         get_dispatch_table, make_class_data, layout_class_method): Likewise.
4695         * constants.c (build_ref_from_constant_pool): Likewise.
4696         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
4697         add_stmt_to_compound): Likewise.
4698         * except.c (build_exception_object_ref, expand_end_java_handler):
4699         Likewise.
4700         * java-gimplify.c (java_gimplify_case_expr,
4701         java_gimplify_default_expr, java_gimplify_block,
4702         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
4703         * jcf-write.c (generate_bytecode_insns): Likewise.
4704         * typeck.c (convert_ieee_real_to_integer): Likewise.
4705
4706 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
4707
4708         * java-tree.h (builtin_function): Declare.
4709
4710 2004-07-16  Steven Bosscher  <stevenb@suse.de>
4711
4712         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
4713         abuse restore_line_number_status.
4714
4715 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
4716
4717         g++/15861
4718         * jcf-parse.c (java_emit_static_constructor): Specify default
4719         priority.
4720
4721 2004-07-13  Per Bothner  <per@bothner.com>
4722
4723         * java-tree.h (all_class_filename):  Remove useless macro.
4724         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
4725         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
4726         * parse.y (java_parser_context_restore_global):  Replace
4727         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
4728         * jcf-parse.c (read_class, java_parse_file):  Likewise.
4729
4730 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
4731
4732         PR java/16474
4733         gjavah.c (print_field_info): Emit constant only if field is static.
4734
4735 2004-07-11  Roger Sayle  <roger@eyesopen.com>
4736
4737         * expr.c (java_truthvalue_conversion, flush_quick_stack,
4738         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
4739         build_java_ret, build_java_throw_out_of_bounds_exception,
4740         build_java_array_length_access, java_check_reference,
4741         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
4742         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
4743         expand_java_arrayload, build_java_monitor, expand_java_return,
4744         expand_load_internal, expand_java_NEW, build_get_class,
4745         build_instanceof, expand_java_CHECKCAST, expand_iinc,
4746         build_java_soft_divmod, build_java_binop, build_field_ref,
4747         expand_compare, expand_java_goto, expand_java_switch,
4748         expand_java_add_case, build_class_init, build_known_method_ref,
4749         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
4750         expand_invoke, build_jni_stub, expand_java_field_op,
4751         java_expand_expr, expand_byte_code, STORE_INTERNAL,
4752         force_evaluation_order, emit_init_test_initialization): Convert
4753         calls to "build" into calls to the prefered "buildN" functions.
4754
4755 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
4756
4757         * java-tree.h (set_block): Remove.
4758         * lang.c (java_clear_binding_stack): New.
4759         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
4760         * decl.c (struct binding_level): Remove this_block.
4761         (clear_binding_level): Likewise.
4762         (poplevel): Don't handle this_block.
4763         (set_block): Remove.
4764
4765 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
4766
4767         * class.c (common_enclosing_context_p): Remove statement with no
4768         side-effects.
4769
4770 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4771
4772         PR java/8618
4773         * parse.y (create_anonymous_class): Remove 'location' argument. Use
4774         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
4775         (craft_constructor): Inherit access flags for implicit constructor
4776         from the enclosing class.
4777         (create_class): Fix comment typo.
4778         (resolve_qualified_expression_name): Pass type of qualifier to
4779         not_accessible_p, not the type in which target field was found.
4780         (not_accessible_p): Handle inner classes. Expand protected
4781         qualifier-subtype check to enclosing instances, but don't apply this
4782         check to static members. Allow protected access to inner classes
4783         of a subtype. Allow private access within common enclosing context.
4784         (build_super_invocation): Get WFL line number info from current
4785         class decl.
4786         (build_incomplete_class_ref): Update for new create_anonymous_class
4787         signature.
4788         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
4789         common_enclosing_instance_p.
4790         * class.c (common_enclosing_context_p): New. Determine if types
4791         share a common enclosing context, even across static contexts.
4792         (common_enclosing_instance_p): Renamed from
4793         common_enclosing_context_p. Determines if types share a common
4794         non-static enclosing instance.
4795         * java-tree.h (common_enclosing_instance_p): Declare.
4796         * jcf-write.c (get_method_access_flags): New. Surpress private flag
4797         for inner class constructors.
4798         (generate_classfile): Use get_method_access_flags.
4799
4800 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
4801
4802         * class.c (interface_of_p): Check for null TYPE_BINFO.
4803
4804 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
4805
4806         * class.c (make_class): Do not create binfo here.
4807         (set_super_info): Create it here.
4808         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
4809
4810 2004-07-08  Richard Henderson  <rth@redhat.com>
4811
4812         * expr.c (case_identity, get_primitive_array_vtable,
4813         java_expand_expr, emit_init_test_initialization): Remove.
4814         * java-tree.h (java_expand_expr): Remove.
4815         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
4816
4817 2004-07-07  Per Bothner  <per@bothner.com>
4818
4819         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
4820         get internal error due to mismatched types.
4821
4822         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
4823
4824         * gcj.texi (Linking):   New node.  Document -lgij usage.
4825
4826 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
4827
4828         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
4829         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
4830         * java/class.c (set_super_info, class_depth, interface_of_p,
4831         maybe_add_interface, add_interface, make_class_data,
4832         layout_class, add_miranda_methods): Adjust BINFO macros.
4833         * expr.c (can_widen_reference_to, lookup_field): Likewise.
4834         * jcf-write.c (generate_classfile): Likewise.
4835         * parse.y (patch_anonymous_class,
4836         check_inner_circular_reference, check_circular_reference,
4837         java_complete_class, check_abstract_method_definitions,
4838         java_check_abstract_method_definitions,
4839         check_interface_throws_clauses, java_check_abstract_methods,
4840         lookup_java_interface_method2,
4841         find_applicable_accessible_methods_list): Likewise.
4842         * typeck.c (find_method_in_interface): Likewise.
4843         * verify.c (merge_types): Likewise.
4844
4845 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
4846
4847         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
4848         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
4849
4850 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
4851
4852         * class.c (make_class): Use make_tree_binfo.
4853         (set_super_info, add_interface_do): Likewise.
4854         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
4855
4856 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4857
4858         * verify.c: Correct array element access formatting thinko.
4859
4860 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
4861
4862         * verify.c: Insert a short blurb at the start referring to the JVMS.
4863         (merge_type_state): Remove redundant nested if statement.
4864         (verify_jvm_instructions): Ensure current_subr is initialised to
4865         NULL_TREE.
4866         Minor formatting fixes all over the place.
4867
4868 2004-07-02  Richard Henderson  <rth@redhat.com>
4869
4870         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
4871
4872 2004-07-01  Richard Henderson  <rth@redhat.com>
4873
4874         * class.c (registerClass_libfunc): Remove.
4875         (init_class_processing): Don't set it.
4876         (emit_register_classes): Take list_p parameter.  Fill it in
4877         with _Jv_RegisterClass calls.
4878         * decl.c (java_init_decl_processing): Don't call
4879         init_resource_processing.
4880         * jcf-parse.c (java_emit_static_constructor): New.
4881         (java_parse_file): Call it.
4882         * resource.c (registerResource_libfunc): Remove.
4883         (init_resource_processing): Remove.
4884         (write_resource_constructor): Take list_p parameter.  Fill it in
4885         with _Jv_RegisterResource calls.
4886         * java-tree.h: Update prototypes.
4887
4888 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
4889
4890         PR java/1262
4891         * class.c (layout_class_method): Do not override package-private
4892         method if its in a different package.
4893         (split_qualified_name): Move here from parse.y. Rename from
4894         breakdown_qualified. Add comment.
4895         (in_same_package): Move here from parse.y. Add comment.
4896         * java-tree.h (break_down_qualified, in_same_package): Declare.
4897         (in_same_package): Likewise.
4898         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
4899         Callers updated.
4900
4901 2004-06-29  Andrew Haley  <aph@redhat.com>
4902
4903         * except.c (expand_start_java_handler): Push a new binding level.
4904         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4905         register_exception_range() to register where we'll do it.
4906         (expand_end_java_handler): Remove old bogus code.  Replace with
4907         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4908         the top of the expression we're curently building.
4909         (maybe_end_try): Delete.
4910         * decl.c (binding_level.exception_range): New field.
4911         (clear_binding_level): Add field exception_range.  Reformat.
4912         (poplevel): Call expand_end_java_handler().
4913         (poplevel): Call java_add_stmt only if functionbody is false.
4914         (maybe_poplevels): Don't call maybe_end_try() from here.
4915         (end_java_method): Clear no longer used trees in function decl.
4916         (register_exception_range): New function.
4917         * java-tree.h (register_exception_range, struct eh_range): Declare.
4918
4919 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
4920
4921         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
4922
4923 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
4924
4925         Formatting fixes.
4926         * expr.c (class_has_finalize_method): Fix method name indentation.
4927         (expand_java_call): Remove K&R style parameter declaration.
4928         (expand_invoke): Fix statement indentation.
4929         (expand_java_field_op): Likewise.
4930         * parse-scan.y: Fix typo.
4931         (reset_report): Fix method name indentation.
4932         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
4933         line. Fix typos.
4934         * verify.c (verify_jvm_instructions): Document parameters, insert
4935         page break.
4936         * lang.c (lang_init_source): Fix method name indentation.
4937         * class.c (common_enclosing_context_p): Likewise.
4938         (emit_symbol_table): Fix parameter list indentation.
4939         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
4940         parameter declaration.
4941         * constants.c: Fix copyright notice indentation.
4942         * typeck.c (find_method_in_superclasses): Fix parameter list
4943         indentation.
4944         (find_method_in_interfaces): Likewise.
4945         * zextract.c (makelong): Fix method name indentation.
4946
4947 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4948
4949         PR java/15715.
4950         * parse.y (create_interface): Set correct access modifiers for
4951         interfaces.
4952         * jcf-write.c (get_classfile_modifiers): New function.
4953         (generate_classfile): Use get_classfile_modifiers, not
4954         get_access_flags.
4955
4956 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4957
4958         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
4959         dependency to current parser context, not NULL_TREE, for top-level
4960         classes.
4961         (jdep_resolve_class): Enable member access check for all inner
4962         class dependencies.
4963
4964 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4965
4966         * parse.y (qualify_and_find): Pass type decl, not identifier, to
4967         load_class.
4968
4969 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4970
4971         PR java/15734
4972         * expr.c (expand_java_field_op): Ensure that target class for static
4973         field access has been loaded.
4974
4975 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
4976             Ranjit Mathew  <rmathew@hotmail.com>
4977
4978         PR java/1207, java/16178
4979         * jcf-parse.c (load_class): Return immediately if passed a type decl
4980         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
4981         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
4982         before calling load_class.
4983         (qualify_and_find): Likewise.
4984         (find_in_imports_on_demand): Likewise.
4985         (find_applicable_accessible_methods_list): Likewise.
4986
4987 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
4988
4989         * parse.y (java_layout_seen_class_methods): Don't call load_class
4990         on class defined by source parser.
4991
4992 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
4993
4994         * parse.y (set_nested_class_simple_name_value): Removed.
4995         (java_complete_expand_class): Remove calls to
4996         set_nested_class_simple_name_value.
4997
4998 2004-06-22  Andrew Haley  <aph@redhat.com>
4999             Ranjit Mathew  <rmathew@hotmail.com>
5000
5001         Fixes PR java/16113.
5002         * decl.c (force_poplevels): Remove call to expand_end_bindings.
5003
5004 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
5005
5006         * parse.y (create_class): Correct diagnostic message about
5007         java.lang.Object extending anything else.
5008
5009 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5010
5011         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5012         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5013         * constants.c (build_ref_from_constant_pool): Likewise.
5014         * expr.c (build_java_array_length_access): Likewise.
5015         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5016         (invoke_build_dtable, build_invokevirtual): Likewise.
5017         (build_invokeinterface, java_expand_expr): Likewise.
5018         (emit_init_test_initialization): Likewise.
5019         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5020         * parse.y (make_qualifed_name, build_array_ref): Likewise.
5021
5022 2004-06-21  Andrew Haley  <aph@redhat.com>
5023
5024         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5025         block.
5026
5027 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
5028
5029         * jcf.h (struct JCF): Change java_source, right_zip and finished
5030         to unsigned int.
5031         * lex.h (struct java_lexer): Change hit_eof, read_anything,
5032         byte_swap and use_fallback to unsigned int.
5033         * parse.h (struct _jdep): Change flag0 to unsigned int.
5034
5035 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
5036
5037         Fixes PR java/13948
5038         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5039         before trying to lay out its methods.
5040         * jcf-parse.c (read_class): Track parsed files using canonical paths
5041         obtained via lrealpath from libiberty.
5042         (java_parse_file): Likewise.
5043         (parse_source_file_1): Rename formal parameter to reflect its
5044         modified purpose. Minor formatting fix.
5045
5046 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5047
5048         * class.c (emit_register_classes): Make the function uninlinable,
5049         do not set current_function_cannot_inline.
5050         * resource.c (write_resource_constructor): Do not reset
5051         flag_inline_functions around rest_of_compilation.
5052
5053 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
5054
5055         PR java/15769
5056         * expr.c (java_truthvalue_conversion): Handle
5057         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5058         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5059         i.e. return the expression.
5060
5061 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
5062
5063         * gjavah.c: Include version.h
5064
5065 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
5066
5067         * jcf-write.c (generate_bytecode_conditional): Correct handling
5068         of unordered conditionals. Add comment.
5069
5070 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
5071             Per Bothner  <per@bothner.com>
5072
5073         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5074         local variable was initialised upon declaration.
5075         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5076         variable was final and initialised upon declaration.
5077         * check-init.c (check_final_reassigned): Give error only if a blank
5078         final is not definitely unassigned or if an initialised final is
5079         reassigned.
5080         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5081         assignment expressions. Remove case MODIFY_EXPR, label do_default.
5082         (check_init): Perform initialised-variable-removing-optimisation
5083         only on non-final local variables.
5084
5085 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5086
5087         * jcf-write.c (generate_bytecode_conditional): Handle binops
5088         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5089         and LTGT_EXPR.
5090         (generate_bytecode_insns): Likewise.
5091
5092 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5093
5094         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5095         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5096
5097 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5098
5099         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5100         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5101
5102 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5103
5104         * decl.c (struct binding_level): Add GTY marker. Compile
5105         binding_depth unconditionally.
5106         (current_binding_level, free_binding_level, global_binding_level):
5107         Likewise.
5108         (clear_binding_level): Unconditionally set binding_depth.
5109         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5110
5111 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5112
5113         * lex.c (java_new_lexer): Set 'encoding'.
5114         (java_read_char): Improve error message for unrecognized characters.
5115         * lex.h (struct java_lexer): New field 'encoding'.
5116
5117 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5118
5119         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5120
5121 2004-05-21  Mark Wielaard  <mark@klomp.org>
5122
5123         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5124         extern.
5125
5126 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
5127
5128         * typeck.c: Remove non-printable character 160.
5129
5130 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
5131
5132         * check-init.c: Correct minor typos.
5133
5134 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5135
5136         * Make-lang.in, expr.c, java-gimplify.c: Rename
5137         tree-simple.[ch] to tree-gimple.[ch].
5138
5139 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
5140
5141         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5142
5143 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5144
5145         Merge from tree-ssa-20020619-branch.  See
5146         ChangeLog.tree-ssa for details.
5147
5148         * Make-lang.in, builtins.c, check-init.c, class.c,
5149         constants.c, decl.c, except.c, expr.c, java-except.h,
5150         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5151         lang.c, lang.opt, parse.y, resource.c: Merged.
5152         * java-gimplify.c: New file.
5153
5154 2004-05-10  Andrew Haley  <aph@redhat.com>
5155
5156         * parse.y (create_class): Set TYPE_VFIELD.
5157         * decl.c (java_init_decl_processing): Likewise.
5158
5159         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5160         * class.c (make_method_value): Replace DECL_VINDEX with call to
5161         get_method_index().
5162         (get_dispatch_vector): Likewise.
5163         (layout_class_method): Likewise.
5164         Replace set of DECL_VINDEX with call to set_method_index().
5165         (set_method_index): New function.
5166         (get_method_index): New function.
5167         * java-tree.h (set_method_index): New function decl.
5168         (get_method_index): New function decl.
5169
5170 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
5171
5172         * parse.y (check_pkg_class_access): Add new argument
5173         and use it when cl is NULL to call lookup_cl on it.
5174         (parser_check_super_interface): Do not call lookup_cl.
5175         Pass this_decl to check_pkg_class_access and NULL
5176         instead of lookup_cl.
5177         (parser_check_super): Update for change in
5178         check_pkg_class_access.
5179         (do_resolve_class): Likewise.
5180         (process_imports): Likewise.
5181         (find_in_imports_on_demand): Likewise.
5182         (resolve_qualified_expression_name): Likewise.
5183
5184 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
5185
5186         Fixes PR java/9685, PR java/15073
5187         * parse.y (accessibility_string): New method.
5188         (not_accessible_field_error): Use accessibility_string()
5189         instead of java_accstring_lookup().
5190         (resolve_qualified_expression_name): Check with
5191         check_pkg_class_access() before allowing access using
5192         qualified names.
5193         Fix comment typo.
5194         Use check_pkg_class_access() instead of not_accessible_p()
5195         for unqualified types.
5196         (not_accessible_p): Use DECL_CONTEXT (member) instead of
5197         REFERENCE for package-private access checking.
5198         (patch_method_invocation): Use accessibility_string() instead
5199         of java_accstring_lookup().
5200
5201 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
5202
5203         Fixes PR java/15133
5204         * gjavah.c (struct method_name): Add member is_native.
5205         (overloaded_jni_method_exists_p): Match candidate method only if
5206         it is native.
5207         (print_method_info): Initialise is_native flag from the method's
5208         access flags.
5209
5210 2004-04-30  Roger Sayle  <roger@eyesopen.com>
5211
5212         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5213         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5214
5215 2004-04-22  Roger Sayle  <roger@eyesopen.com>
5216
5217         * resource.c (write_resource_constructor): Guard call to possibly
5218         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5219
5220 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
5221
5222         * class.c (make_class_data): Add new field aux_info.
5223         * decl.c (java_init_decl_processing): Push type and decl for
5224         `aux_info'.
5225
5226 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5227
5228         * expr.c (expand_java_NEW): Don't use size argument for
5229         _Jv_AllocObject calls.
5230         * parse.y (patch_invoke): Likewise.
5231
5232 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5233
5234         * expr.c (build_invokeinterface): Remove unused variables to
5235         fix warnings.
5236
5237 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5238
5239         * class.c (get_interface_method_index): New function. Return dispatch
5240         index for interface method.
5241         (make_method_value): For interface methods, set index field to
5242         iface dispatch index, not DECL_VINDEX.
5243         * expr.c (build_invokeinterface): Use get_interface_method_index.
5244
5245 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5246
5247         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5248
5249 2004-03-31  Andrew Haley  <aph@redhat.com>
5250
5251         PR java/14104
5252         * jcf-io.c (opendir_in_zip): Tidy up error handling.
5253
5254 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5255
5256         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5257         form of GTY markers.
5258
5259 2004-03-25  Marcus Meissner  <meissner@suse.de>
5260
5261         PR java/14689:
5262         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5263
5264 2004-03-23  Tom Tromey  <tromey@redhat.com>
5265
5266         PR java/14315:
5267         * jcf-write.c (make_class_file_name): Don't report if mkdir
5268         failed with EEXIST.
5269
5270 2004-03-23  Tom Tromey  <tromey@redhat.com>
5271
5272         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5273
5274 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
5275
5276         * class.c, gjavah.c, lang.c: Fix comment typos.
5277         * gcj.texi: Fix typos.
5278
5279 2004-03-19  Per Bothner  <per@bothner.com>
5280
5281         * gcj.texi (Code Generation):  Document new flags and assert defaults.
5282
5283         * class.c (assume_compiled_node_struct):  Rename type to
5284         class_flag_node_struct, as it is now also used for enable_assertions.
5285         Rename assume_compiled_node typedef.  Rename excludep field to value.
5286         (find_assume_compiled_node):  Rename function to find_class_flag_node.
5287         Minor optimization - avoid needless strlen.
5288         (add_assume_compiled):  Some tweaking and optimization.
5289         Rename and generalize to add_class_flag takem an extra parameter.
5290         (add_assume_compled):  New just calls add_class_flag.
5291         (add_enable_assert, enable_assertions):  New functions.
5292         (enable_assert_tree):  New static.
5293         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5294         * lang.opt (fenable-assertions, fenable-assertions=,
5295         fdisable-assertions, fdisable-assertions=):  New options.
5296         * lang.c (java_handle_option):  Handle new options.
5297         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
5298         class in an interface - create helper class nested in outer interface.
5299         (build_assertion):  Short-circuit if enable_assertions is false.
5300
5301 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5302
5303         * java-tree.h: Changes throughout to add checking to macros
5304         and numerous whitespace changes.
5305         (VAR_OR_FIELD_CHECK): New macro.
5306         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5307         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5308
5309 2004-03-16  Per Bothner  <per@bothner.com>
5310
5311         * jcf-jump.c (options):  New --print-constants option.
5312         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
5313
5314         * jcf-dump.c (flag_print_constant_pool):  Default to off.
5315         (print_constant_terse_with_index):  New helper function.
5316         (various places):  Check flag_print_constant_pool where missing.
5317         (main):  If verbose set flag_print_constant_pool.
5318         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
5319
5320 2004-03-15  Andrew Haley  <aph@redhat.com>
5321
5322         PR java/14581
5323         * parse.y (java_complete_lhs): Check that final variable has an
5324         initializer.
5325
5326 2004-03-12  Andrew Haley  <aph@redhat.com>
5327
5328         PR java/14551
5329         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5330         conversion.
5331
5332 2004-02-29  Roger Sayle  <roger@eyesopen.com>
5333
5334         * jcf-parse.c (java_parse_file): Handle the case that input_filename
5335         is NULL.
5336
5337 2004-02-27  Per Bothner  <per@bothner.com>
5338
5339         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
5340         suggestion:  Use build_incomplete_class_ref.
5341         This fixes PR java/13508, java/11714.
5342
5343 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
5344
5345         * java/parse.h: Update copyright.
5346
5347 2004-02-26  Andrew Haley  <aph@redhat.com>
5348
5349         PR java/14231:
5350         * parse.y (check_interface_throws_clauses): Check for
5351         !METHOD_INVISIBLE (iface_method).
5352         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5353         well as CLASS_ABSTRACT.
5354
5355 2004-02-25  Per Bothner  <per@bothner.com>
5356
5357         * parse.y (build_assertion):  If we're in an inner class, create the
5358         class$ helper routine in the outer class.
5359
5360 2004-02-19  Richard Henderson  <rth@redhat.com>
5361
5362         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5363
5364 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
5365
5366         * Make-lang.in (java.install-man): Add extra dependencies.
5367
5368 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
5369
5370         * Make-lang.in: Install man pages under the same names
5371         (possibly transformed) as the program they document.
5372
5373 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
5374
5375         * gjavah.c: Include "intl.h".
5376         (error): New function.
5377         (main): Call gcc_init_libintl.
5378         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5379         print_stub_or_jni, process_file, main): Use error rather than
5380         fprintf.
5381         (print_method_info, usage, help, version, main): Mark strings for
5382         translation with _.  Avoid splitting up sentences.  Send
5383         information messages to stdout.
5384         * jcf-dump.c: Include "intl.h".
5385         (main): Call gcc_init_libintl.
5386         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5387         Mark error, usage and version messages for translation with _.
5388         Avoid splitting up sentences.
5389         * jv-scan.c: Include "intl.h".
5390         (fatal_error, warning): Change parameter s to msgid.  Translate
5391         messages.
5392         (main): Call gcc_init_libintl.
5393         (usage, help, version): Mark error, usage and version messages for
5394         translation with _.  Avoid splitting up sentences.
5395         * jvgenmain.c: Include "intl.h".
5396         (main): Call gcc_init_libintl.
5397         (usage, main): Mark error messages for translation with _.
5398         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5399         JVGENMAIN_OBJS): Add intl.o.
5400         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5401         java/jvgenmain.o): Update dependencies.
5402
5403 2004-02-08  Per Bothner  <per@bothner.com>
5404
5405         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
5406         class don't use not_accessible_field_error, which can get confused.
5407
5408 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5409
5410         Make-lang.in (po-generated):  Delete.
5411
5412 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5413
5414         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5415         Depend on target.h.
5416         * decl.c: Include target.h.
5417         (start_java_method): Replace PROMOTE_PROTOTYPES with
5418         targetm.calls.promote_prototypes.
5419         * expr.c: Include target.h.
5420         (pop_arguments): Replace PROMOTE_PROTOTYPES with
5421         targetm.calls.promote_prototypes.
5422         * parse.y: Include target.h.
5423         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5424         with targetm.calls.promote_prototypes.
5425
5426 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5427
5428         * typeck.c: Update copyright.
5429
5430 2004-02-02  Tom Tromey  <tromey@redhat.com>
5431
5432         * decl.c (java_init_decl_processing): Remove duplicate
5433         gnu/gcj/RawData.
5434
5435 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
5436
5437         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5438
5439 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
5440
5441         * expr.c (build_field_ref): Move variable
5442         definition up.
5443
5444 2004-01-28  Andrew Haley  <aph@redhat.com>
5445
5446         * expr.c (build_field_ref): Widen field offset.
5447
5448 2004-01-27  Andrew Haley  <aph@redhat.com>
5449
5450         java/13273
5451         * parse.y (check_interface_throws_clauses): Make sure class_decl
5452         has been loaded.
5453
5454 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
5455
5456         PR java/13733
5457         * parse.y (patch_assignment): Don't modify lhs_type for
5458         reference assignments.
5459
5460 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5461
5462         * Make-lang.in: Replace $(docdir) with doc.
5463         (java.info, java.srcinfo, java.man, java.srcman): New rules.
5464         (java.install-man): Revamp rule.
5465
5466 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5467
5468         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5469         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5470         instead of deferred backquote.
5471
5472 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
5473
5474         * typeck.c (find_method_in_interfaces): Move variable
5475         definition up.
5476
5477 2004-01-16  Andrew Haley  <aph@redhat.com>
5478
5479         PR java/13273:
5480         * typeck.c (shallow_find_method): New.
5481         (find_method_in_superclasses): New.
5482         (find_method_in_interfaces): New.
5483         (lookup_do): Rewrite.
5484         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5485
5486         * jcf-parse.c (read_class): Save and restore output_class.
5487         * decl.c (java_expand_body): Set output_class from fndecl.
5488
5489 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
5490
5491         * class.c (gen_indirect_dispatch_tables): Fix string length
5492         calculations.
5493
5494 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5495
5496         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5497         (java.srcextra): Copy above back to source directory if requested.
5498         (po-generated): Delete reference to $(parsedir).
5499         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5500         Use implicit rule.
5501
5502 2004-01-14  Jan Hubicka  <jh@suse.cz>
5503
5504         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5505         estimation.
5506
5507 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5508
5509         * java-tree.h (java_expand_expr): Change prototype.
5510         * expr.c (java_expand_expr): Add alt_rtl parameter.
5511
5512 2004-01-09  Andrew Haley  <aph@redhat.com>
5513
5514         PR java/12755:
5515         * parse.y (java_fix_constructors):  Set output_class.
5516         (java_reorder_fields): Likewise.
5517         (java_layout_classes): Likewise.
5518         (java_expand_classes): Generate indirect dispatch tables.
5519         (java_expand_classes): Set output_class.
5520         (java_finish_classes): Likewise.
5521         * lang.c (java_init): Turn on always_initialize_class_p if we're
5522         using indirect dis[atch.
5523         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5524         (java_get_callee_fndecl): Use class local atable.
5525         * jcf-parse.c
5526         (always_initialize_class_p): Decl moved to java-tree.h.
5527         (HANDLE_CLASS_INFO): Set output_class.
5528         (read_class): Likewise.
5529         (parse_class_file): Call gen_indirect_dispatch_tables.
5530         (parse_zip_file_entries): Set output_class.
5531         (java_parse_file): Set output_class.  Don't emit symbol tables.
5532         * java-tree.h (output_class): New.
5533         Remove global declarations for otable, atable, and ctable.
5534         (always_initialize_class_p): moved here from decl.c.
5535         (DECL_OWNER): New.
5536         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5537         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5538         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5539         (struct lang_type): Add otable_methods, otable_decl,
5540         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5541         ctable_decl, catch_classes, type_to_runtime_map.
5542         * expr.c (build_field_ref): Make otable, atable, and ctable class
5543         local rather than global.
5544         (build_known_method_ref): Likewise.
5545         (build_invokeinterface): Likewise.
5546         (java_expand_expr): Pass runtime type (rather than actual type) to
5547         expand_start_catch.
5548         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5549         this class.  Look up each class in that map to delete duplicates.
5550         (expand_end_java_handler): Pass runtime type (rather than actual
5551         type) to expand_start_catch.
5552         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5553         (do_nothing): New.
5554         (java_init_decl_processing): Rearrange things.  Remove global
5555         declarations of otable, atable, and ctable.
5556         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5557         (java_expand_body): Set output_class.
5558         * constants.c (build_constant_data_ref): Use output_class, not
5559         current_class.
5560         (alloc_name_constant): Likewise.
5561         * class.c (gen_indirect_dispatch_tables): New.
5562         (build_class_ref): Generate hard reference to superclass, even if
5563         using indirect dispatch.
5564         (build_static_field_ref): Use class local atable.
5565         (make_class_data): Generate hard reference to superclass, even if
5566         using indirect dispatch.
5567         Generate symbolic references to interfaces when using indirect
5568         dispatch.
5569         (make_class_data): Emit otable, atable, and ctable.
5570         Make otable, atable, and ctable class local rather than global.
5571         (emit_catch_table): Make otable, atable, and ctable class local
5572         rather than global.
5573
5574 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5575
5576         * parse.y (catch_clause_parameter): Fix typo.
5577
5578         PR java/13404
5579         * parse.y: (catch_clause_parameter): Return early if $3, aka
5580         formal_parameter, is null.
5581
5582 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5583
5584         * class.c: Remove uses of "register" specifier in
5585         declarations of arguments and local variables.
5586         * decl.c: Likewise.
5587         * expr.c: Likewise.
5588         * gjavah.c: Likewise.
5589         * jcf-dump.c: Likewise.
5590         * jcf-io.c: Likewise.
5591         * jcf-parse.c: Likewise.
5592         * jcf-write.c: Likewise.
5593         * keyword.h: Likewise.
5594         * parse.y: Likewise.
5595         * typeck.c: Likewise.
5596         * verify.c: Likewise.
5597
5598 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5599
5600         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5601         (java.install_common, java.install-man): Adjust for above.
5602         (java.uninstall): Likewise.
5603
5604 2003-12-03  Michael Koch  <konqueror@gmx.de>
5605
5606         * class.c (make_class_data):
5607         Push field value to 'hack_signers' instead of 'signers'.
5608         * decl.c (java_init_decl_processing):
5609         Push field 'hack_signers' instead of 'signers'.
5610
5611 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5612
5613         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5614         including iconv.h.
5615
5616 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5617
5618         PR java/12374:
5619         * parse.y (qualify_ambiguous_name): Remove lots of broken
5620         field access processing - there's no need to do that here,
5621         because we have resolve_field_access.  Remove
5622         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5623         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5624         used.
5625
5626 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5627
5628         Fix PR java/13237
5629         * parse.y (java_complete_lhs): Save location prior to patching
5630         CALL_EXPR.
5631
5632 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5633
5634         PR java/12548
5635         * resource.c (write_resource_constructor): Append
5636         "_resource" to constructor identifier name.
5637
5638 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5639
5640         Fix PR java/13183.
5641         * constants.c (cpool_for_class): New function.
5642         (outgoing_cpool): Remove global variable.
5643         (alloc_name_constant): Use cpool_for_class.
5644         (build_constants_constructor): Likewise.
5645         * decl.c (java_expand_body): Set current_class.
5646         * java-tree.h (outgoing_cpool) Remove declaration.
5647         (init_outgoing_cpool): Likewise.
5648         * jcf-parse.c (init_outgoing_cpool): Remove function.
5649         (parse_class_file): Don't call init_outgoing_cpool.
5650         * parse.y (java_complete_expand_methods): Don't call
5651         init_outgoing_cpool.  Don't save outgoing_cpool.
5652         (java_expand_classes): Don't restore outgoing_cpool.
5653         (java_finish_classes): Likewise.
5654
5655 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5656
5657         * Make-lang.in: (java.install-common) Add
5658         symlink for $(target_noncanonical)-gcjh for
5659         native builds.
5660
5661 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5662
5663         * Make-lang.in (java.extraclean): Delete.
5664
5665 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5666
5667         * Make-lang.in (check-java): Add.
5668
5669 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5670
5671         Fix PR java/13024.
5672         * except.c (prepare_eh_table_type): Allocate variable-sized
5673         buffer `buf' with alloca.
5674
5675 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5676
5677         Fix PR java/12857.
5678
5679         decl.c (java_init_decl_processing): Don't initialize
5680         class_not_found_type_node, no_class_def_found_type_node.
5681
5682         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
5683         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
5684         (class_not_found_type_node, no_class_def_found_type_node):
5685         Don't define.
5686
5687         parse.y (build_dot_class_method_invocation): Add this_class
5688         argument.  Qualify method invocations to a different class.
5689         (create_new_parser_context): Initialize saved_data_ctx to 0.
5690         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
5691         (build_dot_class_method): Don't load classes.  Register
5692         incomplete types.
5693         (build_incomplete_class_ref): Special cases for interfaces
5694         and inner classes.  Move build_dot_class_method call to here...
5695         (patch_incomplete_class_ref): ...from here.  Pass current_class
5696         to build_dot_class_method_invocation.
5697         (build_assertion): Pass class_type to
5698         build_dot_class_method_invocation.
5699         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
5700
5701 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
5702
5703         Fix PR java/12739.
5704         * java-tree.h (BLOCK_EMPTY_P): Define.
5705         * parse.y (java_complete_lhs): Check for empty blocks
5706         in TRY_FINALLY_EXPR case.
5707
5708 2003-11-17  Andrew Haley  <aph@redhat.com>
5709
5710         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
5711         (struct lang_decl_var:freed): New variable.
5712         * decl.c (poplevel): Mark local vars that have gone out of scope.
5713         (push_jvm_slot): Don't use the RTL of a var that has gone out of
5714         scope.
5715
5716 2003-11-16  Jason Merrill  <jason@redhat.com>
5717
5718         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
5719         and TAGS files that include them for each front end.
5720
5721 2003-11-15  Tom Tromey  <tromey@redhat.com>
5722
5723         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
5724
5725 2003-11-12  Jason Merrill  <jason@redhat.com>
5726
5727         PR optimization/12547
5728         * lang.c (java_tree_inlining_walk_subtrees): Just walk
5729         BLOCK_EXPR_BODY directly.
5730
5731 2003-11-12  Andrew Haley  <aph@redhat.com>
5732
5733         PR java/11045
5734         * parse.y (fold_constant_for_init): Check that we really do have a
5735         constant.
5736
5737         PR java/11533
5738         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
5739         init_test_decls being inlined.
5740
5741         PR java/12890:
5742         * parse.y (do_resolve_class): Check return value from
5743         breakdown_qualified().
5744
5745 2003-11-11  Tom Tromey  <tromey@redhat.com>
5746
5747         PR java/12915:
5748         * parse.y (merge_string_cste): Handle case where we have a
5749         pointer that happens to be zero, not null_pointer_node.
5750
5751 2003-11-10  Tom Tromey  <tromey@redhat.com>
5752
5753         * jcf-parse.c (classify_zip_file): Correctly compare
5754         filename_length against length of manifest file's name.
5755
5756 2003-11-08  Tom Tromey  <tromey@redhat.com>
5757
5758         PR java/12894:
5759         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
5760
5761 2003-11-06  Andrew Haley  <aph@redhat.com>
5762
5763         * expr.c (java_stack_swap): Make sure destination stack slots are
5764         of the correct type.
5765
5766 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
5767
5768         * Make-lang.in (dvi): Move targets to $(docobjdir).
5769         (gcj.dvi): Simplify rule and adjust target.
5770         (gcj.info): Simplify rule.
5771         (gcj.pod): New intermediate rule.
5772         (gcjh.pod): Likewise.
5773         (jv-scan.pod): Likewise.
5774         (jcf-dump.pod): Likewise.
5775         (gij.pod): Likewise.
5776         (jv-convert.pod): Likewise.
5777         (rmic.pod): Likewise.
5778         (rmiregistry.pod): Likewise.
5779         (gcj.1): Delete.
5780         (gcjh.1): Delete.
5781         (jv-scan.1): Delete.
5782         (jcf-dump.1): Delete.
5783         (gij.1): Delete.
5784         (jv-convert.1): Delete.
5785         (rmic.1): Delete.
5786         (rmiregistry.1): Delete.
5787
5788 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
5789
5790         Fixes PR java/12866.
5791         * parse.y (resolve_qualified_expression_name): Move test
5792         for outer field access methods from here...
5793         (check_thrown_exceptions) ...to here.
5794
5795 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
5796
5797         * .cvsignore: Delete.
5798
5799 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
5800
5801         * verify.c (verify_jvm_instructions): Don't warn about legal
5802         eh binding regions generated for example by jdk 1.4.1.
5803
5804 2003-10-24  David S. Miller  <davem@redhat.com>
5805
5806         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
5807
5808 2003-10-22  Andrew Haley  <aph@redhat.com>
5809
5810         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
5811         (java_get_callee_fndecl): New.
5812
5813         * jcf-parse.c (java_parse_file): Call emit_catch_table().
5814
5815         * java-tree.h (ctable_decl): New.
5816         (catch_classes):  New.
5817         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
5818
5819         * decl.c (java_init_decl_processing): Add catch_class_type.
5820         Add ctable_decl.
5821         Add catch_classes field.
5822
5823         * class.c (build_indirect_class_ref): Break out from
5824         build_class_ref.
5825         (make_field_value): Check flag_indirect_dispatch.
5826         (make_class_data): Ditto.
5827         Tidy uses of PUSH_FIELD_VALUE.
5828         Add field catch_classes.
5829         (make_catch_class_record): New.
5830
5831         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
5832
5833 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5834
5835         * jcf-write.c: Follow spelling conventions.
5836         * parse.y: Likewise.
5837
5838 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
5839
5840         * ChangeLog: Fix typos.
5841         * expr.c: Fix comment typos.
5842         * jcf-write.c: Likewise.
5843         * lang.c: Likewise.
5844         * lex.c: Likewise.
5845         * mangle.c: Likewise.
5846         * parse-scan.y: Likewise.
5847         * parse.y: Likewise.
5848
5849 2003-10-22  Tom Tromey  <tromey@redhat.com>
5850
5851         * expr.c (expand_byte_code): Only warn about dead bytecode when
5852         extra_warnings is set.
5853
5854 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
5855
5856         Fix for PR java/12586.
5857         * mangle.c (find_compression_record_match): Don't iterate through
5858         package namespace elements unless they all match compression_table
5859         entries.
5860
5861 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
5862
5863         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
5864         (generate-manpages): Likewise.
5865         (java.maintainer-clean): Likewise.
5866         (gcj.info): Likewise.
5867         (gcj.1): Likewise.
5868         (gcjh.1): Likewise.
5869         (jv-scan.1): Likewise.
5870         (jcf-dump.1): Likewise.
5871         (gij.1): Likewise.
5872         (jv-convert.1): Likewise.
5873         (rmic.1): Likewise.
5874         (rmiregistry.1): Likewise.
5875         (java.install-man): Likewise.
5876         (parse-scan.o): Move and define complete compile line.
5877         (parse.o): Likewise.
5878         (jcf-tree-inline.o): Move.
5879
5880 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
5881
5882         * Make-lang.in (info): Update dependencies.
5883         (java.install-info): Remove.
5884         ($(srcdir)/java/gcj.info): Replace with ...
5885         ($(docobjdir)/gcj.info): ... this.
5886
5887 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
5888
5889         * Make-lang.in: Replace uses of $(target_alias) with
5890         $(target_noncanonical).
5891
5892 2003-10-09  Tom Tromey  <tromey@redhat.com>
5893
5894         * decl.c (java_init_decl_processing): Declare signers field.
5895         * class.c (make_class_data): Set signers field.
5896
5897 2003-10-09  Jason Merrill  <jason@redhat.com>
5898
5899         * parse.y (patch_assignment): Use make_node to create a BLOCK.
5900         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
5901         POINTER_TYPE.
5902
5903 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
5904
5905         * Make-lang.in (java.info): Replace with ...
5906         (info): ... this.
5907         (java.dvi): Replace with ...
5908         (dvi): ... this.
5909         (java.generated-manpages): Replace with ...
5910
5911 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
5912
5913         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
5914
5915 2003-10-01  Andrew Haley  <aph@redhat.com>
5916
5917         * jcf-parse.c (java_parse_file): Write otable and atable.
5918         * java-tree.h (atable_methods): New.
5919         (atable_decl): New.
5920         (atable_syms_decl): New.
5921         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
5922         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
5923         (symbol_*type): Rename method_symbol* to symbol*type.
5924         (emit_offset_symbol_table): Delete.
5925         (emit_symbol_table): New.
5926         (get_symbol_table_index): New.
5927         (atable_type): New.
5928         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
5929         (build_known_method_ref): Likewise.
5930         (get_symbol_table_index): Rename from get_offset_table_index.
5931         Parameterize to allow re-use by differing types of symbol table.
5932         (build_invokevirtual): Pass table to get_offset_table_index.
5933         * decl.c (java_init_decl_processing): Push types and decls for
5934         atable and atable_syyms.
5935         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
5936         (make_class_data): Add new fields atable and atable_syms.
5937         (emit_symbol_table): Rename from emit_offset_symbol_table.
5938         Parameterize to allow re-use by different types of symbol table.
5939         (build_symbol_entry): Renamed from build_method_symbols_entry.
5940
5941 2003-09-30  Roger Sayle  <roger@eyesopen.com>
5942
5943         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
5944         semantics for SAVE_EXPR, by caching the result in a temporary.
5945
5946 2003-09-28  Richard Henderson  <rth@redhat.com>
5947
5948         * check-init.c (check_init): Save and restore input_location
5949         instead of file and line separately.
5950         * decl.c (java_expand_body): Likewise.
5951         * jcf-write.c (generate_bytecode_insns): Likewise.
5952         * parse.y (safe_layout_class): Likewise.
5953         * jcf-parse.c (read_class, parse_class_file): Likewise.
5954         (java_parse_file): Use %H for warning locator.
5955
5956 2003-09-28  Roger Sayle  <roger@eyesopen.com>
5957
5958         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
5959         with void-type branches instead of using a COMPOUND_EXPR.
5960
5961 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
5962
5963         * decl.c (java_optimize_inline, dump_function): Remove.
5964         * java-tree.h (java_optimize_inline): Remove declaration.
5965         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
5966         * parse.y (source_end_java_method, java_expand_classes):
5967         Likewise.  Remove dead code.
5968
5969 2003-09-27  Roger Sayle  <roger@eyesopen.com>
5970
5971         * lang.c (java_init_options): Set flag_evaluation_order.
5972         * expr.c (force_evaluation_order): Don't attempt to force
5973         evaluation order of binary operations using save_expr.
5974         * parse.y (java_complete_lhs): No longer need to call
5975         force_evaluation_order when constructing binary operators.
5976
5977 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
5978             Bryce McKinlay  <bryce@mckinlay.net.nz>
5979
5980         PR java/1333:
5981         * parse.y (not_accessible_field_error): New function.
5982         (resolve_expression_name): Check field access permissions.
5983         (resolve_qualified_expression_name): Use
5984         not_accessible_field_error.
5985         (resolve_qualified_expression_name): Likewise.
5986
5987 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5988
5989         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
5990
5991 2003-09-23  Roger Sayle  <roger@eyesopen.com>
5992
5993         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
5994         with equal operands without side-effects.
5995
5996 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
5997
5998         * decl.c (java_init_decl_processing): Don't emit otable decls
5999         if flag_indirect_dispatch is not set.
6000
6001 2003-09-21  Richard Henderson  <rth@redhat.com>
6002
6003         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6004         resource.c: Revert.
6005
6006 2003-09-21  Richard Henderson  <rth@redhat.com>
6007
6008         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6009         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6010
6011 2003-09-20  Richard Henderson  <rth@redhat.com>
6012
6013         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6014
6015 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6016
6017         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6018         * check-init.c (check_init): Likewise.
6019
6020 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6021
6022         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6023
6024 2003-09-16  Andrew Haley  <aph@redhat.com>
6025
6026         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6027
6028 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
6029
6030         Fixes PR java/9577
6031         * mangle.c (find_compression_record_match): Skip
6032         over a "6JArray" (the array template mangled string)
6033         IDENTIFIER_NODE.
6034         (mangle_array_type): Correct minor typo.
6035         (atms): Move definition to the beginning.
6036
6037 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
6038
6039         * class.c (add_miranda_methods): Ensure super-interfaces are laid
6040         out. Fix for PR java/12254.
6041
6042 2003-09-11  Richard Henderson  <rth@redhat.com>
6043
6044         * parse.y (source_end_java_method): Update for new
6045         cgraph_finalize_function argument.
6046
6047 2003-09-09  Richard Henderson  <rth@redhat.com>
6048
6049         * parse.y (source_end_java_method): Update call to
6050         cgraph_finalize_function.
6051
6052 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
6053
6054         * decl.c (java_expand_body): New function.
6055         * expr.c (build_class_init): Set DECL_IGNORED_P.
6056         * java-tree.h (start_complete_expand_method,
6057         java_expand_body): Declare.
6058         * jcf-parse.c (cgraph.h): Include.
6059         (java_parse_file): Handle flag_unit_at_a_time.
6060         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6061         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6062         (java_estimate_num_insns): Use walk_tree_without_duplicates.
6063         (java_start_inlining): New function.
6064         * parse.h (java_finish_classes): Declare.
6065         * parse.y: Include cgraph.h.
6066         (block): Don't special-case empty block production.
6067         (craft_constructor): Set DECL_INLINE.
6068         (source_end_java_method): Handle flag_unit_at_a_time.
6069         Replace inline code with call to java_expand_body.
6070         (start_complete_expand_method): Remove static modifier.
6071         (java_expand_method_bodies): Patch function tree for
6072         class initialization and/or synchronization as needed.
6073         Don't begin RTL expansion yet.
6074         (java_expand_classes): Check flag_unit_at_a_time before
6075         calling finish_class.
6076         (java_finish_classes): New function.
6077         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6078         (patch_assignment): Set DECL_CONTEXT on temporary variable.
6079         (emit_test_initialization): Set DECL_IGNORED_P.
6080
6081 2003-09-03  Roger Sayle  <roger@eyesopen.com>
6082
6083         * builtins.c (enum builtin_type): Delete unused enumeration.
6084         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6085
6086 2003-08-28  Tom Tromey  <tromey@redhat.com>
6087
6088         * gcj.texi (Extensions): Document gcjlib URLs.
6089
6090 2003-08-20  Tom Tromey  <tromey@redhat.com>
6091
6092         * gcj.texi (Extensions): Added xref.
6093         (libgcj Runtime Properties): Document
6094         gnu.gcj.runtime.VMClassLoader.library_control.
6095
6096 2003-08-20  Andrew Haley  <aph@redhat.com>
6097
6098         * except.c (prepare_eh_table_type): Use new encoding for exception
6099         handlers when using -fno-assume-compiled.
6100
6101 2003-08-13  Tom Tromey  <tromey@redhat.com>
6102
6103         * gcj.texi (Invoking gij): Document -X and -?.
6104
6105 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
6106
6107         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6108         GCJH_OBJS, JCFDUMP_OBJS
6109         * win32-host.c: Removed the unnecessary and broken dependency
6110         on jcf.h
6111
6112 2003-08-11  Tom Tromey  <tromey@redhat.com>
6113
6114         * parse.y (java_check_regular_methods): Typo fixes.  Call
6115         check_interface_throws_clauses.  Use
6116         check_concrete_throws_clauses.
6117         (check_interface_throws_clauses): New function.
6118         (check_concrete_throws_clauses): New function.
6119         (hack_is_accessible_p): New function.
6120         (find_most_specific_methods_list): Added FIXME.
6121         * typeck.c (lookup_do): Use `flags' argument to decide what to
6122         do.  Reimplemented.
6123         (lookup_argument_method_generic): New function.
6124         (lookup_argument_method2): Removed.
6125         * jcf.h (ACC_INVISIBLE): New define.
6126         * jcf-write.c (generate_classfile): Skip invisible methods.
6127         * class.c (add_miranda_methods): New function.
6128         (layout_class_methods): Use it.
6129         (get_access_flags_from_decl): Use ACC_INVISIBLE.
6130         * java-tree.h (METHOD_INVISIBLE): New define.
6131         (lang_decl_func) [invisible]: New field.
6132         (lookup_argument_method_generic): Declare.
6133         (SEARCH_INTERFACE): New define.
6134         (SEARCH_SUPER): Likewise.
6135         (SEARCH_ONLY_INTERFACE): Likewise.
6136         (SEARCH_VISIBLE): Likewise.
6137         (lookup_argument_method2): Removed declaration.
6138
6139 2003-08-05  Tom Tromey  <tromey@redhat.com>
6140
6141         Fix for PR java/11600:
6142         * parse.y (java_complete_lhs): See whether we're calling a method
6143         on an array.
6144         (check_thrown_exceptions): Added `is_array_call' argument;
6145         fixed `clone' checking; updated all callers.
6146
6147 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
6148
6149         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6150
6151 2003-08-03  Tom Tromey  <tromey@redhat.com>
6152
6153         * java-tree.h (METHOD_TRANSIENT): Removed.
6154         * decl.c (pushdecl): Removed some dead code.
6155         * class.c (get_access_flags_from_decl): Can't have transient
6156         method.
6157         (add_method_1): Can't have a transient method.
6158
6159 2003-07-28  Andreas Jaeger  <aj@suse.de>
6160
6161         * jvspec.c: Convert to ISO C90 prototypes.
6162
6163 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6164
6165         * decl.c (force_poplevels): Fix warning call.
6166
6167 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6168
6169         * expr.c (expand_java_field_op): Don't use xxx_with_decl
6170         (expand_java_field_op): Likewise.
6171         * class.c (layout_class_method): Likewise
6172         (emit_register_classes): Likewise.
6173         * decl.c (pushdecl): Likewise.
6174         (poplevel): Likewise.
6175         (force_poplevels): Likewise.
6176         (give_name_to_locals): Likewise.
6177         * check-init.c (check_for_initialization): Likewise.
6178
6179 2003-07-24  Jason Merrill  <jason@redhat.com>
6180
6181         * java-tree.h: Move boolean_type_node et al to the back end.
6182
6183 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6184
6185         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6186         casts.
6187
6188 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
6189
6190         * lang.opt: Don't show -MD_ and -MDD_.
6191
6192 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
6193
6194         * lang-options.h: Remove.
6195         * lang.opt: Add help text.
6196
6197 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
6198
6199         * expr.c: Remove the last argument to expand_assignment().
6200
6201 2003-07-09  Jan Hubicka  <jh@suse.cz>
6202
6203         * java-tree.h (DECL_NUM_STMTS): Rename to...
6204         (DECL_ESTIMATED_INSNS): ... this.
6205         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6206         New static functions.
6207         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6208         * parser.y (add_stmt_to_compound): Do not account statements.
6209
6210 2003-07-08  Mark Wielaard  <mark@klomp.org>
6211
6212         * gcj.texi: CNI now expands to Compiled Native Interface.
6213
6214 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6215
6216         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6217
6218 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6219
6220         * expr.c (expand_byte_code): Adjist emit_line_note call.
6221
6222 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
6223
6224         * lang.c (java_handle_option): Don't handle filenames.
6225
6226 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
6227
6228         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6229         DIR_SEPARATOR.
6230         Use FILENAME_CMP.
6231         * jcf-write.c: Don't default-define DIR_SEPARATOR.
6232         * jcf.h: Delete COMPARE_FILENAMES definition.
6233
6234 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
6235
6236         * lang.c (java_init_options): Update prototype.
6237
6238 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
6239
6240         * decl.c (poplevel): Adjust define_label call.
6241
6242 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
6243
6244         * gjavah.c (flag_jni): Make non-static.
6245         * parse-scan.y (ctxp): Make non-static.
6246
6247         * class.c (build_method_symbols_entry)
6248         * expr.c (get_offset_table_index)
6249         * jcf-parse.c (jcf_parse):
6250         Mark the definition static, matching the forward declaration.
6251
6252 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
6253
6254         * lang.c (java_handle_option): Don't check for missing arguments.
6255
6256 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6257
6258         * class.c (push_class): Use a location_t to save place.
6259         (emit_register_classes): Set input_location. Adjust
6260         expand_function_end call.
6261         * resource.c (write_resource_constructor): Likewise.
6262         * decl.c (end_java_method): Adjust expand_function_end call.
6263         * parse.y (source_end_java_method): Likewise.
6264
6265 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
6266
6267         * lang.c (java_handle_option): Likewise.
6268
6269 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
6270
6271         * lang.c (java_handle_option): Special-casing of optional
6272         joined arguments no longer needed.
6273         * lang.opt: Update switches that take optional argument.
6274
6275 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6276
6277         * lang.opt: Declare Java.
6278         * lang.c (java_init_options): Update.
6279
6280 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6281
6282         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6283
6284 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6285
6286         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6287         * lang.c (java_handle_option): -MD and -MMD have an underscore.
6288         * lang.opt: -MD and -MMD have an underscore.
6289
6290 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6291
6292         * class.c (emit_register_classes): Adjust init_function_start
6293         call.
6294         * decl.c (complete_start_java_method): Likewise.
6295         * resource.c (write_resource_constructor): Likewise.
6296
6297 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6298
6299         * Make-lang.in: Update to use options.c and options.h.
6300         * lang.c: Include options.h not j-options.h.
6301         (java_handle_option): Abort on unrecognized option.
6302         (java_init_options): Request Java switches.
6303
6304 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
6305
6306         * Make-lang.in: Handle mostlyclean.
6307
6308 2003-06-11  Tom Tromey  <tromey@redhat.com>
6309
6310         * lang.c (java_handle_option): Update dependency_tracking for
6311         OPT_MF case.
6312
6313         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6314         empty argument.
6315
6316 2003-06-10  Andrew Haley  <aph@redhat.com>
6317
6318         * resource.c (write_resource_constructor): Use expand_expr to
6319         generate the address of the label attached to a resource.
6320         * Make-lang.in (java/resource.o): Add expr.h
6321
6322 2003-06-10  Andrew Haley  <aph@redhat.com>
6323
6324         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6325         (java_decl_ok_for_sibcall): New.
6326
6327 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
6328
6329         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6330         (java/j-options.c, java/j-options.h): New.
6331         * java-tree.h (resource_name, compile_resource_file,
6332         compile_resource_data): Constify.
6333         * jcf-write.c (jcf_write_base_directory): Similarly.
6334         * jcf.h (jcf_write_base_directory): Similarly.
6335         * lang.c: Include j-options.h.
6336         (cl_options_count, cl_options, string_option, java_decode_option,
6337         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6338         process_option_with_no): Remove.
6339         (resource_name): Constify.
6340         (LANG_HOOKS_HANDLE_OPTION): Override.
6341         (java_handle_option): New.
6342         (java_init): Don't call jcf_path_init.
6343         (java_init_options): Call jcf_path_init.
6344         * lang.opt: New.
6345         * resource.c (compile_resource_data, compile_resource_file): Constify.
6346
6347 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
6348
6349         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6350         (struct lang_decl_func): Add last_line field.
6351         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6352         DECL_SOURCE_LINE_LAST): Remove.
6353         * parse.y (missing_return_error, finish_method_declaration,
6354         lookup_cl, start_artificial_method_body, source_end_java_method,
6355         start_complete_expand_method): Adjust.
6356
6357 2003-06-08  Tom Tromey  <tromey@redhat.com>
6358
6359         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6360         fno-assume-compiled.
6361
6362 2003-06-08  Roger Sayle  <roger@eyesopen.com>
6363
6364         * builtins.c (define_builtin_type, builtin_types): Delete.
6365         (define_builtin): Rewritten to take just the built-in code,
6366         the function's name, type and fallback library function name.
6367         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6368         (initialize_builtins): Overhaul to define the GCC builtins
6369         used by gcj manually, providing the Java run-time's
6370         implementations as the fallback library function.
6371
6372 2003-06-08  Anthony Green  <green@redhat.com>
6373
6374         * parse.y (patch_cast): Fix conversions from floating-point to
6375         integral types.
6376
6377 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
6378
6379         * Make-lang.in: Update.
6380         * lang.c: Include opts.h. Define cl_options_count and cl_options.
6381
6382 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
6383
6384         * lang.c (java_init_options): Update.
6385
6386 2003-06-05  Jan Hubicka  <jh@suse.cz>
6387
6388         * Make-lang.in:  Add support for stageprofile and stagefeedback
6389
6390 2003-05-31  Roger Sayle  <roger@eyesopen.com>
6391
6392         * lang.c (java_init_options): Prescribe wrap-around two's
6393         complement arithmetic overflow by setting flag_wrapv.
6394
6395 2003-05-29  Roger Sayle  <roger@eyesopen.com>
6396
6397         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6398         (builtin_record): Add an additional builtin_code field to
6399         record which GCC built-in corresponds to the Java function.
6400         (java_builtins):  Add new entries for atan, atan2, exp, log,
6401         pow and tan.
6402         (max_builtin, min_builtin, abs_builtin): Perform constant
6403         folding on the resulting tree.
6404         (java_build_function_call_expr): Likewise, perform constant
6405         folding on the resulting tree.
6406         (initialize_builtins): The NULL creators are now allowed in
6407         the java_builtins table, which is now terminated by an entry
6408         with builtin_code == END_BUILTINS.
6409         (check_for_builtin): Likewise.  If the matching creator is
6410         NULL, construct the call using java_build_function_call_expr
6411         directly with the decl for the corresponding builtin_code.
6412
6413 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6414
6415         * win32-host.c: Normalize copyright boilerplate.
6416
6417 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6418
6419         * parse.y (print_int_node): Use string concatentation on
6420         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6421         function calls into one.
6422
6423 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
6424
6425         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6426         fatal_io_error with calls to fatal_error; add ": %m" to the end of
6427         all the affected error messages.
6428
6429 2003-05-13  Richard Henderson  <rth@redhat.com>
6430
6431         * class.c (layout_class_method): Set DECL_EXTERNAL.
6432         * decl.c (java_mark_decl_local, java_mark_class_local): New.
6433         * java-tree.h (java_mark_class_local): Declare.
6434         * jcf-parse.c (parse_class_file): Use it.
6435         * parse.y (java_expand_classes): Likewise.
6436
6437 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
6438
6439         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6440         * lex.h: #include input.h.
6441         * jv-scan.c (input_filename): Remove.
6442
6443 2003-05-02  Tom Tromey  <tromey@redhat.com>
6444
6445         PR java/10491:
6446         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6447         (handle_inner_classes): New function.
6448
6449 2003-05-01  Tom Tromey  <tromey@redhat.com>
6450
6451         PR java/10459:
6452         * parse.y (finish_for_loop): Do nothing if update expression is a
6453         EXPR_WFL_NODE wrapping nothing.
6454         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6455
6456 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
6457
6458         * lex.h (input_lineno): Remove declaration.
6459         * parse-scan.y: #include input.h.
6460         (input_filename): Remove declaration.
6461         (input_location): Add definition.
6462         (input_line): Remove definition.
6463
6464 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6465
6466         * lex.h (lineno): Rename to ...
6467         (input_line): ... here
6468         * parse-scan.y (lineno): Rename to ...
6469         (input_line): ... here.
6470         (reset_report): Rename lineno to input_line.
6471         * check-init.c (check_init): Likewise.
6472         * class.c (push_class): Likewise.
6473         * decl.c (complete_start_java_method, end_java_method): Likewise.
6474         * expr.c (expand_byte_code): Likewise.
6475         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6476         * jcf-write.c (generate_bytecode_insns): Likewise.
6477         * lex.c (java_init_lex, java_allocate_new_line,
6478         do_java_lex): Likewise.
6479         * parse.h (YYNOT_TWICE): Likewise.
6480         * parse.y (empty_statement, expression_statement,
6481         java_pop_parser_context, java_parser_context_save_global,
6482         yyerror, register_fields, method_header, safe_layout_class,
6483         find_in_imports_on_demand, create_artificial_method,
6484         source_end_java_method, start_complete_expand_method,
6485         build_thisn_assign, java_complete_lhs,
6486         maybe_absorb_scoping_block): Likewise.
6487
6488 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
6489
6490         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6491         '/' when computing java source filename
6492
6493 2003-04-13  Tom Tromey  <tromey@redhat.com>
6494
6495         * gjavah.c (print_c_decl): Indentation fix.
6496
6497 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
6498
6499         * class.c (make_field_value, make_method_value, get_dispatch_table)
6500         (make_class_data, emit_offset_symbol_table)
6501         * constants.c (build_constants_constructor)
6502         * java-tree.h (START_RECORD_CONSTRUCTOR)
6503         * parse.y (maybe_build_array_element_wfl):
6504         Use build_constructor.
6505
6506 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
6507
6508         PR java/10253:
6509         * parse.y (string_convert_int_cst): Always use at least one digit
6510         in string conversion. Remove ASCII dependence.
6511         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6512
6513 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
6514
6515         * Make-lang.in: added win32-host.c
6516         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6517         resolves to open() on non-Win32 platforms and
6518         Win32-specific jcf_open_exact_case() on Win32
6519         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6520         when trying .java and .class files
6521         * win32-host.c: added to repository. Defines
6522         Win32-specific jcf_open_exact_case()
6523
6524 2003-04-10  Andrew Haley  <aph@redhat.com>
6525
6526         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6527         (maybe_free_localvar): Renamed from localvar_free.
6528         Add new arg, really.
6529         (generate_bytecode_insns): Set new variable, jsrs.
6530         Only free local vars if no jsr insns have been emittted.
6531         Call maybe_free_localvar, not localvar_free.
6532
6533 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6534
6535         * gcj.texi: Remove @ at start of file.
6536
6537 2003-03-25  Tom Tromey  <tromey@redhat.com>
6538
6539         * parse.y (create_interface): Call CHECK_DEPRECATED.
6540
6541 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6542
6543         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6544
6545 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6546
6547         * javaop.h (jfloat, jdouble): Make them structures mirroring
6548         the bit fields of IEEE float and double respectively.
6549         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6550         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6551         (union Word, union DWord): Delete.
6552         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6553
6554         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6555         D_NAN_MASK): Delete.
6556         (jni_print_float, jni_print_double): New.  Generate
6557         hexadecimal floating constants.
6558         (print_field_info): Use jni_print_float/double.
6559
6560         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6561         finite floating point numbers for output; special case
6562         non-finite floats.
6563
6564 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6565
6566         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6567         Replace 0 and 1 with true and false in return statements.
6568
6569 2003-03-19  Tom Tromey  <tromey@redhat.com>
6570
6571         * lex.c (do_java_lex): Renamed from java_lex.
6572         (java_lex): New function.
6573         Include timevar.h.
6574
6575 2003-03-13  Tom Tromey  <tromey@redhat.com>
6576
6577         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6578         type.
6579
6580 2003-03-04  Andrew Haley  <aph@redhat.com>
6581
6582         * gjavah.c (is_first_data_member): New global variable.
6583         (print_c_decl): If it's the first data member, align it as the
6584         superclass.
6585         (process_file): Set is_first_data_member.
6586
6587 2003-03-11  Tom Tromey  <tromey@redhat.com>
6588
6589         * parse.y (resolve_field_access): Initialize class if field is
6590         found in another static field.
6591         * expr.c (build_class_init): Don't optimize out initialization of
6592         implemented interface.
6593
6594 2003-03-11  Andrew Haley  <aph@redhat.com>
6595
6596         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6597         warning.
6598
6599 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6600
6601         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6602         and DIR_SEPARATOR_2 for a target.
6603         Correct minor typos.
6604
6605         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6606         and DIR_SEPARATOR_2 for a target into account.
6607
6608 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6609
6610         * lang.c (java_init): Update prototype, move code to java_post_options.
6611         (java_post_options): Similarly.
6612
6613 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6614
6615         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6616         compare file name components depending on the case-sensitivity
6617         or otherwise of the host file system.
6618
6619         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6620         "strcmp" to compare file name components.
6621         Use IS_DIR_SEPARATOR instead of comparing directly against
6622         DIR_SEPARATOR.
6623         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6624         comparing directly against DIR_SEPARATOR.
6625
6626 2003-03-04  Tom Tromey  <tromey@redhat.com>
6627
6628         * Make-lang.in (java.tags): New target.
6629
6630 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6631
6632         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6633         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6634
6635 2003-03-01  Tom Tromey  <tromey@redhat.com>
6636
6637         * parse.y (jdep_resolve_class): Only check deprecation if we found
6638         a decl.
6639
6640 2003-02-28  Tom Tromey  <tromey@redhat.com>
6641
6642         PR java/9695:
6643         * class.c (maybe_layout_super_class): Always pass a WFL to
6644         do_resolve_class.
6645         * parse.y (do_resolve_class): Updated comment to explain
6646         parameters.
6647
6648 2003-02-26  Tom Tromey  <tromey@redhat.com>
6649
6650         * jcf-write.c (generate_classfile): Check whether class is
6651         deprecated before writing attribute count.
6652
6653 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6654
6655         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6656         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6657
6658 2003-02-23  Tom Tromey  <tromey@redhat.com>
6659
6660         * lang-options.h: Added -Wdeprecated.
6661         * gcj.texi (Warnings): Document -Wdeprecated.
6662         * java-tree.h (flag_deprecated): Declare.
6663         * lang.c (lang_W_options): Added deprecated.
6664         (flag_deprecated): New global.
6665         * chartables.h: Rebuilt.
6666         * gen-table.pl (process_one): Look at whitespace.
6667         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6668         * parse.h (CLEAR_DEPRECATED): New macro.
6669         (CHECK_DEPRECATED_NO_RESET): New macro.
6670         * jcf-parse.c (handle_deprecated): New function.
6671         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6672         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
6673         * parse.y (resolve_type_during_patch): Check deprecation.
6674         (jdep_resolve_class): Likewise.
6675         (process_imports): Likewise.
6676         (resolve_expression_name): Likewise.
6677         (check_deprecation): Strip arrays from decl.  Check
6678         flag_deprecated.
6679         (patch_method_invocation): Also check the particular constructor
6680         for deprecation.
6681         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
6682         * jcf-write.c (append_deprecated_attribute): New function.
6683         (generate_classfile): Generate deprecated attribute when
6684         appropriate.
6685         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
6686         (java_lex) [case '*']: Simplify logic.
6687         (java_start_char_p): Use LETTER_MASK.
6688         (java_part_char_p): Likewise.
6689         (java_space_char_p): New function.
6690
6691 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
6692
6693         Change base class access representation.
6694         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
6695         (add_interface_do): Likewise.
6696
6697 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
6698
6699         * decl.c (java_init_decl_processing): Change
6700         soft_lookupjnimethod_node to reflect the change in
6701         signature of _Jv_LookupJNIMethod in libjava/jni.cc
6702         * expr.c (build_jni_stub): Calculate and pass the size
6703         on the stack of the arguments to a JNI function. Use
6704         new target macro MODIFY_JNI_METHOD_CALL to allow a
6705         target to modify the call to a JNI method.
6706
6707 2003-02-08  Roger Sayle  <roger@eyesopen.com>
6708
6709         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
6710         instead of basename to avoid compiler warnings on Tru64.
6711
6712 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
6713
6714         * gcj.texi: Update to GFDL 1.2.
6715
6716 2003-01-31  Andrew Haley  <aph@redhat.com>
6717
6718         * parse.y (java_expand_classes): Scan the whole class list looking
6719         for access methods that haven't yet been expanded.
6720
6721 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
6722
6723         Fix for java/4269:
6724
6725         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
6726         to fix bootstrap on sparc-unknown-netbsdelf1.5.
6727         * jcf-parse.c: Likewise.
6728
6729 2003-01-31  Mark Wielaard  <mark@klomp.org>
6730
6731         * gjavah.c (throwable_p): Allocate 1 more byte for string.
6732
6733 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
6734
6735         * class.c (make_class): Use BINFO_ELTS.
6736         (set_super_info): Likewse.
6737         (add_interface_do): Likewise.
6738
6739 2003-01-30  Tom Tromey  <tromey@redhat.com>
6740
6741         * jcf-parse.c (read_class): Update identifier's class value if it
6742         changed during parsing.
6743
6744 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
6745
6746         * Make-lang.in (po-generated): Find the targets in $(parsedir).
6747         Propagate change to all other rules as required.
6748         (java/parse-scan.o): Add explicit dependency on
6749         $(parsedir)/java/parse-scan.c .
6750
6751 2003-01-29  Tom Tromey  <tromey@redhat.com>
6752
6753         * parse.y (patch_assignment): Only transform the rhs of an
6754         assignment when compiling to native.
6755
6756 2003-01-28  Tom Tromey  <tromey@redhat.com>
6757
6758         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
6759
6760 2003-01-28  Tom Tromey  <tromey@redhat.com>
6761
6762         * lex.c (java_lex): Don't include UEOF as part of token.
6763         (java_read_unicode): Error if \u sequence prematurely terminated.
6764
6765 2003-01-27  Tom Tromey  <tromey@redhat.com>
6766
6767         * parse.y (java_check_regular_methods): Check for construct after
6768         checking types in throws clause.
6769
6770 2003-01-24  Tom Tromey  <tromey@redhat.com>
6771
6772         * class.c (build_static_field_ref): Only a String or numeric field
6773         can fold to a constant.
6774
6775 2003-01-23  Tom Tromey  <tromey@redhat.com>
6776
6777         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
6778         file name in resource buffer.
6779
6780 2003-01-23  Tom Tromey  <tromey@redhat.com>
6781
6782         * expr.c (build_known_method_ref): Use method's context to find
6783         method table index.
6784
6785 2003-01-23  Tom Tromey  <tromey@redhat.com>
6786
6787         * constants.c (set_constant_entry): Allocated cleared memory.
6788
6789 2003-01-22  Tom Tromey  <tromey@redhat.com>
6790
6791         * java-tree.h: Don't use PARAMS.
6792         * resource.c: Add prototypes for all functions.
6793         (write_resource_constructor): Use `const char *' to avoid
6794         warning.
6795
6796 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
6797
6798         * jcf-parse.c (process_zip_dir): Remove unused variable.
6799
6800 2003-01-22  Tom Tromey  <tromey@redhat.com>
6801
6802         * expr.c (build_invokeinterface): Abort if method's context is not
6803         an interface.
6804
6805 2003-01-22  Tom Tromey  <tromey@redhat.com>
6806
6807         * gcj.texi (Input and output files): Mention non-class entries.
6808         * decl.c (java_init_decl_processing): Call
6809         init_resource_processing.
6810         * java-tree.h (compile_resource_data, write_resource_constructor,
6811         compile_resource_file, init_resource_processing): Declare.
6812         * config-lang.in (gtfiles): Added resource.c.
6813         * Make-lang.in (gt-java-resource.h): New target.
6814         (JAVA_OBJS): Added resource.o.
6815         (java/resource.o): New target.
6816         * resource.c: New file.
6817         * class.c (compile_resource_file): Moved to resource.c.
6818         (registerResource_libfunc): Likewise.
6819         (utf8_decl_list): Mark with GTY; now static.
6820         * jcf-parse.c (classify_zip_file): New function.
6821         (parse_zip_file_entries): Use it; compile .properties files.
6822         (process_zip_dir): Use classify_zip_file and compute_class_name.
6823         Don't write class name into zip directory.
6824         (java_parse_file): Call write_resource_constructor.
6825         (compute_class_name): New function.
6826         * jcf-io.c (read_zip_member): Reindented.
6827
6828 2003-01-21  Tom Tromey  <tromey@redhat.com>
6829
6830         * class.c (supers_all_compiled): New function.
6831         (make_class_data): Use it.
6832
6833 2003-01-21  Tom Tromey  <tromey@redhat.com>
6834
6835         * parse.y (method_header): Native method can't be strictfp.
6836         No method can be transient or volatile.
6837
6838 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6839
6840         Make-lang.in (jvspec.o-warn): Add -Wno-error.
6841
6842 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
6843
6844         * check-init.c: Fix comment typos.
6845         * class.c: Likewise.
6846         * constants.c: Likewise.
6847         * decl.c: Likewise.
6848         * except.c: Likewise.
6849         * expr.c: Likewise.
6850         * java-except.h: Likewise.
6851         * java-tree.h: Likewise.
6852         * javaop.h: Likewise.
6853         * jcf-dump.c: Likewise.
6854         * jcf-io.c: Likewise.
6855         * jcf-parse.c: Likewise.
6856         * jcf-write.c: Likewise.
6857         * lang.c: Likewise.
6858         * mangle.c: Likewise.
6859         * typeck.c: Likewise.
6860         * verify.c: Likewise.
6861
6862 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6863
6864         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
6865         * jcf-write.c: Include "tm_p.h".
6866
6867 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6868
6869         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
6870
6871 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6872
6873         * builtins.c (java_build_function_call_expr): Renamed from
6874         build_function_call_expr.  All callers changed.
6875
6876         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
6877         * jcf-parse.c: Include tm_p.h.
6878
6879         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
6880         warning.
6881
6882 2003-01-14  Tom Tromey  <tromey@redhat.com>
6883
6884         * class.c (make_class_data): Check that super is compiled before
6885         building class reference to it.
6886
6887 2003-01-14  Andrew Haley  <aph@redhat.com>
6888
6889         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6890         varargs function -- correct.
6891
6892 2003-01-14  Andrew Haley  <aph@redhat.com>
6893
6894         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
6895
6896 2003-01-14  Andrew Haley  <aph@redhat.com>
6897
6898         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
6899         varargs function -- correct.
6900
6901         * parse.y (patch_assignment): Copy the rhs of an assignment into a
6902         temporary if the RHS is a reference.
6903
6904 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6905
6906         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
6907         * keyword.h: Regenerated.
6908
6909         * All Files: Convert to ISO C style function definitions.
6910
6911 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
6912
6913         * parse.y (check_pkg_class_access): ANSIfy definition.
6914
6915 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6916
6917         * decl.c, parse-scan.y, parse.y: Don't cast return value of
6918         xmalloc et al.
6919
6920         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
6921
6922 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
6923
6924         Merge from pch-branch:
6925
6926         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
6927
6928         * Make-lang.in (java/gjavah.o): Update dependencies.
6929         * gjavah.c: Include ggc.h.
6930
6931         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
6932
6933         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
6934         (JCFDUMP_OBJS): Add ggc-none.o.
6935         (java/jcf-dump.o): Depend on GGC_H.
6936         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
6937         CPool substructures.
6938         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
6939         * jcf-dump.c: Include ggc.h.
6940
6941         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6942
6943         * jcf.h (union cpool_entry): New.
6944         (struct CPool): Use gengtype to mark.  Change field 'data' to be
6945         an array of unions.
6946         (struct JCF): Use gengtype to mark.
6947         (CPOOL_UINT): Update for new cpool_entry type.
6948         (CPOOL_USHORT1): Likewise.
6949         (CPOOL_USHORT2): Likewise.
6950         (CPOOL_FINISH): Use GC to free cpool subfields.
6951         * parse.h (struct parser_ctxt): Mark field current_jcf.
6952         * lex.c (java_init_lex): Use GC to allocate struct JCF.
6953         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
6954         (main_jcf): Use gengtype to mark.
6955         (ggc_mark_jcf): Delete.
6956         (get_constant): Update for new cpool_entry type.
6957         (give_name_to_class): Likewise.
6958         (get_class_constant): Likewise.
6959         (init_outgoing_cpool): Use GGC to allocate struct CPool.
6960         (java_parse_file): Use GGC to allocate struct JCF.
6961         (init_jcf_parse): Don't call ggc_add_root.
6962         * jcf-reader.c (jcf_parse_constant_pool): Update for new
6963         cpool_entry type.
6964         * java-tree.h (current_jcf): Use gengtype to mark.
6965         (CPOOL_UTF): Update for new cpool_entry type.
6966         (outgoing_cpool): Use gengtype to mark.
6967         (struct lang_type): GC struct JCF and struct CPool.
6968         * config-lang.in (gtfiles): Add jcf.h.
6969         * constants.c (find_tree_constant): New.
6970         (set_constant_entry): Allocate cpool subfields using GGC.  Update
6971         for new cpool_entry type.
6972         (find_constant1): Update for new cpool_entry type.
6973         (find_constant2): Likewise.
6974         (find_utf8_constant): Use find_tree_constant.
6975         (find_class_or_string_constant): Remove unnecessary cast to jword.
6976         Update for new cpool_entry type.
6977         (count_constant_pool_bytes): Update for new cpool_entry type.
6978         (write_constant_pool): Likewise.
6979         (alloc_name_constant): Use find_tree_constant.
6980         (build_constants_constructor): Update for new cpool_entry type.
6981
6982         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
6983
6984         * parse.y (mark_parser_ctxt): Delete.
6985         (goal): Don't use ggc_add_root.
6986         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
6987         (java_pop_parser_context): Let GC free parser_ctxt.
6988         (java_parser_context_resume): Likewise.
6989         * parse.h (struct parser_ctxt): Use gengtype to mark.
6990         (ctxp): Likewise.
6991         (ctxp_for_generation): Likewise.
6992         * lex.h (struct java_lc_s): Mark for gengtype.
6993         (java_lexer): Rearrange for gengtype.
6994         * config-lang.in (gtfiles): Add lex.h, parse.h.
6995
6996 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6997
6998         * All Files: Remove PARAMS macro.
6999
7000         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7001         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7002         `__STDC__' macros.
7003
7004         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7005         VA_CLOSE.
7006
7007 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
7008
7009         * Make-lang.in (java.install-common, java.uninstall,
7010         java.install-info, java.install-man): Prepend $(DESTDIR)
7011         to destination paths in all (un)installation commands.
7012         (java.install-common): Rewrite $(LN) command to support
7013         DESTDIR with "ln" as well as with "ln -s".
7014
7015 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
7016
7017         * java-tree.h: Protect against multiple inclusion.
7018
7019 2003-01-07  Tom Tromey  <tromey@redhat.com>
7020
7021         * class.c (add_assume_compiled): Don't adjust parent if we're
7022         already at the root of tree.
7023
7024 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7025
7026         * lang.c (dump_compound_expr): Prototype.
7027
7028 2003-01-03  Tom Tromey  <tromey@redhat.com>
7029
7030         Fix for PR java/8712:
7031         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7032         when simply checking against `null'.
7033
7034 2003-01-03  Tom Tromey  <tromey@redhat.com>
7035
7036         * gcj.texi (Standard Properties): Document http.proxyHost and
7037         http.proxyPort.
7038
7039         * gcj.texi (GNU Classpath Properties): Document new properties.
7040
7041 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7042
7043         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7044         java/lang-options.h, java/mangle.c, java/mangle_name.c,
7045         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7046
7047 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7048
7049         * Make-lang.in, boehm.c, buffer.c,
7050           buffer.h, builtins.c, class.c,
7051           config-lang.in, constants.c,
7052           convert.h, decl.c, except.c,
7053           expr.c, java-except.h,
7054           java-tree.h, javaop.def,
7055           jcf-parse.c, jcf-write.c,
7056           jv-scan.c, jvgenmain.c,
7057           jvspec.c, keyword.gperf,
7058           keyword.h, lang-options.h,
7059           lang-specs.h, lang.c, lex.c,
7060           lex.h, mangle.c, mangle_name.c,
7061           parse-scan.y, parse.h, parse.y,
7062           typeck.c, verify.c, xref.c,
7063           xref.h: Replace "GNU CC" with
7064           "GCC" in the copyright header.
7065
7066         * check-init.c, gjavah.c, javaop.h,
7067           jcf-depend.c, jcf-dump.c, jcf-io.c,
7068           jcf-path.c, jcf-reader.c, jcf.h,
7069           zextract.c, zipfile.h: These files are
7070           "part of GCC". Also say "GCC" not "GNU CC".
7071
7072 2002-12-30  DJ Delorie  <dj@redhat.com>
7073
7074         * Make-lang.in: Protect against texi2pod/pod2man failing.
7075
7076 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
7077
7078         * gcj.texi: Use @copying.
7079
7080 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7081
7082         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7083         print_cxx_classname.
7084         (print_cxx_classname): Add add_scope parameter.
7085         (print_class_decls): Do not emit a semicolon after the extern
7086         "Java" block.
7087         (process_file): Adjust calls to print_cxx_classname.
7088
7089 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7090
7091         * gcj.texi: Include Cover Texts in man page.
7092
7093 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
7094
7095         * class.c (build_static_field_ref): Check FIELD_FINAL.
7096
7097         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7098         instead of current_constant_pool_data_ref.
7099         * java-tree.h (current_constant_pool_data_ref): Undefine.
7100         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7101         * jcf-parse.c (init_outgoing_cpool): Don't initialize
7102         current_constant_pool_data_ref.
7103
7104         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7105         not build_internal_class_name.
7106
7107         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7108         Use it when class ref isn't certain to be compiled.
7109
7110 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7111
7112         * gcj.texi: Include gcc-common.texi.
7113         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7114         $(srcdir)/doc/include/gcc-common.texi.
7115
7116 2002-12-22  Anthony Green  <green@redhat.com>
7117
7118         * gcj.texi (Limitations): Add note about org.xml.sax and
7119         org.w3c.dom.
7120
7121 2002-12-20  Tom Tromey  <tromey@redhat.com>
7122
7123         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7124         where minimum case value is Integer.MIN_VALUE.
7125         Fixes PR java/8955.
7126
7127 2002-12-18  Andrew Haley  <aph@redhat.com>
7128
7129         * parse.y (patch_invoke): Force evaluation order when `check' is
7130         set.  For PR libgcj/8945.
7131
7132 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
7133
7134         * gcj.texi: Change version number to 3.4.
7135
7136 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
7137         Andrew Haley <aph@redhat.com>
7138
7139         * parse.y (source_end_java_method): Remove custom encoding of line
7140         numbers for a function decl before passing it to the back end.
7141
7142 2002-12-03  Andrew Haley  <aph@redhat.com>
7143
7144         * class.c (make_class_data): New field, "chain".
7145         * decl.c (java_init_decl_processing): Likewise.
7146
7147 2002-12-02  Tom Tromey  <tromey@redhat.com>
7148
7149         For PR java/8740:
7150         * parse.y (do_resolve_class): Handle qualified name via
7151         recursion.
7152
7153 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7154
7155         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7156         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7157         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7158         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7159         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7160         Include coretypes.h and tm.h.
7161         * Make-lang.in: Update dependencies.
7162
7163 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7164
7165         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7166
7167 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7168
7169         * jcf-reader.c: Don't expand JCF_readu4 inside the
7170         expansion of JCF_SKIP.
7171
7172 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7173
7174         * jcf-reader.c: Don't expand JCF_readu4 inside the
7175         expansion of JCF_SKIP.
7176
7177 2002-11-22  Tom Tromey  <tromey@redhat.com>
7178
7179         * parse.y (patch_binop): Cast right hand side of shift expression
7180         to `int'.  Fixes PR java/8676.
7181
7182 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
7183             Andrew Haley <aph@redhat.com>
7184
7185         * gcc/java/jcf-write.c (write_classfile): Remove target
7186         class file, if it exists, before renaming the temporary
7187         class file to it.
7188
7189 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7190
7191         * jvspec.c (lang_specific_spec_functions): New.
7192
7193 2002-11-18  Tom Tromey  <tromey@redhat.com>
7194
7195         Fix for PR java/7912:
7196         * expr.c (can_widen_reference_to): Allow cast of array to
7197         Cloneable or Serializable.
7198         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7199         (java_io_serializable_identifier_node): Likewise.
7200         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7201         (valid_ref_assignconv_cast_p): Use new identifier nodes.
7202         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7203         java_io_serializable.
7204         * decl.c (java_init_decl_processing): Initialize
7205         java_lang_cloneable_identifier_node and
7206         java_io_serializable_identifier_node.
7207         (java_lang_cloneable_identifier_node): New global.
7208         (java_io_serializable_identifier_node): Likewise.
7209
7210 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
7211
7212         * buffer.c: Remove unnecessary casts.
7213         * check-init.c: Likewise.
7214         * class.c: Likewise.
7215         * constants.c: Likewise.
7216         * decl.c: Likewise.
7217         * except.c: Likewise.
7218         * gjavah.c: Likewise.
7219         * jcf-io.c: Likewise.
7220         * jcf-parse.c: Likewise.
7221         * jcf-path.c: Likewise.
7222         * jvspec.c: Likewise.
7223         * lang.c: Likewise.
7224         * lex.c: Likewise.
7225         * verify.c: Likewise.
7226
7227 2002-11-06  Tom Tromey  <tromey@redhat.com>
7228
7229         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7230         a JNI header.
7231
7232 2002-11-05  Tom Tromey  <tromey@redhat.com>
7233
7234         Fix for PR java/6388.
7235         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7236         * java-tree.h (enum java_tree_index): New values
7237         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7238         (decimal_int_max, decimal_long_max): New defines.
7239         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
7240         (error_if_numeric_overflow): Rewrote range checking.
7241         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7242         decimal_long_max.
7243
7244 2002-11-02  Tom Tromey  <tromey@redhat.com>
7245
7246         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7247
7248         * class.c (make_method_value): Put class name, not signature, into
7249         `throws' field.  For PR java/8415.
7250
7251 2002-10-24  Tom Tromey  <tromey@redhat.com>
7252
7253         * gcj.texi (Invoking gij): Document --showversion.
7254         (Standard Properties): java.library.path now set.
7255
7256 2002-10-23  Tom Tromey  <tromey@redhat.com>
7257
7258         * gjavah.c (decode_signature_piece): In JNI mode, print
7259         `jobjectArray' when array depth is nonzero.
7260         Fixes PR java/8296.
7261
7262 2002-10-15  Andrew Haley  <aph@redhat.com>
7263
7264         * parse.y (patch_invoke): Call force_evaluation_order on a static
7265         arg list.
7266         (resolve_qualified_expression_name): Call force_evaluation_order
7267         on a arg list that is part of a Qualified Expression Name.
7268
7269         * lang.c (dump_compound_expr): New.
7270         (java_dump_tree): New.
7271
7272 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
7273
7274         * gcj.texi: Added item describing the GCJ runtime property
7275         "gnu.gcj.progname".
7276
7277 2002-10-15  Richard Henderson  <rth@redhat.com>
7278
7279         * jcf-parse.c (get_constant): Fix type warning.
7280
7281 2002-10-15  Andrew Haley  <aph@redhat.com>
7282
7283         * java-tree.h (java_inlining_merge_static_initializers): Declare.
7284         (java_inlining_map_static_initializers): Declare.
7285
7286 2002-10-14  Andrew Haley  <aph@redhat.com>
7287
7288         * tree-inline.c (remap_block): All local class initialization
7289         flags go in the outermost scope.
7290         (expand_call_inline): Call java_inlining_map_static_initializers.
7291         (expand_call_inline): Call java_inlining_merge_static_initializers.
7292         * java/lang.c (merge_init_test_initialization): New.
7293         (java_inlining_merge_static_initializers): New.
7294         (inline_init_test_initialization): New.
7295         (java_inlining_map_static_initializers): New.
7296
7297 2002-10-11  Mark Wielaard  <mark@klomp.org>
7298
7299         * gcj.texi (Compatibility): Add Limitations and Extensions section.
7300
7301 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7302
7303         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7304
7305 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7306
7307         * parse.y (merge_string_cste): Add parentheses around & within |.
7308
7309 2002-10-08  Tom Tromey  <tromey@redhat.com>
7310
7311         * parse.y (variable_declarator_id): Simplify error path for
7312         array declarator error.  For PR java/8003.
7313
7314 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
7315
7316         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7317         bug_report_url.
7318
7319 2002-10-08  Andrew Haley  <aph@redhat.com>
7320
7321         * parse.y (attach_init_test_initialization_flags): Check for
7322         error_mark_node.
7323
7324 2002-10-07  Anthony Green  <green@redhat.com>
7325
7326         * parse.y (merge_string_cste): Fix bug in string concatenation.
7327
7328 2002-10-03  Michael Koch  <konqueror@gmx.de>
7329
7330         * gcj.texi (Standard properties):
7331         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7332
7333 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7334
7335         PR optimization/6627
7336         * lang.c (java_init): If storing the vbit in function
7337         pointers, ensure that force_align_functions_log is atleast
7338         one to aid compatability with g++ vtables.
7339
7340 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
7341
7342         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7343         foul of type-based aliasing.
7344
7345 2002-09-30  Anthony Green  <green@redhat.com>
7346
7347         * gcj.texi (Invoking jv-scan): Fix texinfo.
7348
7349 2002-09-28  Anthony Green  <green@redhat.com>
7350
7351         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7352         (Code Generation): Add -fno-assert documentation.
7353         * jv-scan.c (flag_assert): New global.
7354         (options): Add assert option.
7355         (help): Add --no-assert documentation.
7356         * parse-scan.y (flag_assert): New global.
7357         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7358         (flag_assert): New global.
7359         * java-tree.h (flag_assert): New global.
7360         * lex.c (java_lex): Obey flag_assert.
7361         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7362         calling cc1.
7363
7364 2002-09-26  Andrew Haley  <aph@redhat.com>
7365
7366         * expr.c (build_java_array_length_access): Check for null pointer.
7367         * expr.c (expand_java_arrayload): Likewise.
7368
7369 2002-09-21  Richard Henderson  <rth@redhat.com>
7370
7371         * jcf-parse.c (get_constant): Decode from IEEE no matter
7372         what the target format.
7373
7374 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
7375
7376         * ChangeLog: Follow spelling conventions.
7377         * class.c: Likewise.
7378         * decl.c: Likewise.
7379         * expr.c: Likewise.
7380         * gjavah.c: Likewise.
7381         * java-tree.h: Likewise.
7382         * jcf-dump.c: Likewise.
7383         * jcf-parse.c: Likewise.
7384         * jvspec.c: Likewise.
7385         * lang.c: Likewise.
7386         * mangle.c: Likewise.
7387         * parse.y: Likewise.
7388
7389 2002-09-17  Tom Tromey  <tromey@redhat.com>
7390
7391         * lex.c (java_read_unicode_collapsing_terminators): Handle case
7392         where \r appears at EOF.  Fixes PR java/7950.
7393
7394 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
7395
7396         * jvspec.c (lang_specific_driver): Remove unused variable.
7397
7398 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7399
7400         * java-tree.h (union lang_tree_node): Add chain_next option.
7401
7402 2002-09-16  Richard Henderson  <rth@redhat.com>
7403
7404         * jcf-parse.c (get_constant): Runtime check for IEEE format;
7405         use new real.h interface.
7406         * jcf-write.c (find_constant_index): Use new real.h interface.
7407         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7408
7409 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7410
7411         * lang.c: Follow spelling conventions.
7412
7413 2002-09-11  Per Bothner  <per@bothner.com>
7414
7415         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
7416         constant to the type of the field.
7417         (java_complete_tree):  Remove now-redundant code.
7418
7419         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
7420
7421 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
7422
7423         For PR java/5794:
7424         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7425         return label if a ret instruction for the jsr has been reached.
7426
7427 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
7428
7429         * parse.y (DIR_SEPARATOR): Don't define.
7430         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7431
7432 2002-08-28  Andrew Haley  <aph@redhat.com>
7433
7434         * verify.c (verify_jvm_instructions): Allow exception handler
7435         inside code that is being protected, but generate a warning.
7436         * except.c (link_handler): Initialize `expanded' in new eh_range.
7437         (binding_depth, is_class_level, current_pc): Declare extern.
7438
7439 2002-09-01  Mark Wielaard <mark@klomp.org>
7440
7441         * gcj.texi: Add chapter about system properties.
7442         Fixed some typos.
7443
7444 2002-08-26  Tom Tromey  <tromey@redhat.com>
7445
7446         * parse.y (try_builtin_assignconv): Allow narrowing primitive
7447         conversion if RHS_TYPE is byte, short, or char.
7448
7449 2002-08-22  Tom Tromey  <tromey@redhat.com>
7450
7451         * gcj.texi (Invoking gij): Document -cp and -classpath.
7452
7453 2002-08-21  Tom Tromey  <tromey@redhat.com>
7454
7455         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7456         $(prefix)/share.  For PR libgcj/7633.
7457
7458         For PR java/6005 and PR java/7611:
7459         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7460         (java_can_use_bit_fields_p): New function.
7461
7462 2002-08-16  Tom Tromey  <tromey@redhat.com>
7463
7464         * gcj.texi (Class Initialization): Mention class initialization of
7465         arrays.
7466
7467 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
7468
7469         * Make-lang.in (java-tree-inline.o): New.
7470         (JAVA_OBJS): Add java-tree-inline.o.
7471         * parse.y (source_end_java_method): Call java_optimize_inline.
7472         (java_expand_method_bodies): Save method's tree in
7473         DECL_SAVED_TREE.
7474         (add_stmt_to_compound): Keep track of the number of statments.
7475         * lang.c (java_init): Enable flag_inline_trees.
7476         (java_post_options): If flag_inline_functions is on, enable
7477         flag_inline_trees instread.
7478         (decl_constant_value): New.
7479         (java_tree_inlining_walk_subtrees): New.
7480         * java-tree.h (DECL_NUM_STMTS): New macro.
7481         (java_optimize_inline): Declare.
7482         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7483         Handle a LABEL_EXPR.
7484         * decl.c (build_result_decl): If we already have a DECL_RESULT
7485         don't make another.
7486         (dump_function): New.
7487         (java_optimize_inline): New.
7488         (dump_function): New.
7489
7490 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
7491
7492         For PR java/7483:
7493         * parse.y (build_assertion): Invert return from
7494         desiredAssertionStatus.
7495
7496 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7497
7498         * jcf-write.c (get_access_flags): Return correct access flags for
7499         private and protected inner classes.
7500
7501 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7502
7503         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7504
7505 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7506
7507         * mangle_name.c: Don't include obstack.h twice.
7508         * xref.c: Don't include obstack.h.
7509
7510 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7511
7512         * class.c: (permanent_obstack): Delete declaration.
7513         * constants.c: (permanent_obstack): Delete declaration.
7514         * except.c: (permanent_obstack): Delete declaration.
7515         * expr.c: (permanent_obstack): Delete declaration.
7516         * jcf-parse.c: (permanent_obstack): Delete declaration.
7517         (saveable_obstack): Delete declaration.
7518         * parse.h: (permanent_obstack): Delete declaration.
7519         * typeck.c: (permanent_obstack): Delete declaration.
7520
7521 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7522
7523         * gcj.texi (version-gcc): Increase to 3.3.
7524
7525 2002-07-22  Tom Tromey  <tromey@redhat.com>
7526
7527         * lex.c (java_lex): Check for `e' or `E' after 0.
7528
7529 2002-07-21  Richard Henderson  <rth@redhat.com>
7530
7531         * lang.c (java_unsafe_for_reeval): New.
7532         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7533
7534 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7535
7536         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7537         (jcf_path_init): Use GET_ENVIRONMENT.
7538
7539 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7540             Zack Weinberg <zack@codesourcery.com>
7541
7542         * builtins.c (initialize_builtins): Remove defines that
7543         handled C/C++ specific junk hereby removed from builtins.def.
7544
7545 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7546
7547         * lang.c (java_post_options): Update prototype.
7548
7549 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7550
7551         * builtins.c (initialize_builtins): Ignore the additional
7552         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7553         the builtins.def file.
7554
7555 2002-07-01  Tom Tromey  <tromey@redhat.com>
7556
7557         For PR libgcj/7073:
7558         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7559         specially.
7560
7561 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7562
7563         * java/decl.c (builtin_function): Accept additional parameter.
7564         (java_init_decl_processing): Pass an additional NULL_TREE
7565         argument to builtin_function.
7566
7567 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7568
7569         * gcj.texi: Fixed gcj invocation example so that it compiles.
7570
7571 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7572
7573         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7574         * parse.y (mark_parser_ctxt): Likewise.
7575         (check_modifiers, declare_local_variables): Avoid incorrect
7576         hardcoded constant 10.
7577
7578         * lex.c (java_read_char): Avoid "comparison is always true"
7579         warning.
7580
7581 2002-06-25  Andreas Schwab  <schwab@suse.de>
7582
7583         * expr.c (JSR): Avoid undefined operation on PC.
7584
7585 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7586
7587         * decl.c (clear_binding_level): Const-ify.
7588
7589 2002-06-13  Akim Demaille  <akim@epita.fr>
7590
7591         * parse.y (class_declaration, interface_declaration): Make sure
7592         all their rules have an action, in order to avoid meaningless `$$
7593         = $1' and their type clashes.
7594
7595 2002-06-11  Tom Tromey  <tromey@redhat.com>
7596
7597         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7598         * parse-scan.y (statement_without_trailing_substatement): Added
7599         assert_statement.
7600         (assert_statement): New rule.
7601         * java-tree.h (struct lang_type) [assertions]: New field.
7602         (TYPE_USES_ASSERTIONS): New macro.
7603         (CLASS_USES_ASSERTIONS): Likewise.
7604         (FIELD_SYNTHETIC): New define.
7605         * lex.c (java_lval;): Added ASSERT_TK.
7606         * parse.y (ASSERT_TK): Added.
7607         (statement_without_trailing_substatement): Added assert_statement.
7608         (assert_statement): New rule.
7609         (build_assertion): New function.
7610         (maybe_generate_pre_expand_clinit): Create and initialize
7611         $assertionsDisabled.
7612         (lookup_package_type): Removed decl.
7613         * keyword.h: Rebuilt.
7614         * keyword.gperf (assert): New token.
7615
7616 2002-06-10  Akim Demaille  <akim@epita.fr>
7617
7618         * parse.y (interface_type_list, class_member_declaration)
7619         (unary_expression_not_plus_minus): Remove duplicate %type.
7620         Whitespace changes.
7621
7622 2002-06-09  Tom Tromey  <tromey@redhat.com>
7623
7624         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7625
7626         * parse.y (method_header): Give error message in all cases.
7627         Fixes PR java/6865.
7628
7629 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7630
7631         Don't use RTL inlining. Fix for PR java/6820.
7632         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7633         (flag_really_inline): New.
7634         (java_decode_option): Set flag_really_inline if -finline-functions
7635         is seen.
7636         (java_post_options): New function. Turn off inlining unless
7637         flag_really_inline is set.
7638
7639 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7640
7641         * gjavah.c (throwable_p): Accept argument as either a classname or
7642         signature fragment. Create null-terminated classname string for super
7643         when calling itself recursively.
7644         (decode_signature_piece): Skip first character from class name
7645         signature when calling throwable_p.
7646
7647 2002-06-08  H.J. Lu  (hjl@gnu.org)
7648
7649         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7650
7651 2002-06-04  Tom Tromey  <tromey@redhat.com>
7652
7653         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7654
7655 2002-06-04  Michael Koch  <konqueror@gmx.de>
7656
7657         * gcj.texi (Input Options): Fixed typo.
7658
7659 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7660
7661         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7662         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7663         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7664         and all now-pointless local variables.  Rename other local
7665         variables to reflect their not being handles.
7666
7667         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7668         #if JCF_USE_STDIO blocks.
7669
7670         * parse.y: Add missing semicolon at end of rule.
7671
7672 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
7673
7674         * check-init.c (attach_initialized_static_class): Delete, unused.
7675         * parse.y: Use htab_t instead of struct hashtable, update
7676         all uses.
7677         * java-tree.h: Include hashtab.h instead of hash.h.
7678         (struct lang_decl_func): Use htab_t, set up for gengtype.
7679         (struct init_test_hash_entry): Delete.
7680         (struct treetreehash_entry): New.
7681         (java_treetreehash_find): New
7682         (java_treetreehash_new): New prototype.
7683         (java_treetreehash_create): New prototype.
7684         (java_mark_tree): Delete prototype.
7685         (java_hash_hash_tree_node): Delete prototype.
7686         (java_hash_compare_tree_node): Delete prototype.
7687         (attach_initialized_static_class): Delete prototype.
7688         * expr.c (build_class_init): Update to use java_treetreehash
7689         functions.
7690         (java_expand_expr): Update to use htab_t.
7691         (emit_init_test_initialization): Likewise.
7692         * decl.c (java_mark_tree): Delete.
7693         * class.c (init_test_hash_newfunc): Delete.
7694         (java_hash_hash_tree_node): Delete.
7695         (java_hash_compare_tree_node): Delete.
7696         (add_method_1): Update to use java_treetreehash functions.
7697         (JAVA_TREEHASHHASH_H): New macro.
7698         (java_treetreehash_hash): New function.
7699         (java_treetreehash_compare): New function.
7700         (java_treetreehash_find): New function.
7701         (java_treetreehash_new): New function.
7702         (java_treetreehash_create): New function.
7703         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
7704
7705         * Make-lang.in (java/parse.o): Depend on debug.h.
7706         * java-tree.h (struct lang_identifier): Use gengtype.
7707         (union lang_tree_node): New.
7708         (struct lang_decl_func): Use gengtype.
7709         (struct lang_decl_var): Likewise.
7710         (struct lang_decl): Likewise.
7711         * parse.y: Include debug.h.
7712         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
7713
7714         * lang.c (struct language_function): New dummy structure.
7715
7716         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
7717         descriminator for DECL_LANG_SPECIFIC.
7718         (struct lang_decl_func): Rename from struct lang_decl.
7719         (enum lang_decl_desc): New.
7720         (struct lang_decl): Make it a union.  Update all the accessor macros.
7721         (struct lang_type): Use gengtype.
7722         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
7723         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
7724         are now the same size.
7725         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
7726         use discriminator to mark DECL_LANG_SPECIFIC.
7727
7728         * Make-lang.in (gt-java-builtins.h): New rule.
7729         (java/builtins.o): Add dependency on gt-<filename>.h.
7730         * builtins.c: Use gengtype for roots.
7731         (union string_or_tree): Use gengtype.
7732         (struct builtin_record): Use gengtype.
7733         * config-lang.in (gtfiles): Add builtins.c.
7734
7735         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
7736         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
7737         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
7738         gt-java-parse.h, gtype-java.h): Add rules to generate.
7739         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
7740         (class.o): Add dependency on gt-*.h.
7741         (constants.o): Likewise.
7742         (decl.o): Likewise.
7743         (expr.o): Likewise.
7744         (jcf-parse.o): Likewise.
7745         (jcf-write.o): Likewise.
7746         (lang.o): Likewise.
7747         * config-lang.in (gtfiles): New.
7748         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7749         * constants.c: Replace uses of ggc_add_* with GTY markers.
7750         Include gt-*.h.
7751         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7752         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7753         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
7754         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
7755         Include gt-*.h.
7756         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
7757         Include gt-*.h.
7758         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7759         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
7760         gt-*.h.
7761         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
7762         Include gtype-java.h.
7763
7764 2002-06-02  Tom Tromey  <tromey@redhat.com>
7765
7766         Fix for PR java/5913:
7767         * parse.y (patch_binop): Call patch_string on op1.
7768
7769 2002-06-02  Tom Tromey  <tromey@redhat.com>
7770
7771         Fix for PR java/1343, PR java/6336:
7772         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
7773         formatting.  Changed return type.
7774         (anonymous_class_counter): Moved to top of file.
7775         (maybe_make_nested_class_name): Append number to class name for
7776         function-local classes.
7777
7778 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
7779
7780         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
7781         * Make-lang.in: Update dependency lists.
7782
7783 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
7784
7785         * gjavah.c (throwable_p): Do not free the name of the class after
7786         passing it to find_class.
7787         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
7788         * jcf-io.c (dirent.h): Include it.
7789         (fnmatch.h): Likewise.
7790         (compare_path): New function.
7791         (java_or_class_file): Likewise.
7792         (memoized_dirlist_entry): New type.
7793         (memoized_dirlist_lookup_eq): New function.
7794         (memoized_dirlists): New variable.
7795         (caching_stat): New function.
7796         (memoized_class_lookup_eq): New function.
7797         (memoized_class_lookups): Likewise.
7798         (find_class): Use memoized_class_lookups and caching_stat.
7799         * jcf.h (JCF_USE_SCANDIR): Define.
7800         * parse.y (java_expand_classes): Write the class files in reverse
7801         order.
7802
7803 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7804
7805         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
7806
7807 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
7808
7809         * jcf-write.c (write_classfile): Unlink the temporary file if it
7810         cannot be renamed.  Use concat to build up the name of the
7811         temporary file.
7812
7813 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
7814
7815         * jcf-write.c (write_classfile): Write the file to a
7816         temporary file and then rename it.
7817
7818 2002-05-07  Tom Tromey  <tromey@redhat.com>
7819
7820         * gjavah.c (throwable_p): Use xstrdup, not strdup.
7821
7822         Fix for PR java/1200:
7823         * gjavah.c (throwable_p): New function.
7824         (decode_signature_piece): Use it.  A `WeakReference' isn't the
7825         same as a `jweak'.
7826         Include hashtab.h.
7827         (gcjh_streq): New function.
7828
7829 2002-05-07  Andreas Jaeger  <aj@suse.de>
7830
7831         * parse.y (finish_for_loop): Fix if statement.
7832
7833 2002-05-06  Tom Tromey  <tromey@redhat.com>
7834
7835         Fix for PR java/5941:
7836         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
7837         loop update expression.
7838         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
7839         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
7840
7841 2002-05-04  Mark Wielaard  <mark@klomp.org>
7842
7843         For PR java/6519:
7844         * parse.y (build_string_concatenation): Return just op1 only when op2
7845         is null and op1 is a STRING_CST, otherwise always construct a
7846         StringBuffer.
7847
7848 2002-04-27  Tom Tromey  <tromey@redhat.com>
7849
7850         For PR java/6382:
7851         * parse.y (string_convert_int_cst): New function.
7852         (merge_string_cste): Use it.
7853
7854 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
7855
7856         * java-tree.h (java_parse_file): Update.
7857         (java_set_yydebug): Remove.
7858         * jcf-parse.c (yydebug): Remove.
7859         (java_set_yydebug): Die.
7860         (java_parse_file): Update.
7861         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
7862
7863 2002-04-24  Tom Tromey  <tromey@redhat.com>
7864
7865         For PR java/6425:
7866         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
7867         EXPR_WFL_QUALIFICATION of qual_wfl.
7868
7869 2002-04-23  Per Bothner  <per@bothner.com>
7870
7871         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
7872         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
7873         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
7874
7875 2002-04-23  Tom Tromey  <tromey@redhat.com>
7876
7877         For PR java/6314:
7878         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
7879         recognize `-fcompile-resource='.
7880         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
7881         a bit.
7882
7883 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
7884
7885         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
7886         paths. Fixes PR java/2791.
7887
7888 2002-04-19  Andrew Haley  <aph@redhat.com>
7889
7890         * jcf-write.c (push_long_const): lo, hi: New variables.
7891         Use rshift_double to extract the high part of a 64-bit long.
7892         Use WORD_TO_INT to extract the low part.
7893
7894         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
7895         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
7896         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
7897
7898 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
7899
7900         * typeck.c (incomplete_type_error): Remove.
7901
7902 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7903
7904         * class.c (make_class_data): Set DECL_ALIGN on static class data,
7905         for hash synchronization.
7906         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
7907         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
7908         class_type_node.
7909
7910 2002-04-16  Mark Wielaard  <mark@klomp.org>
7911
7912         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
7913         negative zero.
7914
7915 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7916
7917         Fix for PR java/6294:
7918         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
7919         interfaces.
7920
7921 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7922
7923         Fix for PR java/6085:
7924         * parse.y (patch_method_invocation): Always use build_access_to_thisn
7925         to get enclosing "this" argument for inner-class constructor
7926         invocation. Pass correct arguments to build_access_to_thisn.
7927
7928 2002-04-10  Andreas Jaeger  <aj@suse.de>
7929
7930         * gcj.texi (Input Options): Fix extdirs patch.
7931
7932 2002-04-10  Anthony Green  <green@redhat.com>
7933
7934         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
7935
7936 2002-04-09  Anthony Green  <green@redhat.com>
7937
7938         * gcj.texi (Input Options): Add --extdirs documentation.
7939         * jcf-dump.c (OPT_extdirs): New macro.
7940         (options): Add extdirs option.
7941         (help): Describe --extdirs.
7942         (main): Handle OPT_extdirs.
7943         * gjavah.c (OPT_extdirs): New macro.
7944         (options): Add extdirs option.
7945         (help): Describe --extdirs.
7946         (main): Handle OPT_extdirs.
7947         * jcf-path.c (jcf_path_init): Add extdirs support.
7948         (jcf_path_extdirs_arg): New function.
7949         (extensions): New variable to hold extensions path entries.
7950         * jvspec.c: Remove -fextdirs= when compiling main().
7951         * lang.c (java_decode_option): Handle -fextdirs=.
7952         * jcf.h (jcf_path_extdirs_arg): Declare new function.
7953         * Make-lang.in: Compile jcf-path with version info for use in
7954         identifying the appropriate libgcj.jar.
7955
7956 2002-04-08  Tom Tromey  <tromey@redhat.com>
7957
7958         For PR libgcj/5303:
7959         * .cvsignore: Added rmic.1 and rmiregistry.1.
7960         * gcj.texi (Top): Link to new nodes.
7961         (Invoking rmic): New node.
7962         (Invoking rmiregistry): Likewise.
7963         * Make-lang.in (java.generated-manpages): Added rmic.1 and
7964         rmiregistry.1.
7965         (java.maintainer-clean): Likewise.
7966         ($(srcdir)/java/rmic.1): New target.
7967         ($(srcdir)/java/rmiregistry.1): Likewise.
7968         (java.install-man): Handle rmic.1 and rmiregistry.1.
7969
7970 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7971
7972         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
7973         Add note about handling uncaught exceptions. Add an exception handler
7974         to example.
7975
7976 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7977
7978         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
7979         after using it to patch CALL_EXPR.
7980
7981 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7982
7983         * gcj.texi (Invocation): Document CNI invocation API.
7984
7985 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
7986
7987         * expr.c (truthvalue_conversion): Rename.  Update.
7988         (expand_compare): Update.
7989         * java-tree.h (java_truthvalue_conversion): New.
7990         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
7991
7992 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7993
7994         * java-tree.h (java_mark_addressable): New.
7995         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
7996         * typeck.c (mark_addressable): Rename, update.
7997
7998 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
7999
8000         * expr.c (build_java_binop): Update.
8001         * java-tree.h (java_signed_type, java_unsigned_type,
8002         java_signed_or_unsigned_type): Update.
8003         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8004         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8005         * parse.y (patch_binop): Update.
8006         * typeck.c (signed_or_unsigned_type, unsigned_type,
8007         signed_type): Update.
8008
8009 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8010
8011         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8012         (java_dummy_print): Remove.
8013         (lang_print_error): Rename.  Exit early if inhibiting output.
8014         (inhibit_error_printing_function): New.
8015         (java_init): Don't set hook.
8016         (lang_init_source): Use new boolean.
8017
8018 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8019
8020         * parse.y (do_resolve_class): Fix infinite recursion.
8021
8022 2002-03-29  Tom Tromey  <tromey@redhat.com>
8023
8024         * parse.y (check_inner_circular_reference): Ignore incomplete
8025         types.
8026
8027 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8028
8029         * Make-lang.in (builtins.o): Update.
8030         * boehm.c (get_boehm_type_descriptor): Update.
8031         * builtins.c: Include langhooks.h.
8032         * decl.c (java_init_decl_processing): Update.
8033         * java-tree.h (java_type_for_mode, java_type_for_size): New.
8034         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8035         Redefine.
8036         * typeck.c (type_for_mode, type_for_size): Update.
8037
8038 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8039
8040         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8041
8042 2002-03-28  Tom Tromey  <tromey@redhat.com>
8043
8044         * except.c (expand_end_java_handler): If the handler type is NULL,
8045         use java.lang.Throwable.  Fixes PR java/5986.
8046
8047 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8048
8049         Fix for PR java/4715:
8050         * jcf-parse.c (parse_source_file_3): New function.
8051         (read_class): Call it.
8052         (java_parse_file): Likewise.
8053
8054 2002-03-28  Jan Hubicka  <jh@suse.cz>
8055
8056         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8057
8058 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8059
8060         * parse.y (resolve_package): Initialize "decl".
8061         (lookup_package_type): Remove unused function.
8062
8063 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8064
8065         Fix for PR java/5993:
8066         * parse.y (resolve_package): Return the decl if resolution was
8067         successful. Don't special case "java.lang" and "java.lang.reflect"
8068         packages. Set type_name to the merged identifier.
8069         (resolved_qualified_expression_name): Print error using "name" if
8070         resolve_package returns NULL_TREE.
8071
8072 2002-03-27  Tom Tromey  <tromey@redhat.com>
8073
8074         * expr.c (expand_invoke): Don't generate null pointer check if
8075         we're calling <init>.
8076
8077 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8078
8079         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8080         fix prototype.
8081         * java-tree.h (java_lang_expand_expr): Similarly.
8082         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8083         (java_init): Don't set hook.
8084
8085 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8086
8087         Fix for PR java/5850:
8088         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8089         context if field was not found in the current scope.
8090         * expr.c (lookup_field): Don't look in enclosing contexts.
8091
8092 2002-03-26  Tom Tromey  <tromey@redhat.com>
8093
8094         Fix for PR java/5942:
8095         * parse.y (init_src_parse): Added sanity check.
8096         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8097         elements, not 11.
8098
8099 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8100
8101         * decl.c (lang_mark_tree): Rename java_mark_tree.
8102         * java-tree.h (java_mark_tree): New.
8103         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8104
8105 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
8106
8107         * lex.c: Change java_perform_atof to take normal parameters
8108         instead of a pointer to a parameter block.  Call it directly
8109         from java_lex.
8110
8111 2002-03-22  Mark Wielaard  <mark@klomp.org>
8112
8113         Fix for PR java/5368:
8114         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8115         when printing error message.
8116
8117 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8118
8119         * decl.c (maybe_build_cleanup): Remove.
8120
8121 2002-03-22  Tom Tromey  <tromey@redhat.com>
8122
8123         Andrew Haley  <aph@cambridge.redhat.com>
8124
8125         * expr.c (build_field_ref): Don't build a check if the field is a
8126         member of `this'.
8127
8128 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
8129
8130         Fix for PR java/6026:
8131         * lex.c (java_lex): Fix parsing of consecutive floats.
8132
8133 2002-03-21  Tom Tromey  <tromey@redhat.com>
8134
8135         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8136         class.
8137
8138 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8139
8140         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8141         insert_block, getdecls, kept_level_p, global_bindings_p): New.
8142
8143 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8144
8145         * gcj.texi: @code{gcj} becomes @command{gcj}.
8146         @code{gcc} becomes @command{gcc}.
8147         GcjRaw changed to gnu.gcc.RawData.
8148
8149 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8150
8151         * decl.c (start_java_method): Use new hook.
8152         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8153         (java_init): Remove old hook.
8154
8155 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8156
8157         * builtins.c (define_builtin): Do nothing if `type' is null.
8158         Fixes PR java/5876.
8159
8160 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8161
8162         * parse.y (parser_check_super_interface): Fix error message
8163         grammar/order.
8164
8165 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8166
8167         * jcf-parse.c (get_constant): Delete unused variables.
8168
8169 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8170
8171         * java-tree.h (java_parse_file): New.
8172         * jcf-parse.c (yyparse): Rename java_parse_file.
8173         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8174
8175 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8176
8177         * parse.y (craft_constructor): Return the constructor decl.
8178         (java_expand_classes): Update comments.
8179         (lookup_method_invoke): Call fix_constructors immediately for
8180         anonymous class. Fixes PR java/5935.
8181
8182 2002-03-15  Anthony Green  <green@redhat.com>
8183
8184         * jcf-parse.c (yyparse): Don't emit class registration
8185         constructor when compiling resource files.
8186
8187 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8188
8189         * lang.c (java_tree_code_type, java_tree_code_length,
8190         tree_code_name): Delete.
8191         (tree_code_type, tree_code_length, tree_code_name): Define.
8192         (java_init): Don't try to copy into the various tree_code
8193         arrays.
8194
8195 2002-03-12  Tom Tromey  <tromey@redhat.com>
8196
8197         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8198         UTF-8, not UCS-2.  Fixes PR java/5923.
8199
8200         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8201         a call_expr wrapped in a convert.  Fixes PR java/5848.
8202
8203 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8204
8205         * jcf-write.c (write_classfile): Improve error strings.
8206
8207 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8208
8209         * lex.c: Adjust comments to GNU standards.
8210
8211 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8212
8213         Fix for PR java/5902:
8214         * lex.c (java_lex): Fix parsing of literals.
8215
8216 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8217
8218         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8219         to prevent it getting evaluated twice in the store checking case.
8220         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8221         examining OBJECT.
8222
8223 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8224
8225         * decl.c (java_init_decl_processing): Make sure class_type_node
8226         alignment is not less than 64 bits if hash synchronization is enabled.
8227
8228 2002-03-08  Per Bothner  <per@bothner.com>
8229
8230         * parse.y (java_complete_lhs):  Check if patch_assignment
8231         returned an error-mark.
8232
8233         * parse.y (try_builtin_assignconv):  Don't special-case zero.
8234
8235 2002-03-08  Per Bothner  <per@bothner.com>
8236
8237         Fix for PR java/5812.
8238         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
8239         here instead of in JSR macro.  Likewise with load_type_state call.
8240         Do the latter on if the return_pc has been verified (the jsr returns).
8241         (JSR):  Now just call build_java_jsr.
8242
8243 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
8244
8245         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8246         (java.install-common): Link native driver to
8247         JAVA_TARGET_INSTALL_NAME.
8248
8249 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
8250
8251         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8252         * builtins.c(sin_builtin): Likewise
8253         * builtins.c(sqrt_builtin): Likewise
8254
8255 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
8256
8257         * java/expr.c, java/jcf-parse.c, java/lex.c:
8258         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8259         REAL_ARITHMETIC blocks unconditional.  Delete some further
8260         #ifdef blocks predicated on REAL_ARITHMETIC.
8261
8262 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8263
8264         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8265         explicit sizeof/sizeof.
8266         * decl.c (java_init_decl_processing): Likewise.
8267         * jcf-parse.c (init_jcf_parse): Likewise.
8268         * parse.y (init_src_parse): Likewise.
8269
8270 2002-03-02  Per Bothner  <per@bothner.com>
8271
8272         Make --CLASSPATH by a synonym for --classpath and -classpath.
8273         Implement --bootclasspath.
8274         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
8275         (classpath_l):  Remove.
8276         (jcf_path_CLASSPATH_arg):  Remove.
8277         (jcf_path_bootclasspath_arg):  New function.
8278         (jcf_path_seal):  Simplify accordingly.
8279
8280         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
8281         (jcf_path_CLASSPATH):  Remove declaration.
8282         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
8283         (lang_specific_driver):  Translate -bootclasspath.
8284         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
8285         * lang.c (decode_lang_options):  Do jcf_path_init first.
8286         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
8287         * gjavah.c:  Also handle --bootclasspath.
8288         Handle --CLASSPATH as a synonum for --classpath.
8289         * jcf-dump.c: Likewise.
8290
8291         "." is not part of system path, but is the default for --classpath.
8292         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
8293         (jcf_path_seal):  Add "." if no CLASSPATH specified.
8294
8295         * gcj.texi:  Document changes.
8296
8297 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8298
8299         * expr.c (build_java_arraystore_check): Fix formatting.
8300
8301 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8302
8303         Fix for PR java/5758, java/5632:
8304         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8305         inner-class separator too.
8306         * parse.y (do_resolve_class): New local `decl_result.'
8307         Progressively build a name for what can have been loaded.
8308
8309 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8310
8311         * expr.c (java_array_data_offset): Removed function.
8312         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8313         (build_java_array_length_access): Obtain "length" value using a
8314         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8315         (build_java_arrayaccess): Correct comment. Access "data" using a
8316         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8317         (build_java_arraystore_check): New function.
8318         (expand_java_arraystore): Use build_java_arraystore_check.
8319         * parse.y (patch_assignment): Simplify code to insert a store check
8320         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8321         * check-init.c (check_init): Update to reflect that an array length
8322         access is now a COMPONENT_REF.
8323         * gcj.texi (Code Generation): Improve documentation of
8324         -fno-bounds-check. Add documentation for -fno-store-check.
8325         * java-tree.h (flag_store_check): Declare.
8326         (build_java_arraystore_check): Declare.
8327         * lang.c (flag_store_check): Initialize to 1.
8328         (lang_f_options): Add store-check option.
8329         * jvspec.c: Don't pass store-check option to jvgenmain.
8330         * lang-options.h: Add help string for -fno-store-check.
8331
8332 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8333
8334         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8335         * java-tree.h (java_dup_lang_specific_decl): New.
8336         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8337
8338 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8339
8340         * builtins.c, decl.c: Delete traditional-mode-related code
8341         copied from the C front end but not used, or used only to
8342         permit the compiler to link.
8343
8344 2002-02-22  Tom Tromey  <tromey@redhat.com>
8345
8346         Fix for PR java/2369:
8347         * jvspec.c (verify_class_name): New function.
8348         (lang_specific_driver): Call it.
8349         (JAVA_START_CHAR_P): New macro.
8350         (JAVA_PART_CHAR_P): Likewise.
8351
8352 2002-02-22  Per Bothner  <per@bothner.com>
8353
8354         * class.c:  Change vtable to be more compatible with g++ v3 abi.
8355         (get_dispatch_table):  Prepend offset-to-top (always 0) and
8356         type_info pointer (currently unimplemented hence NULL) to vtable.
8357         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8358         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
8359         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8360         (build_dtable_decl):  Add declarations for new fields.
8361
8362 2002-02-20  Per Bothner  <per@bothner.com>
8363
8364         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8365         to finit$ (otherwise generate_bytecode_insns drops it). However, we
8366         don't need to set it on the COMPOUND_EXPR - the caller does that.
8367
8368 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8369
8370         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8371         `--CLASSPATH' becomes `--classpath.'
8372         * gjavah.c: Likewise.
8373         * jcf-dump.c: Likewise.
8374         * lang-options.h: Likewise.
8375         * lang.c: Likewise.
8376         * jcf-path.c: Updated comment.
8377         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8378         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8379         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8380         (jcf_path_CLASSPATH_arg): Ditto.
8381         (classpath_u): Updated leading comment.
8382
8383 2002-02-20  Per Bothner  <per@bothner.com>
8384
8385         * builtins.c (check_for_builtin):  New function.
8386         (build_call_or_builtin):  Remove.
8387         * java-tree.h:  Update accordingly.
8388         * expr.c (expand_invoke):  Use build + check_for_builtin instead
8389         of build_call_or_builtin.
8390         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
8391         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8392         flag (which had caused jcf-write to incorrectly emit invokevirtual).
8393
8394 2002-02-17  Tom Tromey  <tromey@redhat.com>
8395
8396         * java-tree.h (TYPE_STRICTFP): New macro.
8397         (struct lang_type) [strictfp]: New field.
8398         (CLASS_STRICTFP): New macro.
8399         (METHOD_STRICTFP): New macro.
8400         (struct lang_decl) [strictfp]: New field.
8401         * parse.y (method_header): Disallow strictfp constructor or
8402         abstract method.
8403         (STRICT_TK): Move before MODIFIER_TK.
8404         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8405         (METHOD_MODIFIERS): Likewise.
8406         (INTERFACE_MODIFIERS): Likewise.
8407         * jcf-write.c (get_access_flags): Likewise.
8408         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8409         (add_method_1): Likewise.
8410         (get_access_flags_from_decl): Likewise.
8411         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
8412         recognize strictfp flag.
8413         * jcf.h (ACC_STRICT): New define.
8414
8415 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
8416
8417         * class.c(build_utf8_ref): Move declaration of decl_size
8418
8419 2002-02-07  Tom Tromey  <tromey@redhat.com>
8420
8421         * gcj.texi (Input Options): --CLASSPATH does not suppress system
8422         path.
8423
8424 2002-02-04  Anthony Green  <green@redhat.com>
8425
8426         * class.c (build_utf8_ref): Put UTF-8 constants into merged
8427         sections if available.
8428
8429 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8430
8431         * parse.y (java_expand_classes): Fix typo in static field loop.
8432
8433 2002-02-02  Richard Henderson  <rth@redhat.com>
8434
8435         * class.c (add_field): Mark static fields external.
8436         (build_class_ref): Remove redundant set.
8437         * parse.y (java_expand_classes): Mark static fields of classes
8438         to be compiled as local.
8439         * jcf-parse.c (parse_class_file): Likewise.
8440
8441 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8442
8443         * gcj.texi (About CNI): New node.
8444
8445 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8446
8447         PR java/5080
8448         * jcf-parse.c : Check for HAVE_LOCALE_H before using
8449         setlocale() with LC_CTYPE as a parameter.
8450         * jv-scan.c: Same.
8451
8452 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
8453
8454         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8455         Follow GNU Coding Standards for --version.
8456
8457 2002-01-28  Tom Tromey  <tromey@redhat.com>
8458
8459         * expr.c (build_jni_stub): Ensure storage for `meth' is
8460         generated.
8461         * parse.y (java_complete_expand_methods): Set
8462         current_function_decl before building JNI stub.
8463
8464 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8465
8466         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8467         BUILT_IN_SQRTF.
8468
8469 2002-01-22  Tom Tromey  <tromey@redhat.com>
8470
8471         * decl.c (java_init_decl_processing): Use add_predefined_file.
8472         Predefine RawData.java.
8473         (predef_filenames): Removed.
8474         (java_init_decl_processing): Don't register predef_filenames.
8475         * jcf-parse.c (add_predefined_file): New function.
8476         (predefined_filename_p): Rewrote.
8477         (predefined_filename_p): No longer static.
8478         * decl.c (java_init_decl_processing): Call initialize_builtins.
8479         * Make-lang.in (JAVA_OBJS): Added builtins.o.
8480         (java/builtins.o): New target.
8481         * builtins.c: New file.
8482         * parse.y (patch_invoke): Use build_call_or_builtin.
8483         * java-tree.h (build_call_or_builtin): Declare.
8484         (initialize_builtins): Declare.
8485         (java_set_exception_lang_code): Removed unused declaration.
8486         (PREDEF_FILENAMES_SIZE): Removed.
8487         (java_tree_index): Added JTI_PREDEF_FILENAMES.
8488         (predef_filenames): New define.
8489         (add_predefined_file): Declare.
8490         (predefined_filename_p): Declare.
8491         * expr.c (expand_invoke): Use build_call_or_builtin.
8492
8493 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8494
8495         * parse.y (patch_switch_statement): Fix format specifier.
8496
8497 2002-01-16  Tom Tromey  <tromey@redhat.com>
8498
8499         More for PR java/5365:
8500         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8501         default.
8502         (process_file): Generate include for
8503         java.lang.UnsupportedOperationExceptions.
8504
8505 2002-01-15  Andreas Jaeger  <aj@suse.de>
8506
8507         * .cvsignore: Add man pages.
8508
8509 2002-01-15  Tom Tromey  <tromey@redhat.com>
8510
8511         Fix for PR java/5365:
8512         * gjavah.c (process_file): Turn class name into a file name.
8513
8514 2002-01-14  Matthias Klose  <doko@debian.org>
8515
8516         * gcj.texi: Fix whitespace and formatting errors in the
8517         synopsis of the man pages. Update copyright.
8518
8519 2002-01-14  Tom Tromey  <tromey@redhat.com>
8520
8521         For PR libgcj/5303:
8522         * Make-lang.in (java.install-man): Handle jv-convert man page.
8523         (java.generated-manpages): Added jv-convert.1.
8524         (java.uninstall): Remove jv-convert.1.
8525         (java.maintainer-clean): Likewise.
8526         ($(srcdir)/java/jv-convert.1): New target.
8527         * gcj.texi (Top): Link to jv-convert node.
8528         (Individual utilities): Likewise.
8529         (Invoking jv-convert): New node.
8530
8531 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8532             Martin Kahlert  <martin.kahlert@infineon.com>
8533
8534         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8535         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8536
8537 2002-01-03  Graham Stott  <grahams@redhat.com>
8538
8539         * class.c (compile_resource_file): Update copyright date.
8540         Constify filename parameter.
8541         (java-tree.h): Update copyright date.
8542         (compile_resource_file): Constify filename parameter.
8543
8544 2002-01-03  Graham Stott  <grahams@redhat.com>
8545
8546         * gcc/jcf-parse.c: Update copyright date.
8547         (yyparse): Constify resource_filename.
8548
8549 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8550
8551         * parse.y (src_parse_roots): Don't needlessly zero init.
8552
8553 2001-12-31  Tom Tromey  <tromey@redhat.com>
8554
8555         * parse.y (dump_java_tree): New function.
8556         (source_end_java_method): Call it.
8557         (end_class_declaration): Likewise.
8558         * lang.c (java_decode_option): Call dump_switch_p.
8559
8560 2001-12-28  Tom Tromey  <tromey@redhat.com>
8561
8562         * gen-table.pl: Don't process characters after \uffff.  Added
8563         comment pointing to input file.
8564
8565 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8566
8567         * gen-table.pl: Const-ify output.  Document the location of a
8568         suitable unicode input file.
8569
8570         * chartables.h: Regenerate.
8571
8572 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8573
8574         * chartables.h: Const-ify.
8575         * gjavah.c (options): Likewise.
8576         * jcf-dump.c (options): Likewise.
8577         * jv-scan.c (options): Likewise.
8578         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8579         * parse.y (binop_lookup): Likewise.
8580
8581 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8582
8583         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8584         the static arrays that are output.
8585         * jvspec.c (jvgenmain_spec): Make static.
8586         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8587         * keyword.h: Regenerate.
8588         * lang.c (string_option, process_option_with_no, lang_f_options,
8589         lang_W_options): Const-ify.
8590         * lex.c (java_lex): Likewise.
8591
8592 2001-12-21  Richard Henderson  <rth@redhat.com>
8593
8594         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8595         (get_boehm_type_descriptor): ... here.  Arrange for the
8596         TREE_TYPE to get set properly.
8597
8598 2001-12-21  Richard Henderson  <rth@redhat.com>
8599
8600         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8601         only if the target requires collect2.
8602
8603         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8604
8605 2001-12-20  Tom Tromey  <tromey@redhat.com>
8606
8607         For PR java/4509:
8608         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8609         CAN_COMPLETE_NORMALLY for the node.
8610         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8611         generate code for second branch if first branch can't complete
8612         normally.
8613         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8614         the loop head if the loop body can't complete normally.
8615
8616 2001-12-20  Tom Tromey  <tromey@redhat.com>
8617
8618         For PR java/4766:
8619         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8620         case where `finally' clause can't complete normally.
8621
8622 2001-12-20  Tom Tromey  <tromey@redhat.com>
8623
8624         Fixes PR java/5057:
8625         * parse.y (analyze_clinit_body): Added this_class parameter.
8626         Check for more cases where we must keep <clinit>.
8627         (maybe_yank_clinit): Cleaned up flow control.
8628
8629 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8630
8631         * decl.c (java_init_decl_processing): Don't initialize
8632         finit_leg_identifier_node.
8633         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8634         (finit_leg_identifier_node): Remove.
8635         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8636
8637 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8638
8639         * mangle.c (mangle_member_name): Don't special-case for
8640         NO_DOLLAR_IN_LABEL.
8641         * mangle_name.c (unicode_mangling_length): Likewise.
8642         (append_unicode_mangled_name): Likewise.
8643         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8644         code.
8645
8646 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8647
8648         * expr.c (build_java_array_length_access): Don't force null pointer
8649         check unless flag_check_references is set.
8650
8651 2001-12-20  Tom Tromey  <tromey@redhat.com>
8652
8653         Fix for PR java/3417:
8654         * parse.y (patch_assignment): Added special processing for
8655         `return'.
8656         (patch_return): Don't convert booleans to integers, and don't
8657         special-case `null'.
8658
8659 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8660
8661         * config-lang.in (diff_excludes): Remove.
8662
8663 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8664
8665         * gcj.texi: Update link to GCC manual.
8666
8667 2001-12-17  Tom Tromey  <tromey@redhat.com>
8668
8669         * parse.y (link_nested_class_to_enclosing): Removed useless
8670         statement.
8671
8672 2001-12-16  Tom Tromey  <tromey@redhat.com>
8673
8674         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
8675         Fixes PR java/5088.
8676
8677 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
8678
8679         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
8680         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
8681         spelling errors.
8682
8683 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8684
8685         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
8686
8687 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8688
8689         * decl.c (java_init_decl_processing): Build otable_type correctly.
8690         otable_decl is an otable_type.
8691
8692 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8693
8694         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
8695         otable_type, otable_ptr_type, method_symbol_type,
8696         method_symbols_array_type, method_symbols_array_ptr_type): New
8697         field/global tree definitions.
8698         (flag_indirect_dispatch): New flag.
8699         * decl.c (java_init_decl_processing): Initialize new otable and
8700         otable_syms type nodes and decls. Add new field "index" to
8701         method_type_node.
8702         * class.c (build_method_symbols_entry): New function.
8703         (make_method_value): Set "index" to to method's vtable index for
8704         virtual methods when indirect-dispatch is not used.
8705         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
8706         and set vtable_method_count to -1. Set otable and otable_syms field
8707         if indirect-dispatch is used and there was something to put in them.
8708         (build_method_symbols_entry): New function.
8709         (emit_offset_symbol_table): New function.
8710         * expr.c (get_offset_table_index): New function.
8711         (build_invokevirtual): Build array reference to otable at the index
8712         returned by get_offset_table_index, and use the result as the vtable
8713         offset.
8714         (build_invokeinterface): Similar.
8715         * jcf-parse.c (yyparse): If indirect-dispatch, call
8716         emit_offset_symbol_table at the end of compilation, after all classes
8717         have been generated.
8718         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
8719         * lang.c (flag_indirect_dispatch): Define.
8720         (lang_f_options): Add indirect-dispatch flag.
8721
8722 2001-12-14  Matthias Klose  <doko@debian.org>
8723
8724         * gcj.texi: Markup for man page generation. Document missing
8725         options printed by <tool> --help.
8726         Terminate description of gij's -ms option with a dot.
8727         * Make-lang.in ($(srcdir)/java/*.1): New targets.
8728         (java.generated-manpages java.install-man, java.uninstall,
8729         java-maintainer-clean) Updated.
8730
8731 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
8732
8733         * class.c (get_dispatch_table): Fix java vtable layout
8734         for TARGET_VTABLE_USES_DESCRIPTORS.
8735         * decl.c (java_init_decl_processing): Initialize
8736         alloc_no_finalizer_node, finalize_identifier_node.
8737         * expr.c (class_has_finalize_method): New function.
8738         (expand_java_NEW): Generate calls for finalizer-free allocation.
8739         (build_invokevirtual): Fix java vtable layout for
8740         TARGET_VTABLE_USES_DESCRIPTORS.
8741         * java-tree.h (enum java_tree_index): New entries:
8742         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
8743         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
8744         (class_has_finalize_method): declare.
8745         (HAS_FINALIZER_P): New macro.
8746         * parse.y (patch_invoke): Generate calls for finalizer-free
8747         allocation.
8748
8749 2001-12-12  Matthias Klose  <doko@debian.org>
8750
8751         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
8752         whitespace at end of line.
8753
8754 2001-12-11  Tom Tromey  <tromey@redhat.com>
8755
8756         * lex.c (java_init_lex): Define wfl_to_string as
8757         gnu.gcj.runtime.StringBuffer unless generating bytecode.
8758
8759 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
8760
8761         * class.c (make_method_value): Use null_pointer_node to
8762         represent empty exception table.
8763
8764 2001-12-10  Tom Tromey  <tromey@redhat.com>
8765
8766         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
8767
8768 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
8769
8770         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
8771
8772 2001-12-09  Per Bothner  <per@bothner.com>
8773
8774         * check-init.c (current_switch_has_default):  New static field.
8775         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
8776         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
8777         DEFAULT_EXPR seen, simulate a default alternative that copies state.
8778
8779 2001-12-09  Tom Tromey  <tromey@redhat.com>
8780
8781         * check-init.c (check_init): Don't allow pre- or post- increment
8782         or decrement of final variable.
8783         (final_assign_error): Minor error message rewording.
8784
8785 2001-12-08  Tom Tromey  <tromey@redhat.com>
8786
8787         * java-tree.h: Fixed typo.
8788
8789         * gjavah.c (decompile_method): Don't decompile to `return this'
8790         for static methods.
8791
8792         * gjavah.c (cxx_keywords): Re-sorted.
8793         * lex.c (cxx_keywords): Re-sorted.
8794
8795         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
8796         else.
8797
8798         * gjavah.c (print_namelet): Clear subnamelets.
8799         (HANDLE_METHOD): Set `method_printed' earlier.
8800
8801 2001-12-07  Tom Tromey  <tromey@redhat.com>
8802
8803         * lang.c (lang_f_options): Added
8804         optimize-static-class-initialization.
8805         (java_decode_option): Removed special case.
8806
8807 2001-12-07  Per Bothner  <per@bothner.com>
8808
8809         * check-init.c (check_init):  Fix typo freeing memory twice.
8810
8811 2001-12-05  Per Bothner  <per@bothner.com>
8812
8813         Restore support for static class initialization optimization.
8814         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
8815         * check-init.c (check_int):  At end of BLOCK handle initialization
8816         blocks, which used to be done in java_complete_expand_method but did
8817         not handle the case where check_for_initialization might allocate
8818         more than a word of bits.
8819         * decl.c (lang_make_tree):  The smic field is now a tree.
8820         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
8821         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
8822
8823         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
8824
8825         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
8826         Change from a hash table to a list.
8827         (struct_lang_decl):  Change field 'smic' to match.
8828         * class.c (add_method_1):  Initialize
8829         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
8830         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
8831         (java_expand_method_bodies): -here, since 'smic' is now a list.
8832         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
8833
8834         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
8835
8836         * class.c (java_hash_compare_tree_node):  Fix casts.
8837
8838 2001-12-04  Per Bothner  <per@bothner.com>
8839
8840         * check-init.c:   Handle definite unassignment to finals in addition
8841         to definite assignment.
8842         (loop_current_locals):  New field.
8843         (num_current_locals, int start_current_locals, num_current_words):
8844         Make static.
8845         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
8846         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
8847         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
8848         (get_variable_decl, check_final_reassigned):  New functions.
8849         (check_init, check_bool_init):  Modify as needed for checking finals.
8850         (check_for_initialization):  Take extra parameter and return void.
8851         Do extra start-up logic to check final fields for assignment.
8852         * parse.y (check_static_final_variable_assignment_flag,
8853         reset_static_final_variable_assignment_flag, check_final_assignment,
8854         check_final_variable_local_assignment_flag,
8855         reset_final_variable_indirect_assignment_flag,
8856         reset_final_variable_global_assignment_flag):  Remove functions.
8857         (java_complete_expand_methods, outer_field_access_fix,
8858         patch_assignment): Remove no-longer used logic.
8859         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
8860         * parse.y (register_fields, java_complete_tree):  Update accordingly.
8861
8862         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
8863         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
8864         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
8865
8866         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
8867
8868         * java-tree.h (DECL FINAL):  New bit-field.
8869         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
8870         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
8871         (DECL_INIT_CALLS_THIS):  New macro.
8872         (struct lang_decl):  New bit-field init_calls_this.
8873         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
8874         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
8875         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
8876         use it for both local variables and final fields.
8877         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
8878         and local_final.
8879         (struct lang_type):  Remove hfv bit-field.
8880         (check_for_initialization):  Change to return void.
8881
8882         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
8883         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
8884         * check-init.c (final_assign_error):  New helper function.
8885         (check_final_reassigned, check_init):  Use it.
8886         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
8887
8888         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
8889         bit-fields to unsigned.
8890
8891 2001-12-03  Per Bothner  <per@bothner.com>
8892
8893         * parse.y (patch_binop):  Minor constant folding.
8894
8895         * parse.y (build_current_thisn):  Shorter 'buffer'.
8896
8897 2001-12-03  Per Bothner  <per@bothner.com>
8898
8899         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
8900         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
8901         * jcf-write.c (generate_bytecode_insns):  Remove support for
8902         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
8903         * check-init.c (check_init):  Likewise.
8904
8905 2001-12-03  Per Bothner  <per@bothner.com>
8906
8907         * verify.c (subroutine_nesting):  New function.
8908         (verify_jvm_instructions):  Use it to fix logic for checking that
8909         we're done with the current subroutine.
8910
8911         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
8912         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
8913
8914 2001-12-03  Per Bothner  <per@bothner.com>
8915
8916         * jcf.h:  Fix obvious typo in comment.
8917         * typeck.c (build_null_signature):  Add comment.
8918
8919 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
8920
8921         * expr.c: Remove leading capital from diagnostic messages, as
8922         per GNU coding standards.
8923         * jcf-io.c: Similarly.
8924         * jcf-parse.c: Similarly.
8925         * jv-scan.c: Similarly.
8926         * jvspec.c: Similarly.
8927         * mangle.c: Similarly.
8928
8929 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
8930             Alexandre Petit-Bianco  <apbianco@redhat.com>
8931
8932         * expr.c (build_java_arrayaccess): Call save_expr on array for
8933         correct evaluation order, modified comment, fixed indentation.
8934         * parse.y: (patch_assignment): Correctly extract the array base
8935         from the tree generate by build_java_arrayaccess, added comments.
8936         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
8937         Fixes PR java/3096, PR java/3803, PR java/3965.
8938
8939 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8940
8941         * expr.c (expand_byte_code): Remove trailing periods from messages.
8942         * jcf-parse.c (load_class, jcf_parse): Similarly.
8943         * jcf-write.c (generate_classfile): Similarly.
8944         * lex.c (java_lex): Similarly.
8945
8946 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8947
8948         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
8949
8950 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
8951
8952         * Make-lang.in (java.generated-manpages): New dummy target.
8953
8954 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8955
8956         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
8957         ASM_FINAL_SPEC.
8958         (lang_specific_pre_link): Use set_input to set input_filename.
8959         Append `main' here.
8960         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
8961         (main): Fix definition.
8962         Strip `main' from classname.
8963         Fixes PR java/227.
8964
8965 2001-11-18  Roger Sayle <roger@eyesopen.com>
8966
8967         * parse.h (java_expand_switch): Remove old prototype.
8968
8969 2001-11-18  Tom Tromey  <tromey@redhat.com>
8970
8971         Fix for PR java/1401:
8972         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
8973         arg0 is null.
8974         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
8975         correctly.
8976
8977 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8978
8979         * lang.c (finish_parse): Rename to java_finish.
8980         (LANG_HOOKS_FINISH, java_finish): New.
8981
8982 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
8983
8984         * decl.c (init_decl_processing): Rename java_init_decl_processing.
8985         * java-tree.h: New prototype.
8986         * lang.c (java_init): Update prototype.  Combine with old init_parse.
8987
8988 2001-11-13  Tom Tromey  <tromey@redhat.com>
8989
8990         * gjavah.c (method_signature): New global.
8991         (HANDLE_METHOD): Set it.
8992         (decompile_return_statement): New function.
8993         (decompile_method): Use it.
8994         (print_method_info): Removed `synth' argument.
8995
8996 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
8997
8998         * java-tree.h (java_set_yydebug): New.
8999         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9000         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9001         (print_lang_decl, print_lang_type, print_lang_identifier,
9002         print_lang_statistics, lang_print_xnode): Remove.
9003
9004 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9005
9006         * jcf-parse.c (init_lex): Remove.
9007         * lang.c (language_string, lang_identify): Remove.
9008         (struct lang_hooks): Constify.
9009         (LANG_HOOKS_NAME): Override.
9010         (init_parse): Update.
9011
9012 2001-11-08  Andreas Franck  <afranck@gmx.de>
9013
9014         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9015         program_transform_name the way suggested by autoconf.
9016         (java.install-common): Also transform auxiliary program names with
9017         program_transform_name.
9018
9019 2001-11-08  Tom Tromey  <tromey@cygnus.com>
9020
9021         * parse.y (trap_overflow_corner_case): New rule.
9022         (unary_expression): Use it.
9023         * lex.c (java_init_lex): Don't set minus_seen.
9024         (yylex): Don't use minus_seen.  Communicate overflow to parser for
9025         it to handle.
9026         (error_if_numeric_overflow): New function.
9027         * parse.h (minus_seen): Removed field.
9028         (JAVA_RADIX10_FLAG): New define.
9029
9030 2001-11-07  Tom Tromey  <tromey@redhat.com>
9031
9032         Patch for PR java/1414:
9033         * parse.y (case_label_list): New global.
9034         (goal): Register case_label_list with GC.
9035         (java_complete_lhs): Save new case on case_label_list.
9036         (patch_switch_statement): Check for duplicate case labels.
9037
9038 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9039
9040         * parse.y (patch_assignment): Removed unused third argument.
9041         (java_complete_lhs): Removed unused third argument to patch_assignment.
9042
9043 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9044
9045         * lang.c: Include langhooks-def.h.
9046         * Make-lang.in: Update.
9047
9048 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9049
9050         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9051
9052 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9053
9054         * mangle.c (find_compression_record_match): Don't match compression
9055         records for package name elements unless they occur at the start of
9056         the name. Fix for PR java/4717.
9057
9058 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9059
9060         * expr.c (expand_java_field_op): Don't special-case references to
9061         java.lang.PRIMTYPE.TYPE.
9062         (build_primtype_type_ref): Removed.
9063         * java-tree.h (build_primtype_type_ref): Remove prototype.
9064         * parse.y (maybe_build_primttype_type_ref): Removed.
9065         (complete_function_arguments): Don't special-case references to
9066         java.lang.PRIMTYPE.TYPE.
9067         (patch_assignment): Likewise.
9068         (array_constructor_check_entry): Likewise.
9069
9070 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9071
9072         * mangle.c (static tree compression_table): Fixed leading comment.
9073         * parse.h (struct parser_ctxt): Fixed field comment.
9074         * parse.y (check_pkg_class_access): New prototype, fixed leading
9075         comment, new parameter used to emit error only if passed as true.
9076         (parse_check_super): Pass extra argument to check_pkg_class_access.
9077         (do_resolve_class): Likewise.
9078         (process_imports): Likewise.
9079         (read_import_dir): Fixed indentation.
9080         (find_in_imports_on_demand): New local class_type_name. Local
9081         node_to_use deleted. while loop changed into for loop. Report
9082         multiple definition only for accessible classes. Improved error
9083         message.
9084         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9085         assigned to parameter list, fixed indentation. while loop changed
9086         into for loop, restore TREE_CHAIN on local `tem' before the next
9087         iteration.
9088
9089 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9090
9091         * lang.c (lang_get_alias_set): Deleted.
9092
9093 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9094
9095         * gjavah.c (jni_print_char): Fix thinko in last change.
9096
9097         * gjavah.c (jni_print_char, decode_signature_piece): Use
9098         safe-ctype macros and/or fold extra calls into fewer ones.
9099         * lex.c (java_read_unicode, java_lex): Likewise.
9100         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9101         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9102         * mangle_name.c (append_unicode_mangled_name,
9103         unicode_mangling_length): Likewise.
9104
9105 2001-10-17  Richard Henderson  <rth@redhat.com>
9106
9107         * Make-lang.in (java/lang.o): Depend on langhooks.h.
9108
9109 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9110
9111         * lang.c (langhooks.h): Included.
9112         (LANG_HOOKS_INIT): Redefined.
9113         (LANG_HOOKS_INIT_OPTIONS): Likewise.
9114         (LANG_HOOKS_DECODE_OPTION): Likewise.
9115         (struct lang_hooks lang_hooks): New initialization.
9116
9117 2001-10-11  Per Bothner  <per@bothner.com>
9118
9119         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
9120         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9121         The former is simpler, and jcf-write.c handles it better.
9122         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
9123         or WITH_CLEANUP_EXPR.
9124         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
9125         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9126
9127         * parse.y (patch_if_else_statement):  If the condition is constant,
9128         optimize away the test.
9129
9130 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9131
9132         * parse.y (patch_cast): Call patch_string on the first operand of
9133         the incoming node, update it if necessary. Fixes PR java/4510.
9134
9135 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9136
9137         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9138         when name qualifier matches a package name.
9139
9140 2001-10-08  Tom Tromey  <tromey@redhat.com>
9141
9142         Fix for PR java/4489:
9143         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9144         force a new label when computing `body_block'.
9145
9146 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9147
9148         * jcf-io.c (format_uint): Const-ify.
9149         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9150         * lex.c (java_get_line_col): Likewise.
9151         * parse.y (build_incdec): Likewise.
9152
9153 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9154
9155         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9156         a NULL enclosing context if appropriate. Fixes PR java/4466.
9157
9158 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9159
9160         * parse.y (patch_assignment): Use lvalue's original TYPE when
9161         building the final COMPOUND_EXPR.
9162         (try_reference_assignconv): Fixed leading comment.
9163
9164 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9165
9166         * parse.y (check_final_variable_indirect_assignment): For
9167         COMPOUND_EXPR, return only if finals were found initialized
9168         properly, if not, keep on checking.
9169         (check_final_variable_global_assignment_flag): New local
9170         error_found, set when appropriate and used to decide whether to
9171         report uninitialized finals. Fixed typo in comment.
9172
9173 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9174
9175         * decl.c (init_decl_processing): Fixed typo in predef_filenames
9176         last three initializations. Fixes PR java/4360.
9177
9178 2001-09-21  Richard Henderson  <rth@redhat.com>
9179
9180         * class.c (get_dispatch_table): Handle function descriptors.
9181         (build_dtable_decl): Likewise.
9182         * expr.c (build_invokevirtual): Likewise.
9183
9184 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9185
9186         * parse.y (patch_method_invocation): Build class initialization
9187         when static finals are used to qualify method invocation.
9188         Fixes PR java/4366.
9189
9190 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
9191
9192         * parse.h: (WFL_STRIP_BRACKET): Re-written using
9193         build_type_name_from_array_name.
9194         (STRING_STRIP_BRACKETS): New macro.
9195         * parse.y (build_type_name_from_array_name): New function.
9196         (array_creation_expression:): Accumulate []s instead of [s.
9197         (cast_expression:): Accumulate []s instead of [s after cast type
9198         name.
9199         (build_array_from_name): Local string deleted, use
9200         build_type_name_from_array_name.
9201         (build_unresolved_array_type): Accumulate []s instead of [s after
9202         type name.
9203         (register_fields): Fixed comment.
9204         (resolve_class): Local name, base deleted, new locals tname and
9205         array_dims. Use build_type_name_from_array_name. Use array_dims to
9206         build array type.
9207         (purify_type_name): Use STRING_STRIP_BRACKETS.
9208
9209 2001-09-18  Andreas Jaeger  <aj@suse.de>
9210
9211         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9212         * jv-scan.c: Likewise.
9213
9214 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9215
9216         * parse.y (patch_method_invocation): Inner class creation context
9217         check not enforced within constructors. Fixes PR java/1873.
9218
9219 2001-09-16  Tom Tromey  <tromey@redhat.com>
9220
9221         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9222         NOTE_PUSH for single-case push.  Fixes PR java/4189.
9223
9224 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9225
9226         * java-tree.h (TYPE_IMPORT_LIST): New macro.
9227         (TYPE_IMPORT_DEMAND_LIST): Likewise.
9228         (struct lang_type): New fields import_list and import_demand_list.
9229         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9230         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9231         (do_resolve_class): New local saved_enclosing_type, initialized,
9232         passed as parameter to find_in_imports and find_in_imports_on_demand.
9233         (find_in_imports): Added paramater enclosing_type, use its
9234         TYPE_IMPORT_LIST when applicable.
9235         (find_in_imports_on_demand): Added parameter enclosing_type, use
9236         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9237         declaration and initialization.
9238         (fold_constant_for_init): Switch/restore current_class to the
9239         appropriate context.
9240
9241 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
9242
9243         * verify.c (verify_jvm_instructions): Fix typo.
9244
9245 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9246
9247         * expr.c (expand_invoke): Const-ification.
9248         * parse.y (patch_method_invocation): Likewise.
9249
9250 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9251
9252         * gjavah.c (cxx_keywords): Const-ification.
9253         * keyword.gperf (java_keyword): Likewise.
9254         * lang.c (java_tree_code_name): Likewise.
9255         * lex.c (cxx_keywords): Likewise.
9256         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9257
9258 2001-09-11  Richard Henderson  <rth@redhat.com>
9259
9260         * parse.h (ctxp_for_generation): Mark extern.
9261
9262 2001-09-10  Richard Henderson  <rth@redhat.com>
9263
9264         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9265
9266 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9267
9268         * typeck.c (java_array_type_length, build_prim_array_type):
9269         Represent empty arrays by NULL index.
9270
9271 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
9272
9273         * java-tree.h (compile_resource_file): Grouped with other prototypes.
9274         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9275
9276 2001-09-06  Anthony Green  <green@redhat.com>
9277
9278         * class.c (O_BINARY): Define if necessary.
9279         (registerResource_libfunc): Declare.
9280         (init_class_processing): Initilize registerResource_libfunc.
9281         (compile_resource_file): New function.
9282         * java-tree.h (resource_name): Declare.
9283         (compile_resource_file): Declare.
9284         * jcf-parse.c (yyparse): Handle compiling java resource files.
9285         * lang.c (java_decode_option): Handle -fcompile-resource option.
9286         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9287         resource files.
9288         * gcj.texi (Code Generation): Add documentation for -R flag.
9289
9290 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
9291
9292         * jcf-write.c (generate_classfile): Issue an error in case of
9293         field/initial value mismatch.
9294         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9295         being initialized and we're generating bytecode.
9296         (java_complete_lhs): In MODIFY_EXPR section: added comments,
9297         set DECL_INITIAL properly when appropriate.
9298         Fixes PR java/4230
9299         Fixes PR java/4204
9300
9301 2001-09-01  Per Bothner  <per@bothner.com>
9302
9303         * parse.y (maybe_yank_clinit):  A field without an initializer is not
9304         relevant.  All initializers except static final and constant require
9305         <clinit>, regardless of flag_emit_class_files.
9306
9307 2001-08-31  Per Bothner  <per@bothner.com>
9308
9309         * class.c (set_constant_value):  When not emitting class files, then a
9310         String ConstantValue is a utf8const_ptr_type.
9311
9312 2001-08-30  Per Bothner  <per@bothner.com>
9313
9314         * jcf-write.c (generate_classfile):  Check that field is primitive
9315         or string before emitting ConstantValue attribute.
9316
9317 2001-08-30  Per Bothner  <per@bothner.com>
9318
9319         * parse.y (resolve_qualified_expression_name):  If creating a
9320         COMPOUND_EXPR, set it's type correctly.
9321
9322 2001-08-30  Per Bothner  <per@bothner.com>
9323
9324         * jcf-io.c (open_class):  Set filename field.
9325
9326         * jcf-parse,c (parse_class_file):  Set current_function_decl
9327         for better error message when Code attribute is missing.
9328
9329         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
9330         better diagnostics, especially for constructors.
9331
9332 2001-08-30  Per Bothner  <per@bothner.com>
9333
9334         * jcf-write.c (generate_classfile):  Don't write ConstantValue
9335         attribute if field is not final, for compatibility with jdk.
9336
9337         * jcf-write.c (generate_classfile):  Convert ConstantValue values
9338         to correct type.  Work-around for front-end bug.
9339         * class.c (set_constant_value):  Error if constant has wrong type.
9340
9341 2001-08-30  Per Bothner  <per@bothner.com>
9342
9343         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
9344         "Double" are printed at verbosity 1.
9345
9346         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
9347
9348         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
9349
9350 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9351
9352         * parse.y (patch_assignment): Don't verify final re-assignment here.
9353         (java_complete_lhs): Verify assignments to finals calling
9354         patch_assignment. Verify re-assignments to finals before calling
9355         patch_assignment.
9356
9357 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
9358
9359         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9360         Fixes PR java/1413
9361
9362 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9363
9364         * lex.c (java_lex): new local found_hex_digits. Set and then used
9365         in test to reject invalid hexadecimal numbers.
9366         * parse.y (java_complete_tree): Prevent unwanted cast with
9367         initialized floating point finals.
9368         (patch_binop): Emit a warning when detecting a division by zero,
9369         mark result not constant, don't simplify non integer division.
9370
9371 2001-08-28  Per Bothner  <per@bothner.com>
9372
9373         * jcf-write.c  (generate_bytecode_insns):  For increments and
9374         decrements just recurse to push constant.  Improvement on Mark's patch.
9375
9376 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
9377
9378         * jcf-write.c (generate_bytecode_insns): Generate an integer to
9379         real conversion for increments and decrements of reals.
9380
9381 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9382
9383         * parse.y (resolve_qualified_expression_name): Handle unresolved
9384         qualified expressions, prevent numerical qualifiers, fixed typo.
9385         Fixes PR java/4141
9386
9387 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9388
9389         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9390         don't report anything but deprecated class when marked so. Handle
9391         VAR_DECL.
9392         (patch_method_invocation): Check deprecation on methods and types.
9393         (patch_binop): code becomes an enum tree_code, added default: to
9394         switch to handle that. Detect division by zero, try to fold and
9395         return before using a subroutine.
9396
9397 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9398
9399         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9400         file smaller than 4 bytes.
9401         * parse.y (check_inner_circular_reference): New function.
9402         (check_circular_reference): Likewise.
9403         (array_initializer:): Accept {,}.
9404         (java_check_circular_reference): Rewritten using
9405         check_circular_reference and check_inner_circular_reference.
9406         (java_complete_expand_method): Unconditionally save and restore
9407         the unpurged exception list.
9408         (build_dot_class_method_invocation): Unmangle signature parameter.
9409
9410 2001-08-21  Tom Tromey  <tromey@redhat.com>
9411
9412         * decl.c (init_decl_processing): Add `throws' field to method
9413         descriptor.
9414         * class.c (make_method_value): Compute `throws' field for method.
9415
9416 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9417
9418         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9419         circularity is detected.
9420         (ctors_unchecked_throws_clause_p): Fixed leading comment.
9421
9422 2001-08-17  Richard Henderson  <rth@redhat.com>
9423
9424         * class.c (emit_register_classes): Add align parameter to
9425         call to assemble_integer.
9426
9427 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
9428
9429         * jcf-parse.c (load_class): New locals saved and class_loaded. If
9430         loading a class_or_name fails, try considering an innerclass name
9431         and load the enclosing context.
9432         * parse.y (resolve_inner_class): New function.
9433         (find_as_inner_class): Added leading comment.
9434         (register_incomplete_type): Keep the current context as enclosing
9435         context for JDEP_FIELD dependencies.
9436         (do_resolve_class): Locals new_class_decl and super initialized to
9437         NULL. Call resolve_inner_class, explore the enclosing context
9438         superclass if necessary.
9439         Fixes PR java/4007
9440
9441 2001-08-16  Tom Tromey  <tromey@redhat.com>
9442
9443         * jcf-dump.c (main): Updated for change to jcf_path_seal.
9444         * gjavah.c (main): Updated for change to jcf_path_seal.
9445         * lang.c (version_flag): New global.
9446         (java_decode_option): Recognize `-version'.
9447         (java_init): Update for change to jcf_path_seal.
9448         * jcf.h (jcf_path_seal): Added `print' argument.
9449         * jcf-path.c (jcf_path_seal): Added `print' argument.
9450
9451 2001-08-13  Zack Weinberg  <zackw@panix.com>
9452
9453         * Make-lang.in (java/decl.o): Update dependencies.
9454         * decl.c: Include libfuncs.h, don't include toplev.h.
9455
9456 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9457
9458         * decl.c (init_decl_processing): exception_type_node,
9459         class_not_found_type_node, and no_class_def_found_type_node
9460         initialized. predef_filenames augmented accordingly.
9461         instinit_identifier_node initialized.
9462         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9463         * java-tree.h (enum java_tree_index): New entries
9464         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9465         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9466         (exception_type_node): New macro.
9467         (class_not_found_type_node): Likewise.
9468         (no_class_def_found_type_node): Likewise.
9469         (instinit_identifier_node): Likewise.
9470         (PREDEF_FILENAMES_SIZE): Adjusted.
9471         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9472         (struct lang_type): Fixed typo in bitfield name.
9473         (DECL_INSTINIT_P): New macro.
9474         (ID_INSTINIT_P): Likewise.
9475         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9476         attribute.
9477         * parse.y (encapsulate_with_try_catch): New function.
9478         (generate_instinit): Likewise.
9479         (build_instinit_invocation): Likewise.
9480         (ctors_unchecked_throws_clause_p): Likewise.
9481         (add_instance_initializer): Deleted.
9482         (build_instance_initializer): Likewise.
9483         (in_instance_initializer): Likewise.
9484         (check_method_redefinition): instinit$ not to be verified.
9485         (java_complete_expand_methods): Generate instinit$, simplified code.
9486         (build_dot_class_method): Eliminated unnecessary locals. Use
9487         encapsulate_with_try_catch, removed unnecessary code.
9488         (fix_constructors): New local iii. Use build_instinit_invocation.
9489         (patch_method_invocation): Added comment.
9490         (maybe_use_access_method): Don't consider instinit$.
9491         (find_applicable_accessible_methods_list): Shorten the search for
9492         instinit$ too.
9493         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9494         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9495         (patch_throw_statement): Likewise. Fixed typo.
9496
9497 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
9498
9499         Revert:
9500         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9501         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9502         ASM_FINAL_SPEC.
9503         (lang_specific_pre_link): Use set_input to set input_filename.
9504         Append `main' here.
9505         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9506         (main): Fix definition.
9507         Strip `main' from classname.
9508         Fixes PR java/227.
9509
9510 2001-08-11  Zack Weinberg  <zackw@panix.com>
9511
9512         * lex.h: Don't include setjmp.h.  Don't define
9513         SET_FLOAT_HANDLER or prototype set_float_handler.
9514
9515 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9516
9517         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9518         `poplevel' in the right order.
9519
9520 2001-08-09  Richard Henderson  <rth@redhat.com>
9521
9522         * Make-lang.in (class.o): Depend on TARGET_H.
9523         * class.c (emit_register_classes): Use target hooks instead of
9524         assemble_constructor and assemble_destructor.
9525
9526 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9527
9528         * check-init.c (flags.h): Include
9529         (check_init): Don't report uninitialized static class
9530         initialization flags, don't free bit index when doing static class
9531         initialization optimization.
9532         (check_for_initialization): Return type changed to `unsigned int.'
9533         (attach_initialized_static_class): New function.
9534         * class.c (add_method_1): Create the initialized static class
9535         table if necessary.
9536         (finish_class): Always emit deferred inline methods.
9537         * decl.c (emit_init_test_initialization): Moved to expr.c
9538         (complete_start_java_method): Don't traverse
9539         DECL_FUNCTION_INIT_TEST_TABLE.
9540         (lang_mark_tree): Mark hash tables in function decls.
9541         * expr.c (emit_init_test_initialization): Moved from decl.c.
9542         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9543         initialization flag, set DECL_CONTEXT and
9544         LOCAL_CLASS_INITIALIZATION_FLAG.
9545         (java_lang_expand_expr): Emit initialization code for static class
9546         initialized flags when entering block, if necessary.
9547         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9548         * java-tree.h (flag_optimize_sci): New global variable declaration.
9549         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9550         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9551         (LOCAL_FINAL_P): Fixed typo in comment.
9552         (FINAL_VARIABLE_P): Likewise.
9553         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9554         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9555         (struct lang_decl): New fields `ict', `smic' and `cif.'
9556         (check_for_initialization): New returned value for global.
9557         (attach_initialized_static_class): New global function.
9558         (STATIC_CLASS_INIT_OPT_P): New macro.
9559         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9560         * lang.c (java_decode_option): Handle
9561         `-fno-optimize-static-class-initialization'
9562         * parse.y (start_complete_expand_method): New function.
9563         (java_expand_method_bodies): Likewise.
9564         (attach_init_test_initialization_flags): Likewise.
9565         (adjust_init_test_initialization): Likewise.
9566         (emit_test_initialization): Likewise.
9567         (java_complete_expand_methods): Nullify abstract and native method
9568         bodies.
9569         (java_complete_expand_method): New locals `fbody', `block_body'
9570         and `exception_copy.' Reorganized: directly return on empty method
9571         bodies, call `start_complete_expand_method', remember definitely
9572         initialized static class in function, don't expand method bodies.
9573         (java_expand_classes): Call `java_expand_method_bodies' before
9574         `finish_class' when compiling to native.
9575         (resolve_expression_name): Use `orig' after building outer class
9576         field access.
9577         (patch_invoke): Remember static method invocations.
9578
9579 2001-08-06  Richard Henderson  <rth@redhat.com>
9580
9581         * class.c (emit_register_classes): Pass a symbol_ref and priority
9582         to assemble_constructor.
9583
9584 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9585
9586         * java-tree.h (all_class_filename): New macro.
9587         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9588         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9589         newly created IDENTIFIER_NODE to `all_class_filename.'
9590
9591 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9592
9593         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9594         Use ggc_add_tree_root to register roots.
9595
9596 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9597
9598         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9599         second operand calling check_init.
9600         * decl.c (complete_start_java_method): Swaped second and third
9601         arguments while creating WITH_CLEANUP_EXPR node.
9602         * jcf-write.c (generate_bytecode_insns): Use second operand
9603         instead of third when handling WITH_CLEANUP_EXPR.
9604         * parse.y (java_complete_lhs): Expand second operand of
9605         WITH_CLEANUP_EXPR nodes.
9606         (patch_synchronized_statement): Swaped second and third arguments
9607         while creating WITH_CLEANUP_EXPR node.
9608
9609 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9610
9611         * parse.y (create_interface): Avoid cyclic inheritance report when
9612         syntax error encountered during class definition.
9613         Fixes PR java/2956
9614
9615 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9616
9617         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9618         ASM_FINAL_SPEC.
9619         (lang_specific_pre_link): Use set_input to set input_filename.
9620         Append `main' here.
9621         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9622         (main): Fix definition.
9623         Strip `main' from classname.
9624         Fixes PR java/227.
9625
9626 2001-07-18  Tom Tromey  <tromey@redhat.com>
9627
9628         For PR java/2812:
9629         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9630         * lex.c (java_new_lexer): Use ICONV_CONST.
9631         (java_read_char): Likewise.
9632         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9633         (jv-scan$(exeext)): Likewise.
9634
9635 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9636
9637         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9638         * parse.y (check_class_interface_creation): Allow `private' if the
9639         enclosing is not an interface.
9640         (create_interface): Interface tagged public if the enclosing
9641         context is an interface.
9642         (create_class): Class tagged public if the enclosing context
9643         is an interface.
9644         Fixes PR java/2959
9645
9646 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9647
9648         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9649         Fixes PR java/2665
9650
9651 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9652
9653         * check-init.c (check_init): Remove references to EXPON_EXPR.
9654
9655 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9656
9657         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9658         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9659         Fixes PR java/3602
9660
9661 2001-07-13  Tom Tromey  <tromey@redhat.com>
9662
9663         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9664         invocation.
9665
9666 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9667
9668         * parse.y (patch_method_invocation): Don't override primary if one
9669         is already provided, but let this$<n> be built. Fixed comment.
9670
9671 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9672
9673         * parse.y (empty_statement:): Report empty statement error only
9674         when found at class declaration level.
9675         Fixes PR java/3635
9676
9677 2001-07-12  Tom Tromey  <tromey@redhat.com>
9678
9679         * expr.c (expand_load_internal): New function.
9680         (LOAD_INTERNAL): Use it.
9681
9682 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
9683
9684         * parse.y (verify_constructor_super): Compare anonymous class ctor
9685         args with `valid_method_invocation_conversion_p.'
9686         Fixes PR java/3285
9687
9688 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9689
9690         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
9691         `-fsyntax-only.' Fixes PR java/3248
9692
9693 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9694
9695         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
9696
9697 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
9698
9699         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
9700         current function is static. Fixes PR java/1970
9701
9702 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9703
9704         * parse.y (patch_method_invocation): Add enclosing context to ctor
9705         calls if necessary. Fixes PR java/2953
9706
9707 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9708
9709         * parse.y (resolve_package): Abort if qualified expression member
9710         isn't right.
9711         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
9712         Fixes PR java/1391
9713
9714 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
9715
9716         * verify.c: Don't use // comments.
9717
9718 2001-07-05  Tom Tromey  <tromey@redhat.com>
9719
9720         * lang.c (flag_assume_compiled): Removed.
9721         * java-tree.h (flag_assume_compiled): Removed.
9722         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
9723         -fhash-synchronization, -fuse-divide-subroutine,
9724         -fcheck-references, -femit-class-file, -femit-class-files,
9725         -fassume-compiled.  Updated --encoding information.  Changed
9726         -foutput-class-dir to `-d'.
9727
9728 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
9729
9730         * jcf-parse.c (parse_class_file): Add lineno parameter to
9731         debug_start_source_file call.
9732
9733 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
9734
9735         * gcj.texi: Use gpl.texi.
9736         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
9737         dependencies and use doc/include in search path.
9738
9739 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
9740
9741         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
9742         `this'.  If so, don't build instance initializers.
9743
9744 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9745
9746         * parse.y (resolve_expression_name): Improved error message for
9747         inner class cases. Fixes PR java/1958
9748
9749 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9750
9751         * lang.c: #include diagnostic.h
9752         (lang_print_error): Add a `diagnostic_context *' parameter.
9753         (java_dummy_print): Likewise.
9754         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
9755
9756 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9757
9758         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
9759         * jcf.h (typedef struct JCF): New bitfield `finished.'
9760         (JCF_FINISH): Set `finished.'
9761         (JCF_ZERO): Reset `finished.'
9762         Fixes PR java/2633
9763
9764 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9765
9766         * parse.y (class_body_declaration:): Don't install empty instance
9767         initializers.
9768         Fixes PR java/1314
9769
9770 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9771
9772         * class.c (set_super_info): Call `set_class_decl_access_flags.'
9773         (set_class_decl_access_flags): New function.
9774         * java-tree.h (set_class_decl_access_flags): New prototype.
9775         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
9776         (parse_class_file): New local `decl_max_locals.' Take wide types
9777         into account to compute DECL_MAX_LOCALS.
9778         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
9779         imports on demand.
9780
9781 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
9782
9783         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
9784
9785 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9786
9787         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
9788         * parse.y (do_resolve_class): Moved comments out to leading comment
9789         section. Removed local `start', New local `_ht' and
9790         `circularity_hash.'  Record `enclosing' in hash table and search
9791         it to detect circularity.  Use `enclosing' as an argument to
9792         `lookup_cl.' Free the hash table when done.
9793
9794 2001-06-19  Tom Tromey  <tromey@redhat.com>
9795
9796         * lex.c (java_read_char): Disallow invalid and overlong
9797         sequences.  Fixes PR java/2319.
9798
9799 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
9800
9801         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
9802
9803 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
9804
9805         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
9806         arguments accordingly.
9807
9808 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
9809
9810         * gcj.texi: Move contents to just after title page.
9811
9812 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
9813
9814         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
9815         builtin type.
9816         (patch_incomplete_class_ref): Build the class ref, build the class
9817         init if necessary, complete the tree.
9818         Fixes PR java/2605
9819
9820 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9821
9822         * parse.y (lookup_field_wrapper): Test `name' code.
9823         (resolve_qualified_expression_name): Test `qual_wfl' code.
9824         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
9825         handle `qual_wfl' by code.
9826         (maybe_build_primttype_type_ref): Test `wfl' code.
9827
9828 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
9829
9830         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
9831         fdl.texi.
9832         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
9833         the dvi file in the java directory.
9834
9835 2001-05-25  Sam TH  <sam@uchicago.edu>
9836
9837         * gen-table.pl javaop.h jcf.h lex.h,
9838         parse.h: Fix header include guards.
9839
9840 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
9841
9842         * jv-scan.c (version): Update copyright year.
9843
9844 2001-05-21  Per Bothner  <per@bothner.com>
9845
9846         * jcf-parse.c (read_class):  If class is from .class or .zip file
9847         and it's already been read, don't push/pop parser context.
9848
9849 2001-05-18  Per Bothner  <per@bothner.com>
9850
9851         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
9852         command line so the jvgenmain-generated main program comes first.
9853
9854 2001-05-15  Tom Tromey  <tromey@redhat.com>
9855
9856         * class.c (build_utf8_ref): Don't generate identifier based on
9857         utf8const contents.
9858
9859 2001-05-12  Richard Henderson  <rth@redhat.com>
9860
9861         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
9862         * expr.c (java_lang_expand_expr): Expand it.
9863         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
9864         calling build_exception_object_ref.
9865         * parse.y (catch_clause_parameter): Likewise.
9866         (build_dot_class_method): Likewise.
9867         (try_reference_assignconv): Likewise.
9868         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
9869         * jcf-write.c (generate_bytecode_insns): Likewise.
9870
9871 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9872
9873         * parse.y (build_unresolved_array_type): Set
9874         EXPR_WFL_QUALIFICATION on the newly created wfl.
9875         Fixes PR java/2538. Fixes PR java/2535.
9876
9877 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9878
9879         * parse.y (fix_constructors): Removed unnecessary assignment to
9880         local. Moved assignment to `this$<n>', fixed comments and
9881         indentation.
9882         (build_wfl_wrap): Fixed indentation.
9883         Fixes PR java/2598, java/2579 and java/2658.
9884
9885 2001-05-03  Mo DeJong  <mdejong@redhat.com>
9886
9887         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
9888         check for byte swap.
9889
9890 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
9891
9892         * expr.c (build_class_init): Move MODIFY_EXPR
9893         outside of COND_EXPR.  Remove variable `call'.
9894
9895 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9896
9897         * decl.c: NULL_PTR -> NULL.
9898         * jcf-write.c: Likewise.
9899
9900 2001-05-01  Tom Tromey  <tromey@redhat.com>
9901
9902         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
9903         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
9904         * gcj.texi: Updated copyright text.  Include fdl.texi.
9905         (Top): Link to new node.
9906
9907 2001-05-01  Per Bothner  <per@bothner.com>
9908
9909         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
9910
9911 2001-05-01  Per Bothner  <per@bothner.com>
9912
9913         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
9914         import_list contains the name, not the TREE_PURPOSE.
9915
9916 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9917
9918         * jcf-io.c (read_zip_member): Cast to long in comparison with
9919         signed value.
9920
9921         * jvspec.c (lang_specific_driver): Initialize variables.
9922
9923         * mangle.c (find_compression_record_match): Likewise.
9924
9925         * typeck.c (build_null_signature): Provide static prototype.  Mark
9926         parameter with ATTRIBUTE_UNUSED.
9927
9928         * verify.c (verify_jvm_instructions): Initialize variable.
9929
9930 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9931
9932         * parse.y (do_resolve_class): Check for cyclic inheritance during
9933         inner class resolution.
9934
9935 2001-04-27  Per Bothner  <per@bothner.com>
9936
9937         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
9938         while iterating, since that could cause gc to lose stuff.
9939
9940 2001-04-26  Per Bothner  <per@bothner.com>
9941
9942         Fix method search wrt scope of inner classes to match JLS2.
9943         * typeck.c (build_null_signature):  New static function.
9944         (has_method):  New function.  Uses build_null_signature and lookup_do.
9945         * java-tree.h (has_method):  New declaration.
9946         * parse.y (find_applicable_accessible_methods_list):  Do not search
9947         context of inner classes here.
9948         (patch_method_invocation):  Search scope, ie. current and outer clases,
9949         for method matching simple name, to find class.
9950
9951 2001-04-26  Per Bothner  <per@bothner.com>
9952
9953         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
9954         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
9955
9956         * constants.c (find_methodref_with_class_index):  New function.
9957         (find_methodref_index):  Use find_methodref_with_class_index.
9958         * java-tree.h (find_methodref_with_class_index):  New declaration.
9959         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
9960         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
9961         If context changed from interface to class, don't use invokeinterface.
9962
9963 2001-04-25  Per Bothner  <per@bothner.com>
9964
9965         * verify.c (verify_jvm_instructions):  For field instructions,
9966         check that field index is valid.  For invoke instructions, check that
9967         method index is valid.
9968
9969 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
9970
9971         * config-lang.in (target_libs): Copy from $libgcj_saved.
9972
9973 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9974
9975         * decl.c (init_decl_processing): Add new class "protectionDomain"
9976         field.
9977         * class.c (make_class_data): Set initial value for "protectionDomain".
9978
9979 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9980
9981         * jvspec.c (lang_specific_driver): Fix memory allocation
9982         deficit, by using concat in lieu of xmalloc/sprintf.
9983
9984 2001-04-20  Per Bothner  <per@bothner.com>
9985
9986         Fixes to compile multiple .class files at once.
9987         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
9988         * java-tree.h (CLASS_PARSED_P):  New macro.
9989         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
9990         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
9991         (read_class):  Avoid some code duplication.
9992         Don't call JCF_FINISH for a .class file - might be needed later.
9993         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
9994         rather than CLASS_LOADED_P, since latter implies class laid out.
9995         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
9996         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
9997
9998 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9999
10000         * Make-lang.in (java/boehm.o): Depend on toplev.h.
10001
10002         * boehm.c: Include toplev.h.
10003
10004 2001-04-06  Tom Tromey  <tromey@redhat.com>
10005             Alexandre Petit-Bianco  <apbianco@redhat.com>
10006
10007         Fix for PR gcj/1404 and PR gcj/2332:
10008         * parse.y (build_array_from_name): If we use the type_wfl then
10009         accumulate dimensions from the original type as well.
10010         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10011
10012 2001-04-06  Tom Tromey  <tromey@redhat.com>
10013
10014         * parse.y (analyze_clinit_body): Return true if the second operand
10015         of a METHOD_EXPR is nonzero.
10016
10017 2001-04-06  Tom Tromey  <tromey@redhat.com>
10018
10019         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10020         directory.
10021         ($(srcdir)/java/parse.c): Likewise.
10022
10023 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10024
10025         * gcj.texi: Use `which-gcj' instead of `which-g77.'
10026         (version-gcc): Initialized.
10027         (which-gcj): Likewise.
10028
10029 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10030
10031         * java-tree.h (struct lang_decl): New macro
10032         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10033         * parse.y (build_instance_initializer): New function.
10034         (add_instance_initializer): Use it.
10035         (java_fix_constructors): Set `current_class' before fix pass.
10036         (fix_constructors): Just return if already fixed. Move `super()'
10037         invocation ahead. Use `build_instance_initializer.'
10038         Fixes PR java/1315.
10039
10040 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10041
10042         * parse.y (resolve_qualified_expression_name): Pass field's
10043         DECL_CONTEXT to `not_accessible_p.'
10044         (not_accessible_p): Changed parameters order in `inherits_from_p'
10045         invocation.
10046
10047 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
10048
10049         * lang-options.h: Add flag_check_references.
10050
10051 2001-04-04  Per Bothner  <per@bothner.com>
10052
10053         * java-tree.h (CONSTANT_VALUE_P):  New macro.
10054         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
10055         * parse.y (maybe_build_class_init_for_field):  New static function.
10056         (resolve_expression_name, resolve_field_access):  Use
10057         maybe_build_class_init_for_field instead of build_class_init
10058         This does not do the init if the field is compile-time-constant.
10059         (resolve_field_access):  Simplify.
10060
10061         * parse.y (fold_constant_for_init):  Merge test into switch.
10062
10063 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
10064
10065         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10066         on gansidecl.h.
10067         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10068
10069 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
10070
10071         * expr.c (pop_type_0): Save the result of the first
10072         lang_printable_name call in a scratch buffer, so it
10073         won't be clobbered by the second call.
10074
10075 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10076
10077         * parse-scan.y (array_type:): Rewritten.
10078         (type_declaration:): `empty_statement' replaces `SC_TK.'
10079         (class_member_declaration:): `empty statement' added.
10080         (method_body:): Simplified.
10081         (static_initializer:): Likewise.
10082         (primary_no_new_array:): Use `type_literals.'
10083         (type_literals:): New rule.
10084         (dims:): Set and update `bracket_count.'
10085         Fixes PR java/1074. Fixes PR java/2412.
10086
10087 2001-03-28  Hans Boehm  <boehm@acm.org>
10088
10089         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10090         (get_boehm_type_descriptor): Set type on returned value to be a
10091         pointer length integer.
10092
10093 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10094
10095         * expr.c (pop_type_0): Call `concat' rather than building the
10096         string manually.
10097         (pop_type): Add format specifier in call to `error'.
10098
10099         * parse.y (patch_method_invocation): Avoid casting away
10100         const-ness.
10101
10102 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
10103
10104         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10105
10106 2001-03-28  Richard Henderson  <rth@redhat.com>
10107
10108         IA-64 ABI Exception Handling:
10109         * Make-lang.in (except.o): Don't depend on eh-common.h.
10110         * check-init.c (check_init): Handle EXC_PTR_EXPR.
10111         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10112         [soft_exceptioninfo_call_node]: Remove.
10113         [eh_personality_libfunc, lang_eh_runtime_type]: New.
10114         (end_java_method): No emit_handlers.
10115         * except.c (java_set_exception_lang_code): Remove.
10116         (method_init_exceptions): Don't call it.
10117         (prepare_eh_table_type): No CATCH_ALL_TYPE.
10118         (build_exception_object_ref): New.
10119         (expand_end_java_handler): Update for except.h name changes.
10120         (emit_handlers, expand_resume_after_catch): Remove.
10121         * expr.c (java_lang_expand_expr): Update for except.h name changes.
10122         (process_jvm_instruction): Use build_exception_object_ref.
10123         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10124         (soft_exceptioninfo_call_node): Remove.
10125         (build_exception_object_ref): Declare.
10126         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10127         soft_exceptioninfo_call_node.  Move processing ...
10128         [EXC_PTR_EXPR]: ... here.
10129         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10130         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10131         (source_end_java_method): No java_set_exception_lang_code or
10132         emit_handlers.
10133         (build_dot_class_method): Use build_exception_object_ref.
10134         (try_reference_assignconv): Check EXC_PTR_EXPR not
10135         soft_exceptioninfo_call_node.
10136
10137 2001-03-28  Richard Henderson  <rth@redhat.com>
10138
10139         * java-tree.h (throw_node): Define as a single member of
10140         java_global_trees instead of a separate array.
10141         (JTI_THROW_NODE): New.
10142         * decl.c (throw_node): Don't declare.
10143         (init_decl_processing): Init a scalar throw_node.
10144         Don't register it for gc.
10145         * check-init.c (check_init): Reference scalar throw_node.
10146         * expr.c (build_java_athrow): Likewise.
10147         * jcf-write.c (generate_bytecode_insns): Likewise.
10148         * parse.h (BUILD_THROW): Likewise.
10149
10150 2001-03-28  Richard Henderson  <rth@redhat.com>
10151
10152         * decl.c (end_java_method): Do not save and restore
10153         flag_non_call_exceptions.
10154         * parse.y (source_end_java_method): Likewise.
10155         * lang.c (flag_exceptions): Don't declare.
10156         (java_init_options): Set flag_non_call_exceptions.  Set
10157         flag_exceptions here ...
10158         (java_init): ... not here.
10159
10160 2001-03-27  Richard Henderson  <rth@redhat.com>
10161
10162         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10163         exceptions_via_longjmp.
10164
10165         * lang.c (flag_new_exceptions): Don't declare it.
10166         (java_init_options): Or set it.
10167
10168 2001-03-27  Richard Henderson  <rth@redhat.com>
10169
10170         * decl.c (end_java_method): Rename asynchronous_exceptions to
10171         flag_non_call_exceptions.
10172         * parse.y (source_end_java_method): Likewise.
10173
10174 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10175
10176         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10177
10178 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
10179
10180         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10181
10182 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10183
10184         * parse.y (find_as_inner_class): Follow current package
10185         indications not to mistakingly load an unrelated class.
10186
10187 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10188
10189         * constants.c (PUTN): Use memcpy, not bcopy.
10190
10191         * lex.c (java_read_char): Use memmove, not bcopy.
10192
10193         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10194
10195 2001-03-23  Per Bothner  <per@bothner.com>
10196
10197         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
10198         macro for better error pin-pointing.
10199         * java-tree.h:  Fix typo in comment.
10200
10201         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
10202         Don't include jsr/goto in exception range.
10203         Check if start and end of exception range are the same (also TRY_EXPR).
10204         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10205         However, do emit the following goto even if try_block is empty.
10206         Defer freeing exception_decl until after the finalizer, to make
10207         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
10208
10209         * parse.y (java_complete_lhs):  If the try-clause is empty, just
10210         return the finally-clause and vice versa.
10211
10212 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10213
10214         * gcj.texi (Input Options): documented the check for attribute
10215         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10216         * java-tree.h (flag_force_classes_archive_check): Declared extern.
10217         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10218         (jcf_parse): Check for the right classes archive if necessary.
10219         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10220         (jcf_parse_fields): Fixed indentation.
10221         * jcf-write.c (append_gcj_attribute): New function.
10222         (generate_classfile): Compute the attribute count, invoke
10223         `append_gcj_attribute'.
10224         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10225         turned into bit-fields. New bit-field `right_zip.'
10226         (JCF_ZERO): Set `right_zip' to zero.
10227         * lang-options.h (-fforce-classes-archive-check): Added flag.
10228         * lang.c (flag_force_classes_archive_check): New flag.
10229         (lang_f_options): New entry `force-classes-archive-check.'
10230         Fixes PR java/1213.
10231
10232 2001-02-07  Andrew Haley  <aph@redhat.com>
10233
10234         * gcj.texi (Configure-time Options): Add -fcheck-references.
10235         * expr.c (build_java_indirect_ref): New function.
10236         (java_check_reference): New function.
10237         (build_java_array_length_access): Use build_java_indirect_ref to
10238         check for null references.
10239         (build_java_arrayaccess): Likewise.
10240         (build_get_class): Likewise.
10241         (build_field_ref): Likewise.
10242         (invoke_build_dtable): Likewise.
10243         (build_invokeinterface): Likewise.
10244         * lang.c (lang_f_options): Add flag_check_references.
10245         * jvspec.c (jvgenmain_spec): Add flag_check_references.
10246         * java-tree.h (flag_check_references): New variable.
10247         * lang.c (flag_check_references): Likewise.
10248         * parse.y (patch_invoke): Use java_check_reference.
10249         (patch_assignment): Allow for extra nesting in
10250         _Jv_CheckArrayStore.
10251
10252 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
10253
10254         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10255         * lex.c (cxx_keywords): Likewise.
10256
10257 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10258
10259         * parse.y (qualify_ambiguous_name): Broaden `length'
10260         recognition. Help MODIFY_EXPR be resolved as expression names.
10261         Fixes PR java/2066. Fixes PR java/2400.
10262
10263 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
10264
10265         * gjavah.c (process_file): Mark interface definitions with
10266         "__attribute__ ((java_interface))".
10267
10268 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10269
10270         * class.c (layout_class): Fixed push_super_field's second
10271         argument. Fixes PR java/2333.
10272         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10273         too early to lay innerclasses out.
10274
10275 2001-03-20  Tom Tromey  <tromey@redhat.com>
10276             Alexandre Petit-Bianco <apbianco@redhat.com>
10277
10278         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10279         inside an array reference. Insertion of the array store check
10280         rewritten. Fixes PR java/2299.
10281
10282 2001-03-20  Tom Tromey  <tromey@redhat.com>
10283
10284         * lex.c (java_read_unicode): Only accept leading `u's.
10285
10286 2001-03-20  Tom Tromey  <tromey@redhat.com>
10287
10288         * jcf-parse.c (read_class): Initialize `class'.
10289
10290 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10291
10292         * jcf_parse.c (jcf_parse): Eliminate unused variable.
10293
10294 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10295
10296         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10297         (layout_class): Likewise.
10298         (layout_class_method): Likewise.
10299         (emit_register_classes): Likewise.
10300         * decl.c (builtin_function): Likewise.
10301         (give_name_to_locals): Likewise.
10302
10303 2001-03-19  Per Bothner  <per@bothner.com>
10304
10305         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
10306         before trying to load an inner class.
10307
10308         Fixes to process to command-line .class files in two passes.
10309         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
10310         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
10311         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
10312         * class.c (is_compiled_class):  Fix for renamed flag.
10313         * parse.y (maybe_create_class_interface_decl):  Likewise.
10314         * jcf-parse.c (yyparse):  Also set if compiling .class files.
10315         * jcf-parse.c (read_class);  Read current_class.
10316         (jcf_parse):  Make static.
10317         (load_inner_classes):  New function, with code moved from jcf_parse,
10318         because we need to inner classes after the command-line files are read.
10319         (yyparse):  Set finput to NULL when it doesn't need to be closed.
10320         Reduce use of main_jcf (basically only for archive) and
10321         use finput instead of main_jcf->read_state.
10322         Inline jcf_figure_file_type into yyparse.
10323         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10324         Defer load_inner_classes and parse_class_file to a second pass,
10325         after we've correctly mapped command-line .clas fiels to classes.
10326         (jcf_figure_file_type):  Removed.
10327         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
10328         (JCF_ZERO):  Also clear zipd field.
10329         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
10330
10331 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10332
10333         * jcf-parse.c (yyparse): Change ch from char * to char.
10334
10335 2001-03-19  Per Bothner  <per@bothner.com>
10336
10337         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
10338         Add constructed filelist-file at end, following -xjava.  Thus any .o
10339         and library files are not affected by the -xjava.  Also wrap
10340         explicit @FILE with -xjava and -xnone.
10341
10342 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
10343
10344         * class.c (build_static_field_ref): Call make_decl_rtl() after
10345         setting the DECL_EXTERNAL flag.
10346
10347 2001-03-17  Per Bothner  <per@bothner.com>
10348
10349         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
10350
10351         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
10352         when result is is needed (target is STACK_TARGET).
10353
10354         * parse.h (JDEP_SOLV):  Removed.
10355         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
10356
10357         * parse.y (incomplete_class_list): Removed.
10358         (obtain_incomplete_type): Don't use or set incomplete_class_list.
10359         It doesn't work if resolve_class changes the name of an array type
10360         that is on the list and then someone else looks for the modified name.
10361         Also, seems liable to break when compiling multiple source files at
10362         once.  So the simplest is to just remove incomplete_class_list -
10363         it is only a minor space win and it is not even clear it saves time.
10364
10365         * parse.y (resolve_class):  Remove unneeded promote_type.
10366
10367 2001-03-15  Per Bothner  <per@bothner.com>
10368
10369         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
10370         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
10371         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10372         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10373
10374         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
10375         * parse.y (java_expand_classes):  Likewise.
10376
10377         * parse.y (expand_start_java_method):  Was only called once and had a
10378         misleading name, so inline in caller java_complete_expand_method.
10379         (enter_a_block):  Likewise inline in enter_block and remove.
10380
10381         Remove junk from when gcc/java was created (by copying from C/C++).
10382         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
10383         (struct binding_level):  Remove fields keep, keep_if_subblocks,
10384         more_cleanups_ok, have_cleanups (which have never been used).
10385         (pushlevel, poplevel):  Remove related useless code.
10386
10387         * class.c (make_class_data):  The class_dtable_decl (i.e. the
10388         vtable for Class) should be external, except when compiling Class.
10389
10390         * jvspec.c (lang_specific_driver):  Fix -C handling.
10391         Check -save-temps to see if temp @FILE should be deleted.
10392         Follow-up to/fix for February 16 patch.
10393
10394         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
10395         (type_stack_dup):  Remove no-longer neded error check.
10396
10397 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
10398
10399         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10400         to 'for_pointer'. If this type is for a pointer (argument) mangling,
10401         don't surround the element with 'N..E' if the type name is
10402         unqualified.
10403
10404 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10405
10406         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10407         DECL_RTL_SET_P, etc.
10408         (make_method_value): Likewise.
10409         (get_dispatch_table): Likewise.
10410
10411         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10412
10413 2001-03-07  Tom Tromey  <tromey@redhat.com>
10414
10415         * config-lang.in (lang_requires): Define.
10416
10417 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
10418
10419         * typeck.c (convert): Check flag_unsafe_math_optimizations,
10420         not flag_fast_math.
10421
10422 2001-03-05  Per Bothner  <per@bothner.com>
10423
10424         Fix a problem where rest_of_decl_compilation applied to
10425         class_dtable_decl causes problems because it was done too early,
10426         before output file was opened.
10427         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
10428         * class.c (class_dtable_decl):  Add macro - element of class_roots.
10429         (make_class_data):  Define class_dtable_decl.
10430         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
10431
10432 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10433
10434         * java/class.c, java/decl.c, java/java-tree.h: Replace all
10435         uses of 'boolean' with 'bool'.
10436
10437 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10438
10439         * lang-specs.h: Add zero initializer for cpp_spec field to all
10440         array elements.
10441
10442 2001-02-16  Per Bothner  <per@bothner.com>
10443
10444         Handle compiling multiple input files at once, and @FILE syntax.
10445         * gcj.texi:  Updated documentation to match.
10446         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
10447         * jcf-parse.c (parse_source_file):  Split into ...
10448         (parse_source_file_1):  New function - and:
10449         (parse_source_file_2):  New function.
10450         (yyparse):  On -ffilelist-file, open and scan named file.
10451         On first pass over files, only do parse_source_file_1.
10452         A new second pass calls parse_source_file_2 for each file to compile.
10453         (init_jcf_parse):  Call init_src_parse.
10454         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
10455         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
10456         as multiple input file combined in one compilation.
10457         * lang-options.h:  Add -ffilelist-file
10458         * lang.c (flag_filelist_file):  New flag variable.
10459         (lang_f_options):  Handle -ffilelist-file.
10460         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10461         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
10462         gclass_list - use global fields of src_parse_roots instead.
10463         * parse.y (src_parse_roots):  New array.
10464         (incomplete_class_list, gclass_list):  New macros.
10465         (push_parser_context, java_pop_parser_context,
10466         java_parser_context_resume):  Don't fiddle with deleted fields.
10467         (various):  Use incomplete_class gclass_list and global macros
10468         instead of parse_ctxt fields - the lists are global.
10469         (init_src_parse):  New function.
10470
10471 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10472
10473         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10474
10475 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10476
10477         * parse.y (check_inner_class_access): Moved declaration of local
10478         `enclosing_decl_type' to the right location.
10479
10480 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
10481
10482         * parse.y (parser_check_super_interface): Don't call
10483         check_pkg_class_access for an inner interface.
10484         (parser_check_super): Don't call check_pkg_class_access for inner
10485         class.
10486         (do_resolve_class): Simplify enclosing type loop. Don't call
10487         check_pkg_class_access if CL and DECL are not set.
10488         (find_in_imports_on_demand): Set DECL if class_type needed to be
10489         loaded. Don't call check_pkg_class_access for an inner class.
10490         (check_inner_class_access): Rewritten to implement member access
10491         rules as per spec 6.6.1.
10492         (check_pkg_class_access): Handle the empty package correctly.
10493         (in_same_package): New function. Determine if two classes are in the
10494         same package.
10495
10496 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
10497
10498         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10499         method into array types.
10500         * parse.y (patch_method_invocation): Bypass access check on clone call
10501         to array instance.
10502
10503 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10504
10505         * expr.c (build_instanceof): Check for arrays when trying fold to
10506         false.
10507
10508 2001-02-15  Jim Meyering  <meyering@lucent.com>
10509
10510         * Make-lang.in (java.install-common): Depend on `installdirs'.
10511         (java.install-info): Likewise.
10512
10513 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
10514
10515         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10516
10517 2001-02-14  Tom Tromey  <tromey@redhat.com>
10518             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10519
10520         Fix for PR java/1261.
10521         * typeck.c (build_java_array_type): Add public `clone' method to
10522         arrays.
10523         * parse.y (resolve_qualified_expression_name): Use current_class
10524         when checking for inaccessibility.
10525         (patch_method_invocation): Fixed error message when accessibility
10526         denied.  Added `from_super' argument.
10527
10528 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10529
10530         * parse.y (resolve_class): Don't build a fake decl. Use the one
10531         already built.
10532         * typeck.c (build_java_array_type): Build and assign decl to array
10533         type.
10534
10535 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10536
10537         * parse.y (not_accessible_p): Changed leading comment. Added extra
10538         `where' argument. Use it to enforce protected access rules.
10539         (resolve_qualified_expression_name): Added extra argument to
10540         not_accessible_p.
10541         (patch_method_invocation): Use argument `primary' to provide
10542         not_accessible_p with an extra argument.
10543         (lookup_method_invoke): Added extra argument to not_accessible_p.
10544         (search_applicable_method_list): Likewise.
10545
10546 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10547
10548         * parse.y (resolve_qualified_expression_name): Try to resolve as
10549         an inner class access only if `decl' is a TYPE_DECL.
10550
10551 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10552
10553         * decl.c (classdollar_identifier_node): Initialize.
10554         * java-tree.h (enum java_tree_index): New entry
10555         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10556         (classdollar_identifier_node): New macro.
10557         (ID_CLASSDOLLAR_P): Likewise.
10558         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10559         (build_dot_class_method_invocation): Likewise.
10560         (find_applicable_accessible_methods_list): `class$' can't be
10561         inherited.
10562
10563 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10564
10565         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10566
10567 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10568
10569         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10570         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10571         gone.
10572
10573 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10574
10575         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10576         outside of the `__U' sequence too.
10577         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10578         sequence too.
10579
10580 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10581
10582         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10583
10584 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10585
10586         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10587         (JVGENMAIN_OBJS): Likewise.
10588         * java-tree.h (append_gpp_mangled_name): New prototype.
10589         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10590         Removed cast calling `gcc_add_root.'
10591         * jvgenmain.c (mangle_obstack): New global, initialized.
10592         (main): Use it.
10593         (do_mangle_class): Constify local `ptr.'
10594         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10595         append_gpp_mangle_name and update `count' if necessary.
10596         Use `mangle_obstack.'
10597         * mangle.c (append_unicode_mangled_name): Removed.
10598         (append_gpp_mangled_name): Likewise.
10599         (unicode_mangling_length): Likewise.
10600         (mangle_member_name): Return type set to `void.'
10601         (mangle_field_decl): Don't append `U' in escaped names.
10602         (mangle_method_decl): Likewise.
10603         (mangle_member_name): Just use `append_gpp_mangled_name.'
10604         * mangle_name.c: New file.
10605
10606 2001-02-07  Per Bothner  <per@bothner.com>
10607
10608         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10609
10610         * check-init.c (check_init):  Don't call done_alternative after
10611         processing loop code, as a LOOP_EXPR never terminates normally.
10612
10613 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10614
10615         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10616
10617 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10618
10619         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10620         DECLs.
10621
10622 2001-02-06  Tom Tromey  <tromey@redhat.com>
10623
10624         * lex.c (java_new_lexer): Longer error message.
10625
10626 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10627             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10628
10629         * typeck.c (build_prim_array_type): Added leading comment.
10630         (build_java_array_type): Moved locals out of
10631         block. Always create the `data' field, fixed alignment to match
10632         C++.
10633
10634 2001-02-04  Tom Tromey  <tromey@redhat.com>
10635
10636         * expr.c (java_lang_expand_expr): Don't bother recomputing
10637         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10638         Fixes PR java/1866.
10639
10640 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10641
10642         * parse.y (process_imports): Save the original name of the import
10643         for better error report.
10644
10645 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10646
10647         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10648         of macros used when compiling jvspec.c.
10649         * jvspec.c (lang_specific_driver): Link with the shared
10650         libgcc by default.
10651
10652 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10653
10654         * check-init.c (check_init): Call internal_error instead of fatal.
10655         * expr.c (java_lang_expand_expr): Likewise.
10656         * jcf-parse.c (get_constant): Likewise.
10657         * mangle.c (java_mangle_decl): Likewise.
10658         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10659         (operator_string): Likewise.
10660         * check-init.c (check_init): Call abort instead of fatal.
10661         * class.c (build_class_ref): Likewise.
10662         * constants.c (write_constant_pool): Likewise.
10663         * decl.c (start_java_method): Likewise.
10664         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10665         (java_stack_dup, encode_newarray_type): Likewise.
10666         (build_java_array_length_access): Likewise.
10667         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10668         (build_java_soft_divmod, build_invokeinterface): Likewise.
10669         * java-tree.h (INNER_CLASS_P): Likewise.
10670         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10671         (give_name_to_class, get_class_constant): Likewise.
10672         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
10673         (find_constant_index, generate_bytecode_conditional): Likewise.
10674         (generate_bytecode_insns, perform_relocations): Likewise.
10675         * lex.c (java_unget_unicode, java_lex): Likewise.
10676         * mangle.c (mangle_type, mangle_record_type): Likewise.
10677         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
10678         (finish_mangling): Likewise.
10679         * parse.h (MARK_FINAL_PARMS): Likewise.
10680         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
10681         (obtain_incomplete_type, java_complete_class): Likewise.
10682         (java_check_regular_methods, java_complete_expand_method): Likewise.
10683         (cut_identifier_in_qualified, check_deprecation): Likewise.
10684         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
10685         (java_complete_lhs, lookup_name_in_blocks): Likewise.
10686         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
10687         * typeck.c (set_local_type, parse_signature_type): Likewise.
10688         (parse_signature_string, build_java_signature): Likewise;
10689         (set_java_signature): Likewise.
10690         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
10691         * class.c (add_method): Call fatal_error instead of fatal.
10692         (build_static_field_ref): Likewise.
10693         * expr.c (build_known_method_ref, expand_invoke): Likewise.
10694         * jcf-parse.c (get_constant, jcf_parse): Likewise.
10695         * lex.c (java_new_new_lexer): Likewise.
10696         * jv-scan.c (main): Likewise.
10697         (fatal_error): Renamed from fatal.
10698         * jcf-parse.c (yyparse): Call fatal_io_error instead of
10699         pfatal_with_name.
10700         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
10701         (yyparse): Likewise.
10702         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
10703         * lex.c (java_get_line_col): Likewise.
10704         * jcf-parse.c (load_class): Make errors non-fatal.
10705         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
10706
10707 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
10708
10709         * jvgenmain.c (class_mangling_suffix): Remove unused string.
10710         (error): Remove unused function.
10711         (main): Don't use "__attribute__ alias" on generated class symbol.
10712
10713 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10714
10715         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
10716         argument.
10717         * parse.y (finish_method_declaration): Code accounting for WFLed
10718         method DECL_NAMEs deleted.
10719         (check_abstract_method_definitions): Likewise.
10720         (resolve_type_during_patch): Layout resolved type.
10721         * typeck.c (lookup_do): Removed unused local.
10722
10723 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
10724
10725         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
10726         * decl.c (init_decl_processing): Use integer_minus_one_node, not
10727         integer_negative_one_node.
10728         * expr.c (build_java_binop): Likewise.
10729
10730 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
10731
10732         * zextract.c (read_zip_archive): Read file_offset before writing
10733         zipd and consequently clobbering the header contents.
10734
10735 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10736
10737         * Make-lang.in: Remove all dependencies on defaults.h.
10738         * decl.c: Don't include defaults.h.
10739         * expr.c: Likewise.
10740         * parse.y: Likewise.
10741
10742 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10743
10744         * ChangeLog (2001-01-21): Fixed typo.
10745         * class.c (layout_class_method): Code accounting for WFLed
10746         method DECL_NAMEs deleted.
10747         * constant.c (find_methodref_index): Likewise.
10748         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
10749         * java-tree.h (DECL_FUNCTION_WFL): New macro.
10750         (struct lang_decl): New field `wfl'.
10751         (java_get_real_method_name): Prototype deleted.
10752         * mangle.c (mangle_method_decl): Code accounting for WFLed
10753         method DECL_NAMEs deleted.
10754         * parse.h (GET_METHOD_NAME): Macro deleted.
10755         * parse.y (reset_method_name): Deleted.
10756         (method_header): Set DECL_FUNCTION_WFL.
10757         (check_abstract_method_header): Code accounting for WFLed method
10758         DECL_NAMEs deleted.
10759         (java_get_real_method_name): Deleted.
10760         (check_method_redefinition): Code accounting for WFLed method
10761         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
10762         (java_check_regular_methods): Likewise.
10763         (java_check_abstract_methods): Likewise.
10764         (java_expand_classes): Don't call `reset_method_name.'
10765         (search_applicable_method_list): Use DECL_NAMEs instead of
10766         GET_METHOD_NAME.
10767         * typeck.c (lookup_do): Code accounting for WFLed method
10768         DECL_NAMEs deleted.
10769
10770 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
10771
10772         * lex.c (java_read_char): Check for EOF from getc first.
10773
10774 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10775
10776         * class.c (layout_class): Don't lay the superclass out if it's
10777         already being laid out.
10778         * jcf-parse.c (handle_innerclass_attribute): New function.
10779         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
10780         handle_innerclasses_attribute.
10781         (jcf_parse): Don't load an innerclasses if it's already being
10782         laid out.
10783         * jcf-write.c (append_innerclass_attribute_entry): Static
10784         `anonymous_name' and its initialization deleted. `ocii' and `ini'
10785         to be zero for anonymous classes.
10786
10787 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10788
10789         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
10790         necessary.
10791         * jcf-parse.c (set_source_filename): Use
10792         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
10793
10794 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10795
10796         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
10797         gets a unique asm name.
10798
10799 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10800
10801         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
10802         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
10803         if necessary.
10804         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
10805         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
10806         * parse.y (lookup_package_type_and_set_next): Deleted.
10807         (resolve_package): Removed unnecessary code.
10808         (find_applicable_accessible_methods_list): `finit$' can't be
10809         inherited.
10810         * verify.c (pop_argument_types): Added missing prototype.
10811
10812 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
10813
10814         * config-lang.in: Disable java by default.
10815
10816 2001-01-23  Tom Tromey  <tromey@redhat.com>
10817
10818         * gcj.texi (Copying): New node.
10819         Added copyright information.
10820
10821 2001-01-21  Per Bothner  <per@bothner.com>
10822
10823         Various fixes to allow compiling a compressed .jar/.zip archive.
10824         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
10825         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
10826         (struct ZipDirectory):  New field zipf points to owning ZipFile.
10827         * jcf.h (struct ZipDirectory):  Add forward declaration.
10828         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
10829         Remove seen_in_zip and zip_offset fields.
10830         (JCF_SEEN_IN_ZIP):  New macro.
10831         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
10832         * jcf-io.c:  Change all ZipFileCache to ZipFile.
10833         (read_zip_member):  New function.
10834         (open_in_zip):  Call read_zip_member.
10835         * jcf-parse.c (find_in_current_zip):  Remove function.
10836         (read_class):  Merge in find_in_current_zip functionality.
10837         Call read_zip_member if needed.
10838         (parse_zip_file_entries):  Use read_zip_member.
10839         (process_zip_dir):  Update for removed and added JCF fields.
10840         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
10841
10842 2001-01-21  Per Bothner  <per@bothner.com>
10843
10844         Minor optimization of static ggc roots.
10845         * jcf-parse.c (parse_roots):  New static field.
10846         (current_field, current_method, current_file_list):  Replace by macros
10847         naming fields of parse_roots.
10848         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
10849         * class.c (class_roots):  New static field.
10850         (registered_class, fields_ident, info_ident, class_list):
10851         New macros naming fields of parse_roots.
10852         (build_static_field_ref):  Don't register roots here.
10853         (layout_class):  Static field list replaced by macro class_list.
10854         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
10855         Initialize fields_ident and info_ident here.
10856
10857 2001-01-21  Per Bothner  <per@bothner.com>
10858
10859         * jcf-parse.c (ggc_mark_jcf):  New function.
10860         (init_jcf_parse):  Register current_jcf as ggc root.
10861
10862 2001-01-21  Per Bothner  <per@bothner.com>
10863
10864         * lang.c (put_decl_node):  Print method's name.
10865
10866 2001-01-21  Per Bothner  <per@bothner.com>
10867
10868         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
10869         (verify_jvm_instructions):  Use it, for better error messages on loads.
10870
10871 2001-01-21  Per Bothner  <per@bothner.com>
10872
10873         * verify.c (merge_type_state):  Still may have to merge even if
10874         LABEL_VERIFIED (label).
10875
10876 2001-01-21  Per Bothner  <per@bothner.com>
10877
10878         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
10879         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
10880
10881 2001-01-19  Per Bothner  <per@bothner.com>
10882
10883         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
10884         if expeting an interface type.  Refines Tom's change of 2000-09-12.
10885
10886 2001-01-18  Per Bothner  <per@bothner.com>
10887
10888         * gcj.texi (Input Options): Mention .java files.
10889
10890 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10891
10892         * lang-options.h (-Wunsupported-jdk11): Removed.
10893         * lang.c (flag_not_overriding): Deleted.
10894         (flag_static_local_jdk1_1): Likewise.
10895         (lang_W_options): Removed "unsupported-jdk11" entry.
10896         * parse.y (java_check_methods): Removed dead code.
10897
10898 2001-01-17  Tom Tromey  <tromey@redhat.com>
10899
10900         Changes suggested by Per Bothner:
10901         * gcj.texi (Input Options): Don't mention input files.
10902         (Code Generation): Updated --main information.
10903         (Invoking jcf-dump): Mention that --javap is incomplete.
10904         From Alexandre Petit-Bianco:
10905         (Warnings): Don't mention -Wunsupported-jdk11.
10906         My stuff:
10907         (Compatibility): Mention JDK 1.2-ness of libraries.
10908         (Resources): Mention resources used when writing gcj.
10909
10910 2001-01-17  Tom Tromey  <tromey@redhat.com>
10911
10912         * gcj.texi: New file.
10913         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
10914         (java.info): Depend on gcj.info.
10915         (java/gcj.dvi): New target.
10916         (java.dvi): Depend on gcj.dvi.
10917         (java.install-info): Wrote.
10918
10919 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
10920
10921         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
10922         having called make_decl_rtl.
10923
10924 2001-01-14  Per Bothner  <per@bothner.com>
10925
10926         Various patches to emit better messages on verification errors.
10927         * expr.c (push_type_0):  Return error indication on stack overflow,
10928         instead of callinfg fatal.
10929         (push_type):  Now just call push_type_0 (nd fatal on overflow).
10930         (pop_type_0):  Return detailed error message (in a char** argument).
10931         (pop_type):  If pop_type_0 fails, print error message.
10932         (pop_argument_types):  Moved to verify.c.
10933         * verify.c (pop_argument_types):  Moved from expr.c.
10934         Return a (possible) error message, rather than void.
10935         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
10936         (verify_jvm_instruction):  Use new macros, improving error messages.
10937         For case OPCODE_astore use object_ptr_type_node.
10938         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
10939         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
10940
10941         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
10942         constant, return body without wrapper.  (Improves constant folding.)
10943         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
10944
10945 2001-01-13  Per Bothner  <per@bothner.com>
10946
10947         * expr.c (expand_java_field_op):  Assigning to a final field outside
10948         an initializer does not violate JVM spec, so should be warning, not
10949         error.  (Sun's verifier does not complain - though MicroSoft's does.)
10950
10951 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
10952
10953         * gjavah.c (version), jcf-dump.c (version): Update copyright year
10954         to 2001.
10955
10956 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
10957
10958         * parse.y (resolve_expression_name): Permit instance variables from
10959         enclosing context in super constructor call.
10960         (resolve_qualified_expression_name): Permit enclosing class's qualified
10961         "this" in super constructor call.
10962
10963 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
10964
10965         * class.c (build_utf8_ref): Remove last argument in call to
10966         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
10967         (build_class_ref): Likewise.
10968         (build_static_field_ref): Likewise.
10969         (get_dispatch_table): Likewise.
10970         (layout_class_method): Likewise.
10971         (emit_register_classes): Likewise.
10972         * constants.c (build_constant_data_ref): Likewise.
10973         * decl.c (builtin_function): Likewise.
10974         (create_primitive_vtable): Likewise.
10975         * expr.c (build_known_method_def): Likewise.
10976         (build_jni_stub): Likewise.
10977         (java_lang_expand_expr): Likewise.
10978
10979 2001-01-10  Tom Tromey  <tromey@redhat.com>
10980
10981         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
10982
10983 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10984
10985         * java-tree.h (lang_printable_name_wls): New prototype.
10986         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
10987         rather than `current_class' to print type name. Don't prepend type
10988         names when printing constructor names.
10989         (lang_printable_name_wls): New function.
10990         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
10991         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
10992         * parse.y (patch_method_invocation): Message tuned for constructors.
10993         (not_accessible_p): Grant `private' access from within
10994         enclosing contexts.
10995
10996 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10997
10998         All files with updated copyright when applicable.
10999         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11000         * class.c (mangle_class_field): Function removed.
11001         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11002         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11003         (build_class_ref): Call `java_mangle_class_field' instead of
11004         `mangle_class_field.'
11005         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11006         (layout_class): Call `java_mangle_decl' instead of
11007         `mangle_static_field.'
11008         (cxx_keywords): Initialized static array moved to `lex.c.'
11009         (layout_class_method): Changed leading comment. Simplified to
11010         call `java_mangle_decl.' Local `ptr' moved in for loop body.
11011         * decl.c (lang_mark_tree): Mark field `package_list.'
11012         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11013         (struct lang_type): New field `package_list.'
11014         (unicode_mangling_length): Prototype removed.
11015         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11016         emit_unicode_mangled_name): Likewise.
11017         (cxx_keyword_p): New prototype.
11018         (java_mangle_decl, java_mangle_class_field,
11019         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11020         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11021         `build_expr_wfl.'
11022         * jvgenmain.c (main_method_prefix): Global variable removed.
11023         (main_method_suffix): Likewise.
11024         (do_mangle_classname): New function.
11025         (main): Call it. Format changed to accommodate new mangling scheme.
11026         * lex.c: (utf8_cmp): Conditionally prototyped.
11027         (cxx_keywords): Moved from class.c, conditionally defined.
11028         (utf8_cmp, cxx_keyword_p): Likewise.
11029         * mangle.c (obstack.h, ggc.h): Included.
11030         (mangle_field_decl): New function.
11031         (mangle_method_decl, mangle_type, mangle_pointer_type,
11032         mangle_array_type, mangle_record_type,
11033         find_compression_pointer_match, find_compression_array_match,
11034         find_compression_record_match,
11035         find_compression_array_template_match, set_type_package_list,
11036         entry_match_pointer_p, emit_compression_string, init_mangling,
11037         finish_mangling, compression_table_add, mangle_member_name): Likewise.
11038         (mangle_obstack): New global.
11039         (MANGLE_RAW_STRING): New macro.
11040         (unicode_mangling_length): Turned static.
11041         (append_unicode_mangled_name): Renamed from
11042         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
11043         replaces `obstack', removed from the parameter list.
11044         (append_gpp_mangled_name): Turned static. `mangle_obstack'
11045         replaces parameter `obstack', removed from the parameter list. Call
11046         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11047         (append_gpp_mangled_classtype): Removed.
11048         (compression_table, compression_next): New static variables.
11049         * parse.y (temporary_obstack): Extern declaration removed.
11050
11051 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11052
11053         * parse.y (patch_binop): Compute missing type in error situations.
11054
11055 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11056
11057         * class.c (make_class_data): Push initial value for "arrayclass".
11058         * decl.c (init_decl_processing): Add new class field "arrayclass".
11059
11060 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11061
11062         From patha@softlab.ericsson.se:
11063         * parse.y (switch_label): Use build, not build1, to construct
11064         DEFAULT_EXPR.
11065
11066 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
11067
11068         * lang.c (lang_decode_option): Change -MA to -MP.
11069         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11070         Update to new prototype; do quote targets.
11071         (jcf_dependency_write): Update.
11072
11073 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
11074
11075         Shorten primitive array allocation path:
11076         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11077         to create new primitive arrays.
11078         * expr.c (build_newarray): If generating native code, call
11079         soft_newarray_node with a reference to the primitive TYPE identifier
11080         instead of type_value.
11081
11082 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
11083
11084         Fix for PRs gcj/312 and gcj/253:
11085         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11086         dest if they arn't already.
11087         * class.c (layout_class): Call maybe_layout_super_class on
11088         superinterfaces also, but only if compiling from bytecode.
11089
11090         Fix for PR gcj/373:
11091         * parse.y (create_class): Set ACC_STATIC if class is declared in an
11092         interface.
11093
11094 2000-12-15  Tom Tromey  <tromey@redhat.com>
11095
11096         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11097         set.
11098
11099 2000-12-14  Andrew Haley  <aph@redhat.com>
11100
11101         * boehm.c (mark_reference_fields): Change test to correctly detect
11102         bitmap overflow.
11103
11104 2000-12-15  Andreas Jaeger  <aj@suse.de>
11105
11106         * config-lang.in (lang_dirs): Added.
11107
11108 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11109
11110         * parse.y (end_artificial_method_body): Fixed undefined behavior.
11111         Credits go to rth for finding it.
11112
11113 2000-12-13  Mike Stump  <mrs@wrs.com>
11114
11115         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11116
11117 2000-11-07  Tom Tromey  <tromey@cygnus.com>
11118
11119         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11120         * lex.c (java_ignorable_control_p): Removed.
11121         (java_letter_or_digit_p): Removed.
11122         (java_start_char_p): New function.
11123         (java_read_char): Return `int', not `unicode_t'.  Changed
11124         callers.
11125         (java_read_unicode): Likewise.
11126         (java_read_unicode_collapsing_terminators): Likewise.
11127         (java_get_unicode): Likewise.
11128         (java_new_lexer): Initialize hit_eof.
11129         (java_parse_end_comment): Take `int' argument.
11130         (java_parse_doc_section): Likewise.
11131         (java_parse_escape_sequence): Don't allow backlash-newline.
11132         Return `int'.
11133         * lex.h (JAVA_DIGIT_P): Removed.
11134         (_JAVA_LETTER_OR_DIGIT_P): Removed.
11135         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11136         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11137         (JAVA_PART_CHAR_P): New macro.
11138         (UEOF): Now -1.
11139         (JAVA_CHAR_ERROR): Now -2.
11140         (java_lexer): New field `hit_eof'.
11141         * chartables.h: New file.
11142         * gen-table.pl: new file.
11143
11144 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11145             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11146
11147         * parse.y (java_complete_lhs): Only allow compound assignment of
11148         reference type if type is String.
11149
11150 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11151
11152         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11153         jcf-path.c: Likewise.
11154
11155 2000-12-09  Anthony Green  <green@redhat.com>
11156
11157         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11158         filestart and filename_length as int values.
11159
11160 2000-12-07  Mo DeJong  <mdejong@redhat.com>
11161
11162         * jcf-io.c (find_class): Correct the logic that tests to see if a
11163         .java file is newer than its .class file. The compiler was
11164         incorrectly printing a warning when file mod times were equal.
11165
11166 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
11167
11168         * jvgenmain.c: Use ISPRINT not isascii.
11169
11170 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11171
11172         * parse.y (end_artificial_method_body): Fixed typo.
11173
11174 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11175
11176         * parse.y (patch_method_invocation): Pick the correct enclosing
11177         context when creating inner class instances.
11178         Fixes gcj/332.
11179
11180 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
11181
11182         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11183         Update copyright year to 2000.
11184
11185 2000-11-23  Anthony Green  <green@redhat.com>
11186
11187         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11188         Move current_file_list out of yyparse and make it static.
11189
11190         * expr.c: Declare quick_stack and tree_list_free_list as static
11191         (init_expr_processing): Register quick_stack and
11192         tree_list_free_list roots.
11193
11194 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11195
11196         * parse.y (build_outer_field_access): New local `decl_ctx', use
11197         it. Check for field's context and current class immediate outer
11198         context inheritance.
11199         (outer_field_access_p): Consider fields inherited from the last
11200         enclosing context.
11201         (build_access_to_thisn): Stop at the last enclosing context if
11202         necessary.
11203         Fixes gcj/367.
11204
11205 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11206
11207         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11208
11209 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
11210
11211         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11212         scratch buffer.
11213
11214 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11215
11216         * jv-scan.c (help): Document --complexity.
11217         (options): Added --complexity.
11218         (flag_complexity): New global.
11219         (main): Call `report'.
11220         * parse-scan.y (complexity): New global.
11221         (if_then_statement, if_then_else_statement,
11222         if_then_else_statement_nsi, switch_block_statement_group,
11223         while_expression, do_statement, for_begin, continue_statement,
11224         throw_statement, catch_clause, finally, method_invocation,
11225         conditional_and_expression, conditional_or_expression,
11226         conditional_expression): Update complexity.
11227         (reset_report): Reset complexity.
11228         (report): New function.
11229
11230 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11231
11232         * lex.c (yylex): Added STRICT_TK case.
11233         * parse.y (STRICT_TK): Added.
11234         * parse-scan.y (STRICT_TK): Added.
11235         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11236         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
11237         file.
11238         * keyword.h: Rebuilt.
11239         * keyword.gperf (strictfp): Added.
11240
11241 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11242
11243         * lex.c (yylex): Recognize floating point constants with leading
11244         0.
11245
11246 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11247
11248         * java-tree.h (cyclic_inheritance_report): Constify.
11249         * parse.y (cyclic_inheritance_report): Likewise.
11250
11251 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11252
11253         * parse.y (goal): Remove call to ggc_add_string_root.
11254
11255 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11256
11257         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11258         Create string in scratch buffer, then pass to build_string.
11259
11260 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11261
11262         * parse.y (issue_warning_error_from_context): Add
11263         ATTRIBUTE_PRINTF.
11264
11265 2000-11-11  Anthony Green  <green@redhat.com>
11266
11267         * jcf-parse.c (process_zip_dir): Add finput parameter.
11268         (jcf_figure_file_type): Call process_zip_dir with appropriate
11269         argument.
11270
11271 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11272
11273         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11274         * jcf-parse.c (jcf_figure_file_type): Likewise.
11275
11276 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11277
11278         * parse.y (create_new_parser_context): Use memset () instead of
11279         bzero ().
11280
11281 2000-11-08  Tom Tromey  <tromey@cygnus.com>
11282
11283         * gjavah.c (process_file): Only include gcj/cni.h when generating
11284         CNI stubs.
11285
11286 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11287
11288         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11289         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11290         instead of bzero ().
11291
11292 2000-11-05  Tom Tromey  <tromey@cygnus.com>
11293
11294         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11295         * lex.c (IS_ZERO): New define.
11296         (java_perform_atof): Error on floating point underflow.
11297
11298 2000-11-04  Tom Tromey  <tromey@cygnus.com>
11299
11300         * lex.c (java_parse_escape_sequence): Only read two octal
11301         characters if the first one is greater than 3.  Don't allow
11302         "octal" numbers to include the digits 8 or 9.
11303
11304 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11305
11306         * Make-lang.in (java.distdir): Remove.
11307
11308 2000-11-03  Tom Tromey  <tromey@cygnus.com>
11309
11310         * Make-lang.in (java.dvi): New target.
11311         Partial fix for PR other/567.
11312
11313         * lang-options.h: Mention -Wout-of-date.
11314         * jcf-dump.c (flag_newer): New global.
11315         * gjavah.c (flag_newer): New global.
11316         * jcf-io.c (find_class): Only warn when flag_newer set.
11317         * lang.c (flag_newer): New global.
11318         (struct string_option): New declaration.
11319         (lang_W_options): New global.
11320         (process_option_with_no): New function.
11321         (lang_decode_option): Use it.
11322
11323         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11324         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11325         `$'.
11326
11327         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11328         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11329         * lex.c (java_read_unicode): Removed `term_context' argument.
11330         Recognize any number of `u' in `\u'.
11331         (java_read_unicode_collapsing_terminators): New function.
11332         (java_get_unicode): Use it.
11333         (java_lineterminator): Removed.
11334         (yylex): Produce error if character literal is newline or single
11335         quote.  Return if eof found in middle of `//' comment.  EOF in
11336         `//' comment is only an error if pedantic.
11337         (java_ignorable_control_p): New function.
11338         (java_parse_end_comment): Return if eof found in middle of
11339         comment.
11340         Include flags.h.
11341         * jv-scan.c (pedantic): New global.
11342
11343 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11344
11345         * parse.y (outer_field_access_p): Inherited fields aren't
11346         consider outer fields.
11347         (maybe_build_thisn_access_method): Use
11348         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11349         (resolve_expression_name): Trigger an error if a static field
11350         is being accessed as an outer field.
11351
11352 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11353
11354         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11355         Fixes gcj/365.
11356
11357 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11358
11359         * Make-lang.in: Move all build rules here from Makefile.in,
11360         adapt to new context.  Wrap all rules that change the current
11361         directory in parentheses.  Expunge all references to $(P).
11362         When one command depends on another and they're run all at
11363         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11364         all object-file generation rules.  Delete obsolete variables.
11365
11366         * Makefile.in: Delete.
11367         * config-lang.in: Delete outputs= line.
11368
11369 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11370
11371         * parse.y (patch_method_invocation): NULLify this_arg when already
11372         inserted.
11373         (maybe_use_access_method): Handle call to methods unrelated to the
11374         current class. Fixed comment.
11375         Fixes gcj/361.
11376
11377 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11378
11379         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11380         scope.
11381
11382 2000-10-24  Tom Tromey  <tromey@cygnus.com>
11383
11384         * lex.c (java_new_lexer): Initialize new fields.  Work around
11385         broken iconv() implementations.
11386         (java_read_char): Swap bytes if required.  Use fallback decoder if
11387         required.
11388         (byteswap_init, need_byteswap): New globals.
11389         (java_destroy_lexer): Only close iconv handle if it is in use.
11390         * lex.h (java_lexer): New fields read_anything, byte_swap,
11391         use_fallback.
11392         Made out_buffer unsigned.
11393
11394 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11395
11396         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11397         where an enclosing context can be set on the jdep.
11398         (do_resolve_class): Fixed identation.
11399
11400 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11401
11402         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11403
11404         * jcf-reader.c (peek_attribute, skip_attribute): Only define
11405         when requested.
11406
11407         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11408
11409         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11410
11411 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11412
11413         * jcf-write.c (OP1): Update `last_bc'.
11414         (struct jcf_block): Fixed indentation and typo in comments.  New
11415         field `last_bc'.
11416         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11417         follows `monitorenter'.
11418         * parse.y (patch_synchronized_statement): New local `tmp'. Call
11419         `patch_string'.
11420         Fixes gcj/232.
11421
11422 2000-10-16  Tom Tromey  <tromey@cygnus.com>
11423
11424         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11425         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11426         * lang-options.h: Added -MA, -MT, -MF..
11427         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11428         (DEPEND_TARGET_SET): New macro.
11429         (DEPEND_FILE_ALREADY_SET): Likewise.
11430         (init_parse): Handle new flags.
11431         * jcf.h (jcf_dependency_print_dummies): Declare.
11432         * Make-lang.in (s-java): Added mkdeps.o.
11433         * Makefile.in (BACKEND): Added mkdeps.o.
11434         (../gcjh$(exeext)): Added mkdeps.o.
11435         (../jcf-dump$(exeext)): Added mkdeps.o.
11436         * jcf-depend.c: Include mkdeps.h.
11437         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11438         add_entry): Removed.
11439         (jcf_dependency_reset): Rewrote.
11440         (dependencies): New global.
11441         (jcf_dependency_set_target): Rewrote.
11442         (jcf_dependency_add_target): Likewise.
11443         (jcf_dependency_add_file): Likewise.
11444         (munge): Removed.
11445         (print_ents): Removed.
11446         (jcf_dependency_write): Rewrote.
11447         (print_dummies): New global.
11448         (jcf_dependency_print_dummies): New function
11449         (jcf_dependency_write): Call deps_dummy_targets if required.
11450
11451 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11452
11453         * gjavah.c (add_class_decl): Removed unused variables `tname',
11454         `tlen' and `name_index'.
11455         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11456         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11457         in `wfl_operator' with value.
11458         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11459         (jcf_figure_file_type): Fixed identation.
11460         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11461         * parse.y (analyze_clinit_body): New function.
11462         (static_initializer:): Reset `current_static_block'.
11463         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11464         `wfl_operator' with new value.
11465         (lookup_cl): Use EXPR_WFL_FILENAME.
11466         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11467         analyze_clinit_body.
11468         (build_outer_field_access): Access to this$<n> built from
11469         current_class, not its outer context.
11470         (build_access_to_thisn): Fixed leading comment. Tidied things up.
11471         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11472         (patch_method_invocation): Use `is_static_flag' when already
11473         initialized.
11474         (patch_newarray): Removed assignment in ternary operator.
11475
11476 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11477
11478         * except.c (free_eh_ranges): Don't free `whole_range'.
11479
11480 2000-10-15  Anthony Green  <green@redhat.com>
11481
11482         * decl.c (init_decl_processing): Call init_class_processing before
11483         anything else.
11484
11485 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11486
11487         * check-init.c (check_init): Fixed leading comment. Use
11488         LOCAL_FINAL_P.
11489         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11490         (give_name_to_locals): Likewise.
11491         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11492         fields in lang_decl_var.
11493         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11494         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11495         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11496         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11497         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11498         (LOCAL_FINAL): Rewritten.
11499         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11500         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11501         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11502         `init_final' fields.
11503         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11504         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11505         (TYPE_HAS_FINAL_VARIABLE): New macro.
11506         (struct lang_type): Added `afv' field.
11507         * parse.y (check_static_final_variable_assignment_flag): New function.
11508         (reset_static_final_variable_assignment_flag): Likewise.
11509         (check_final_variable_local_assignment_flag): Likewise.
11510         (reset_final_variable_local_assignment_flag): Likewise.
11511         (check_final_variable_indirect_assignment): Likewise.
11512         (check_final_variable_global_assignment_flag): Likewise.
11513         (add_inner_class_fields): Use LOCAL_FINAL_P.
11514         (register_fields): Handle local finals and final variables.
11515         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11516         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11517         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11518         on local finals.
11519         (java_complete_expand_methods): Loop to set
11520         TYPE_HAS_FINAL_VARIABLE. Call
11521         `reset_final_variable_local_assignment_flag' and
11522         `check_final_variable_local_assignment_flag' accordingly before
11523         and after constructor expansion. Call
11524         `reset_static_final_variable_assignment_flag'
11525         before expanding <clinit> and after call
11526         `check_static_final_variable_assignment_flag' if the
11527         current_class isn't an interface. After all methods have been
11528         expanded, call `check_final_variable_global_assignment_flag' and
11529         `check_static_final_variable_assignment_flag' if the current class
11530         is an interface.
11531         (maybe_yank_clinit): Fixed typo in comment.
11532         (build_outer_field_access_methods): Removed old sanity check. Use
11533         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11534         Don't create access methods for finals.
11535         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11536         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11537         existing DECL_INIT has been processed.
11538         (java_complete_lhs): Likewise.
11539         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11540         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11541         logic.
11542         (patch_assignment): Use LOCAL_FINAL_P.
11543         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11544         DECL_INITIAL is nullified.
11545         Fixes gcj/163.
11546
11547 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11548
11549         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11550
11551         * Makefile.in (parse.c, parse-scan.c): Likewise.
11552
11553 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11554
11555         * class.c (temporary_obstack): Remove.
11556         (make_class): Don't mess with obstascks.
11557         (push_class): Likewise.
11558         (set_super_info): Likewise.
11559         (add_method_1): Likewise.
11560         (add_method): Likewise.
11561         (add_field): Likewise.
11562         (build_utf8_ref): Likewise.
11563         (build_class_ref): Likewise.
11564         (build_static_field_ref): Likewise.
11565         (finish_class): Likewise.
11566         (push_super_field): Likewise.
11567         (layout_class): Likewise.
11568         (layout_class_methods): Likewise.
11569         (init_class_processing): Likewise.
11570         * constants.c (get_tag_node): Likewise.
11571         (build_constant_data_ref): Likewise.
11572         * decl.c (ggc_p): Remove.
11573         (copy_lang_decl): Use ggc_alloc.
11574         (complete_start_java_method): Don't mess with obstacks.
11575         (start_java_method): Likewise.
11576         (end_java_method): Likewise.
11577         * except.c (link_handler): Use xmalloc.
11578         (free_eh_ranges): New function.
11579         (method_init_exceptions): Use it.
11580         (add_handler): Use xmalloc.
11581         (expand_start_java_handler): Don't mess with obstacks.
11582         (prepare_eh_table_type): Likewise.
11583         (expand_end_java_handler): Likewise.
11584         * expr.c (push_value): Likewise.
11585         (create_label_decl): Likewise.
11586         (build_jni_stub): Likewise.
11587         (java_lang_expand_expr): Likewise.
11588         (note_instructions): Use xrealloc.
11589         (java_push_constant_from_pool): Don't mess with obstacks.
11590         (process_jvm_instruction): Likewise.
11591         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11592         declaration.
11593         * jcf-parse.c (get_constant): Don't mess with obstacks.
11594         (read_class): Likewise.
11595         (jcf_parse): Likewise.
11596         * lex.c (expression_obstack): Remove.
11597         (java_lex): Don't use obstack_free.
11598         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11599         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11600         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11601         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11602         * parse.y (gaol): Add more GC roots.
11603         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11604         (lookup_field_wrapper): Likewise.
11605         (obtain_incomplete_type): Don't mess with obstacks.
11606         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11607         macros.
11608         (craft_constructor): Don't mess with obstacks.
11609         (safe_layout_class): Likewise.
11610         (java_complete_class): Likewise.
11611         (source_end_java_method): Likewise.
11612         (build_outer_field_access_methods): Likewise.
11613         (build_outer_method_access_method): Likewise.
11614         (maybe_build_thisn_access_method): Likewise.
11615         (build_dot_class_method_invocation): Likewise.
11616         (java_complete_tree): Likewise.
11617         (java_complete_lhs): Likewise.
11618         (do_merge_string_cste): Likewise.
11619         (patch_string_cst): Likewise.
11620         (array_constructor_check_entry): Likewise.
11621         * typeck.c (build_java_array_type): Likewise.
11622         (parse_signature_string): Likewise.
11623         (build_java_signature): Likewise.
11624
11625 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11626
11627         Fix for PR gcj/356:
11628         * gjavah.c (add_class_decl): Don't special-case inner classes.
11629         (add_namelet): Likewise.
11630
11631 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11632
11633         * java-tree.h: Constify current_encoding.
11634         * lang.c: Constify current_encoding.
11635
11636 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11637
11638         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11639         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11640
11641 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11642
11643         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11644         patch. Fixes gcj/340.
11645
11646 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11647
11648         * lex.c (java_new_lexer): Initialize out_first and out_last
11649         fields.
11650         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11651
11652 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11653
11654         * parse.y (pop_current_osb): New function.
11655         (array_type:): Use `dims:', changed actions
11656         accordingly. Suggested by Anthony Green.
11657         (array_creation_expression:): Used pop_current_osb.
11658         (cast_expression:): Likewise.
11659         (search_applicable_method_list): Fixed indentation.
11660
11661 2000-10-08  Anthony Green  <green@redhat.com>
11662
11663         * parse.y (array_type_literal): Remove production.
11664         (type_literals): Refer to array_type, not array_type_literal.
11665
11666 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11667
11668         Patch contributed by Corey Minyard.
11669         * decl.c (check_local_named_variable): New function.
11670         (tree check_local_unnamed_variable): Likewise.
11671         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11672
11673 2000-10-07  Anthony Green  <green@redhat.com>
11674
11675         * class.c (layout_class): Handle case where superclass can't be
11676         layed out yet.
11677
11678 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11679
11680         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
11681         gperf.
11682
11683 2000-10-05  Tom Tromey  <tromey@cygnus.com>
11684
11685         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
11686         * jvgenmain.c (class_mangling_prefix): Removed.
11687         (class_mangling_suffix): New global.
11688         (main): Use it.
11689         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
11690         `$'.
11691         (print_method_info): Handle overrides for static and final
11692         methods.
11693         (process_file): Generate declaration for class object field.
11694         * class.c (cxx_keywords): New array.
11695         (utf8_cmp): New function.
11696         (cxx_keyword_p): New function.
11697         (layout_class_method): Mangle C++ keywords by appending `$'.
11698         (mangle_field): New function.
11699         (mangle_class_field): Use mangle_field.  Mangle class name as
11700         `class$'.
11701         (mangle_static_field): Use mangle_field.
11702
11703 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11704
11705         * decl.c (find_local_variable): Removed uncessary type check and
11706         fixed range check typo. From Corey Minyard.
11707
11708 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11709
11710         * decl.c (give_name_to_locals): New local `code_offset'. Call
11711         `maybe_adjust_start_pc'.
11712         * expr.c (note_instructions): New function.
11713         (expand_byte_code): Don't collect insn starts here.
11714         (peek_opcode_at_pc): New function.
11715         (maybe_adjust_start_pc): Likewise.
11716         * java-tree.h (maybe_adjust_start_pc): Declare.
11717         (note_instructions): Likewise.
11718         * jcf-parse.c (parse_class_file): Call `note_instructions'.
11719
11720 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11721
11722         * parse.y (field_access:): Fixed indentation.
11723         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
11724
11725 2000-09-07  Tom Tromey  <tromey@cygnus.com>
11726
11727         Fix for PR gcj/307:
11728         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
11729         JPRIMITIVE_TYPE_P, for arithmetic operators.
11730         (patch_method_invocation): Indentation fix.
11731         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
11732         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
11733         (do_unary_numeric_promotion): Cleaned up code.
11734         (valid_cast_to_p): Handle boolean correctly.
11735
11736 2000-09-27  Tom Tromey  <tromey@cygnus.com>
11737
11738         * lex.c (java_read_unicode): Reset bs_count when finished with
11739         `\u' sequence.
11740
11741 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
11742
11743         Convert to GC.
11744         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
11745         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
11746         (typeck.o): Depend on ggc.h.
11747         * class.c (add_method_1): Use GC functions for allocation.
11748         (init_class_processing): Register roots.
11749         * decl.c (ggc_p): Set to 1.
11750         (pending_local_decls): Make it static.
11751         (push_jvm_slot): Use GC functions for allocation.
11752         (init_decl_processing): Register roots.
11753         (give_name_to_locals): Use GC functions for allocation.
11754         (lang_mark_tree): New function.
11755         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
11756         functions for allocation.
11757         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
11758         * lex.c (java_lex): Use build_string, rather than replicating it
11759         inline.
11760         * parse.y (goal): Add more roots.
11761         (mark_parser_ctxt): New function.
11762         * typeck.c: Include ggc.h.
11763
11764 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11765
11766         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
11767         contains something else than MODIFY_EXPR.
11768
11769 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
11770
11771         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
11772         * Makefile.in (parse.o): Depend on ggc.h.
11773         (class.o): Likewise.
11774         (constants.o): Likewise.
11775         (decl.o): Likewise.
11776         (expr.o): Likewise.
11777         (jcf-parse.o): Likewise.
11778         (jcf-write.o): Likewise.
11779         (mangle.o): Likewise.
11780         * class.c: Include ggc.h.
11781         (build_static_field_ref): Register GC roots.
11782         (layout_class): Likewise.
11783         (init_class_processing): Likewise.
11784         * constants.c: Include ggc.h.
11785         (current_constant_pool_data_ref): Remove.
11786         (tag_nodes): Move it to ...
11787         (get_tag_node): ... here.  Register GC roots.
11788         * decl.c: Include ggc.h.  Remove many global tree definitions.
11789         (throw_node): Define.
11790         (java_global_trees): Likewise.
11791         (predef_filenames): Make the size a constant.
11792         (init_decl_processing): Adjust accordingly.
11793         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
11794         * expr.c: Include ggc.h.
11795         (init_expr_processing): Register GC roots.
11796         (build_invokeinterface): Likewise.
11797         * java-tree.h: Replace extern tree declarations with macros.
11798         (java_global_trees): New variable.
11799         (java_tree_index): New enumeration.
11800         (init_jcf_parse): Declare.
11801         * jcf-parse.c: Include ggc.h.
11802         (current_class): Remove declaration.
11803         (main_class): Likewise.
11804         (all_class_list): Likewise.
11805         (predefined_filename_p): Adjust for constant size of
11806         predef_filenames.
11807         (init_jcf_parse): New function.
11808         * jcf-write.c: Include ggc.h.
11809         (generate_classfile): Register GC roots.
11810         (append_synthetic_attribute): Likewise.
11811         (append_innerclass_attribute_entry): Likewise.
11812         * lang.c: Include ggc.h.
11813         (lang_print_error): Register GC roots.
11814         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
11815         with macros.
11816         * parse.y: Include ggc.h.
11817         (wfl_operator): Remove.
11818         (goal): Register GC roots.
11819         (java_pop_parser_context): Adjust for new field names.
11820         (java_parser_context_save_global): Likewse.
11821         (java_parser_context_restore_global): Likewise.
11822         (java_parser_context_suspend): Likewise.
11823         (java_parser_context_resume): Likewise.
11824         (verify_constructor_circularity): Register GC roots.
11825         (lookup_cl): Likewise.
11826         (java_reorder_fields): Likewise.
11827         (build_current_this): Likewise.
11828         (class_in_current_package): Likewise.
11829         (argument_types_convertible): Likewise.
11830         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
11831
11832 2000-09-14  Tom Tromey  <tromey@cygnus.com>
11833
11834         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
11835
11836 2000-09-13  Tom Tromey  <tromey@cygnus.com>
11837
11838         * jcf-parse.c: Include <locale.h>.
11839         * jv-scan.c: Include <locale.h>.
11840
11841 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11842
11843         * expr.c (pop_type_0): Return `Object' if trying to merge two
11844         interface types.
11845         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
11846         interface types; `Object' is always a valid supertype.
11847
11848 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11849
11850         Fix for PR gcj/33:
11851         * jv-scan.c (help): Document --encoding.
11852         (options): Added `encoding' entry.
11853         (OPT_ENCODING): New define.
11854         (main): Handle --encoding.
11855         Include <langinfo.h> if nl_langinfo exists.
11856         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
11857         --encoding.
11858         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
11859         (parse_source_file): Correctly call java_init_lex.  Added `finput'
11860         argument.  Use nl_langinfo to determine default encoding.
11861         * java-tree.h (current_encoding): Declare.
11862         * parse.y (java_parser_context_restore_global): Don't restore
11863         `finput'.
11864         (java_parser_context_save_global): Don't set `finput' field.
11865         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
11866         if required.
11867         * lang.c (current_encoding): New global.
11868         (lang_decode_option): Recognize `-fencoding='.
11869         (finish_parse): Don't close finput.
11870         * parse.h (struct parser_ctxt): Removed `finput' and
11871         `unget_utf8_value' fields.  Added `lexer' field.
11872         (java_init_lex): Fixed declaration.
11873         * lex.c (java_new_lexer): New function.
11874         (java_destroy_lexer): Likewise.
11875         (java_read_char): Added `lex' argument.  Handle iconv case.
11876         (java_read_unicode): Added `lex' argument.  Count backslashes in
11877         lexer structure.
11878         (java_init_lex): Added `finput' and `encoding' arguments.  Set
11879         `lexer' field in ctxp.
11880         (BAD_UTF8_VALUE): Removed.
11881         (java_lex): Handle seeing UEOF in the middle of a string literal.
11882         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
11883         (java_lexer): New structure.
11884         (UNGETC): Removed.
11885         (GETC): Removed.
11886         (DEFAULT_ENCODING): New define.
11887         (java_destroy_lexer): Declare.
11888
11889 2000-09-12  Tom Tromey  <tromey@cygnus.com>
11890
11891         Fix for PR gcj/343:
11892         * lex.c (java_init_lex): Initialize java_io_serializable.
11893         * parse.y (java_io_serializable): New global.
11894         (valid_ref_assignconv_cast_p): An array can be cast to
11895         serializable.
11896
11897 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
11898
11899         * decl.c, expr.c: Include defaults.h if not already included.
11900         Don't define the *_TYPE_SIZE macros.
11901
11902 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
11903
11904         * typeck.c (build_java_array_type): Correct first parameter
11905         in ADJUST_FIELD_ALIGN invocation.
11906
11907 2000-09-06  Tom Tromey  <tromey@cygnus.com>
11908
11909         * lang-specs.h: Also recognize `-femit-class-files'.
11910
11911 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11912
11913         * verify.c (merge_types): Load the types to merge if necessary.
11914
11915 2000-09-02  Anthony Green  <green@redhat.com>
11916
11917         * jcf-io.c: Include zlib.h.
11918         (open_in_zip): Read compressed class file archives.
11919         * zipfile.h (ZipDirectory): Add uncompressed_size and
11920         compression_method fields.
11921         * zextract.c (read_zip_archive): Collect file compression info.
11922
11923 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
11924
11925         * parse.y (do_resolve_class): Also explore superclasses of
11926         intermediate enclosing contexts when searching for inner classes.
11927
11928 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11929
11930         * parse.y (variable_declarator_id:): Better error message.
11931         (expression_statement:): Use YYNOT_TWICE.
11932         (cast_expression:): Likewise.
11933         (assignment:): Likewise.
11934
11935 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11936
11937         * parse.y (do_merge_string_cste): New locals. Create new
11938         STRING_CSTs each time, use memcpy. Fixes gcj/311.
11939
11940 2000-08-07  Hans Boehm  <boehm@acm.org>
11941
11942         * boehm.c (mark_reference_fields): Set marking bits for all words in
11943         a multiple-word record.
11944         (get_boehm_type_descriptor): Use the procedure marking descriptor for
11945         java.lang.Class.
11946
11947 2000-08-31  Mike Stump  <mrs@wrs.com>
11948
11949         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
11950         jcf-dump$(exeext)): Make parallel safe.
11951
11952 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
11953
11954         * jcf-parse.c (set_source_filename): Constify a char *.
11955         * jcf-write.c (append_innerclasses_attribute,
11956         make_class_file_name): Constify a char *.  Don't recycle a
11957         variable for an unrelated purpose.
11958         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
11959         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
11960
11961 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11962
11963         * expr.c (can_widen_reference_to): Fixed indentation.
11964         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
11965         * parse.y: `finit$' replaces `$finit$' in comments.
11966         (try_builtin_assignconv): Fixed leading comment.
11967
11968 2000-08-25  Greg McGary  <greg@mcgary.org>
11969
11970         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
11971
11972 2000-08-24  Greg McGary  <greg@mcgary.org>
11973
11974         * lang.c (lang_decode_option): Use ARRAY_SIZE.
11975         * parse.y (BINOP_LOOKUP): Likewise.
11976
11977 2000-08-22  Andrew Haley  <aph@cygnus.com>
11978
11979         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
11980         sign extending. Fixes gcj/321.
11981         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
11982         combining to make a jlong. Fixes gcj/321.
11983
11984 2000-08-21  Nix  <nix@esperi.demon.co.uk>
11985
11986         * lang-specs.h: Do not process -o or run the assembler if
11987         -fsyntax-only.
11988
11989 2000-08-16  Andrew Haley  <aph@cygnus.com>
11990
11991         * typeck.c (build_java_array_type): Rewrite code to do array
11992         alignment.  Take into account back-end macros when aligning array
11993         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
11994         user to set alignment. Fixes gcj/252 and 160.
11995
11996 2000-08-09  Tom Tromey  <tromey@cygnus.com>
11997
11998         * parse.y (check_abstract_method_definitions): Now return `int'.
11999         Check implemented interfaces.  Fixes PR gcj/305.
12000
12001         * parse.y (patch_switch_statement): Disallow `long' in switch
12002         expressions.  Fixes PR gcj/310.
12003
12004 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12005
12006         * decl.c (finit_leg_identifier_node): New global.
12007         (init_decl_processing): Use `finit$' to initialize
12008         finit_identifier_node. Use `$finit$' to initialize
12009         finit_leg_identifier_node.
12010         * expr.c (expand_java_field_op): Use ID_FINIT_P.
12011         * java-tree.h (finit_identifier_node): Changed attached comment.
12012         (finit_leg_identifier_node): New declaration.
12013         (ID_FINIT_P): Take finit_identifier_node and
12014         finit_leg_identifier_node into account. This is a backward
12015         compatibility hack.
12016
12017 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12018
12019         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12020         Jan 6 2000 patch.
12021         (generate_bytecode_insns): Check `nargs' before emitting it.
12022         * verify.c (merge_type_state): Fixed typo.
12023         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12024         generate_bytecode_{conditional,insns}.
12025
12026 2000-08-13  Anthony Green  <green@redhat.com>
12027
12028         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12029         for -pg builds).
12030
12031 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12032
12033         * class.c (maybe_layout_super_class): Fixed indentation.
12034         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12035         (java_check_methods): New function declaration.
12036         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12037         instead of `str_ptr'.
12038         * jcf-write.c (generate_bytecode_insns): Emit number the of args
12039         of a `invokeinterface' at the right time.
12040         * parse.h (WFL_STRIP_BRACKET): New macro.
12041         (SET_TYPE_FOR_RESOLUTION): Use it.
12042         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12043         (check_class_interface_creation): Don't check for cross package
12044         innerclass name clashes.
12045         (method_header): Behave properly if MDECL is `error_mark_node'.
12046         (method_declarator): Return `error_mark_node' if bogus current
12047         class.
12048         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12049         (resolve_and_layout): New local `decl_type', set and used. Call
12050         java_check_methods.
12051         (java_check_methods): New method.
12052         (java_layout_classes): Use it.
12053         (resolve_qualified_expression_name): No EH check necessary in
12054         access$<n>.
12055         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12056         `case' statement.
12057         (patch_assignment): Set DECL_INITIAL on integral final local.
12058
12059 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12060
12061         * java-tree.h (flag_extraneous_semicolon): New extern.
12062         * lang-options.h: (-Wextraneous-semicolon): New option.
12063         * lang.c (flag_redundant): Fixed typo in leading comment.
12064         (flag_extraneous_semicolon): New global.
12065         (lang_decode_option): Set `flag_extraneous_semicolon' when
12066         -Wall. Decode `-Wextraneous-semicolon'.
12067         * parse.y (type_declaration:): Removed `SC_TK' hack, added
12068         `empty_statement' rule.
12069         (class_body_declaration): Likewise.
12070         (method_body:): Accept `;' as a method body.
12071         (static_initializer:): Removed `SC_TK' hack.
12072         (constructor_block_end:): Likewise.
12073         (empty_statement:): Report deprecated empty declaration. Fixes
12074         gcj/295
12075
12076 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12077
12078         * parse.y (build_dot_class_method_invocation): Changed parameter
12079         name to `type'. Build signature from `type' and convert it to a
12080         STRING_CST if it's an array.
12081         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12082         to use `ref_type' directly.
12083
12084 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
12085
12086         * lang-options.h: Added a comma after the last element to avoid
12087         syntax errors when other languages define additional options.
12088
12089 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12090
12091         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12092         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12093         (jc1): Link with $(BACKEND).
12094         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12095
12096 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12097
12098         * jvspec.c: Adjust type of second argument to
12099         lang_specific_driver, and update code as necessary.
12100
12101         * class.c (build_dtable_decl): Initialize dummy.
12102
12103 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12104
12105         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12106         method bodies not to rule out discarding `<clinit>'; don't use
12107         <clinit> to initialize static fields with constant initializers.
12108
12109 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12110
12111         * gjavah.c (print_method_info): Added `synth' parameter. Skip
12112         synthetic methods.
12113         (method_synthetic): New global.
12114         (HANDLE_METHOD): Recognize synthetic method and tell
12115         `print_method_info' about it.
12116         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12117         processing a synthetic method.
12118         * jcf-reader.c (skip_attribute): New function.
12119         ( skip_attribute): Likewise.
12120
12121 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12122
12123         * parse.y (build_outer_field_access): Fixed comments.
12124         (fix_constructors): Emit the initialization of this$<n> before
12125         calling $finit$.
12126         (resolve_qualified_expression_name): Build an access to `decl' if
12127         necessary.
12128
12129 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12130
12131         * parse-scan.y (curent_class): Non longer const.
12132         (inner_qualifier, inner_qualifier_length): Deleted.
12133         (current_class_length): New global.
12134         (bracket_count): Fixed typo in leading comment.
12135         (anonymous_count): New global.
12136         (class_instance_creation_expression:): Handle anonymous classes.
12137         (anonymous_class_creation:): New rule.
12138         (push_class_context): Rewritten.
12139         (pop_class_context): Likewise.
12140         (INNER_QUALIFIER): Macro deleted.
12141         (report_class_declaration): call `push_class_context' when
12142         entering the function. `fprintf' format modified not to use
12143         INNER_QUALIFIER.
12144         (report_class_declaration): Assign `package_name' and
12145         `current_class' to NULL separately.
12146
12147 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12148
12149         * expr.c (build_invokeinterface): Call layout_class_methods on
12150         target interface.
12151
12152 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12153             Anthony Green  <green@cygnus.com>
12154             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12155
12156         * class.c (make_class_data): Create vtable for abstract classes.
12157         (get_dispatch_table): Changed to cope with abstract classes.
12158
12159 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12160
12161         * parse.y (patch_method_invocation): Don't reverse the argument
12162         list when dealing with anonymous class constructors. Fixed typo in
12163         comment.
12164
12165 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12166
12167         * parse.y (build_alias_initializer_parameter_list): Reverse
12168         crafted list when building aliases for anonymous class
12169         constructors.
12170
12171 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12172
12173         * parse.y (jdep_resolve_class): Don't bother checking potential
12174         innerclass access if `decl' is NULL.
12175         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12176         WFL.
12177
12178 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12179
12180         * parse.c: Remove (again.)
12181
12182 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12183
12184         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12185         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12186         outside the `if' statement, alias to innerclass removed, `decl'
12187         used to mark the class complete.
12188
12189 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12190
12191         * parse.y (simple_name:): Fixed typo in error message.
12192
12193 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12194
12195         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12196         or its first operand can be error marks.
12197
12198 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12199
12200         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12201         * parse.y (method_header): Likewise.
12202
12203 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12204
12205         * parse.y (process_imports): Consider that one might be trying to
12206         import an innerclass. Fixes gcj/254
12207
12208 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12209
12210         * parse.y (find_as_inner_class): Handle the case where the
12211         enclosing context of an innerclass has been loaded as bytecode.
12212
12213 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12214
12215         * parse.y (simple_name:): Reject `$' in type names.
12216         (resolve_type_during_patch): Use `type' as a second
12217         argument to resolve_no_layout. Fixes gcj/257.
12218
12219 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
12220
12221         * parse.y (find_most_specific_methods_list): Select the only
12222         non-abstract method even if max has been set.
12223         Fixes gcj/285, gcj/298.
12224
12225 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
12226
12227         * lang-specs.h: Added %(jc1) to java compiler options.
12228
12229 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12230
12231         * .cvsignore: New file.
12232
12233 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12234
12235         * parse.y (not_accessible_p): Access granted to innerclasses
12236         (indirectly) extending the reference type. Fixes gcj/249.
12237
12238 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12239
12240         * parse.y (patch_method_invocation): Fixed comment.
12241         (maybe_use_access_method): Build this$<n>s to the context of the
12242         target method, or a type that extends it. Fixes gcj/242.
12243
12244 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12245
12246         * parse.c: Remove.
12247
12248 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12249
12250         * parse.y (fold_constant_for_init): Avoid bullish conversion.
12251
12252 2000-07-13  Tom Tromey  <tromey@cygnus.com>
12253
12254         * lang-specs.h: Added %{I*}.
12255
12256 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12257
12258         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12259
12260 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12261
12262         * parse-scan.c: Remove.
12263
12264 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12265
12266         * class.c (set_super_info): Handled protected inner classes.
12267         (common_enclosing_context_p): Bail early if arguments aren't both
12268         inner classes.
12269         (get_access_flags_from_decl): Handle private and protected inner
12270         classes.
12271         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12272         (CLASS_PROTECTED): Likewise.
12273         (struct lang_type): New bitfield `poic'.
12274         * parse.y (jdep_resolve_class): Call check_inner_class_access on
12275         inner classes only.
12276         (check_inner_class_access): Renamed arguments, added
12277         comments. Handles protected inner classes (fixes gcj/225)
12278         (not_accessible_p): Fixed comments. Avoid handling inner classes.
12279
12280 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12281
12282         * parse.y (resolve_qualified_expression_name): Verify qualified
12283         access to `this'. Fixes gcj/239.
12284
12285 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12286
12287         * jcf-write.c (generate_classfile): Don't install ConstantValue
12288         for null pointers.
12289
12290 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12291
12292         * parse.y (resolve_qualified_expression_name): Handle inner class
12293         access. Fixes gcj/256.
12294
12295 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12296
12297         * jcf-write.c (generate_classfile): Properly install the
12298         ConstantValue attribute and the initial value constant pool index
12299         on string constants.
12300         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12301         class files.
12302
12303 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12304
12305         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12306         construct.
12307         * parse.y (find_as_inner_class): Fixed typo.
12308         (do_resolve_class): Explore enclosing contexts when searching for
12309         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12310         (check_inner_class_access): Check `decl' which can be null in case
12311         of previous errors.
12312
12313 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12314
12315         * java-tree.h (java_debug_context): Declared `extern'.
12316         (safe_layout_class): Likewise.
12317         * parse.y (resolve_field_access): Field must be `static' in order
12318         to be replaced by its initial value. Added comments.
12319         (find_applicable_accessible_methods_list): Fixed typo.
12320         (find_most_specific_methods_list): Methods found in innerclasses
12321         take over methods founds in the enclosing contexts.
12322         (java_complete_tree): Loosen restrictions on the type of DECLs
12323         that can be replaced by their initialization values.
12324         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12325
12326 2000-07-05  Tom Tromey  <tromey@cygnus.com>
12327
12328         * Make-lang.in (PARSE_DIR): New macro.
12329         (PARSE_RELDIR): Likewise.
12330         (PARSE_C): Likewise.
12331         (PARSE_SCAN_C): Likewise.
12332         ($(PARSE_C)): New target.
12333         ($(PARSE_SCAN_C)): Likewise.
12334         (SET_BISON): New macro.
12335         (BISONFLAGS): Likewise.
12336         (JAVABISONFLAGS): Likewise.
12337
12338 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
12339
12340         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12341         argument on the first pass for CNI as well as JNI.
12342         (print_method_info): Set up method name on the first pass only.
12343
12344 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12345
12346         * parse.y (parser_qualified_classname): Removed parameter
12347         `is_static'.
12348         (create_interface): Removed first passed parameter to
12349         parser_qualified_classname.
12350         (create_class): Likewise. Don't install alias on static
12351         innerclasses. Fixes gcj/275.
12352
12353 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12354
12355         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12356         debugable statement with empty_stmt_node. Fixes gcj/272
12357
12358 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12359
12360         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12361         gcj/271.
12362
12363 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12364
12365         * jcf-write.c (push_long_const): Appropriately cast short negative
12366         constant to jword.
12367
12368 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12369
12370         * parse.y (verify_constructor_super): Use loop variable
12371         `m_arg_type' initialized with `mdecl_arg_type'.
12372
12373 2000-06-29  Tom Tromey  <tromey@cygnus.com>
12374
12375         * parse.y (resolve_field_access): Handle case where `type_found'
12376         is NULL.
12377
12378 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12379
12380         * expr.c (lookup_field): The same field can be found through two
12381         different interface. Don't declare it ambiguous in that case.
12382
12383 2000-06-27  Tom Tromey  <tromey@cygnus.com>
12384
12385         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
12386         follows \r, then unget it at a lower level.
12387
12388 2000-06-26  Tom Tromey  <tromey@cygnus.com>
12389
12390         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12391         java_complete_tree.
12392
12393 2000-06-25  Tom Tromey  <tromey@cygnus.com>
12394
12395         * parse.y (for_statement): Wrap expression in a WFL if it is a
12396         constant.  For PR gcj/268.
12397
12398 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12399
12400         * parse.y (do_resolve_class): Minor optimiztion in the package
12401         list search. Removed unnecessary test and return statement.
12402         (valid_ref_assignconv_cast_p): Order of arguments to
12403         enclosing_context_p fixed.
12404
12405 2000-06-24  Tom Tromey  <tromey@cygnus.com>
12406
12407         * expr.c (lookup_field): Print error and return error_mark_node if
12408         field reference is ambiguous.
12409
12410         * parse.y (check_abstract_method_definitions): Also check if
12411         `other_method' is abstract.
12412
12413 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12414
12415         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12416         classes.
12417         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12418         (struct lang_type): New field `pic'.
12419         (CLASS_PRIVATE): New macro.
12420         * parse.y (check_inner_class_access): New function.
12421         (jdep_resolve_class): Call it.
12422
12423 2000-06-23  Tom Tromey  <tromey@cygnus.com>
12424
12425         * parse.y (patch_incomplete_class_ref): Initialize the returned
12426         class.  For PR gcj/260.
12427
12428 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12429
12430         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12431
12432 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12433
12434         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12435         Java specific checks.
12436         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12437         screened by DECL_P.
12438         * java-tree.def (CASE_EXPR): Marked 'e'.
12439         (DEFAULT_EXPR): Likewise.
12440         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12441         screened by DECL_P.
12442         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12443         Java specific checks.
12444         (generate_bytecode_insns): Test try_block for BLOCK before using
12445         BLOCK_EXPR_BODY.
12446         * parse.y (build_wfl_wrap): Added `location' argument. Set
12447         EXPR_WFL_LINECOL accordingly.
12448         (dim_expr:): Wrap constants with WFLs.
12449         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12450         (resolve_package): Check for `stmt' not being a BLOCK before
12451         building a debuggable statement with it.
12452         (make_qualified_primary): Added extra parameter to build_wfl_wrap
12453         invocation.
12454         (resolve_field_access): Make sure `decl' is a DECL before treating
12455         it as such.
12456         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12457         IDENTIFIER_NODE before treating it as such.
12458         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12459         treating it as such.
12460         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12461         to be applied only on non array types.
12462
12463 2000-06-16  Per Bothner  <per@bothner.com>
12464
12465         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
12466         define in terms of DECL_RESULT, as that fails when --enable-checking.
12467
12468 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12469
12470         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
12471         types the same in comparison.
12472         (CHECK_OP): Add static prototype.
12473
12474 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12475
12476         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12477         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12478         * parse.c: Rebuilt.
12479
12480 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12481
12482         * decl.c (create_primitive_vtable): Prototype.
12483
12484         * jcf-write.c (generate_bytecode_insns): Initialize variable
12485         `saved_context'.
12486
12487         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12488
12489 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12490
12491         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12492         to track searched classes, and do not search the same class more than
12493         once. Call find_applicable_accessible_methods_list on immediate
12494         superclass, instead of search_applicable_method_list on all ancestors.
12495         Fix for PR gcj/238.
12496
12497 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12498
12499         * parse.y (register_fields): Permit static fields in inner classes
12500         if they are final. Fix for PR gcj/255.
12501
12502 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12503
12504         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12505         * parse.y (find_in_imports): Returned type changed to void,
12506         leading comment fixed.
12507         (register_package): New function.
12508         (qualify_and_find): Likewise.
12509         (package_declaration:): Use `register_package'.
12510         (single_type_import_declaration:): Removed local variable
12511         `node'. Added missing `;' for consistency.
12512         (type_import_on_demand_declaration:): Use `chainon' to link new
12513         entries.
12514         (lookup_field_wrapper): Lookup local variables defined in outer
12515         contexts first.
12516         (java_complete_class): Don't reverse the list of imported on demand.
12517         (do_resolve_class): Reorganized. Removed local variable
12518         `original_name'. Call `qualify_and_find' with the current package
12519         name, invoke `find_in_imports_on_demand' right after. Call
12520         `qualify_and_find' with the packages we've seen so far. Fixed
12521         operations numbering in comments.
12522         (java_expand_class): Don't reverse `package_list'.
12523         (find_most_specific_methods_list): New local variables `abstract'
12524         and `candidates'. Use them to pick the right method.
12525
12526 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12527
12528         * parse.y (check_modifiers_consistency): Don't subtract out
12529         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12530
12531 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12532
12533         * Makefile.in (INTLLIBS): New.
12534         (LIBS): Add above.
12535         (DEPLIBS): Ditto.
12536
12537 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12538
12539         * class.c (get_dispatch_table): Build the vtable dummy entry list
12540         element with a null purpose. Fixed leading comment.
12541         (build_dtable_decl): Build an accurate dtable type when appropriate
12542         and use it.
12543
12544 2000-06-02  Richard Henderson  <rth@cygnus.com>
12545
12546         * lang.c (lang_get_alias_set): New.
12547
12548 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12549
12550         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12551         before using it as the accessed field.
12552
12553 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12554
12555         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12556         char_array_vtable, short_array_vtable, int_array_vtable,
12557         long_array_vtable, float_array_vtable, double_array_vtable):
12558         Declare.
12559         * expr.c (get_primitive_array_vtable): New function.
12560         (create_primitive_vtable): New function.
12561         (java_lang_expand_expr): Enable code to statically generate
12562         arrays.
12563         * decl.c (init_decl_processing): Create primitive vtables.
12564         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12565         short_array_vtable, int_array_vtable, long_array_vtable,
12566         float_array_vtable, double_array_vtable): Define.
12567
12568 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12569
12570         * java/parse.y (find_applicable_accessible_methods_list):
12571         Don't add an uninitialized value to the list.
12572
12573 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12574
12575         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12576         when trying to see if field's class should be initialized.  Always
12577         initialize field's declaring class, not qualified class.
12578         For PR gcj/162.
12579
12580         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12581         `wfl_operator', to maybe_build_primttype_type_ref.
12582         Fixes PR gcj/235.
12583
12584 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12585
12586         * parse.y (patch_method_invocation): Don't try to lookup methods
12587         in primitive types.
12588
12589 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12590
12591         * parse.y (resolve_field_access): Call the appropriate <clinit>
12592         before accessing the length of a static array. Craft a decl for
12593         the field while its time. Fixes PR gcj/129.
12594
12595 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12596
12597         * parse.y (resolve_package): Correctly set `*next' (was off by
12598         one.)
12599         (resolve_qualified_expression_name): Fixed comment.
12600
12601 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12602
12603         * jcf-parse.c (jcf_parse_source): Reset current_class and
12604         current_function_decl to NULL before parsing a new file.
12605
12606 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12607
12608         * parse.y (block_end:): If the collected block doesn't feature a
12609         statement, insert an empty statement.
12610
12611 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12612
12613         * parse.y (maybe_yank_clinit): New function.
12614         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12615         end of the list of methods belonging to a class.
12616         (java_complete_expand_method): Check whether <clinit> is really
12617         necessary and expand it accordingly.
12618
12619 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12620
12621         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12622         processed by the method's switch statement.
12623
12624 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12625
12626         * java-tree.h: Added init state enum.
12627         * decl.c (emit_init_test_initialization): Initialize class
12628         initialization check variable by looking at class' state.
12629
12630 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12631
12632         * java-tree.h (build_instanceof): Declare.
12633         (build_get_class): Declare.
12634         * parse.y (patch_binop): Use build_instanceof.
12635         * expr.c (build_instanceof): New function.  If class is final,
12636         don't make a function call.
12637         (expand_java_INSTANCEOF): Use it.
12638         (build_get_class): New function.
12639
12640 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12641
12642         * jcf-write.c (generate_classfile): Scan the source_file for
12643         slashes with the right pointer variable.
12644
12645 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12646
12647         * lang.c (lang_decode_option): Update -Wunused flags by calling
12648         set_Wunused.
12649         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12650
12651 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12652
12653         * check_init.c (check_init): Constify local char *.
12654         * class.c (push_class): Constify local char *.
12655         * java_tree.h: Update prototypes.
12656         * jcf-io.c (open_class): Constify filename parameter and
12657         return value.
12658         (find_class): Remove redundant string copy.  Cast return from
12659         open_class.
12660         * jcf-parse.c (read_class, parse_class_file, yyparse):
12661         Constify local char *.
12662         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12663         Constify local char *.
12664         * jcf.h (JCF): Constify filename and classname.
12665         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12666         * lang.c (init_parse): Constify parameter and return value.
12667         * lex.c (java_get_line_col): Constify filename parameter.
12668         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12669         * parse.y (java_parser_context_suspend,
12670         issue_warning_error_from_context, safe_layout_class): Constify
12671         local char *.
12672         * parse.c: Regenerate.
12673
12674 2000-05-08  Tom Tromey  <tromey@cygnus.com>
12675
12676         * expr.c (build_jni_stub): Cache the result of
12677         _Jv_LookupJNIMethod.
12678
12679 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12680
12681         * decl.c (predef_filenames_size): Now 7.
12682         (predef_filenames): New seventh entry.
12683
12684 2000-05-04  Tom Tromey  <tromey@cygnus.com>
12685
12686         * boehm.c (mark_reference_fields): Don't mark RawData fields.
12687         Keep track of when we've seen a reference field after a
12688         non-reference field.
12689         (get_boehm_type_descriptor): Handle case where we see
12690         non-reference fields but no trailing reference field.
12691         * decl.c (rawdata_ptr_type_node): Define.
12692         (init_decl_processing): Initialize rawdata_ptr_type_node.
12693         * java-tree.h (rawdata_ptr_type_node): Declare.
12694
12695 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12696
12697         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
12698         specifiers in calls to fprintf.
12699
12700 2000-05-03  Andrew Haley  <aph@cygnus.com>
12701
12702         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
12703
12704         * javaop.h (WORD_TO_INT): New function.
12705         (IMMEDIATE_s4): Use WORD_TO_INT.
12706         * jcf.h (JPOOL_INT): Ditto.
12707
12708         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
12709         separator.
12710
12711 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12712
12713         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
12714         on native function.
12715         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
12716         JNI methods.
12717         * expr.c (build_jni_stub): New function.
12718         * lang-specs.h: -fjni and -femit-class-file are incompatible.
12719         * parse.c: Rebuilt.
12720         * parse.y (java_complete_expand_methods): Expand a native method
12721         and call build_jni_stub if -fjni given.
12722         * lang-options.h: Document -fjni.
12723         * lang.c (flag_jni): New global.
12724         (lang_f_options): Added `jni' entry.
12725         * java-tree.h (soft_lookupjnimethod_node,
12726         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
12727         Declare.
12728         (flag_jni): Declare.
12729         (build_jni_stub): Declare.
12730         (struct lang_decl): Added `native' flag.
12731         (METHOD_NATIVE): Redefined to use `native' field of lang specific
12732         structure.
12733         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
12734         soft_jnipopsystemframe_node): New globals.
12735         (init_decl_processing): Set them.  _Jv_InitClass only takes one
12736         argument.
12737
12738         * java-tree.def: Put into `C' mode.
12739
12740 2000-04-27  Tom Tromey  <tromey@cygnus.com>
12741
12742         Fix for PR gcj/2:
12743         * expr.c (expand_invoke): Generate check to see if object pointer
12744         is null in nonvirtual invocation case.
12745         * java-tree.h (soft_nullpointer_node): Declare.
12746         * decl.c (soft_nullpointer_node): New global.
12747         (init_decl_processing): Initialize soft_nullpointer_node.
12748         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12749         or `private' methods.
12750         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12751
12752 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12753
12754         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
12755         from <clinit>
12756
12757 2000-04-26  Tom Tromey  <tromey@cygnus.com>
12758
12759         * zextract.c (find_zip_file_start): New function.
12760         (read_zip_archive): Use it.
12761
12762 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12763
12764         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
12765
12766 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12767
12768         * class.c (common_enclosing_context_p): New function.
12769         * java-tree.h (common_enclosing_context_p): Added prototype.
12770         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
12771         classes sharing an outer context with the current instance.
12772         * parse.y (build_access_to_thisn): Fixed leading comment.
12773         (verify_constructor_super): New local `supper_inner'. Skip
12774         enclosing context argument in the case of inner class constructors.
12775         (patch_method_invocation): Insert proper context as second
12776         parameter to pure inner class constructor super invocations.
12777
12778 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12779
12780         * parse.y (end_class_declaration): Reset the interface number
12781         counter.
12782
12783 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12784
12785         * parse.y (source_start_java_method): Deleted unnecessary code.
12786         (patch_method_invocation): Fixed comment.
12787
12788 2000-04-24  Robert Lipe <robertlipe@usa.net>
12789
12790         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
12791
12792 2000-04-23  Tom Tromey  <tromey@cygnus.com>
12793
12794         * boehm.c (mark_reference_fields): Use int_byte_position.
12795
12796 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12797
12798         * boehm.c (mark_reference_fields): Only call byte_position on
12799         non-static fields.
12800
12801 2000-04-22  Tom Tromey  <tromey@cygnus.com>
12802
12803         * boehm.c (mark_reference_fields): Added `last_view_index'
12804         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
12805
12806 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
12807
12808         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
12809         * parse.y (check_class_interface_creation): Fixed comments. Select
12810         permitted modifiers for (inner) interfaces. Changed error message
12811         to report rejected modifiers used with local classes.
12812
12813 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12814
12815         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
12816         of directly inherited type considered in scope.
12817         * parse.y (do_resolve_class): Search inherited classes for inner
12818         classes.
12819
12820 2000-04-20  Tom Tromey  <tromey@cygnus.com>
12821
12822         * parse.y (not_accessible_p): Use member's class, not current
12823         class, when doing inheritance check for protected reference.
12824         Fixes PR gcj/124.
12825
12826 2000-04-20  Jason Schroeder  <shrode@subnature.com>
12827
12828         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
12829
12830 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12831
12832         * parse.y (lookup_field_wrapper): Search for final local aliases.
12833         (resolve_expression_name): Let lookup_field_wrapper search for
12834         final local aliases. Force the value of `name' if one is found.
12835         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
12836         an expression name. Fixed comments.
12837
12838 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12839
12840         * parse.y (yyerror): `msg' can be null, don't use it in that case.
12841
12842 2000-04-19  Tom Tromey  <tromey@cygnus.com>
12843
12844         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
12845
12846 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12847
12848         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
12849
12850 2000-04-18  Tom Tromey  <tromey@cygnus.com>
12851
12852         PR gcj/211:
12853         * gjavah.c (utf8_cmp): Changed return value.
12854         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
12855         result.
12856         (cxx_keywords): New global.
12857         (get_field_name): Handle new result of cxx_keyword_subst.
12858         (print_method_info): Likewise.
12859
12860 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
12861
12862         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
12863         with a newline, for CNI.
12864         (print_stub_or_jni): Print a space or newline before method name for
12865         CNI as well as JNI.
12866         (print_cxx_classname): Don't write leading "::" in CNI stub method.
12867         (process_file): Include gcj/cni.h if generating CNI stubs.
12868
12869 2000-04-16  Tom Tromey  <tromey@cygnus.com>
12870
12871         * gjavah.c (decompile_method): Use print_field_name.
12872         Fixes PR gcj/205.
12873
12874 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12875
12876         * parse.y (java_expand_classes): Reverse the package list once.
12877         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
12878         reduction.
12879         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
12880         the `==' and `!=' operators.
12881
12882 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12883
12884         * jcf-write.c (generate_bytecode_insns): At invocation time,
12885         always relate an interface method to the type of its selector.
12886
12887 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12888
12889         Fix for PR gcj/2:
12890         * expr.c (expand_invoke): Generate check to see if object pointer
12891         is null in nonvirtual invocation case.
12892         * java-tree.h (soft_nullpointer_node): Declare.
12893         * decl.c (soft_nullpointer_node): New global.
12894         (init_decl_processing): Initialize soft_nullpointer_node.
12895         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
12896         or `private' methods.
12897         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
12898
12899 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12900
12901         Fix for PR gcj/140:
12902         * parse.y (check_final_assignment): Recognize assignments to the
12903         `length' field of an array when generating class files.
12904
12905 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12906
12907         * class.c (decl_hash): Prototype removed.
12908         (decl_compare): Likewise.
12909
12910 2000-04-05  Tom Tromey  <tromey@cygnus.com>
12911
12912         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
12913         * parse.y (check_modifiers_consistency): Check for final/volatile
12914         clash.  Fixes PR gcj/164.
12915
12916 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12917
12918         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
12919         made global.
12920         (java_hash_compare_tree_node): Renamed from `decl_compare, made
12921         global.
12922         (add_method_1): Use `java_hash_hash_tree_node' and
12923         `java_hash_compare_tree_node'.
12924         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
12925         (java_hash_compare_tree_node): Likewise.
12926         * parse.y (find_applicable_accessible_methods_list): Create,
12927         delete and use a hash table to remember already searched interfaces.
12928
12929 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
12930
12931         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
12932         with latest entry.
12933
12934 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12935
12936         * boehm.c (mark_reference_fields, set_bit): Prototype.
12937         (set_bit): Un-ANSI-fy definition.
12938
12939         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
12940         Prototype.
12941
12942         * decl.c (emit_init_test_initialization): Likewise.
12943
12944         * gjavah.c (jni_print_char): Likewise.
12945
12946         * parse.y (create_new_parser_context): Likewise.
12947
12948 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12949
12950         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
12951         patch missing hunk. Fixed indentation.
12952
12953 2000-03-30  Tom Tromey  <tromey@cygnus.com>
12954
12955         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
12956         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
12957
12958 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12959
12960         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12961         when negative *before* using it as an array index.
12962         * ChangeLog: Fixed typo.
12963
12964 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12965
12966         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
12967         to 0 when it reaches -1.
12968
12969 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12970
12971         * jcf-parse.c (get_constant): Properly cast `num' during the
12972         invocation of `add_double'.
12973         * jcf-write.c (push_long_const): Properly cast `lo' before
12974         comparing it to short bounds.
12975         * parse-scan.y (interface_declaration:): Rule re-arrange so that
12976         `interface_body:' is reduced after the current interface is
12977         pushed.
12978
12979 2000-03-26  Tom Tromey  <tromey@cygnus.com>
12980
12981         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
12982         Java-specific `-f' option.
12983
12984 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12985
12986         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
12987         Adjust order of making types.
12988         Make bitsize_*_node values.
12989
12990 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12991
12992         * class.c (make_field_value): Use byte_position.
12993         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
12994         (java_array_data_offset): Likewise.
12995         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
12996         bzero call.
12997
12998 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12999
13000         * parse.y (check_abstract_method_definitions): New local
13001         `end_type_reached'. Make sure we also consider `end_type'.
13002         (java_check_abstract_method_definitions): Make sure we eventually
13003         consider `java.lang.Object'.
13004         (maybe_use_access_method): Don't use access method if not in the
13005         context of a pure inner class or if the method's context is right.
13006         (find_applicable_accessible_methods_list): New static flag
13007         `object_done'. Don't search abstract classes as interfaces. Fixed
13008         indentation. Fixed the `java.lang.Object' only search. Search
13009         class interface(s) first, then fully search enclosing contexts.
13010         (find_most_specific_methods_list): Pick the closest candidate when
13011         they're all abstract.
13012
13013 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13014
13015         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13016         properly initialize `finished_label'. Don't emit gotos for empty
13017         try statements.
13018
13019 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13020
13021         * except.c (emit_handlers): Clear catch_clauses_last.
13022
13023 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13024
13025         * parse.y (check_method_types_complete): New function.
13026         (create_class): Reset anonymous class counter only when seeing an
13027         non inner classe.
13028         (java_complete_class): JDEP_METHOD: Don't recompute signature
13029         if incomplete.
13030
13031 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13032
13033         * class.c (build_static_ref): Fixed indentation in comment.
13034         * java-tree.def (TRY_EXPR): Fixed typo in name.
13035         (CLASS_LITERAL): Likewise.
13036         * java-tree.h: (TYPE_DOT_CLASS): New macro.
13037         (struct lang_type): New field `dot_class'.
13038         * jcf-write.c (generate_bytecode_insns): Fixed error message.
13039         (generate_classfile): Method `class$' is synthetic.
13040         * parse.y (build_do_class_method): New function.
13041         (build_dot_class_method_invocation): Likewise.
13042         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13043         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13044         (qualify_ambiguous_name): Likewise.
13045         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13046         (build_try_statement): Fixed leading comment.
13047
13048 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13049
13050         * class.c (make_field_value): Properly handle sizes.
13051         (get_dispatch_vector): Use tree_low_cst and host_integerp.
13052         (layout_class_method): Count using trees.
13053         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13054         * expr.c (java_array_data_offset): Use int_bit_position.
13055         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13056         (build_invokevirtual): Use tree_low_cst and do computations with trees.
13057
13058 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13059
13060         * lang.c (flag_hash_synchronization): New global.
13061         (lang_f_options): Added `hash-synchronization'.
13062         * lang-options.h: Mention -fhash-synchronization.
13063         * java-tree.h (flag_hash_synchronization): Declare.
13064         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13065         hash table synchronization is disabled.
13066         * decl.c (init_decl_processing): Only push `sync_info' value when
13067         hash table synchronization is disabled.
13068         * class.c (make_class_data): Only push `sync_info' field when hash
13069         table synchronization is disabled.  Removed dead code.
13070
13071 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13072
13073         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13074
13075 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13076
13077         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13078         classes.
13079         * parse.y (patch_method_invocation): Handle anonymous classes
13080         creation in static context.
13081
13082 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13083
13084         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13085         * parse.y (resolve_qualified_expression_name): Use it.
13086         (patch_method_invocation): Likewise.
13087
13088 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13089
13090         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13091         depending on the type of dependency which dictates what the
13092         current class is.
13093         (unresolved_type_p): Resolved types limited to the current class.
13094
13095 2000-03-15  Tom Tromey  <tromey@cygnus.com>
13096
13097         * decl.c (init_decl_processing): Set type of `sync_info' to be
13098         pointer to Object.
13099
13100         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13101         Correctly compute bit number for current slot.  Zero `high' and
13102         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
13103         mark_reference_fields.
13104         (mark_reference_fields): New function.
13105
13106 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13107
13108         * parse.y (register_incomplete_type): Fixed initialization of
13109         JDEP_ENCLOSING.
13110
13111 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13112
13113         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13114         static globals.
13115         (push_class_context, pop_class_context): New function.
13116         (class_body:): Call pop_class_context.
13117         (interface_body:): Likewise.
13118         (INNER_QUALIFIER): New macro.
13119         (report_class_declaration): Changed output format and use
13120         INNER_QUALIFIER. Call push_class_context.
13121
13122 2000-02-14  Andrew Haley  <aph@cygnus.com>
13123
13124         * check-init.c (check_init): Add new cases for unary and binary
13125         tree nodes.
13126
13127 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13128
13129         * parse.y (resolve_package): Set `next' once a type name has been
13130         progressively discovered.
13131         (resolve_qualified_expression_name): Propagate resolution only if
13132         there are remaining qualifiers. Take into account `q' might have
13133         been cleared after re-qualification.
13134         * parse.y (patch_method_invocation): New local `resolved'.
13135         Section dealing with qualified expression rewritten to use
13136         resolve_field_access.
13137
13138 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13139
13140         * parse.h (PUSH_CPC): Fixed indentation.
13141         (DEBUG_CPC): New macro.
13142         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13143         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13144         * parse.y (class_body_declaration:): Use
13145         SET_CPC_INSTANCE_INITIALIZER_STMT.
13146         (method_declaration:): Check for null current_function_decl.
13147         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13148         (java_parser_context_pop_initialized_field): Better handling of
13149         empty lists.
13150         (maybe_make_nested_class_name): Mark nested class name as
13151         qualified when necessary.
13152         (end_class_declaration): Don't call java_parse_context_resume when
13153         one or more error occurred.
13154         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13155         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13156         SET_CPC_INITIALIZER_STMT.
13157         (method_header): Check for inner classes declaring static methods.
13158         (resolve_qualified_expression_name): Handle situation where `this'
13159         is implied.
13160
13161 2000-03-13  Hans Boehm <boehm@acm.org>
13162
13163         * typeck.c (build_prim_array_type): Correctly set the high word too.
13164
13165 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13166
13167         * parse.y (java_complete_expand_methods): Leave <clinit> out of
13168         ordinary methods.
13169         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13170         list of methods for interfaces.
13171
13172 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13173
13174         * parse.y (qualify_ambiguous_name): Properly handle expressions
13175         using `null'.
13176
13177 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13178
13179         * parse.y (check_final_assignment): Extended to process
13180         COMPOUND_EXPR.
13181         (patch_assignment): Have check_final_assignment called only once.
13182
13183 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13184
13185         * java-tree.h (IS_INIT_CHECKED): New flag.
13186         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13187         * parse.y (patch_string): Call force_evaluation_order on the
13188         completed string concatenation tree.
13189         * expr.c (force_evaluation_order): Call force_evaluation_order on
13190         function's arguments too.
13191
13192 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13193
13194         * decl.c (emit_init_test_initialization): Mark KEY as unused.
13195         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13196         (build_anewarray): Likewise.
13197         * parse.y (patch_newarray): Likewise.
13198         * parse.c: Regenerated.
13199
13200 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
13201
13202         * decl.c (init_decl_processing): Added new class fields `depth',
13203         `ancestors', and `idt' to class_type_node. Use
13204         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13205         * class.c (make_class_data): Push initial values for new fields.
13206         * java-tree.h: Updated prototype for `build_invokeinterface'.
13207         * expr.c (build_invokeinterface): Changed parameters to accept
13208         `method' tree. Calculate index of `method' in its declaring
13209         interface. Build call to _Jv_LookupInterfaceMethodIdx.
13210         (expand_invoke): Call `build_invokeinterface' with new parameters.
13211         * parse.y (patch_invoke): Call `build_invokeinterface' with new
13212         parameters.
13213
13214 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
13215
13216         * typeck.c (lookup_do): Search superinterfaces first
13217         when looking up an interface method. From Godmar Back
13218         <gback@cs.utah.edu>
13219
13220 2000-03-06  Tom Tromey  <tromey@cygnus.com>
13221
13222         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13223
13224 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13225
13226         * java-tree.h (lookup_argument_method2): Declared.
13227         (safe_layout_class): Prototype moved from parse.h.
13228         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13229         * parse.y (java_check_regular_methods): Local `super_class' gone.
13230         Call lookup_argument_method2 instead of lookup_argument_method.
13231         Perform modifier match for methods found declared in implemented
13232         interfaces. Fixed indentation problem. Overriding/hiding error
13233         report to take place only for methods found in classes.
13234         * typeck.c (lookup_argument_method): Changed leading
13235         comment. Re-written by calling lookup_do.
13236         (lookup_argument_method2): New function.
13237         (lookup_java_method): Re-written by calling lookup_do.
13238         (lookup_do): New function.
13239
13240 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13241
13242         * check-init.c (check_init): Removed dead code. Handle (blank)
13243         final variables.
13244         * parse.y (declare_local_variables): New local `final_p', set it
13245         and use it to initialize LOCAL_FINAL.
13246         (check_final_assignment): Only check FIELD_DECLs.
13247
13248 2000-02-17  Tom Tromey  <tromey@cygnus.com>
13249
13250         * Makefile.in (JAVA_OBJS): Added boehm.o.
13251         (boehm.o): New target.
13252         * Make-lang.in (JAVA_SRCS): Added boehm.c.
13253         * java-tree.h (flag_use_boehm_gc): Declare.
13254         (get_boehm_type_descriptor): Declare.
13255         * lang.c (lang_f_options): Added `use-boehm-gc'.
13256         (flag_use_boehm_gc): New global.
13257         * lang-options.h: Added -fuse-boehm-gc.
13258         * boehm.c: New file.
13259         * class.c (get_dispatch_table): If class uses a Boehm type
13260         descriptor, put it in the vtable.
13261         (make_class_data): Removed dead code.
13262
13263 2000-03-03  Per Bothner  <per@bothner.com>
13264
13265         * decl.c (init_decl_processing):  Initialize sizetype properly.
13266
13267 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13268
13269         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13270         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13271         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13272         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13273         (jcf_parse): New local `current'. Load innerclasses seen in outer
13274         context being processed.
13275         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13276         * jcf-write.c (append_innerclasses_attribute): New function.
13277         (append_innerclasses_attribute_entry): Likewise.
13278         (get_access_flags): Handle static classes. Set anonymous and local
13279         classes to be private.
13280         (generate_classfile): Attribute count adjusted. Call
13281         append_innerclasses_attribute.
13282         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13283         PURE_INNER_CLASS_TYPE_P.
13284         * parse.y (parser_qualified_classname): New parameter `is_static',
13285         produce non qualified name accordingly.
13286         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13287         (create_interface): Added argument to parser_qualified_classname.
13288         (create_class): Added argument to parser_qualified_classname. Setup
13289         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13290         (add_inner_class_fields): Fixed indentation.
13291         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13292         (method_declarator): Fixed typo in comment.
13293         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13294         (build_current_thisn): Likewise.
13295         (patch_method_invocation): Likewise.
13296
13297 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13298
13299         * decl.c (current_function_decl): Move to toplev.c.
13300
13301 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13302
13303         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13304         (DECL_BIT_INDEX): Use underlying representation.
13305         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13306
13307 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13308
13309         * expr.c (build_java_ret): Pass proper type to size_binop.
13310
13311 2000-02-25  Anthony Green  <green@cygnus.com>
13312
13313         * expr.c (build_class_init): Mark the decl to be ignored by
13314         check_init.
13315         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13316         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13317         * class.c (init_test_hash_newfunc): New function.
13318         (decl_hash): New function.
13319         (decl_compare): New function.
13320         * decl.c (emit_init_test_initialization): New function.
13321         (complete_start_java_method): Traverse the init test hashtable,
13322         calling emit_init_test_initialization.
13323         (always_initialize_class_p): Define.
13324         * expr.c (build_class_init): Use initialization tests when
13325         emitting class initialization code.
13326         (always_initialize_class_p): Declare.
13327         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13328         1.
13329         * java-tree.h: Include hash.h.
13330         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13331         (struct lang_decl): Add init_test_table field.
13332         (init_test_hash_entry): Define.
13333
13334 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13335
13336         * gjavah.c (main): Avoid using `argi' to report unimplemented
13337         options.
13338
13339 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13340
13341         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13342         initialize locals to avoid warnings. Local `exception_type' moved
13343         into if statement.
13344
13345 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13346
13347         * parse.y (resolve_expression_name): Use `orig' as a second
13348         argument to resolve_field_access.
13349         (resolve_field_access): Removed unnecessary code when dealing with
13350         static fields.
13351
13352 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13353
13354         * class.c (push_super_field): Don't push the field twice.
13355         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13356         * parse.h (java_reorder_fields): Prototyped.
13357         * parse.y (java_reorder_fields): New function.
13358         (java_layout_class): Simplified not to worry about re-ordering.
13359
13360 2000-02-23  Tom Tromey  <tromey@cygnus.com>
13361
13362         * gjavah.c (print_name): In JNI case, correctly quote string.
13363         (print_method_info): Don't handle overrides in JNI mode.
13364
13365 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13366
13367         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13368         value type set to `boolean_type_node'.
13369
13370 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13371
13372         * jcf-dump.c (main): Test for correct condition after
13373         output file creation.
13374
13375 2000-02-19  Anthony Green  <green@cygnus.com>
13376
13377         * jcf-depend.c (add_entry): Fix test for first list entry.
13378
13379 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13380
13381         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13382         * constants.c (build_constants_constructor): Likewise.
13383
13384 2000-02-19  Anthony Green  <green@cygnus.com>
13385
13386         * jcf-depend.c (add_entry): Add entries to the end of the list.
13387
13388 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
13389
13390         * decl.c (INT_TYPE_SIZE): Define if necessary.
13391         (expand_java_return): Handle the case of a native integer smaller
13392         than a JVM integer.
13393
13394 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13395
13396         * gjavah.c (help): Use GCCBUGURL.
13397         * jv-scan.c (help): Likewise.
13398         * jcf-dump.c (help): Likewise.
13399
13400 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13401
13402         * jcf-write.c (generate_bytecode_insns): Don't generate empty
13403         `finally' clauses.
13404
13405 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13406
13407         * jcf-parse.c (load_class): Call `fatal' if no file containing
13408         the target class are found.
13409
13410 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
13411
13412         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13413         lex.c, lex.h, and PARSE_H to...
13414         (parse.o, parse-scan.o): ...here, respectively.
13415
13416         * lex.c: Split out code that may trigger SIGFPE from yylex()
13417         to its own function.
13418         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13419
13420 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13421
13422         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13423
13424 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13425
13426         * parse.y (outer_field_access_p): Stop in time when outer contexts
13427         are exhausted.
13428         (resolve_qualified_expression_name): Properly qualify *everything*
13429         after a package.type to be resoled as expression names.
13430         (find_applicable_accessible_methods_list): Save/restore `class' to
13431         isolate it from a possible outer context search.
13432
13433 2000-02-15  Tom Tromey  <tromey@cygnus.com>
13434
13435         * gjavah.c (jni_print_char): New function.
13436         (print_full_cxx_name): Use it.
13437         (decode_signature_piece): Likewise.
13438         (print_cxx_classname): Likewise.
13439
13440 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13441
13442         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13443         version.o.
13444         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13445
13446         * gjavah.c: Include version.h.
13447
13448         * jcf-dump.c: Likewise.
13449
13450         * jv-scan.c: Likewise.
13451
13452 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13453
13454         * parse.y (outer_field_access_fix): First parameter now a tree
13455         node. Check for assignment to final. First argument to
13456         build_outer_field_access_fix modified to accommodate prototype.
13457         (build_outer_field_access): Don't check for assignment to final
13458         here.
13459         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13460         possibly returned by outer_field_access_fix. Changed
13461         outer_field_access_fix's first argument.
13462         (check_final_assignment): $finit$'s context is OK.
13463         (patch_unaryop): Use node instead of its line/column value when
13464         calling outer_field_access_fix.
13465
13466 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13467
13468         * parse.y (interface_declaration:): No longer tagged
13469         <node>. Re-installed default action.
13470         (class_member_declaration:): Handle inner interfaces.
13471         (interface_member_declaration): Handle inner interfaces and
13472         classes.
13473         (create_interface): Push error if one seen. Suspend parsing
13474         context when processing an inner interface.
13475         (register_fields): Inner class static field limitations not to
13476         apply to inner interfaces.
13477
13478 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13479
13480         * jcf-parse.c (load_class): Update `java_error_count' when a
13481         class' file can't be found.
13482         (parse.y): Avoid (byte)code generation when errors seen.
13483
13484 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13485
13486         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13487         decodes a valid node.
13488         (patch_binop): Handle TRUNC_DIV_EXPR.
13489
13490 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13491
13492         * parse.y (resolve_package): New local `acc'. Try to progressively
13493         build and guess a package and type name.
13494
13495 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13496
13497         * parse.y (find_applicable_accessible_methods_list): Load and
13498         layout the search class if necessary.
13499         (java_complete_tree): Keep to original type of the folded initial
13500         value.
13501
13502 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13503
13504         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13505         Generate error message if circularity is detected. New static
13506         local `list'.
13507         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
13508         * jcf-write.c (generate_bytecode_insns): Very simply handle
13509         SAVE_EXPR.
13510         * parse.y (java_check_circular_reference): Use
13511         `cyclic_inheritance_report' during report, if necessary.
13512         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13513         walking NEW_ARRAY_INIT twice.
13514
13515 2000-02-09  Tom Tromey  <tromey@cygnus.com>
13516
13517         * parse.y (check_class_interface_creation): Allow inner classes to
13518         be `private' or `protected', check modifiers' consistency. Prevent
13519         block local classes from bearing any modifiers.
13520
13521 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13522
13523         * except.c (check_start_handlers): Re-add prototype lost in last
13524         patch.
13525         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13526
13527 2000-02-09  Andrew Haley  <aph@cygnus.com>
13528
13529         * decl.c (clear_binding_level): Remove excess initializer.
13530         (maybe_poplevels): Remove unused variable.
13531         (force_poplevels): Ditto.
13532         (struct binding_level): Add comment.
13533
13534 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13535
13536         * jcf-write.c (generate_classfile): Don't consider
13537         pre-initialization with reference value (use <clinit> instead.)
13538         * parse.y (java_fix_constructors): No generated constructor for
13539         interfaces.
13540         (build_outer_field_access): Removed debug message.
13541         (outer_field_expanded_access_p): Adapted to bytecode generation.
13542         (build_outer_field_access_method): Use fix_method_argument_names.
13543         (build_outer_method_access_method): Fixed indentation. Added
13544         comment. Handle access method generation for static and also void
13545         methods.
13546         (build_access_to_thisn): Inserted debug message.
13547         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13548         (resolve_qualified_expression_name): Fixed comment.
13549         (not_accessible_p): Adapted to bytecode generation. Added comment.
13550         (patch_method_invocation): Added comment.
13551         (maybe_use_access_method): Fixed leading comment. Handle static
13552         methods.
13553         (java_complete_lhs): Don't shortcut handling of initialized upon
13554         declaration String type static fields when generating bytecode.
13555         (patch_unaryop): Handle outer field access when generating
13556         bytecode.
13557
13558 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13559
13560         * java-tree.h (FIELD_THISN): New macro.
13561         * jcf-write.c (append_synthetic_attribute): New function.
13562         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13563         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13564         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13565         this$<n> fields.
13566         (build_outer_field_access): Turned on access functions usage and
13567         generation when compiling to bytecode.
13568         (maybe_use_access_method): Likewise.
13569
13570 2000-01-25  Andrew Haley  <aph@cygnus.com>
13571
13572         * java-except.h (struct eh_range): Add `expanded' field.
13573         (maybe_start_try): Add end_pc arg.
13574         (maybe_end_try): Ditto.
13575         * java-tree.h (force_poplevels): new function.
13576         * expr.c (expand_byte_code): Don't call maybe_start_try or
13577         maybe_end_try.
13578         * except.c (add_handler): Reset expanded.
13579         (expand_start_java_handler): Set expanded.
13580         (check_start_handlers): Don't expand a start handler that's
13581         already been expanded.
13582         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13583         ends after end_pc.
13584         (expand_end_java_handler): call force_poplevels.
13585         (force_poplevels): new function.
13586         * decl.c (binding_level): Add start_pc of binding level.
13587         (maybe_pushlevels): Call maybe_start_try when pushing binding
13588         levels.
13589         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13590         (LARGEST_PC): Define.
13591         (clear_binding_level): Use LARGEST_PC.
13592
13593         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13594         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13595         (binding_depth, is_class_level, current_pc): new variables.
13596         (struct binding_level): ditto.
13597         (indent): new function.
13598         (push_jvm_slot): add debugging info.
13599         (maybe_pushlevels): ditto.
13600         (maybe_poplevels): ditto.
13601         (pushlevel): ditto.
13602         (poplevel): ditto.
13603         (start_java_method): ditto.
13604         (give_name_to_locals): comment only.
13605         * except.c (binding_depth, is_class_level, current_pc):
13606         new variables.
13607         (expand_start_java_handler): add debugging info.
13608         (expand_end_java_handler): ditto.
13609
13610 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13611
13612         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13613         (print_name_for_stub_or_jni, process_file): Constify a char*.
13614
13615 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13616
13617         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13618
13619 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13620
13621         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13622         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13623         defined to be 1.
13624
13625 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13626
13627         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13628         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13629         (struct lang_type): New field `ii_block'.
13630         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13631         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13632         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13633         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13634         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13635         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13636         macros.
13637         * parse.y (add_instance_initializer): New function.
13638         (in_instance_initializer): New static global.
13639         (class_body_declaration:): Link instance initializer block.
13640         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13641         (array_creation_expression:): Remove unused local.
13642         (java_parser_context_push_initialized_field): Fixed leading
13643         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13644         CPC_INSTANCE_INITIALIZER_LIST.
13645         (java_parser_context_pop_initialized_field): Likewise.
13646         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13647         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13648         CPC_INITIALIZER_STMT.
13649         (fix_constructors): New local `class_type'. Use it. Call
13650         add_instance_initializer.
13651         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13652         (patch_return): Forbid return in instance initializers.
13653         (patch_throw_statement): Enforce exception handling in the context
13654         of instance initializers.
13655
13656 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13657
13658         * Make-lang.in (java.mostlyclean): Remove executables in
13659         `mostlyclean'.
13660
13661 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13662
13663         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13664         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13665         (java_float_finite): Convert to use union Word from javaop.h.
13666         (java_double_finite): Convert to use union DWord from javaop.h.
13667
13668 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13669
13670         * gjavah.c (options): Added `jni' entry.
13671         (help): Document -jni.
13672         (flag_jni): New global.
13673         (process_file): Handle JNI output.  Don't print text from
13674         -prepend, -add, etc, when generating stubs.  Only remove `.class'
13675         suffix if it actually exists.
13676         (main): Create a `.c' file when run with `--jni --stubs'.  Create
13677         correct output file name with `--jni'.
13678         (print_include): Mangle header name differently in JNI case.
13679         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
13680         method list.
13681         (print_method_info): Handle JNI case.  Put signature info into
13682         method name.  Handle case when STREAM is NULL.
13683         (print_name_for_stub_or_jni): New function.
13684         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
13685         (print_cxx_classname): Handle JNI.
13686         (print_full_cxx_name): Likewise.
13687         (decode_signature_piece): Likewise.
13688         (overloaded_jni_method_exists_p): New function.
13689         (struct method_name): Added `signature' and `sig_length' fields.
13690         (HANDLE_END_FIELD): Do nothing in JNI mode.
13691
13692 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13693
13694         * jv-scan.c: Include version.c, <getopt.h>.
13695         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
13696         (options): New array.
13697         (usage): New function.
13698         (version): New function.
13699         (main): Use getopt_long to parse command line.
13700         * jcf-dump.c: Include version.c, <getopt.h>.
13701         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
13702         OPT_JAVAP): New macros.
13703         (options): New array.
13704         (usage): Return `void'.  Changed message.
13705         (help): New function.
13706         (version): New function.
13707         (main): Use getopt_long_only to parse command line.
13708         * gjavah.c: Include <getopt.h>.
13709         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
13710         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
13711         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
13712         (options): New array.
13713         (java_no_argument): Removed.
13714         (help): Updated with missing options.
13715         (main): Use getopt_long_only to parse command line.
13716         (usage): Changed message.
13717
13718 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13719
13720         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
13721         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
13722         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
13723         * parse.y (array_creation_expression:): Handle anonymous arrays.
13724         (build_array_from_name): Don't set `ret_name' if null.
13725         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
13726         (qualify_ambiguous_name): Likewise.
13727         (java_complete_expand_class): Likewise.
13728
13729 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13730
13731         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
13732         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
13733         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
13734         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
13735         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
13736         AIPL_FUNCTION_COMPLETED_INVOCATION.
13737         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
13738         AIPL_FUNCTION_INVOCATION_READY.
13739         (AIPL_FUNCTION_DECLARATION): New enum entry.
13740         * parse.y (reorder_static_initialized): New function.
13741         (java_parser_context_pop_initialized_field): Use it.
13742         (add_inner_class_fields): Use
13743         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
13744         augmented. Install marker after last alias initializer, if any.
13745         (generate_finit): Fixed typo. Don't try to retain only the used
13746         fields.
13747         (method_header): Compute and set DECL_FUNCTION_NAP.
13748         (method_declarator): Fixed comment. Insert alias initializer in
13749         parameter list.
13750         (build_alias_initializer_parameter_list): Fixed leading
13751         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
13752         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
13753         (java_complete_expand_class): Code to retain only used aliases
13754         removed.
13755         (java_complete_expand_methods): New local `first_decl'. Generate
13756         $finit$ first, then expand the constructors, regular methods and
13757         <clinit>.
13758         (java_complete_expand_method): Don't report error on missing
13759         return statement if previously detected bogus.
13760         (fix_constructors): Don't patch constructor parameters list.
13761         (patch_method_invocation): Use new AIPL enum values. Reverse
13762         alias initializer list for anonymous classes.
13763
13764 2000-01-30  Anthony Green  <green@redhat.com>
13765
13766         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
13767         determine how many stack slots to pop.
13768
13769 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13770
13771         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
13772         error handling/recovery.
13773         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
13774
13775 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13776
13777         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
13778         FIELD_LOCAL_ALIAS_USED): New macros.
13779         (DECL_FUNCTION_NAP): New macro.
13780         (struct lang_decl): New field `nap'.
13781         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
13782         (struct lang_type): New fields `finit_stmt_list' and
13783         `clinit_stmt_list'.
13784         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
13785         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
13786         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
13787         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
13788         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
13789         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
13790         (BUILD_THROW): Macro line separator re-indented.
13791         * parse.y (end_class_declaration): New function.
13792         (maybe_generate_pre_expand_clinit): New name for
13793         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
13794         pre-expand static fields.
13795         (maybe_generate_clinit): Function deleted.
13796         (check_for_static_method_reference): Prototype's parameter list
13797         indented.
13798         (generate_finit): New name for maybe_generate_finit. Changed
13799         leading comment. Function rewritten to use
13800         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
13801         (build_alias_initializer_parameter_list): New function.
13802         (java_parser_context_pop_initialized_field): Likewise.
13803         (add_inner_class_fields): Likewise.
13804         (type_declaration:): Call end_class_declaration.
13805         (class_member_declaration:): Likewise.
13806         (formal_parameter_list:): Fixed typos.
13807         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
13808         element. Improved error handling.
13809         (block_statement:): Call end_class_declaration.
13810         (anonymous_class_creation:): Likewise.
13811         (create_anonymous_class): Fixed comments.
13812         (create_class): Call add_inner_class_fields.
13813         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
13814         (method_header): Use MARK_FINAL_PARMS.
13815         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
13816         (method_declarator): Propagate final argument flag.
13817         (craft_constructor): New local `artificial'. Call
13818         build_alias_initializer_parameter_list. Use
13819         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
13820         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
13821         necessary.
13822         (complete_expand_class): Get rid of unused outer context local
13823         alias fields.
13824         (java_complete_expand_methods): Fixed leading
13825         comment. Generate/pre-expand <clinit> first. Changed method
13826         expansion order to regular, $finit$, constructors, <clinit>.
13827         (java_complete_expand_method): Set current_function_decl.
13828         (fix_constructors): Fix constructor parameter list to account for
13829         outer context local alias initializers.
13830         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13831         (resolve_expression_name): Lookup outer context local aliases. New
13832         local `access', use it.
13833         (patch_method_invocation): Patch inner class ctor invocation with
13834         outer context local aliases initialization values. $finit$
13835         invocation patching now includes things generated with
13836         build_alias_initializer_parameter_list.
13837         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
13838         (build_super_invocation): Likewise.
13839         (patch_assignment): Changed comment.
13840
13841 2000-01-27  Andrew Haley  <aph@cygnus.com>
13842
13843         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
13844         (emit_if): Ditto.
13845         (emit_jsr): Ditto.
13846
13847 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13848
13849         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
13850         concatenation.
13851         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
13852
13853         * parse.y (register_fields): Don't pass a format specifier to
13854         OBSOLETE_MODIFIER_WARNING.
13855         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
13856         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
13857         specifier.
13858         (check_modifiers): Change function into a macro.
13859         (check_class_interface_creation): Pass a literal format string.
13860
13861 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13862
13863         * buffer.h: PROTO -> PARAMS.
13864         * check-init.c: Likewise.
13865         * class.c: Likewise.
13866         * constants.c: Likewise.
13867         * convert.h: Likewise.
13868         * decl.c: Likewise.
13869         * except.c: Likewise.
13870         * expr.c: Likewise.
13871         * gjavah.c: Likewise.
13872         * java-except.h: Likewise.
13873         * java-tree.h: Likewise.
13874         * jcf-depend.c: Likewise.
13875         * jcf-dump.c: Likewise.
13876         * jcf-parse.c: Likewise.
13877         * jcf-path.c: Likewise.
13878         * jcf-reader.c: Likewise.
13879         * jcf-write.c: Likewise.
13880         * jcf.h: Likewise.
13881         * jv-scan.c: Likewise.
13882         * jvgenmain.c: Likewise.
13883         * jvspec.c: Likewise.
13884         * lang.c: Likewise.
13885         * lex.c: Likewise.
13886         * lex.h: Likewise.
13887         * parse-scan.y: Likewise.
13888         * parse.h: Likewise.
13889         * parse.y: Likewise.
13890         * typeck.c: Likewise.
13891         * verify.c: Likewise.
13892         * xref.c: Likewise.
13893         * xref.h: Likewise.
13894         * zextract.c: Likewise.
13895         * zipfile.h: Likewise.
13896
13897 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13898
13899         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13900         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
13901         * constants.c (build_constant_data_ref): Check for cached
13902         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
13903         in TYPE_CPOOL_DATE_REF.
13904         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
13905         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
13906         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
13907         (LOCAL_FINAL): New macro.
13908         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
13909         constant pool -- don't try to reuse.
13910         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
13911         TYPE_LANG_SPECIFIC.
13912         (find_in_current_zip): Use TYPE_JCF.
13913         * parse.h (java_check_final): Prototype removed.
13914         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
13915         (maybe_create_class_interface_decl,
13916         check_class_interface_creation): Likewise.
13917         (java_expand_finals): Function removed.
13918         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
13919         (block_statement:): Fixed comment.
13920         (anonymous_class_creation:): Likewise.
13921         (check_class_interface_creation): Reversed Jan 12, 2000 extra
13922         argument patch.
13923         (check_class_interface_creation): Loosened error report on (inner)
13924         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
13925         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
13926         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
13927         argument patch.
13928         (create_interface): Likewise.
13929         (anonymous_class_counter): New static global.
13930         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
13931         patch. Fixed comments.
13932         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
13933         anonymous_class_counter when declaring a toplevel class.
13934         (craft_constructor): Fixed constructor name when handling
13935         anonymous classes. Anonymous class constructors to feature hidden
13936         this$<n> parameter.
13937         (java_fix_constructors): Added comment.
13938         (java_check_final): Function removed.
13939         (java_complete_expand_methods): Fixed comment. Don't generate
13940         class data, save its outgoing constant pool instead.
13941         (verify_constructor_super): Skip anonymous class constructor
13942         hidden this$<n> parameter.
13943         (java_expand_classes): New local `saved_ctxp'. Removed call to
13944         java_expand_finals and java_check_final. Expand anonymous class
13945         constructors. Generate class data.
13946         (build_super_invocation): Skip anonymous class hidden this$<n>
13947         parameter.
13948         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
13949         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
13950         (set_java_signature): Likewise.
13951
13952 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13953
13954         * gjavah.c: Delete ACC_VISIBILITY define.
13955         * jcf.h: Add ACC_VISIBILITY define.
13956         * parse.y: final: rule tagged <value>.
13957         (java_check_regular_methods): Use ACC_VISIBILITY define for
13958         default package access check.
13959         (local_variable_declaration_statement): Use final: rule.
13960
13961 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13962
13963         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
13964         (final:): New rule.
13965
13966 2000-01-17  Tom Tromey  <tromey@cygnus.com>
13967
13968         * gjavah.c (print_field_info): Allow non-static final fields.
13969
13970 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13971
13972         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
13973         * parse.y (patch_anonymous_class): New function.
13974         (create_anonymous_class): Register incomplete type when the
13975         class/interface to extends/implement isn't known yet.
13976         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
13977         (verify_constructor_super): Tuned error message.
13978
13979 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13980
13981         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
13982         (ANONYMOUS_CLASS_P): New macro.
13983         (TYPE_SIGNATURE, TYPE_JCF): New macros.
13984         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
13985         * parse.y (create_class): Added leading argument.
13986         (maybe_create_class_interface_decl,
13987         check_class_interface_creation): Likewise.
13988         (craft_constructor): New function.
13989         (verify_constructor_super): Added argument in prototype.
13990         (class_declaration:): Inserted leading argument.
13991         (for_begin:): Use FOR_LOOP_P.
13992         (anonymous_class_creation): Create WFL of the anonymous class to
13993         instantiate. Call build_new_invocation. Added comments.
13994         (check_class_interface_creation): Handle parameter `anonymous' in
13995         verbose mode class creation announce.
13996         (link_nested_class_to_enclosing): Exclude anonymous classes.
13997         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
13998         anonymous class, even though they appear to have an enclosing
13999         context.
14000         (create_interface): Pass extra argument to
14001         check_class_interface_creation.
14002         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14003         (create_class): Call check_class_interface_creation and
14004         maybe_create_class_interface_decl with extra new argument. Don't
14005         add private this$<n> to anonymous classes.
14006         (method_declarator): Insert hidden this$<n> to anonymous class
14007         constructors.
14008         (java_fix_constructors): Deleted code creating default
14009         constructor. Call craft_constructor instead.
14010         (java_check_regular_methods): Set `saw_constructor' to 1 for
14011         anonymous classes.
14012         (fix_constructors): Pass extra argument to verify_constructor_super.
14013         (verify_constructor_super): New local `sdecl', use it. Search for
14014         matching constructor (possibly featuring arguments) in super
14015         class.
14016         (lookup_method_invoke): Craft constructor according to arguments
14017         list when dealing with anonymous class constructors.
14018         (build_super_invocation): Pass arguments to anonymous class super
14019         constructors.
14020         (search_loop): Use FOR_LOOP_P.
14021         (labeled_block_contains_loop_p): Likewise.
14022
14023 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14024
14025         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14026         (enclosing_context_p): New function.
14027         (get_access_flags_from_decl): Handle CLASS_STATIC.
14028         (maybe_layout_super_class): Extra first argument passed to
14029         do_resolve_class.
14030         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14031         ID_INIT_P.
14032         * decl.c (access0_identifier_node): New global.
14033         (init_decl_processing): access0_identifier_node initialized.
14034         (pushdecl): Set DECL_CONTEXT only on non type decls.
14035         * expr.c (lookup_field): Lookup inner class fields in enclosing
14036         contexts.
14037         (expand_invoke): Use ID_INIT_P.
14038         (expand_java_field_op): Use DECL_CLINIT_P.
14039         * java-tree.def (CLASS_LITERAL): New tree code.
14040         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14041         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14042         (struct lang_decl): New field `inner_access'.
14043         (enclosing_context_p): Prototyped.
14044         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14045         ID_CLINIT_P): New macros.
14046         (CLASS_STATIC): New macro.
14047         (CLASS_ACCESS0_GENERATED_P): New macro.
14048         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14049         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14050         INNER_CLASS_P): New macros.
14051         (DECL_INNER_CLASS_LIST): New macro.
14052         * jcf-parse.c (yyparse): Avoid the use of ANSI string
14053         concatenation.
14054         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14055         the shift value to int. Fixed typo in comment.
14056         * lex.c (inst_id, wpv_id): Initialize.
14057         * mangle.c (unicode_mangling_length): Take `$' into account.
14058         * parse.h (DRECOVER, RECOVER): Terminate properly.
14059         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14060         (typedef struct _jdep): New field `enclosing'.
14061         (JDEP_ENCLOSING): New macro.
14062         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14063         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14064         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14065         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14066         GET_ENCLOSING_CPC_CONTEXT): New macros.
14067         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14068         (do_resolve_class): Added extra argument in prototype.
14069         * parse.y (resolve_class): Added extra argument in prototype.
14070         (maybe_create_class_interface_decl): Likewise.
14071         (maybe_use_access_method, build_wfl_wrap): New functions.
14072         (java_complete_expand_classes, java_complete_expand_class):
14073         Likewise.
14074         (java_parser_context_push_initialized_field,
14075         java_parser_context_suspend, java_parser_context_resume):
14076         Likewise.
14077         (maybe_make_nested_class_name, make_nested_class_name,
14078         set_nested_class_simple_name_value,
14079         link_nested_class_to_enclosing, find_as_inner_class,
14080         find_as_inner_class_do, check_inner_class_redefinition,
14081         build_thisn_assign, build_current_thisn, build_access_to_thisn,
14082         maybe_build_thisn_access_method, build_outer_field_access,
14083         build_outer_field_access_methods, build_outer_field_access_expr,
14084         build_outer_method_access_method, build_new_access_id,
14085         build_outer_field_access_method, outer_field_access_p,
14086         outer_field_expanded_access_p, outer_field_access_fix,
14087         build_incomplete_class_ref, patch_incomplete_class_ref,
14088         create_anonymous_class): Likewise.
14089         (inst_id, wpv_id): New static global variables.
14090         (synchronized:): New rule, tagged <node>.
14091         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14092         rules.
14093         (anonymous_class_creation:): New rule, tagged <node>.
14094         (NEW_TK): Tagged <node>.
14095         (type_literals, array_type_literal): New rules, tagged <node>.
14096         (class_declaration:): Removed action when reducing by class_body:
14097         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14098         using GET_CPC in sub-rules.
14099         (class_member_declaration): Handle inner classes.
14100         (method_declaration): When reducing method_header:, reset
14101         current_function_decl when appropriate.
14102         (method_declarator:): Set the number of formal parameter to 0 for
14103         method declared without arguments.
14104         (constructor_declarator:): Likewise.
14105         (static_initializer:): List of elements kept in a list.
14106         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14107         use of the keyword `static' for type declarations.
14108         (block_statement:): Handle inner class declarations.
14109         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14110         type qualified `this'.
14111         (class_instance_creation_expression): Use anonymous_class_creation:
14112         to handle inner class instances creation. Handle qualified `new'.
14113         (something_dot_new): Added appropriate actions.
14114         (create_new_parser_context): New function.
14115         (java_push_parser_context, java_parser_context_save_global,
14116         java_parser_context_suspend): Use create_new_parser_context.
14117         (check_modifiers): Changed leading comment.
14118         (check_class_interface_creation): Handle interclasses.
14119         (add_superinterfaces): Fixed comment.
14120         (create_interface): Build qualified name from the raw_name instead
14121         of its matching WFL. Push the initialized fields list. raw_name added
14122         as an extra argument to maybe_create_class_interface_decl.
14123         (create_class): Build qualified name from the raw_name instead of
14124         its matching WFL. Removed assignment to current_parsed_class_un.
14125         Call PUSH_ERROR before returning an error. Suspend the current
14126         parser context when processing an inner class. Push the
14127         initialized fields list. raw_name added as an extra argument to
14128         maybe_create_class_interface_decl. Add the private this$<n>
14129         field.
14130         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14131         (register_fields): Get the class type from GET_CPC and handle
14132         previous errors.  Added code to handle the creation of static
14133         fields in inner classes. Initialized fields initialization
14134         statements kept in a list of lists.
14135         (maybe_generate_finit): Initialized fields initialization
14136         statements kept in a list of lists. Use GET_CPC.
14137         (maybe_generate_clinit): Likewise.
14138         (method_header): Use GET_CPC and GET_CPC_UN.
14139         (parser_qualified_classname): Handle inner classes.
14140         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14141         (java_fix_constructors): Hide pointer to enclosing context
14142         instance in constructor list when dealing with inner classes.
14143         (jdep_resolve_class): Call resolve_class with extra first argument
14144         JDEP_ENCLOSING.
14145         (resolve_class): Add enclosing context as a first extra argument
14146         to do_resolve_class.
14147         (do_resolve_class): Call find_as_inner_class. Handle WFLs
14148         properly.
14149         (resolve_no_layout): Extra argument added to resolve_class
14150         invocation.
14151         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14152         (java_get_real_method_name): Use GET_CPC_UN.
14153         (check_abstract_method_definitions): Use DECL_CLINIT_P.
14154         (java_check_abstract_methods): Handle static method declared in
14155         inner classes by an error.
14156         (java_check_regular_methods): Use DECL_CLINIT_P.
14157         (source_start_java_method): Also set DECL_MAX_LOCALS.
14158         (create_artificial_method): Call java_parser_context_save_global
14159         and java_parser_context_restore_global instead of saving/restoring
14160         the context by hand.
14161         (expand_start_java_method): Improved verbose mode message.
14162         (java_complete_expand_methods): Fixed leading comment. Use
14163         DECL_CLINIT_P.
14164         (fix_constructors): Added assignment to this$<n> if necessary.
14165         (java_expand_classes): Call java_complete_expand_classes instead
14166         of java_complete_expand_methods.
14167         (make_qualified_primary): Simplified.
14168         (merge_qualified_name): Optimized for missing left or right parts.
14169         (resolve_expression_name): Handle access to outer class fields from
14170         interclasses.
14171         (resolve_qualified_expression_name): New macro
14172         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14173         classes. Report error on non appropriate qualification of
14174         `new'. Handle qualified `this'.
14175         (not_accessible_p): Allow access to outer class private fields from
14176         inner classes.
14177         (patch_method_invocation): Handle method invocations through
14178         access methods and inner class constructor invocations.
14179         (find_applicable_accessible_methods_list): Search enclosing
14180         contexts of an inner class.
14181         (search_applicable_methods_list): Fixed typo.
14182         (argument_types_convertible): Handle inner class constructors'
14183         hidden outer context reference argument.
14184         (qualify_ambiguous_name): Handle qualified `this'.
14185         (java_complete_lhs): Handle use of field accessed through
14186         artificial access methods in various cases of assignments. Handle
14187         CLASS_LITERAL node.
14188         (check_final_assignment): Use DECL_CLINIT_P.
14189         (valid_ref_assignconv_cast_p): Handle the destination being an
14190         enclosing context of the source.
14191         (patch_unaryop): Handle use of field accessed through artificial
14192         access methods.
14193         (patch_return): Use DECL_CLINIT_P.
14194         (patch_throw_statement): Use DECL_CLINIT_P.
14195         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14196         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14197         ID_INIT_P.
14198
14199 2000-01-16  Anthony Green  <green@cygnus.com>
14200
14201         * parse.y (build_string_concatenation): Only use
14202         StringBuffer(String) shortcut if String arg is constant.
14203
14204 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14205
14206         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14207         the shift value to int. Fixed typo in comment.
14208
14209 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
14210
14211         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14212         * jcf-write.c: Likewise.
14213         * parse.y: Likewise.
14214         * parse.c: Regenerate.
14215
14216 2000-01-09  Anthony Green  <green@cygnus.com>
14217
14218         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14219         bytecodes in the correct order.
14220
14221 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14222
14223         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14224
14225 2000-01-06  Anthony Green  <green@cygnus.com>
14226
14227         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14228         before building constant array decl.
14229
14230 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14231
14232         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14233         method invocation and typo in conditional expression.
14234         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14235         the appropriate NOTE_POP.
14236         * parse.y (patch_binop): Shift value mask to feature the right
14237         type.
14238
14239 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14240
14241         * class.c (assume_compiled, assume_compiled_node): Add static
14242         prototype.
14243         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14244
14245         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14246
14247         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14248
14249         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14250         to `__modifier' to avoid stringifying it.
14251
14252         * parse.y (verify_constructor_circularity): Don't call a variadic
14253         function with a non-literal format string.
14254         (java_check_abstract_methods): Move unreachable code inside
14255         `continue' statement.
14256         (lookup_method_invoke): Call xstrdup, not strdup.
14257
14258         * expr.c (expand_java_field_op): Avoid the use of ANSI string
14259         concatenation.
14260
14261         * jcf-parse.c (yyparse): Likewise.
14262
14263         * jv-scan.c (main): Likewise.
14264
14265 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14266
14267         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14268         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14269         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14270         concatenation.
14271
14272         * parse.y (synchronized, variable_redefinition_error,
14273         check_class_interface_creation, create_interface, create_class,
14274         method_header, finish_method_declaration,
14275         check_modifiers_consistency, method_declarator,
14276         complete_class_report_errors, check_abstract_method_definitions,
14277         java_check_regular_methods, check_throws_clauses,
14278         java_check_abstract_methods, read_import_dir,
14279         check_pkg_class_access, declare_local_variables, fix_constructors,
14280         cut_identifier_in_qualified, resolve_expression_name,
14281         resolve_qualified_expression_name, patch_method_invocation,
14282         java_complete_lhs, patch_assignment, try_builtin_assignconv,
14283         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14284         patch_exit_expr, patch_exit_expr, patch_switch_statement,
14285         patch_try_statement, patch_synchronized_statement,
14286         patch_throw_statement, check_thrown_exceptions,
14287         patch_conditional_expr): Likewise.
14288
14289 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14290
14291         * Makefile.in (LIBDEPS): Added gcc's errors.o
14292         (../jcf-dump$(exeext):): Link with gcc's errors.o
14293         (../gcjh$(exeext):): Likewise.
14294         * expr.c (expand_java_NEW): Layout the entire target type instead of
14295         laying out its methods only.
14296         (lookup_field): Layout the class after having loaded it.
14297         * java-tree.h (java_debug_context): Declared.
14298         * jcf-io.c (toplev.h): Included.
14299         (find_class): Removed assignment to jcf's outofsynch
14300         field. Force source file to be read if newer than its matching
14301         class file. Tweaked debug messages.
14302         * jcf-parse.c (jcf_out_of_synch): Deleted.
14303         (read_class): Call to jcf_out_of_synch removed.
14304         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14305         (jcf_out_of_synch): Prototype deleted.
14306         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14307         `deprecated' and `class_err': integer turned into bit-fields.
14308         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14309         * parse.y (package_list): New global.
14310         (package_declaration:): Record newly parsed package name.
14311         (extra_ctxp_pushed_p): Static global deleted.
14312         (java_parser_context_save_global): Create buffer context for the
14313         purpose of saving globals, if necessary.
14314         (java_parser_context_restore_global): Pop context pushed for the
14315         purpose of saving globals, if necessary.
14316         (java_debug_context_do): New prototype and function.
14317         (java_debug_context): Likewise.
14318         (do_resolve_class): Use already parsed package names to qualify
14319         and lookup class candidate.
14320         (java_pre_expand_clinit): Removed unnecessary local variable.
14321
14322 1999-12-17  Tom Tromey  <tromey@cygnus.com>
14323
14324         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
14325         fixes PR gcj/119.
14326         (process_file): Use `\n\' at end of each line in string.
14327
14328 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14329
14330         * expr.c (expand_invoke): Layout the loaded class before
14331         attempting to use it.
14332         (expand_java_field_op): Allow final field assignments to take
14333         place in $finit$.
14334         * typeck.c (convert): Return error_mark_node if expr is null.
14335
14336 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14337
14338         * class.c (class_depth): Return -1 if the class doesn't load
14339         properly.
14340         * expr.c (can_widen_reference_to): Check for errors during depth
14341         computation and return 0 accordingly.
14342         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14343         create default constructors and add an other error check.
14344         * parse.h (java_fix_constructors): Prototyped.
14345         * parse.y (java_pre_expand_clinit): Likewise.
14346         (build_super_invocation): Re-prototyped to feature one argument.
14347         (java_check_circular_reference): Directly use `current'.
14348         (java_fix_constructors): New function.
14349         (java_check_regular_methods): Don't create default constructors
14350         here, but abort if none were found.
14351         (java_complete_expand_methods): Pre-process <clinit> calling
14352         java_pre_expand_clinit.
14353         (java_pre_expand_clinit): New function.
14354         (fix_constructors): build_super_invocation invoked with the
14355         current method declaration as an argument.
14356         (build_super_invocation): Use the context of the processed method
14357         decl argument instead of current_class.
14358         * typeck.c (lookup_java_method): Take WFLs in method names into
14359         account.
14360
14361 1999-12-14  Per Bothner  <per@bothner.com>
14362
14363         * class.c (make_class_data): flag_keep_inline_functions to keep
14364         private methods in the method array.
14365
14366 1999-12-15  Anthony Green  <green@cygnus.com>
14367
14368         * check-init.c (check_init): Take into account both types of
14369         `throw's when checking for uninitialized variables.
14370
14371 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14372
14373         * parse.y (java_complete_lhs): Force conversion of array
14374         dimensions to int_type_node, that's what runtime's ABI expects.
14375
14376 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14377
14378         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14379         operand of a WFL, until the Java front-end gets fixed with regard
14380         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14381
14382 1999-12-10  Andrew Haley  <aph@cygnus.com>
14383
14384         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14385         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14386         expr.c (build_java_athrow): Add support for sjlj-exceptions.
14387         java-tree.h: Ditto.
14388         jcf-write.c: Ditto.
14389
14390 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14391
14392         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14393         before calling expand_eh_region_start and expand_start_all_catch.
14394         * except.c (expand_start_java_handler): Switch to permanent
14395         obstack before calling expand_eh_region_start.
14396         (expand_end_java_handler): Switch to permanent obstack before
14397         calling expand_start_all_catch.
14398
14399 1999-12-5  Anthony Green  <green@cygnus.com>
14400
14401         * decl.c (init_decl_processing): Mark throw_node as a noreturn
14402         function with side effects.
14403         (init_decl_processing): Mark all memory allocating DECLs with
14404         DECL_IS_MALLOC.
14405
14406 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14407
14408         * except.c (expand_end_java_handler): Call
14409         expand_resume_after_catch and end_catch_handler.
14410
14411 1999-11-30  Anthony Green  <green@cygnus.com>
14412
14413         * verify.c (verify_jvm_instructions): Create new return label
14414         chain if non existent (don't rely on the verified state of the jsr
14415         target.)
14416
14417 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14418
14419         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14420         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14421
14422         * parse.y (patch_assignment): Removed bogus final class test on
14423         lhs when checking on whether to emit an ArrayStoreException runtime
14424         check.
14425         * expr.c (expand_java_arraystore): Likewise.
14426
14427 1999-11-28 Anthony Green <green@cygnus.com>
14428
14429         * decl.c (find_local_variable): Reuse single slot decls when
14430           appropriate.
14431
14432 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14433
14434         * jcf-parse.c (saw_java_source): Global variable removed.
14435         (read_class): Don't use `saw_java_source'. Added extra braces.
14436         (yyparse): Code setting `saw_java_source' removed.
14437
14438 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
14439
14440         * except.c (emit_handlers): Zero catch_clauses after emitting them.
14441
14442 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14443
14444         * verify.c (merge_type_state): Non verified subroutines being
14445         considered more than once to trigger passive type merge.
14446
14447 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14448
14449         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14450         in case of error. Error message tuned.
14451
14452 1999-11-21  Anthony Green  <green@cygnus.com>
14453
14454         * constants.c (find_methodref_index): Unwrap method names before
14455         inserting them in the constant pool.
14456
14457         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14458
14459         * class.c (assume_compiled_node): New typedef.
14460         (assume_compiled_tree): New static data.
14461         (find_assume_compiled_node): New function.
14462         (add_assume_compiled): New function.
14463         (assume_compiled): New function.
14464         * class.c (make_class_data): Use assume_compiled.
14465         (is_compiled_class): Use assume_compiled.
14466
14467         * java-tree.h (add_assume_compiled): Declare.
14468
14469         * lang.c (lang_decode_option): Parse new options.
14470
14471 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14472
14473         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14474         int_type_node: that's what `_Jv_AllocObject' expects.
14475
14476 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14477
14478         * parse.y (lookup_method_invoke): Use lang_printable_name to
14479         reliably build the type name during error report. Fixes PR gcj/97.
14480
14481 1999-11-09  Tom Tromey  <tromey@cygnus.com>
14482
14483         * jcf-path.c: Include <sys/stat.h>.
14484         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
14485         (DIR_UP): New macro.
14486
14487 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14488
14489         * parse.y (source_end_java_method): Resume permanent allocation,
14490         reversing Apr 27 1998 patch.
14491         (patch_string_cst): Pop obstacks after having pushed the permanent
14492         ones.
14493
14494 1999-11-05  Tom Tromey  <tromey@cygnus.com>
14495
14496         * class.c (finish_class): Emit inlined methods if any native
14497         methods exist in the class.  Fixes PR gcj/85.
14498
14499 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14500
14501         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14502         (qualify_ambiguous_name): Likewise.
14503
14504 1999-11-03  Godmar Back <gback@cs.utah.edu>
14505
14506         * typeck.c: (lookup_java_method):  search all inherited
14507         interfaces when looking up interface method.
14508
14509 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14510
14511         * parse.y (method_header:): Issue error message for rule `type
14512         error'.
14513         (synchronized:): Error report when not using synchronized.
14514
14515 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14516
14517         * parse.y (resolve_qualified_expression_name): Prevent `this' from
14518         being used before the superclass constructor has been called.
14519         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14520         instead of `CALL_THIS_CONSTRUCTOR_P'.
14521
14522 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14523
14524         * check-init.c: Fix typo in comment.
14525
14526 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14527
14528         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14529         and final method.
14530
14531 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14532
14533         * parse.y (expression_statement:): Call function to report
14534         improper invocation of a constructor.
14535         (parse_ctor_invocation_error): New function.
14536
14537 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14538
14539         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14540         remember_end_note.
14541
14542 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14543
14544         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14545         in generated `main'.
14546
14547 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14548
14549         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14550         (qualify_ambiguous_name): Likewise.
14551
14552 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14553
14554         * parse.y (java_complete_tree): fold_constant_for_init to work on
14555         permanent_obstack.
14556         (java_complete_lhs): Likewise.
14557         (array_constructor_check_entry): Complete an initializer element
14558         on permanent_obstack.
14559
14560 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14561
14562         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14563         From Mike Moreton <mike@pillim.demon.co.uk>.
14564
14565 1999-10-15  Greg McGary  <gkm@gnu.org>
14566
14567         * java-tree.h (flag_bounds_check): Remove extern decl.
14568         * lang.c (flag_bounds_check): Remove global variable.
14569         (lang_f_options): Remove "bounds-check" entry.
14570         (lang_init_options): Default flag_bounds_check to "on".
14571
14572 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14573
14574         * jvgenmain.c (usage): New function.
14575         (main): Use it.  Also, handle `-D' options.
14576         * jvspec.c (lang_specific_driver): Recognize -D.
14577         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14578
14579         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14580
14581 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14582
14583         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14584         variadic function with a non-literal format string.
14585
14586         * parse-scan.y (report_main_declaration): Likewise.
14587
14588         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14589
14590         * parse.y (read_import_dir, patch_assignment, patch_binop,
14591         patch_array_ref): Likewise.
14592
14593         * typeck.c (build_java_array_type): Likewise.
14594
14595         * verify.c (verify_jvm_instructions): Likewise.
14596
14597 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14598
14599         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14600
14601 1999-10-07  Anthony Green  <green@cygnus.com>
14602
14603         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14604         where CHECK_PUT may fail for valid reasons.
14605
14606         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14607         UNSAFE_PUTN): New macros.
14608
14609 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14610
14611         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14612         well.  Fixes Java PR gcj/59.
14613         * parse-scan.y (yyerror): Report errors.
14614
14615 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14616
14617         * decl.c (insert_block): Remove unconditional `abort'.
14618
14619 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14620
14621         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14622         FUNCTION_CODE now of type int.  All callers changed.
14623         Set the builtin's DECL_BUILT_IN_CLASS.
14624
14625 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14626
14627         * jvspec.c (lang_specific_driver): Don't read spec file if
14628         -fsyntax-only given.
14629
14630 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14631
14632         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14633
14634         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14635         (WORDS_TO_LONG): Likewise.
14636         (WORDS_TO_DOUBLE): Likewise.
14637
14638 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14639
14640         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14641         (RELOCATION_VALUE_1): Likewise.
14642         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14643         push_in_const, push_long_const): Prototyped.
14644         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14645         (push_constant2): Likewise.
14646         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14647         (find_constant_wide): Cast find_constant2's integer arguments to
14648         `jword'.
14649         (find_constant_index): Cast find_constant2's and find_constant2's
14650         integer arguments to `jword'.
14651         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14652         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14653         (emit_if): Use RELOCATION_VALUE_1.
14654         (emit_goto): Likewise.
14655         (emit_jsr): Likewise.
14656         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14657         argument to push_long_const to HOST_WIDE_INT.
14658
14659 1999-09-15  Andreas Schwab  <schwab@suse.de>
14660
14661         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14662
14663 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14664
14665         * lang.c (lang_decode_option): Extend comment.
14666
14667 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14668
14669         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14670         instead of fndecl.
14671
14672 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14673
14674         * gjavah.c (get_field_name, print_method_info, print_include,
14675         add_namelet): Use xmalloc, not malloc.
14676
14677         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
14678         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
14679         NULL pointer.
14680
14681         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
14682
14683         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
14684
14685         * jcf-path.c (add_entry): Likewise.
14686
14687         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
14688
14689         * jv-scan.c (xmalloc): Remove definition.
14690
14691         * jvgenmain.c (xmalloc): Likewise.
14692
14693         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
14694
14695         * lex.c (java_store_unicode): Use xrealloc, not realloc.
14696
14697         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
14698         concat, not xmalloc/sprintf.
14699         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
14700         (xstrdup): Remove definition.
14701
14702         * parse.y (duplicate_declaration_error_p,
14703         constructor_circularity_msg, verify_constructor_circularity,
14704         check_abstract_method_definitions, java_check_regular_methods,
14705         java_check_abstract_methods, patch_method_invocation,
14706         check_for_static_method_reference, patch_assignment, patch_binop,
14707         patch_cast, array_constructor_check_entry, patch_return,
14708         patch_conditional_expr): Use xstrdup, not strdup.
14709
14710         * zextract.c (ALLOC): Use xmalloc, not malloc.
14711
14712 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14713
14714         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
14715
14716         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
14717         (do_spec, lang_specific_pre_link, lang_specific_driver,
14718         input_filename, input_filename_length): Don't declare.
14719         (main_class_name, jvgenmain_spec, lang_specific_driver):
14720         Constify a char*.
14721         (lang_specific_driver): All calls to the function pointer
14722         parameter now explicitly call `fatal'.
14723
14724 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14725
14726         * parse.y (find_applicable_accessible_methods_list): Search
14727         abstract classes as interfaces.
14728
14729 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14730
14731         * class.c (finish_class): We're now outside a valid method
14732         declaration. Tell the rest of gcc so.
14733
14734 1999-09-08  Bruce Korb  autogen@linuxbox.com
14735
14736         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
14737
14738 1999-09-07  Tom Tromey  <tromey@cygnus.com>
14739
14740         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
14741         java-array.h.
14742         (decode_signature_piece): Don't emit "::" in JArray<>.
14743         (print_namelet): Only print trailing `;' when printing a class.
14744
14745 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
14746
14747         * java-tree.h: Delete declarations for all tree nodes now moved to
14748         global_trees.
14749         * decl.c: Delete their definitions.
14750
14751 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
14752
14753         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
14754         * Makefile.in (OBJS): Add ggc-callbacks.o.
14755         (OBJDEPS): Likewise.
14756
14757 1999-09-03  Tom Tromey  <tromey@cygnus.com>
14758
14759         * parse.y (strip_out_static_field_access_decl): Return operand if
14760         it satisfies JDECL_P.
14761
14762 1999-09-02  Tom Tromey  <tromey@cygnus.com>
14763
14764         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
14765         Handle nested arrays, like `[[I'.
14766
14767 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14768
14769         * class.c (finish_class): Remove unused parameter, all callers
14770         changed.
14771
14772         * expr.c (build_java_athrow): Change return type to void.
14773         (java_lang_expand_expr): Make sure each case in switch returns a
14774         value.
14775
14776         * java-tree.h (finish_class): Fix prototype to take void args.
14777
14778         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
14779         (main): Issue return from main, not exit.
14780
14781         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
14782
14783         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
14784
14785         * jv-scan.c (main): Issue return from main, not exit.
14786
14787         * parse.y (check_abstract_method_definitions,
14788         java_check_abstract_method_definitions): Add static prototypes.
14789         (java_complete_expand_methods): Fix call to `finish_class'.
14790
14791         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
14792         and `prevpc'.
14793
14794 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14795
14796         * lang.c (language_string): Constify.
14797
14798 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14799
14800         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
14801         Remove hacks for stuff which comes from libiberty.
14802
14803         * Make-lang.in: Likewise.
14804
14805 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
14806
14807         * Makefile.in (xref.o): Depend on xref.c explicitly.
14808
14809 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14810
14811         * java-tree.h (lang_printable_name): Constify a char*.
14812
14813         * lang.c (lang_printable_name): Likewise.
14814
14815 1999-08-27  Jeffrey A Law  (law@cygnus.com)
14816
14817         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
14818         comments in C code.
14819
14820 1999-08-26  Tom Tromey  <tromey@cygnus.com>
14821
14822         * gjavah.c (print_cxx_classname): Print "::" before qualified
14823         name.
14824
14825 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14826
14827         * parse.y (lookup_cl): Changed leading comment. Now does its best
14828         to set the column number.
14829         (qualify_ambiguous_name): Take WFL wrappers into account.
14830
14831 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
14832
14833         * verify.c (verify_jvm_instructions): Don't check instruction
14834         validity beyond end of method.
14835
14836 1999-08-25  Tom Tromey  <tromey@cygnus.com>
14837
14838         * jvspec.c (lang_specific_driver): Correctly handle --help again.
14839
14840 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14841
14842         * gjavah.c (print_name, print_base_classname, utf8_cmp,
14843         cxx_keyword_subst, generate_access, name_is_method_p,
14844         get_field_name, print_field_name, super_class_name, print_include,
14845         decode_signature_piece, print_class_decls, usage, help,
14846         java_no_argument, version, add_namelet, print_namelet): Add static
14847         prototype.
14848         (print_base_classname, utf8_cmp, cxx_keyword_subst,
14849         name_is_method_p): Constify a char*.
14850         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
14851         Provide a final else clause in an if-else-if.
14852         (print_field_info): Add missing final arg in function call to
14853         `print_field_name'.
14854         (print_method_info, decompile_method, decode_signature_piece,
14855         print_c_decl, print_full_cxx_name, print_stub,
14856         print_mangled_classname, super_class_name, print_include,
14857         add_namelet, add_class_decl, print_class_decls, process_file,
14858         help): Constify a char*.
14859
14860         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
14861         push_int_const, find_constant_wide, find_constant_index,
14862         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
14863         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
14864         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
14865         emit_if, emit_goto, emit_jsr, call_cleanups,
14866         make_class_file_name): Add static prototypes.
14867         (generate_bytecode_return, generate_bytecode_insns): Pass a
14868         NULL_PTR, not a NULL_TREE.
14869
14870         * jv-scan.c: Include "jcf.h".
14871         (main): Declare using DEFUN macro.
14872
14873         * jvspec.c (find_spec_file, lang_specific_pre_link,
14874         lang_specific_driver): Add prototypes.
14875         (find_spec_file): Constify a char*.
14876
14877         * keyword.gperf (hash, java_keyword): Add prototypes.
14878
14879         * lang.c (lang_print_error): Add static prototype.
14880         (lang_init): Prefer memcpy over bcopy to avoid casts.
14881
14882         * lex.c (yylex): Add static prototype.
14883
14884         * parse-scan.y: Include "lex.c" earlier.
14885
14886         * parse.h: Remove redundant declaration for `yylex'.
14887
14888         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
14889         labeled_block_contains_loop_p): Add static prototypes.
14890         (not_accessible_p): Make static to match prototype.
14891
14892         * verify.c (start_pc_cmp): Don't needlessly cast away const.
14893
14894 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14895
14896         * parse.y (check_method_redefinition): Changed leading comment.
14897         (check_abstract_method_definitions): New function.
14898         (java_check_abstract_method_definitions): New function.
14899         (java_check_regular_methods): Call it.
14900         (verify_constructor_super): Fixed indentation.
14901         (lookup_method_invoke): Likewise.
14902
14903 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14904
14905         * parse.y (method_header): Return a null pointer if the current
14906         class node is null.
14907         (finish_method_declaration): Return if the current function decl
14908         is null.
14909         (source_start_java_method): Likewise.
14910         (java_method_add_stmt): Likewise.
14911
14912 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14913
14914         * class.c (emit_register_class): Removed unnecessary call to
14915         start_sequence.
14916         * parse.y (labeled_block_contains_loop_p): Removed unused local
14917         variable.
14918
14919 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14920
14921         * parse.y (java_refold): Added prototype.
14922
14923 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14924
14925         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
14926         (java_stabilize_reference): Removed unnecessary `else'.
14927         (java_complete_lhs): Set flag to remember boolean. Call
14928         java_refold. Added comments.
14929         (java_decl_equiv): New function.
14930         (binop_compound_p): Likewise.
14931         (java_refold): Likewise.
14932         (patch_unaryop): Striped static field access assigned to decl and
14933         op. Changed promotion scheme for ++/-- operators.
14934         (search_loop): New function.
14935         (labeled_block_contains_loop_p): Likewise.
14936         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
14937         comment.
14938         (patch_bc_statement): Call search_loop. Fixed comment.
14939
14940 1999-08-14  Anthony Green  <green@cygnus.com>
14941
14942         * expr.c (java_lang_expand_expr): Mark static array data as
14943         referenced.
14944
14945 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
14946
14947         * jvgenmain.c (main): NUL-terminate name_obstack.
14948
14949 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14950
14951         * check-init.c (check_bool2_init, done_alternative): Add static
14952         prototypes.
14953
14954         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
14955         (add_method, build_utf8_ref, build_class_ref,
14956         append_gpp_mangled_type, layout_class_method): Constify a char*.
14957
14958         * decl.c (push_promoted_type, make_binding_level): Add static
14959         prototypes.
14960         (push_promoted_type, pushdecl): Constify a char*.
14961
14962         * except.c (find_handler_in_range, link_handler,
14963         check_start_handlers): Add static prototypes.
14964
14965         * expr.c (process_jvm_instruction): Constify a char*.
14966
14967         * gjavah.c (main): Constify a char*.
14968
14969         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
14970         Constify a char*.
14971
14972         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
14973         static prototypes.
14974         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
14975         munge, print_ents): Constify a char*.
14976
14977         * jcf-dump.c (disassemble_method): Constify a char*.
14978         (print_constant_pool, print_exception_table): Add static prototypes.
14979         (print_constant, print_exception_table, main, disassemble_method):
14980         Constify a char*.
14981
14982         * jcf-io.c (find_classfile, find_class): Likewise.
14983
14984         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
14985         (set_source_filename, predefined_filename_p): Add static prototypes.
14986         (set_source_filename, get_constant, get_class_constant,
14987         find_in_current_zip): Constify a char*.
14988
14989         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
14990         static prototypes.
14991         (add_entry, add_path, jcf_path_classpath_arg,
14992         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
14993
14994         * jcf-reader.c (get_attribute, jcf_parse_preamble,
14995         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
14996         jcf_parse_one_method, jcf_parse_methods,
14997         jcf_parse_final_attributes): Add static prototypes.
14998         (get_attribute): Constify a char*.
14999
15000         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15001         jcf_dependency_add_target, jcf_path_classpath_arg,
15002         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15003
15004         * jv-scan.c (main): Constify a char*.
15005         (gcc_obstack_init): Add prototype arguments.
15006
15007         * jvgenmain.c (gcc_obstack_init): Likewise.
15008         (main): Constify a char*.
15009
15010         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15011         static prototypes.
15012         (put_decl_string, lang_print_error): Constify a char*.
15013         (lang_init): Remove redundant extern prototype.
15014
15015         * mangle.c (emit_unicode_mangled_name): Constify a char*.
15016
15017         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15018         Add static prototypes.
15019         (get_type_from_signature): Constify a char*.
15020
15021         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15022         Add static prototypes.
15023         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15024         (verify_jvm_instructions): Constify a char*.
15025
15026         * xref.c (xref_flag_value): Likewise.
15027
15028         * xref.h (xref_flag_value): Likewise.
15029
15030         * zextract.c (makeword, makelong): Add static prototypes.
15031         (makeword, makelong): Constify a uch*.
15032
15033 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15034
15035         * lang.c (java_dummy_print): Constify a char*.
15036         (lang_print_error): Likewise.
15037         (lang_init): Remove redundant prototype for `print_error_function'.
15038         (lang_init_source): Likewise.
15039         (lang_identify): Constify a char*.
15040
15041 1999-08-09  Tom Tromey  <tromey@cygnus.com>
15042
15043         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15044         (WORDS_TO_LONG): Likewise.
15045         (WORDS_TO_DOUBLE): Likewise.
15046
15047 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15048
15049         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15050
15051         * expr.c (java_stack_pop, java_array_data_offset,
15052         build_java_throw_out_of_bounds_exception, case_identity,
15053         build_java_check_indexed_type): Add static prototypes.
15054         (linenumber_table, expand_invoke, expand_java_field_op,
15055         build_primtype_type_ref, expand_byte_code): Constify a char*.
15056
15057         * java-tree.h (build_primtype_type_ref, linenumber_table):
15058         Constify a char*.
15059         (java_lang_expand_expr): Add prototype.
15060
15061         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
15062         `java_lang_expand_expr'.
15063
15064         * lex.c (java_lex_error): Constify a char*.
15065         (java_get_unicode, java_read_char, java_allocate_new_line,
15066         java_unget_unicode, java_sneak_unicode): Prototype.
15067
15068         * parse-scan.y (current_class, package_name, method_declarator,
15069         report_class_declaration, yyerror): Constify a char*.
15070
15071         * parse.h (java_report_errors): Prototype.
15072         (yyerror): Constify a char*.
15073
15074         * parse.y (classitf_redefinition_error, check_modifiers,
15075         parse_jdk1_1_error, lookup_package_type,
15076         lookup_package_type_and_set_next, get_printable_method_name,
15077         purify_type_name): Constify a char*.
15078         (build_super_invocation, maybe_generate_finit,
15079         verify_constructor_super, parser_add_interface,
15080         add_superinterfaces, jdep_resolve_class, note_possible_classname,
15081         java_complete_expand_methods, java_expand_finals,
15082         cut_identifier_in_qualified, java_stabilize_reference,
15083         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15084         merge_string_cste): Prototype.
15085         (single_type_import_declaration, yyerror,
15086         variable_redefinition_error, build_array_from_name,
15087         build_unresolved_array_type, check_class_interface_creation,
15088         resolve_class, complete_class_report_errors,
15089         note_possible_classname, read_import_dir,
15090         find_in_imports_on_demand, resolve_package, fix_constructors,
15091         check_deprecation, lookup_method_invoke,
15092         maybe_build_primttype_type_ref, array_constructor_check_entry):
15093         Constify a char*.
15094         (java_complete_expand_methods, java_expand_finals): Make static.
15095         (convert_narrow): Remove static prototype.
15096
15097 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
15098
15099         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15100
15101 1999-08-02  Richard Henderson  <rth@cygnus.com>
15102
15103         * decl.c: Include defaults.h instead of expr.h.
15104         * parse.y: Likewise.
15105
15106 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
15107
15108         * java/decl.c (start_java_method): Change all uses of
15109         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15110         Ensure expr.h is included.
15111         * java/expr.c (pop_arguments): Ditto.
15112         * java/parse.y (expand_start_java_method): Ditto.
15113
15114 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15115
15116         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15117
15118 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
15119
15120         * decl.c: Include "function.h".
15121         * except.c: Likewise.
15122         * parse.y: Likewise.
15123         * Makefile.in: Update dependencies.
15124
15125 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15126
15127         * expr.c (build_java_soft_divmod): Provide a default case in switch.
15128         (java_lang_expand_expr): Mark parameters `target', `tmode' and
15129         `modifier' with ATTRIBUTE_UNUSED.
15130
15131         * gjavah.c (process_file): Add braces around ambiguous `else'.
15132
15133         * jcf-dump.c (print_access_flags, localvar_free): Change return
15134         type to void.
15135
15136         * parse.y (java_complete_expand_method): Initialize variable
15137         `exception_copy'.
15138         (resolve_qualified_expression_name): Likewise for `field_decl'.
15139         (patch_method_invocation): Likewise for `class_to_search'.
15140         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15141         (patch_assignment): Likewise for `lhs_type'.
15142
15143         * verify.c (verify_jvm_instructions): Remove unused variable
15144         `caller'.
15145
15146 1999-07-25  Richard Henderson  <rth@cygnus.com>
15147
15148         * decl.c (va_list_type_node): New.
15149
15150 1999-07-25  Anthony Green  <green@cygnus.com>
15151
15152         * gjavah.c (print_stub): New function.
15153         (METHOD_IS_NATIVE): New macro.
15154         (print_mangled_classname): Make static.
15155         (HANDLE_END_FIELD): Don't emit fields during stub generation.
15156         (process_file): Perform stub generation.
15157         (HANDLE_METHOD): Don't emit class decls during stub
15158         generation.
15159         (HANDLE_END_METHOD): Take into account stub generation.
15160         (print_method_info): Handle stub generation.
15161         (print_stub): New function.
15162         (print_cxx_classname): Make signature consistant with others.
15163         (help): Describe -stubs option.
15164         (main): Create stub file.
15165         (version): Use version.c.
15166         (print_full_cxx_name): New function.
15167         (print_c_decl): Use print_full_cxx_name.
15168
15169 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15170
15171         * check-init.c (check_init): Handle MAX_EXPR.
15172
15173 1999-07-15  Andrew Haley  <aph@cygnus.com>
15174
15175         * lang.c (flag_use_divide_subroutine): New variable.
15176         * typeck.c: (convert_ieee_real_to_integer): Bounds check
15177         fp-to-integer conversion.
15178         (convert): Call convert_ieee_real_to_integer when flag_fast_math
15179         is not set.
15180
15181         * expr.c (build_java_soft_divmod): New function.
15182         (build_java_binop): Call build_java_soft_divmod if
15183         flag_use_divide_subroutine is set.
15184         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15185         soft_lrem_node: new builtin functions.
15186         (init_decl_processing) Initialize the new builtins.
15187         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15188         soft_lrem_node: new builtin functions.
15189         (build_java_soft_divmod): New function.
15190         * parse.y: Call build_java_soft_divmod if
15191         flag_use_divide_subroutine is set.
15192         * parse.c: Rebuilt.
15193
15194         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15195         a --specs= arg) even if not linking.
15196         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15197         -fuse-divide-subroutine
15198
15199 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15200
15201         * parse.y (resolve_and_layout): Check methods only once.
15202         (resolve_qualified_expression_name): Verify thrown exceptions
15203         compatibility.
15204         (check_thrown_exceptions): Reject exceptions thrown in
15205         initializer. Error message tuned.
15206
15207 1999-07-14  Andrew Haley  <aph@cygnus.com>
15208
15209         * expr.c (expand_expr): Do not return the last statement in a
15210         block as the block's value.
15211
15212 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15213
15214         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15215         CALL_EXPR, to avoid order of evaluation changes.
15216
15217 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15218
15219         * parse.y (qualify_ambiguous_name): Do not use
15220         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15221
15222 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15223
15224         * check-init.c (check_init): Handle MAX_EXPR.
15225         * expr.c (force_evaluation_order): Force method call arguments to
15226         be evaluated in left-to-right order.
15227         * parse.y (qualify_ambiguous_name): Loop again to qualify
15228         NEW_ARRAY_EXPR properly.
15229
15230 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15231
15232         * parse.y (patch_invoke): Resolve unresolved invoked method
15233         returned type.
15234         (qualify_ambiguous_name): STRING_CST to qualify expression for
15235         type name resolution.
15236
15237 1999-06-24  Andrew Haley  <aph@cygnus.com>
15238
15239         * class.c (finish_class): Whenever a deferred method is
15240         output, rescan the list of methods to see if a new candidate for
15241         output can be found.
15242
15243 1999-06-28  Tom Tromey  <tromey@cygnus.com>
15244
15245         * jvspec.c (lang_specific_driver): Recognize --help.
15246
15247 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15248
15249         * parse.y (resolve_package): Fixed bogus return statement.
15250         (patch_method_invocation): Resolve method invocation beginning with
15251         a package name qualifier.
15252
15253 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15254
15255         * Make-lang.in (java.stage1): Depend on stage1-start.
15256         (java.stage2): Likewise for stage2-start.
15257         (java.stage3): Likewise for stage3-start.
15258         (java.stage4): Likewise for stage4-start.
15259
15260 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15261
15262         * parse.y (java_complete_lhs): When doing cross referencing, don't
15263         try to keep file location on a WFL expanded as a CALL_EXPR.
15264
15265 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15266
15267         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15268         compiling to class file a void method with an empty method body.
15269         As a side effect, the bytecode backend will generate the
15270         appropriate `return' instruction.
15271
15272 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15273
15274         * parse.y (lookup_package_type_and_set_next): New function prototype.
15275         (resolve_package): Search current and imported packages.
15276         (lookup_package_type_and_set_next): New function.
15277
15278 1999-06-22  Andrew Haley  <aph@cygnus.com>
15279
15280         * verify.c (verify_jvm_instructions): Check for pending blocks
15281         before invalid PC test and opcode switch, not after.
15282
15283 1999-06-21  Andrew Haley  <aph@cygnus.com>
15284
15285         * except.c (find_handler_in_range): The upper limit for exception
15286         ranges is exclusive, not inclusive: (start <= pc < end).
15287         (link_handler): find child pointer which points to outer by
15288         searching sibling list: previous code incorrectly assumed that
15289         outer->outer->first_child must point to outer.
15290         * verify.c (verify_jvm_instructions): FIXME added to code for
15291         `athrow'.
15292         (verify_jvm_instructions): Do not assume that the last block
15293         processed in a subroutine is a block which ends with a `ret'
15294         instruction.  With some control flows it is possible that the last
15295         block ends with an `athrow'.
15296
15297 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15298
15299         * parse.y (qualify_ambiguous_name): Reorganized the post
15300         evaluation of non WFL leading expression nodes.
15301
15302 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15303
15304         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15305         CONVERT_EXPR.
15306
15307 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15308
15309         * parse.y (qualify_ambiguous_name): Handle qualified expression
15310         beginning with a STRING_CST.
15311
15312 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15313
15314         * parse.y (register_fields): Set DECL_INITIAL on both
15315         pre-initialized static and public fields.
15316         (resolve_field_access): Static field access expressions to always
15317         use pointer types.
15318         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15319         qualification. CONVERT_EXPR to be resolved as an expression name.
15320         (java_complete_lhs): Identify and access qualified final
15321         initialized field in switch statement case expression.
15322         (fold_constant_for_init): Pre-initialized field decl constant to
15323         be folded.
15324
15325 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15326
15327         * parse.y (note_possible_classname): Mark returned node with
15328         QUALIFIED_P only if the original class name contained a '/'.
15329
15330 1999-06-05  Anthony Green  <green@cygnus.com>
15331
15332         * Make-lang.in (gcjh): More parallel build fixes.
15333
15334 1999-06-03  Mike Stump  <mrs@wrs.com>
15335
15336         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15337
15338 1999-06-02  Anthony Green  <green@cygnus.com>
15339
15340         * except.c (link_handler): Chain exception handlers in order.
15341
15342 1999-06-02  Anthony Green  <green@cygnus.com>
15343
15344         * expr.c (expand_byte_code): Fill unreachable bytecode regions
15345         with nops and process as usual in order to always set correct EH
15346         ranges.  Emit detailed warnings about unreachable bytecodes.
15347
15348 1999-06-02  Anthony Green  <green@cygnus.com>
15349
15350         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15351         constant.
15352
15353 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15354
15355         * parse.y (lookup_field_wrapper): Unified returned value to NULL
15356           or the searched field decl.
15357
15358 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15359
15360         * parse.y (fold_constant_for_init): Convert numerical constant
15361         values to the type of the assigned field.
15362
15363 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15364
15365         * expr.c (lookup_field): Relaxed the test on class loading error
15366         detection.
15367         * parse.y (fold_constant_for_init): Enabeled old code.
15368
15369 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15370
15371         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15372         decide the validity of the cast of a java.lang.Cloneable reference
15373         to an array.
15374         (patch_conditional_expr): Fixed first argument passed to
15375         binary_numeric_promotion.
15376
15377 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15378
15379         * parse.y (qualify_ambiguous_name): Take into account that a
15380         CONVERT_EXPR might specify a type as a WFL.
15381
15382 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15383
15384         * parse.y (patch_assignment): Save the rhs before using it as an
15385         argument to _Jv_CheckArrayStore.
15386
15387 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15388
15389         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15390
15391 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15392
15393         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15394         floating point literal only when the exponent indicator has been
15395         parsed.
15396
15397 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15398
15399         * parse.y (formal_parameter:): Construct argument tree list
15400         element even if a yet unsupported final parameter was encountered.
15401
15402 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15403
15404         * parse.y (finish_method_declaration): Issue errors for native or
15405         abstract methods declared with a method body, as well as for non
15406         native or non abstract methods with no method body.
15407
15408 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15409
15410         * class.c (build_utf8_ref): Initialize variable `field'.
15411
15412         * decl.c (init_decl_processing): Initialize variable `field'.
15413
15414         * expr.c (build_known_method_ref): Mark parameters `method_type',
15415         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15416         (process_jvm_instruction): Likewise for parameter `length'.
15417
15418         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15419         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15420         ATTRIBUTE_UNUSED.
15421
15422         * parse.y (maybe_generate_clinit): Remove unused variable
15423         `has_non_primitive_fields'.
15424         (find_in_imports_on_demand): Initialize variables `node_to_use'
15425         and `cl'.
15426         (patch_binop): Likewise for variable `prom_type'.
15427         (patch_unaryop): Likewise for variable `prom_type'.
15428
15429         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15430
15431         * xref.c (xref_table): Add missing initializer.
15432
15433 1999-05-14  Tom Tromey  <tromey@cygnus.com>
15434
15435         * java-except.h (struct eh_range): Removed unused `next' member.
15436         * verify.c (verify_jvm_instructions): Call check_nested_ranges
15437         after adding all exception handlers.  Sort exception ranges in
15438         order of start PC.
15439         (struct pc_index): New structure.
15440         (start_pc_cmp): New function.
15441         * except.c (add_handler): Return `void'.  Don't call link_handler;
15442         instead construct an ordinary linked list and do range
15443         coalescing.
15444         (check_nested_ranges): New function.
15445         (link_handler): Changed interface to allow merging of eh_ranges.
15446         Split overlapping ranges.  Return `void'.
15447
15448 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15449
15450         * parse.y (constructor_block_end:): New rule, tagged <node>.
15451         (constructor_body:): Use `constructor_block_end' instead of
15452         `block_end'.
15453
15454 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15455
15456         * parse.y (statement_nsi:): Pop `for' statement block.
15457         (java_complete_lhs): Labeled blocks containing no statement are
15458         marked as completing normally.
15459
15460 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15461
15462         * xref.c (xref_set_current_fp): New function, defined.
15463         * xref.h (xref_set_current_fp): New function, prototyped.
15464
15465 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15466
15467         * check-init.c (check_init): Take into account that
15468         LABELED_BLOCK_STMT can be empty.
15469
15470 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15471
15472         * parse.y (java_check_regular_methods): Warning check on not
15473         overriding methods with default access in other packages does not
15474         apply to `<clinit>'.
15475         (java_complete_lhs): If block body is an empty_stmt_node, replace
15476         it by NULL_TREE. This prevents gcc from generating an irrelevant
15477         warning.
15478
15479 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15480
15481         * check-init.c (check_init): Removed code accepting to see things
15482         falling through default:, when doing xrefs.
15483         * java-tree.h (do_not_fold): New global variable, declared.
15484         * parse.y (do_not_fold): New global variable, defined.
15485         (java_complete_expand_method): Set `do_not_fold' to the value of
15486         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15487         and reinstall them after them have been purged; do not check for
15488         initializations; do not issue missing return errors.
15489         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15490         when doing xrefs.
15491         (patch_binop): Skip the fold part when doing xrefs.
15492         (build_string_concatenation): Skip the concatenation part when
15493         doing xrefs.
15494         (patch_synchronized_statement): Do not generate a try-finally when
15495         doing xrefs.
15496         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15497         and keep the location where the throw was seen.
15498         * typeck.c (convert): When `do_not_fold' is set, do not attempt
15499         any treatment on the converted node an simply return a NOP_EXPR of
15500         the targeted type.
15501         * xref.c (xref_get_data): New function, defined.
15502         * xref.h (xref_get_data): New function, declared.
15503         (XREF_GET_DATA): Use xref_get_data.
15504
15505 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15506
15507         * gjavah.c (print_include): Cast the result of `strlen' to int
15508         when comparing against a signed value.
15509         (add_namelet): Likewise.
15510
15511 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15512
15513         * expr.c (expand_invoke): Mark parameter `nargs' with
15514         ATTRIBUTE_UNUSED.
15515         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15516
15517         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15518         ATTRIBUTE_UNUSED.
15519
15520         * jcf-reader.c (get_attribute): Cast a value to long
15521         when comparing against a signed expression.  Likewise.
15522
15523         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15524         HOST_BITS_PER_CHAR.
15525
15526 1999-05-11  Andrew Haley  <aph@cygnus.com>
15527
15528         * parse.y (source_end_java_method): If the current method contains
15529         any exception handlers, force asynchronous_exceptions: this is
15530         necessary because signal handlers in libjava may throw exceptions.
15531         * decl.c (end_java_method): Ditto.
15532
15533 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15534
15535         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15536         flags.
15537         * jvspec.c (THREAD_NAME): Removed.
15538         (GC_NAME): Likewise.
15539         (MATHLIB): Likewise.
15540         (WITHLIBC): Likewise.
15541         (GCLIB): Likewise.
15542         (THREADLIB): Likewise.
15543         (MATH_LIBRARY): Likewise.
15544         (lang_specific_driver): Don't add `-l' options to command line.
15545         Instead, add a single --specs option.  Recognize `-L' options and
15546         use them to search for spec file.
15547         (find_spec_file): New function.
15548         (SPEC_FILE): New define.
15549
15550 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15551
15552         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15553         cpplib-enabled build.
15554
15555 1999-05-05  Per Bothner  <bothner@cygnus.com>
15556
15557         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15558         temporarily zero it while calling rest_of_decl_compilation.
15559
15560         * java-tree.h (string_ptr_type_node):  Add declaration.
15561         * decl.c:  Define and initialize string_ptr_type_node.
15562         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15563
15564         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15565         * parse.y (for_statement):  Now unconditionally exit_block.
15566         (finish_labeled_statement):  No longer exit_block if for-loop.
15567         (patch_loop_statement):  Check harder if the loop is already labeled.
15568
15569         * parse.y (patch_initialized_static_field):  Removed function.
15570         (maybe_generate_clinit):  Removed special handling for interfaces.
15571         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15572         on <clinit> to determine if it can be removed.
15573         (java_complete_expand_method):  Remove special handling for <clinit>.
15574         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15575         optimize if we get back empty_stmt_node.
15576         For MODIFY_EXPR, re-do checking of static initializers.
15577         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15578         For VAR_DECL, pass correct context.
15579
15580         * verify.c (verify_jvm_instructions):  Better error messages.
15581
15582 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15583
15584         * parse-scan.y (interface_declaration): Call
15585         report_class_declaration for interfaces.
15586
15587 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15588
15589         * Makefile.in: Remove -v from bison command lines.
15590
15591 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15592
15593         * check-init.c (check_init): Exclude a case of error when doing
15594         xrefs.
15595         * class.c (layout_class_method): Don't generate the error message
15596         twice when compiling from source.
15597         * lang-options.h: Added `-Wredundant-modifers' and
15598         `-Wunusupported-jdk11' flags and help text.
15599         * lang.c (lang_decode_option): Added support for
15600         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15601         flag_static_local_jdk11 and flag_redundant set accordingly.
15602         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15603         * parse.h (EXPR_WFL_ADD_COL): New macro.
15604         (DECL_END_SOURCE_LINE): Likewise.
15605         (DECL_INHERITED_SOURCE_LINE): Likewise.
15606         * parse.y (static_ref_err): New function, prototyped.
15607         (CCB_TK): Now tagged <operator>.
15608         (class_body:): Remember the location of the closing '}' of a class
15609         definition when doing xrefs.
15610         (block:): Likewise.
15611         (block_end:): Likewise.
15612         (create_class): Remember the location of the inherited class
15613         identifier when doing xrefs.
15614         (register_fields): Added test on first operand of `init' before
15615         testing it TREE_CODE.
15616         (method_header): Store the location of the class identifier in the
15617         class decl when doing xrefs.
15618         (finish_method_declaration): Don't combine first/last method line
15619         when doing xref.
15620         (java_check_regular_methods): Warning check on not overriding
15621         methods with default access on other packages move before check on
15622         static methods. Initialization of `aflags' also moved up.
15623         (resolve_expression_name): Call static_ref_err to report the error.
15624         (static_ref_err): New function, implemented.
15625         (resolve_field_access): Returned simplified static field access
15626         when doing xrefs.
15627         (resolve_qualified_expression_name): Check for illegal use of
15628         static fields in a non static context. Call static_ref_err to
15629         report error in various places.
15630         (java_complete_tree): Do not fold initialized static fields when
15631         doing xrefs.
15632         (java_complete_lhs): Likewise.
15633
15634 1999-04-29  Anthony Green  <green@cygnus.com>
15635
15636         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15637         create internal labels.
15638         (lookup_label): Ditto.
15639
15640 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15641
15642         * class.c (layout_class_method): Generate <clinit>'s rtl for
15643         interfaces.
15644         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15645         for interfaces' <clinit>.
15646         * expr.c (lookup_field): Search for fields in interfaces.
15647         (expand_invoke): Fixed indentation.
15648         (expand_java_field_op): Likewise. Use IS_CLINIT.
15649         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15650         (IS_CLINIT): New macro.
15651         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15652         interface was parsed.
15653         (maybe_generate_clinit): Don't generate if the current class is an
15654         interface with only fields of primitive types.
15655         (reset_method_name): Use IS_CLINIT.
15656         (java_complete_expand_method): Expand <clinit> when it exists for
15657         interfaces. Use IS_CLINIT.
15658         (resolve_expression_name): Use DECL_CONTEXT instead of
15659         current_class to build static field references.
15660         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15661         ARRAY_REF when doing xreferencing.
15662         (check_final_assignment): Fixed typo in leading comment. Use
15663         IS_CLINIT.
15664         (patch_array_ref): Don't fully expand array references when
15665         xreferencing.
15666         (patch_return): Use IS_CLINIT.
15667         (patch_throw_statement): Likewise.
15668
15669 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15670
15671         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15672
15673 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15674
15675         * decl.c (predef_filenames, predef_filenames_size): New globals
15676         (init_decl_processing): predef_filenames and predef_filenames_size
15677         initialized.
15678         * java-tree.h (predef_filenames, predef_filenames_size): Declared
15679         extern.
15680         * jcf-parse.c (predefined_filename_p): New function.
15681         (yyparse): Check that files on the command line are specified only
15682         once and issue a warning otherwise.
15683         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
15684         * parse.y (source_end_java_method): Nullify NOP method bodies, to
15685         avoid a gcc warning with -W -Wall turned on.
15686         (java_expand_classes): Abort if errors were encountered.
15687         (java_complete_lhs): If the cross reference flag is set, wrap
15688         field DECL node around a WFL when resolving expression name.
15689
15690 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15691
15692         * lang.c (lang_decode_option): Fixed returned value when parsing
15693         `-fxref=...' and `-Wall'.
15694         * parse.y (source_end_java_method): Do not generate code when
15695         flag_emit_xref is set.
15696         (resolve_expression_name): Do not build static field access when
15697         flag_emit_xref is set.
15698         (resolve_field_access): No special treatment on `length' when
15699         flag_emit_xref is set. Do not build qualified static field access
15700         when flag_emit_xref is set.
15701         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
15702         when flag_emit_xref is set.
15703         (patch_assignment): Do not generate array store runtime check when
15704         flag_emit_xref is set.
15705         * xref.c (xref_flag_value): Fixed function declaration
15706         indentation.
15707         (xset_set_data): New function.
15708         * xref.h (xref_set_data): Added prototype for new function.
15709         (typedef struct xref_flag_table): New field data.
15710         (XREF_GET_DATA): New macro.
15711
15712 1999-04-19  Tom Tromey  <tromey@cygnus.com>
15713
15714         * xref.h (enum): Removed trailing comma.
15715
15716         * parse.y (resolve_qualified_expression_name): Added missing
15717         `break'.
15718
15719 1999-04-15  Anthony Green  <green@cygnus.com>
15720
15721         * gjavah.c: New prototypes for java_float_finite and
15722         java_double_finite.
15723
15724 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15725
15726         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
15727         references.
15728
15729 1999-04-06  Jeffrey A Law  (law@cygnus.com)
15730
15731         * Makefile.in (TREE_H): Add tree-check.h.
15732         (RTL_H): Add genrtl.h.
15733
15734 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15735
15736         * parse.y (patch_assignment): Added ArrayStoreException runtime
15737         check.
15738
15739 1999-04-06  Per Bothner  <bothner@cygnus.com>
15740
15741         * expr.c (pop_type_0):  New function.
15742         (pop_type):  Use pop_type_0.
15743         * java-tree.h (pop_type_0):  New declaration.
15744         * verify.c (verify_jvm_instructions):  Check return instructions.
15745
15746         * parse.y (patch_binop):  Don't fold if non-constant and emiting
15747         class files.
15748
15749 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15750
15751         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
15752
15753         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
15754         (main_jcf): Don't define.
15755         (process_file): Don't set `main_jcf'.
15756
15757         * java-tree.h (main_jcf): Don't declare.
15758
15759         * jcf-parse.c (main_jcf): Add static definition.
15760
15761         * lang.c (main_jcf): Don't define.
15762
15763 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15764
15765         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
15766
15767         * decl.c (copy_lang_decl): Likewise for `bcopy'.
15768
15769         * jcf-depend.c: Include "config.h", not <config.h>.
15770
15771         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
15772         `bcopy' to PTR.
15773
15774         * jcf-path.c: Include "config.h", not <config.h>.
15775
15776         * lex.c: Don't include various system header files.
15777         (java_init_lex): Cast the argument of `bzero' to PTR
15778
15779         * parse-scan.y (java_push_parser_context): Likewise.
15780
15781         * parse.y (java_push_parser_context): Likewise.
15782         (patch_bc_statement): Match format specifier to variable argument.
15783
15784         * xref.c: Don't include <stdio.h>.
15785
15786 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15787
15788         * parse.y (struct parser_ctxt *ctxp): Now global.
15789         (declare_local_variables): Use WFL compound value for the
15790         declaration source line value, when doing cross-referencing.
15791
15792 1999-03-31  Tom Tromey  <tromey@cygnus.com>
15793
15794         * gjavah.c (print_field_info): Allow constants of other types.
15795         (print_include): Generate include when new name is proper prefix
15796         of already printed name.
15797         (add_namelet): Likewise.
15798         (cxx_keyword_subst): New function.
15799         (print_method_info): Use it.
15800         (print_field_name): New function.
15801         (get_field_name): New function.
15802         (print_field_info): Use get_field_name and print_field_name.
15803
15804 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15805
15806         * Makefile.in (keyword.h): Generate using gperf language 'C', not
15807         'KR-C', so gperf uses the `const' keyword on strings.
15808
15809         * keyword.gperf (java_keyword): Const-ify a char*.
15810
15811 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15812
15813         * parse.y (patch_bc_statement): Fixed identation and a bogus
15814         `printf' format.
15815
15816 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15817
15818         * parse.y (patch_assignment): Allow static variables in other
15819         classes to be assigned.
15820
15821 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15822
15823         * class.c (maybe_add_interface): Remove unused variable
15824         `interface_binfo'.
15825         (make_class_data): Use = for assignment, not ==.  Likewise.
15826         (emit_register_classes): Remove unused variable `decl'.
15827
15828         * lex.c: Fix comment so as not to contain an embedded `/*'.
15829
15830         * verify.c (verify_jvm_instructions): Remove unused variable
15831         `self_type'.
15832
15833 1999-03-27  Per Bothner  <bothner@cygnus.com>
15834
15835         * parse.y (complete_loop_body):  Rename to finish_loop_body.
15836         (complete_labeled_statement):  Rename to finish_labeled_statement.
15837         (complete_for_loop):  Rename to finish_for_loop.
15838         (complete_method_declaration):  Rename to finish_method_declaration.
15839
15840         * java-tree.h (continue_identifier_node):  New global node.
15841         * decl.c:  Define and initialize continue_identifier_node.
15842         * parse.y (generate_labeled_block):  Remove - no longer needed.
15843         (build_loop_body):  Use continue_identifier_node for continue block.
15844         (finish_labeled_statement):  Also do pop_labeled_block actions.
15845         (java_complete_lhs):  POP_LOOP even if error.
15846         (build_labeled_block):  Special handling for continue_identifier_node.
15847         (patch_loop_statement):  Re-organize.
15848         (patch_bc_statement):  Re-write.
15849
15850 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15851
15852         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
15853         using a WFL compound value.
15854         * parse.y (xref.h): Include.
15855         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
15856         WFL compound value.
15857         (register_fields): Set WFL compound value to lineno if doing
15858         xrefs.
15859         (java_complete_expand_method): Call expand_xref if flag_emit_xref
15860         is set.
15861         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
15862         * xref.h (expand_xref): Prototype renamed from xref_generate.
15863
15864 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15865
15866         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
15867         (GET_CURRENT_BLOCK): New macro.
15868         * parse.y (current_static_block): New global variable.
15869         (method_body:): Define action.
15870         (complete_method_declaration): Set current_function_decl to NULL
15871         when work on the current method is done.
15872         (declare_local_variables): Use GET_CURRENT_BLOCK.
15873         (java_method_add_stmt): Likewise.
15874         (java_complete_expand_method): Disable the use of `this' when
15875         expanding <clinit>.
15876         (enter_a_block): If no current method exist, use
15877         current_static_block to link static initializer blocks.
15878         (exit_block): Rewritten to use current_static_block when no current
15879         method decl exists.
15880         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
15881         (patch_return): Forbid the use of `return' in static initializers.
15882         (patch_throw_statement): Fixed indentation. Issue specific error
15883         for uncaught thrown checked exception in static initializer
15884         blocks. Removed FIXME.
15885
15886 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
15887
15888         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
15889         Link gcj from gcc.o.
15890
15891 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15892
15893         * parse.y (find_applicable_accessible_methods_list): When dealing
15894         with interface: ensure that a given interface or java.lang.Object
15895         are searched only once.
15896
15897 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15898
15899         * gjavah.c (print_c_decl): Remove unused argument `flags'.
15900
15901         * jcf-dump.c (print_access_flags): Add braces around if-else.
15902
15903         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
15904         COMBINE_INPUTS.
15905
15906         * lex.c (build_wfl_node): Add static prototype.
15907
15908         * lex.h (build_wfl_node): Remove static prototype.
15909
15910         * parse.y: Include lex.c early enough to declare everything needed.
15911         Ensure calls to `build_wfl_node' pass the proper arguments.
15912         (create_class): Remove unused variable `super_decl'.
15913         (get_printable_method_name): Initialize variable `name'.
15914
15915 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15916
15917         * Changelog: Fixed 1999-03-22 typos.
15918         * lang.c (lang_decode_option): Fixed typo in error string in the
15919         XARG section.
15920
15921 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15922
15923         * Makefile.in (JAVA_OBJS): Added entry xref.o.
15924         (xref.o): New rule.
15925         * java-tree.h (flag_emit_xref): Declared extern.
15926         * lang.c (xref.h): Included.
15927         (flag_emit_xref): New global variable.
15928         (lang_decode_option): Added support for -fxref.
15929         * xref.c: Created.
15930         * xref.h: Likewise.
15931
15932 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
15933
15934         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
15935         linked with.
15936
15937 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15938
15939         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
15940         $(srcdir)/../system.h and $(JAVA_TREE_H).
15941         (jcf-io.o): Depend on $(JAVA_TREE_H).
15942         (mangle.o): Likewise.
15943
15944         * check-init.c (check_cond_init): Add static prototype.
15945
15946         * class.c (build_java_method_type, hashUtf8String,
15947         make_field_value, get_dispatch_vector, get_dispatch_table,
15948         append_gpp_mangled_type, mangle_static_field): Likewise.
15949         (strLengthUtf8): Hide unused definition.
15950         (hashUtf8String): Const-ify.
15951         (make_field_value): Un-ANSI-fy.
15952
15953         * constants.c: Move inclusion of jcf.h above java-tree.h.
15954         (set_constant_entry, find_class_or_string_constant,
15955         find_name_and_type_constant, get_tag_node,
15956         build_constant_data_ref): Add static prototype.
15957
15958         * decl.c (push_jvm_slot, builtin_function,
15959         lookup_name_current_level): Likewise.
15960         (builtin_function): Const-ify.
15961
15962         * except.c (expand_start_java_handler, expand_end_java_handler):
15963         Add static prototype.
15964
15965         * expr.c (flush_quick_stack, push_value, pop_value,
15966         java_stack_swap, java_stack_dup, build_java_athrow,
15967         build_java_jsr, build_java_ret, expand_java_multianewarray,
15968         expand_java_arraystore, expand_java_arrayload,
15969         expand_java_array_length, build_java_monitor, expand_java_pushc,
15970         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
15971         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
15972         expand_compare, expand_test, expand_cond, expand_java_goto,
15973         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
15974         expand_java_field_op, java_push_constant_from_pool): Likewise.
15975
15976         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
15977         (build_java_arraynull_check): Mark parameters `node' and `type'
15978         with ATTRIBUTE_UNUSED.
15979         (note_label): Likewise for parameter `current_pc'.
15980         (expand_java_call, expand_java_ret): Hide unused definition.
15981
15982         * java-tree.h (make_class, build_constants_constructor,
15983         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
15984         init_outgoing_cpool, register_class, emit_register_classes,
15985         java_layout_seen_class_methods): Prototype.
15986         (unicode_mangling_length): Const-ify.
15987         (append_gpp_mangled_name, append_gpp_mangled_classtype,
15988         emit_unicode_mangled_name, format_int, format_uint,
15989         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
15990         jcf_print_utf8_replace, open_class): Prototype.
15991
15992         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
15993         <stdio.h>.  Include tree.h/java-tree.h.
15994         (utf8_equal_string usage, process_class): Add static prototype.
15995         (open_class): Don't prototype this here.
15996         (utf8_equal_string): Match arguments to format specifiers.
15997         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
15998         TABLE_SWITCH, disassemble_method): Likewise.
15999
16000         * jcf-io.c: Include tree.h/java-tree.h.
16001         (open_class, find_classfile, jcf_print_utf8,
16002         jcf_print_utf8_replace): Const-ify.
16003
16004         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16005         parse_class_file): Add static prototype.
16006         (find_in_current_zip): Match definition to existing static
16007         prototype.
16008
16009         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16010         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16011         finish_jcf_block, define_jcf_label, get_jcf_label_here,
16012         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16013         write_chunks, adjust_typed_op, generate_bytecode_conditional,
16014         generate_bytecode_return, perform_relocations, init_jcf_state,
16015         init_jcf_method, release_jcf_state, generate_classfile):
16016         Add static prototype.
16017         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16018         (make_class_file_name): Const-ify.
16019
16020         * jcf.h (find_classfile): Const-ify.
16021
16022         * jv-scan.c (reset_report): Remove prototype.
16023
16024         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16025         (error): Rewrite to allow varargs.
16026
16027         * lang.c (lang_f_options): Const-ify.
16028
16029         * lex.c (java_parse_escape_sequence): Add static prototype.
16030         (java_allocate_new_line): Match definition to existing static
16031         prototype.
16032
16033         * mangle.c Include tree.h/java-tree.h.
16034         (unicode_mangling_length, emit_unicode_mangled_name,
16035         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16036
16037         * parse.h (jdep_code): Remove trailing comma in enumeration.
16038         (java_get_line_col): Move prototype outside of !JC1_LITE test.
16039         (reset_report): Add prototype.
16040
16041         * verify.c (push_pending_label, merge_types): Add static
16042         prototypes.
16043
16044         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16045
16046 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16047
16048         * parse.y (find_applicable_accessible_methods_list): Extend the
16049         search to superinterfaces when relevant.
16050         (search_applicable_methods_list): New function.
16051
16052 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16053
16054         * class.c (unmangle_classname): Implemented stricter testing
16055         before setting the QUALIFIED_P flag on an identifier.
16056
16057 1999-03-16  Per Bothner  <bothner@cygnus.com>
16058
16059         * parse.y (java_complete_lhs):  Call force_evaluation_order
16060         after patch_newarray.
16061         (patch_binop):  Don't call fold if there are side effects.
16062
16063 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16064
16065         * parse.y (java_stabilize_reference): Use save_expr instead of
16066         building a SAVE_EXPR node.
16067         (java_complete_lhs): Patch the resulting string of the `+='
16068         operator (if necessary) and complete the RHS after having built
16069         the cast.
16070
16071 1999-03-15  Per Bothner  <bothner@cygnus.com>
16072
16073         * class.c (make_class):  Don't set CLASS_P here (because
16074         this function is also called by build_java_array_type).
16075         (push_class):  Set CLASS_P here instead.
16076         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
16077
16078         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
16079         context.  If the context is class, perfer "super" over "synchronized".
16080         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
16081
16082         * parse.y (create_class):  Don't call parser_check_super here;
16083         it is not robust.  Always wait until later.
16084
16085         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
16086         match what JDK 1.2 does), but don't set ACC_PUBLIC.
16087
16088 1999-03-13  Per Bothner  <bothner@cygnus.com>
16089
16090         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
16091         * lex.h (UNGETC):  Change misleading macro.
16092
16093 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16094
16095         * parse.y (java_stabilize_reference): Return NODE when patching a
16096         COMPOUND_EXPR.
16097         (java_complete_lhs): Put parenthesis around truth values.
16098
16099 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16100
16101         * class.c (layout_class_method): Don't make rtl for interface
16102         methods.
16103         * parse.h (GET_TYPE_NAME): New macro.
16104         * parse.y (if_then_statement:): Fixed indentation.
16105         (if_then_else_statement:): Likewise.
16106         (for_statement:): Fixed spacing.
16107         (try_statement:): Fixed indentation.
16108         (create_interface): Don't force interfaces to be abstract.
16109         (method_header): Abstract methods are OK in interfaces.
16110         (declare_local_variables): Fixed typo in comment.
16111         (java_complete_expand_method): Fixed indentation.
16112         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16113         non accessible fields.
16114         (java_stabilize_reference): New function.
16115         (java_complete_lhs): Fixed indentation. Use
16116         java_stabilize_reference in compound assignment. Insert the
16117         cast. If not processing `+' fix string constants before processing
16118         binop.
16119
16120 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16121
16122         * constants.c (find_class_or_string_constant): Cast variable `j'
16123         to a `jword' when comparing against one.
16124
16125         * expr.c (java_lang_expand_expr): Remove unused variables
16126         `has_finally_p' and `op0'.
16127
16128         * gjavah.c (print_field_info): Cast a value to jint when comparing
16129         against one.  Likewise for a jlong.
16130         (add_namelet): Likewise cast a `sizeof' to an int when comparing
16131         against a signed quantity.
16132
16133         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16134         (print_signature): Don't needlessly dereference variable `str'
16135
16136         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16137         `max_locals' with ATTRIBUTE_UNUSED.
16138         (jcf_parse_class): Likewise for variable `index'.
16139
16140         * parse.h (reverse_jdep_list): Remove static prototype.
16141
16142         * parse.y (build_jump_to_finally): Remove prototype and definition.
16143         (reverse_jdep_list): Add static prototype.
16144
16145         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16146         `assignment' and `expr_decl'.
16147
16148         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16149
16150 1999-03-12  Andrew Haley  <aph@cygnus.com>
16151
16152         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16153         we'll need a directory separator and a null character.
16154
16155 1999-03-10  Per Bothner  <bothner@cygnus.com>
16156
16157         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
16158
16159 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16160
16161         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16162         interfaces.
16163
16164 1999-03-05  Per Bothner  <bothner@cygnus.com>
16165
16166         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
16167
16168         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
16169
16170         * class.c (layout_class_method):  A static method in a base class
16171         is never overridden, so treat it like it doesn't exist.
16172         However, do complain about private non-static method overriding
16173         public static method.
16174
16175         * parse.y:  Don't set unused INITIALIZED_P flag.
16176         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
16177
16178         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
16179         (build_array_from_name):  Re-order &index[string] to &string[index].
16180
16181         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
16182         error_mark (it might catch more errors, but it is more likely to lose).
16183
16184 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16185
16186         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16187         (parse-scan.o): Depend on toplev.h.
16188
16189         * class.c (make_method_value): Add prototype.  Make it static.
16190         Remove unused second argument, caller changed.
16191
16192         * expr.c (java_lang_expand_expr): Remove unused variable
16193         `return_label'.
16194
16195         * java-tree.h: Don't prototype find_in_current_zip.
16196         Add prototypes for verify_constant_pool, start_java_method,
16197         end_java_method, give_name_to_locals, expand_byte_code,
16198         open_in_zip, set_constant_value, find_constant1, find_constant2,
16199         find_utf8_constant, find_string_constant, find_class_constant,
16200         find_fieldref_index, find_methodref_index, write_constant_pool,
16201         count_constant_pool_bytes and encode_newarray_type.
16202
16203         * jcf-dump.c: Remove unused variable `LONG_temp'.
16204
16205         * jcf-parse.c: Include parse.h.
16206         (jcf_parse_source): Remove unused parameter, all callers changed.
16207         (jcf_figure_file_type): Add static prototype.
16208         (find_in_current_zip): Likewise.  Also remove unused parameter,
16209         all callers changed.
16210         (read_class): Initialize variable `saved_pos'.
16211
16212         * jcf-reader.c (jcf_parse_preamble): Mark variables
16213         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16214
16215         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16216         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16217         (java_parse_doc_section): Initialize variable `seen_star'.
16218         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16219         (java_lex_error): Mark parameters `msg' and `forward' with
16220         ATTRIBUTE_UNUSED.
16221         (java_get_line_col): Mark parameters `filename' and `line' with
16222         ATTRIBUTE_UNUSED.
16223
16224         * parse-scan.y: Include toplev.h.
16225         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16226
16227         * parse.h: use `struct JCF', not plain `JCF'.
16228         (java_parser_context_save_global, java_expand_classes
16229         java_parser_context_restore_global, java_parse): Add prototypes.
16230
16231         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16232         `node'.
16233
16234 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
16235
16236         *  check-init.c (check_init):  COPYN takes word count, not bit count.
16237
16238 1999-02-26  Per Bothner  <bothner@cygnus.com>
16239
16240         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
16241         explicit build_decl.  (Avoids crash in reload when optimizing.)
16242
16243 1999-02-25  Per Bothner  <bothner@cygnus.com>
16244
16245         * decl.c (complete_start_java_method):  Handle synchronized method
16246         even when compiling from bytecode.
16247
16248 1999-02-26  Tom Tromey  <tromey@cygnus.com>
16249
16250         * gjavah.c (add_class_decl): Only generate `#include' if outer
16251         class is not the name of the class we are processing.  Correctly
16252         append `.h' in #include.
16253         (process_file): Clean up newlines around generated `#include's.
16254         (decode_signature_piece): Correctly handle inner classes.
16255         (struct include): New structure.
16256         (all_includes): New global.
16257         (print_include): New function.
16258         (add_class_decl): Use it.
16259         (process_file): Likewise.
16260         (add_class_decl): Generate include for java-array.h if array
16261         seen.
16262         (process_file): Don't generate java-array.h include.
16263
16264         * gjavah.c (add_namelet): Check for standard package names here.
16265         (add_class_decl): Don't check for standard package names here.
16266
16267 1999-02-25  Tom Tromey  <tromey@cygnus.com>
16268
16269         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16270         When reading a zip file, only use strncmp if both strings are
16271         bigger than the buffer length.  Initialize `k' when looping
16272         through zip file.
16273
16274 1999-02-24  Tom Tromey  <tromey@cygnus.com>
16275
16276         * gjavah.c (struct namelet): New structure.
16277         (add_namelet): New function.
16278         (print_namelet): New function.
16279         (print_class_decls): Use add_namelet and print_namelet to generate
16280         namespaces and not classes.
16281         (method_printed): New global.
16282         (HANDLE_END_METHOD): Examine method_printed.
16283         (print_method_info): Set method_printed when required.  Print
16284         error if function to be ignored is marked virtual.  Handle $finit$
16285         method.
16286         (METHOD_IS_FINAL): New macro.
16287         (print_field_info): Use it.
16288         (HANDLE_METHOD): Clear method_printed.
16289         (method_pass): New global.
16290         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16291         (process_file): Do two passes over both fields and methods.
16292         (HANDLE_METHOD): Examine method_pass.
16293         (root): New global.
16294         (add_class_decl): New function.
16295         (print_class_decls): Don't scan over entire constant pool.
16296
16297 1999-02-23  Tom Tromey  <tromey@cygnus.com>
16298
16299         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16300         disable linking in that case.
16301
16302 1999-02-20  Tom Tromey  <tromey@cygnus.com>
16303
16304         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16305         not 0x1f.
16306
16307 1999-02-21  Per Bothner  <bothner@cygnus.com>
16308
16309         * decl.c (build_result_decl), java-tree.h:  New method.
16310         (complete_start_java_method):  Handle synchronized methods.
16311         Don't build DECL_RESULT here.  (Ordering dependency problem.)
16312         (start_java_method):  Call build_result_decl here instead  ...
16313         * parse.y (java_complete_expand_method):  ... and here.
16314         (expand_start_java_method): Don't call complete_start_java_method here.
16315         (java_complete_expand_method):  Call it here instead.
16316         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
16317         * java-tree.h:  ... here.
16318
16319         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
16320         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
16321         for ARRAY_REF - it doesn't work when array bounds are checked.
16322         (patch_array_ref):  Handle it here instead.
16323
16324         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
16325
16326 1999-02-19  Per Bothner  <bothner@cygnus.com>
16327
16328         Force left-to-right evaluation of binary operations etc.
16329         * expr.c (force_evaluation_order), java-tree.h:  New function.
16330         * parse.y (java_complete_lhs):  Pass binary operations, procedure
16331         calls, and ARRAY_REFs to force_evaluation_order.
16332         (various):  Set TREE_SIDE_EFFECTS more carefully.
16333
16334         Tolerate random (non-UTF8) encoding in comments without complaining.
16335         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
16336         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
16337
16338         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
16339         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
16340
16341         * parse.y (java_complete_lhs):  Ignore an empty statement in a
16342         COMPOUND_EXPR.  Don't complain about empty statement after return.
16343
16344 1999-02-19  Per Bothner  <bothner@cygnus.com>
16345
16346         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
16347         in TREE_LIST - just chain the POINTER_TYPEs together.
16348         (resolve_class):  If type already resolved, return decl.
16349         After resolving, update TREE_TYPE(class_type), and name (if array).
16350         * parse.h (do_resolve_class), parse.y:  Make non-static.
16351         * class.c (maybe_layout_super_class):  Take this_class argument.
16352         Do do_resolve_class if necessary.
16353         (layout_class, layout_class_methods): Adjust calls appropriately.
16354         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16355         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
16356         * typeck.c (build_java_array_type):  Don't call layout_class.
16357
16358 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16359
16360         * parse.y (check_pkg_class_access): Allow private class access
16361         within the same package.
16362         (strip_out_static_field_access_decl): New function.
16363         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16364         operator argument before testing its nature.
16365
16366 1999-02-03  Per Bothner  <bothner@cygnus.com>
16367
16368         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
16369         (TRY_EXPR):  Simplify - it no longer has a finally clause.
16370         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
16371         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16372         * expr.c (java_lang_expand_expr):  Likewise.
16373         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
16374         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
16375         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
16376         (build_try_statement):  Remove finally parameter and handling.
16377         (build_try_finally_statement):  New function.
16378         (patch_try_statement):   No longer need to support finally clause.
16379         (try_statement):  Update grammar action rules.
16380         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
16381         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16382
16383 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
16384
16385         * jcf-parse.c (get_constant): Add braces around computation of 'd'
16386         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
16387
16388 1999-02-17  Andrew Haley  <aph@cygnus.com>
16389
16390         * class.c (build_utf8_ref): Back out broken patch which was
16391         intended to to output signatures using '.' as a separator.
16392
16393         * class.c (make_class_data): Output signatures using '.' as a
16394         separator, rather than '/'.
16395         (mangled_classname): Likewise.
16396         (make_field_value): Likewise.
16397         (make_method_value): Likewise.
16398         * constants.c (alloc_class_constant): Likewise.
16399         * expr.c (build_invokeinterface): Likewise.
16400
16401 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16402
16403         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16404         of an ancient workaround.
16405
16406 1999-02-10  Jeffrey A Law  (law@cygnus.com)
16407
16408         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
16409         here anymore.
16410
16411 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16412
16413         * lex.c (yylex): Encode \0 as UTF8.
16414
16415 1999-02-10  Tom Tromey  <tromey@cygnus.com>
16416
16417         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16418         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16419         (libgcj_zip): Renamed.
16420         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16421         LIBJAVA_ZIP_FILE.
16422         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16423
16424         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16425         (GC_NAME): Renamed -lgc to -lgcjgc.
16426
16427 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16428
16429         * lex.c (java_lang_cloneable): Initialize.
16430         * parse.y (java_lang_cloneable): New static variable.
16431         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16432         doing one more qualification round.
16433         (valid_ref_assignconv_cast_p): Reject null source or
16434         destination. Allow an array to be cast into java.lang.Cloneable.
16435         (patch_cast): Swapped two first arguments to first call to
16436         valid_ref_assignconv_cast_p.
16437
16438 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16439
16440         * parse.h: DECL_P renamed JDECL_P.
16441         * parse.y: DECL_P replaced by JDECL_P.
16442         (build_array_from_name): Always use pointer's type.
16443         (patch_bc_statement): Extra code to search continue target in a
16444         for loop. Fixed comments. Continue target is current loop when
16445         unlabeled.
16446
16447 1999-02-05  Andrew Haley  <aph@cygnus.com>
16448
16449         * class.c (make_class_data): The superclass of an interface should
16450         be null, not class Object.
16451
16452         * lex.c (java_lex): Sign extend hex literals.
16453
16454 1999-02-04  Andrew Haley  <aph@cygnus.com>
16455
16456         * class.c (build_utf8_ref): Output signatures using '.' as a
16457         separator, rather than '/'.
16458         (make_class_data): Likewise.
16459
16460 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
16461
16462         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16463         mkstemp.o.  Get them from libiberty now.
16464
16465 1999-02-02  Jeffrey A Law  (law@cygnus.com)
16466
16467         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16468
16469 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16470
16471         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16472         from libiberty.h
16473
16474 1999-02-02  Per Bothner  <bothner@cygnus.com>
16475
16476         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16477         * jcf-write.c (generate_bytecode_return):  New function.
16478         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
16479
16480         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
16481         generate special [fd]const_[01] instructions.
16482
16483         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
16484
16485         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
16486         handling OPCODE_lookupswitch or OPCODE_tableswitch.
16487
16488 1999-02-01  Per Bothner  <bothner@cygnus.com>
16489
16490         * parse.y (patch_method_invocation):  Handle calling static methods,
16491         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16492
16493         * parse.y (java_complete_lhs):  Don't complain about unreachable
16494         exit condition in a do-while statement.
16495
16496 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16497
16498         * lex.c (java_read_char): Fixed utf8 decoding.
16499         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16500         range.
16501         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16502         comments. Local variable `all_primitive' is gone. Broadened
16503         acceptance of `0' to floating point targets. `long' can now be
16504         widened to `double' or `float'.
16505         (valid_method_invocation_conversion_p): Added leading
16506         comment. Fixed tabulation.
16507         (build_string_concatenation): Optimize out left or right empty
16508         string constants.
16509
16510 1999-01-28  Per Bothner  <bothner@cygnus.com>
16511
16512         * jcf-write.c (localvar_alloc):  Only emit entry for
16513         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16514         (generate_bytecode_insns):  Only call put_linenumber if
16515         debug_info_level > DINFO_LEVEL_NONE.
16516         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
16517         is specified, add -g1 (for compatibility wih javac).
16518
16519 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16520
16521         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16522         gjavah.o, check-init.o, jv-scan.o
16523
16524 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16525
16526         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16527
16528         * gjavah.c: Include config.h and system.h.
16529
16530         * javaop.h (inline): Don't define, its handled by system.h.
16531         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16532         from `inline' to `static inline'.
16533
16534         * jcf.h (inline): Don't define, its handled by system.h.
16535
16536         * lex.c (inline): Likewise.
16537
16538 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16539
16540         * lang-specs.h: Map -Qn to -fno-ident.
16541
16542 1999-01-29  Richard Henderson  <rth@cygnus.com>
16543
16544         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16545
16546 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16547
16548         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16549         then cast it to Object before calling `append' method.
16550
16551 1999-01-28  Per Bothner  <bothner@cygnus.com>
16552
16553         * check-init.c (check_bool2_init, check_bool_init, check_init):
16554         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16555         * jcf-write.c (generate_bytecode_insns):  Likewise.
16556
16557 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16558
16559         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16560         * parse.y (patch_cast): Allow a boolean to be cast into a
16561         boolean.
16562
16563 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16564
16565         * parse.y: (class_declaration:): Fixed indentation.
16566         (class_member_declaration:): Extra `;' after field declaration now
16567         accepted.
16568         (interface_declaration:): Removed debug messages in error reports.
16569         (patch_binop): Nodes created and returned inherit the orignal
16570         node's COMPOUND_ASSIGN_P flag value.
16571         (patch_cast): Fix cast from char to floating point.
16572
16573 1999-01-25  Andrew Haley  <aph@cygnus.com>
16574
16575         * except.c, java-except.h (expand_resume_after_catch): new
16576         function.
16577         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16578         to branch back to main flow of control after a catch block.
16579
16580 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16581
16582         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16583         $(srcdir)/../system.h.
16584         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16585         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16586         (jcf-write.o): Likewise.
16587         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16588         (mangle.o): Depend on $(srcdir)/../toplev.h.
16589         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16590         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16591
16592         * class.c: Include output.h and parse.h.
16593         (mangled_classname): Add the `const' keyword to a char*.
16594         (find_named_method): Hide unused function definition.
16595         (build_utf8_ref): Change type of variable `c' to unsigned char.
16596         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16597         (build_class_ref): Add the `const' keyword to a char*.
16598         (layout_class_method): Remove unused variable `buf'.
16599
16600         * decl.c (find_local_variable): Remove unused variable `rtl'.
16601         (pushdecl): Likewise for variables `different_binding_level' and
16602         `oldglobal'.
16603         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16604         (maybe_build_cleanup): Likewise for parameter `decl'.
16605
16606         * except.c (expand_start_java_handler): Mark parameter `range'
16607         with ATTRIBUTE_UNUSED.
16608
16609         * expr.c: Include except.h.
16610         (pop_type): Remove unused variable `i'.
16611         (pop_value): Likewise for variables `n_words' and `i'.
16612         (expand_java_arrayload): Likewise for variable `convert'.
16613         (java_lang_expand_expr): Likewise for variables `op0', `type',
16614         `mode', `unsignedp', `node' and `elements'.
16615         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16616         `eh_ranges'.
16617         (process_jvm_instruction): Add a `const' qualifier to a char*.
16618
16619         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16620         (temp_directory): Likewise.
16621         (print_c_decl): Likewise.
16622         (print_method_info): Likewise.
16623         (decode_signature_piece): Likewise.
16624         (print_mangled_classname): Likewise.
16625
16626         * java-except.h: Provide prototypes for maybe_start_try,
16627         maybe_end_try and add_handler.
16628
16629         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16630         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16631         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16632         init_expr_processing, push_super_field, init_class_processing,
16633         can_widen_reference_to, class_depth, verify_jvm_instructions,
16634         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16635         set_local_type, merge_type_state, push_type, load_type_state,
16636         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16637         emit_unicode_mangled_name): Add prototypes.
16638
16639         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16640         (print_signature_type): Use ISDIGIT, not isdigit.
16641         (print_signature): Remove unused variable `j'.
16642
16643         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16644         int when comparing against one.
16645
16646         * jcf-parse.c: Include toplev.h.
16647
16648         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16649         (localvar_free): Remove unused variable `i'.
16650         (generate_bytecode_conditional): Likewise for variable `kind'.
16651
16652         * jv-scan.c: Include config.h and system.h.  Remove redundant
16653         OS header and gansidecl.h includes.
16654         (warning): Add the `const' keyword to a char*.  Also add
16655         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16656         __STDC__, when determining whether to use ANSI-isms.
16657         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16658         (xmalloc): Don't redundantly prototype here.
16659         (main): Remove unused parameter `envp'.  Also fix the arguments
16660         passed to function `fatal' to match the format specifier.
16661
16662         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16663
16664         * mangle.c: Include toplev.h.
16665         (emit_unicode_mangled_name): Declare parameter `len'.
16666
16667         * parse.y (parse_warning_context): Add the `const' keyword to a
16668         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16669         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16670         (issue_warning_error_from_context): Add the `const' keyword to
16671         a char*.
16672         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
16673         not `__STDC__' for whether to use ANSI-isms.
16674
16675         * typeck.c (incomplete_type_error): Mark parameters `value' and
16676         `type' with ATTRIBUTE_UNUSED.
16677         (parse_signature_type): Use ISDIGIT, not isdigit.
16678
16679         * verify.c (check_pending_block): Add the `const' keyword to a char*.
16680         (verify_jvm_instructions): Likewise.  Remove unused variables
16681         `field_name' and `default_val'.
16682
16683         * zextract.c: Include config.h and system.h.  Remove redundant
16684         OS header includes.
16685
16686         * zipfile.h: Prototype `read_zip_archive'.
16687
16688 1999-01-21  Andrew Haley  <aph@cygnus.com>
16689
16690         * typeck.c (convert): Allow conversions to void type: some
16691         optimizations in gcc do this.
16692
16693 1999-01-21  Andrew Haley  <aph@cygnus.com>
16694
16695         * typeck.c (convert_ieee_real_to_integer): New function.
16696         (convert): When not using fast-math and using hardware fp, convert
16697         an IEEE NaN to zero.
16698
16699 1999-01-18  Andrew Haley  <aph@cygnus.com>
16700
16701         * parse.y (patch_binop): Do a type conversion from signed to
16702         unsigned and then back to signed when a ">>>" is found.
16703
16704 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16705
16706         * java-tree.h: (check_for_initialization): Added prototype.
16707         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
16708         * parse.y (do_resolve_class): Removed unused locals.
16709         (read_import_dir): Likewise.
16710         (resolve_qualified_expression_name): Array creation
16711         expressions are valid primary expressions.
16712         (qualify_ambiguous_name): Likewise.
16713         (patch_synchronized_statement): Removed unused local.
16714
16715 1999-01-17  Jeffrey A Law  (law@cygnus.com)
16716
16717         * Makefile.in (zextract.o): Add dependencies.
16718
16719         * Makefile.in: Do not put ^Ls at the start of a line.
16720
16721 1999-01-15  Per Bothner  <bothner@cygnus.com>
16722
16723         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
16724         sub-type the result of the call that gets the exception value.
16725
16726         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
16727         don't call finish_class.
16728
16729         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
16730         clear found before continuing.
16731
16732         * verify.c (verify_jvm_instructions):  On an array load, allow
16733         and handle top of stack to be TYPE_NULL.
16734
16735         * gjavah.c (generate_access):  Translate Java package private or
16736         protected access to C++ public, but with a comment.
16737
16738 1999-01-13  Andrew Haley  <aph@cygnus.com>
16739
16740         * expr.c (generate_name): Name prefix changed to avoid clashes
16741         with assembler temp labels.
16742
16743         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
16744         MODIFY_EXPR.  Without this, code for the assignment may not be
16745         generated at all and the synchronized statement will read an
16746         uninitialized variable.
16747
16748 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16749
16750         * class.c (maybe_layout_super_class): Fixed returned value.
16751         * lex.c: Added 1999 to the copyright.
16752         (java_init_lex): Initialize java_lang_imported.
16753         * lex.h: Added 1999 to the copyright.
16754         * parse.h: Added 1999 to the copyright.
16755         (REGISTER_IMPORT): Fixed typo in trailing macro.
16756         (CURRENT_OSB): New macro.
16757         (struct parser_ctxt): New fields osb_depth, osb_limit.
16758         * parse.y (java_lang_id): New global variable.
16759         (type_import_on_demand_declaration): Don't import java.lang.* twice.
16760         (array_creation_expression:): Use CURRENT_OSB.
16761         (dims:): Uses a stack to keep track of array dimensions.
16762         (cast_expression:): Use CURRENT_OSB.
16763         (find_expr_with_wfl): Return NULL if node found doesn't meet the
16764         conditions.
16765         (register_fields): Fixed typos in comment.
16766         (check_method_redefinition): Fixed comment indentation.
16767         (java_check_regular_methods): Set saved found wfl to NULL after
16768         having reinstalled it in the previously found DECL_NAME.
16769
16770 1999-01-10  Richard Henderson  <rth@cygnus.com>
16771
16772         * gjavah.c (java_float_finite): Use a union to do type punning.
16773         (java_double_finite): Likewise.
16774
16775 1999-01-09  Per Bothner  <bothner@cygnus.com>
16776
16777         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
16778         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
16779         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
16780         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
16781         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
16782         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
16783
16784 1999-01-08  Per Bothner  <bothner@cygnus.com>
16785
16786         * check-init.c (check_init):  If compiling to native, we don't
16787         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
16788
16789 1999-01-08  Tom Tromey  <tromey@cygnus.com>
16790
16791         * parse-scan.y (variable_declarator_id): Set or increment
16792         bracket_count.
16793         (bracket_count): New global.
16794         (formal_parameter): Handle case where bracket pairs trail variable
16795         declarator id.
16796
16797 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
16798
16799         * jcf-parse.c (yyparse): variable len changed from a char to an
16800         int to prevent overflow.
16801
16802 1999-01-06  Per Bothner  <bothner@cygnus.com>
16803
16804         * java-tree.h:  Declare read_class.
16805         * jcf-parse.c (read_class):  New function.
16806         (load_class):  Now just call read_class.
16807
16808         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
16809         * jcf-parse.c (parse_source_file):  Declare save_error_count,
16810         which is needed by java_parse_abort_on_error macro,
16811         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
16812
16813         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
16814         constructor, if initializing a static field.
16815         (patch_new_array_init):  Set TREE_CONSTANT if it is.
16816         * expr.c (java_lang_expand_expr):  For a static array constructor
16817         of primitive elements, allocate the array itself statically.
16818         Disabled until we can set the vtable field statically.
16819
16820         * check-init.c:  New file.  Checks for definite assignment.
16821         * Makefile.in (JAVA_OBJS):  Add check-init.o.
16822         * parse.y (java_complete_expand_method): Call check_for_initialization.
16823         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
16824
16825 1999-01-06  Graham <grahams@rcp.co.uk>
16826
16827         * parse.y : include system.h instead of including
16828         standard headers directly with the exception of <dirent.h>.
16829
16830 1999-01-06  Per Bothner  <bothner@cygnus.com>
16831
16832         * lex.h:  Moved static function declarations to lex.c,
16833         to shut up some -Wall warnings.
16834         * lex.c:  Static function declarations moved here.
16835         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
16836
16837 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16838
16839         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
16840
16841 1998-12-22  Per Bothner  <bothner@cygnus.com>
16842
16843         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
16844         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
16845
16846         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
16847         (localvar_alloc):  Change return type to void,
16848         (emit_unop):  Remove unused variable size.
16849
16850         * jcf-write.c (struct jcf_block):  Add new union.
16851         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
16852         (call_cleanups):  New functions.
16853         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
16854         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
16855         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
16856         * lang.c (lang_init):  Call using_eh_for_cleanups.
16857         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
16858         completing operands to patch_synchronized_statement.
16859         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
16860         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
16861         WITH_CLEANUP_EXPR instead of TRY_EXPR.
16862
16863 1998-12-20  John F. Carr  <jfc@mit.edu>
16864
16865         * Make-lang.in: Comment out control-Ls; they upset some makes.
16866
16867 1998-12-18  Tom Tromey  <tromey@cygnus.com>
16868
16869         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
16870         consistently.
16871
16872 1998-12-17  Tom Tromey  <tromey@cygnus.com>
16873
16874         * parse.y (DIR_SEPARATOR): New define.
16875         (check_class_interface_creation): Use it.
16876
16877         * parse-scan.y (report_main_declaration): Recognize
16878         `java.lang.String' in argument to main.
16879
16880 1998-12-16  Per Bothner  <bothner@cygnus.com>
16881
16882         * parse.y (create_interface):  Remove bogus test.
16883
16884 1998-12-16  Per Bothner  <bothner@cygnus.com>
16885
16886         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
16887         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
16888
16889 1998-12-16  Tom Tromey  <tromey@cygnus.com>
16890
16891         * parse-scan.y (qualified_name): Use correct sprintf format.
16892
16893 1998-12-15  Tom Tromey  <tromey@cygnus.com>
16894
16895         * gjavah.c (print_field_info): Changed how most negative number is
16896         printed.
16897
16898 1998-12-14  Per Bothner  <bothner@cygnus.com>
16899
16900         * parse.y (fold_constant_for_init):  New function.
16901         (resolve_expression_name):  Don't replace static final
16902         constant-initialized fields by its value.
16903         (java_complete_lhs):  New.  Same as java_complete_tree, except does
16904         not replace static final constant-initialized fields by their values.
16905         (register_fields):  If there is an initializer, set DECL_INITIAL and
16906         MODIFY_EXPR_FROM_INITIALIZATION_P.
16907         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
16908         Only call patch_initialized_static_field if
16909         MODIFY_EXPR_FROM_INITIALIZATION_P.
16910         (patch_initialized_static_field):  If not valid constant, clear
16911         DECL_INITIAL.
16912
16913         * parse.y (lookup_field_wrapper):  Fix thinko.
16914
16915         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
16916         set and restore global lineno.
16917
16918 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16919
16920         * gjavah.c (print_field_info): If value to print is the smallest
16921         value of its size, then print as hex to avoid later warnings from
16922         C++ compiler.
16923
16924 1998-12-14  Tom Tromey  <tromey@cygnus.com>
16925
16926         * gjavah.c (decompile_method): Decompile `return null'.
16927         (process_file): Generate `#pragma interface'.
16928         (method_declared): New global.
16929         (print_method_info): Set it.
16930         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
16931         (print_method_info): Handle abstract methods.
16932
16933 1998-12-13  Per Bothner  <bothner@cygnus.com>
16934
16935         * parse.y (patch_method_invocation):  If class_decl is null
16936         (e.g. an array type), use original type.
16937
16938         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
16939         errors about uncaught exception from clone (of array, specifically).
16940
16941 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16942
16943         * gjavah.c (decompile_method): Handle all types of `return'
16944         opcode.  Decompile `return this' and `return'.
16945         (method_access): New global.
16946         (print_method_info): Set it.
16947         (decompile_method): Don't decompile a synchronized method.
16948
16949 1998-12-13  Tom Tromey  <tromey@cygnus.com>
16950
16951         * jcf-reader.c (jcf_parse_one_method): Recognize
16952         HANDLE_END_METHOD.
16953         * gjavah.c (HANDLE_END_METHOD): New macro.
16954         (HANDLE_CODE_ATTRIBUTE): New macro.
16955         (decompile_method): New function.
16956         (print_method_info): Don't print `;\n' at end of function decl.
16957         Include java-opcodes.h.
16958         (decompiled): New global.
16959
16960 1998-12-12  Per Bothner  <bothner@cygnus.com>
16961
16962         * class.c (build_class_ref):  Handle PRIMTYPE.class if
16963         flag_emit_class_files.
16964         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
16965         if flag_emit_class_files.
16966         * parse.y (java_complete_tree):  Pre-liminary support for
16967         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
16968
16969         * parse.y (patch_synchronized_statement):   Don't call monitorexit
16970         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
16971
16972         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
16973
16974         * zipfile.h (opendir_in_zip):  New declaration.
16975         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
16976         (opendir_in_zip):  New function, using code from open_in_zip.
16977         (open_in_zip):  Call opendir_in_zip.
16978         (find_class):  Remove no-longer-used do_class_file parameter,
16979         but add source_ok parameter.  Change logic so if we find a .java file,
16980         we don't look for .class in later classpath emtries.
16981         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
16982         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
16983         * gjavah.c: Update call to find_class.
16984         * jcf-dump.c:  Likewise.
16985
16986         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
16987         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
16988         nothing if body is empty_stmt_node.
16989         Various little fixes so SP gets correctly adjusted.
16990         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
16991         For CALL_EXPR, test if static first.
16992         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
16993         such as the ones we create for Object and Class.
16994         Set and restore current_function_decl.
16995         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
16996         (note_possible_classname):  New function.
16997         (read_import_entry):  Removed.  Merged with read_import_dir.
16998         (read_import_dir):  Don't call find_class - that only gives us
16999         the first classpath entry having the needed package.
17000         Use the struct buffer data structure from buffer.h.
17001         (read_import_dir, find_in_imports_on_demand):  The remembered
17002         class names now use '.' (not '/') as package separator.
17003
17004         * parse.y (java_complete_expand_methods):  Call write_classfile
17005         here, and not in java_expand_classes (which only gets first class).
17006
17007 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17008
17009         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
17010         (register_fields):  If a static fields has an initializer, just
17011         chain it on ctxp->static_initialized, and handle later.
17012         (java_complete_expand_methods):  Force <clinit> first.
17013         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
17014         - it's already been completed.
17015         (patch_initialized_static_field):  New function.
17016         (java_complete_field):  Call it.
17017
17018 1998-12-12  Per Bothner  <bothner@cygnus.com>
17019
17020         * expr.c (encode_newarray_type, build_new_array):  New functions.
17021         * java-tree.h:  Declare build_new_array.
17022         * jcf-write.c (patch_newarray):  Use build_new_array.
17023
17024         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
17025         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
17026
17027         * parse.y (patch_new_array_init):  Re-organize.
17028         Now is passed the actual array (pointer) type of the value.
17029         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17030         (patch_array_constructor):  Removed - merged into patch_new_array_init.
17031         (java_complete_tree):  Update patch_new_array_init.
17032
17033         * jcf-write.c (find_constant_index):  New function.
17034         (generate_bytecode_insns):  Use find_constant_index.
17035         (generate_classfile):  Use find_constant_index for ConstantValue.
17036
17037 1998-12-11  Tom Tromey  <tromey@cygnus.com>
17038
17039         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17040         * decl.c (init_decl_processing): Renamed dtable -> vtable.
17041         * class.c (make_class_data): Renamed dtable -> vtable, and
17042         dtable_method_count -> vtable_method_count.
17043
17044 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17045
17046         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17047         global variables, initialized.
17048         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17049         Declared new global variables.
17050         * lex.c (java_lex): Return long_zero_node, float_zero_node,
17051         double_zero_node, integer_zero_node upon direct matching.
17052         * parse.y (purify_type_name): Added function prototype.
17053         (duplicate_declaration_error_p): Consider new_type as potentially
17054         being a incomplete type. Use purify_type_name on type string.
17055         (method_header): saved_type: unused variable removed. Don't figure
17056         return type if method name is invalid.
17057         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17058         processed by patch_unaryop.
17059         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17060         increment/decrement node into its original type after binary
17061         numeric promotion on its operands.
17062
17063 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17064
17065         * parse.y (array_initializer:): Array init operand is NULL_TREE
17066         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17067         now an error. Fixed indentation problems.
17068         (patch_string): Handle error_mark_node as an argument.
17069         (patch_new_array_init): Fixed indentation problems.
17070         (array_constructor_check_entry): Removed check on null wfl_value.
17071         Return an error if wfl_value's walk returns an error.
17072
17073 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17074
17075         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17076         * lex.c (java_lex): Remember column position before advancing one
17077         token. Retain location information on OCB_TK.
17078         * lex.h (typedef struct java_lc): Added new field.
17079         * parse.h (GET_SKIP_TYPE): New macro.
17080         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17081         * parse.y (build_new_array_init, patch_new_array_init,
17082         patch_array_constructor, maybe_build_array_element_wfl,
17083         array_constructor_check_entry): New function prototypes.
17084         (switch_block:): Tagged <node>.
17085         (OCB_TK): Tagged <operator>.
17086         (array_initializer:): Installed actions.
17087         (variable_initializer): Build location information on element if
17088         necessary.
17089         (switch_statement:): Fixed indentation typo.
17090         (switch_block:): Redefined default action.
17091         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17092         (patch_assignment): Removed duplicate code.
17093         (maybe_build_array_element_wfl, build_new_array_init,
17094         patch_new_array_init, patch_array_constructor,
17095         array_constructor_check_entry): New functions.
17096
17097 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17098
17099         * parse.y (array_initializer): Tagged <node>.
17100         (variable_initializer:): Use default rule.
17101         (array_initializer:): Defined actions.
17102         (variable_initializers:): Likewise.
17103         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17104         non-static field accesses.
17105         (patch_invoke): Fixed indentation typo.
17106         (java_complete_tree): Likewise.
17107         (build_labeled_block): Changed leading comment. Generate an error
17108         in case of duplicate loop labels.
17109         (patch_conditional_expr): Patch results of string concatenation
17110         operations.
17111
17112 1998-12-06  Per Bothner  <bothner@cygnus.com>
17113
17114         * constants.c (find_methodref_index):  When the class is an interface,
17115         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17116
17117         * decl.c (finit_identifier_node):  Use "$finit$", rather than
17118         "<finit>" (which Sun's verifier rejects).
17119         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
17120         (generate_field_initialization_code):  Removed.
17121         (fix_constructors)  Don't add call to $finit$ here (wrong order).
17122         (patch_method_invocation):  Add $finit$ call here.
17123
17124         * java-tree.h (CALL_USING_SUPER):  New macro.
17125         * parse.y (patch_invoke):  Remove im local variable.
17126         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
17127         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
17128         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
17129
17130         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
17131
17132         * parse.y (java_complete_tree):  Don't complain about unreachable
17133         statement if it is empty_stmt_node.
17134
17135         * jcf-write.c (find_constant_wide):  New function.
17136         (push_long_const):  Use find_constant_wide.
17137
17138         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
17139         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
17140         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17141         Emit invokeinterface when calling an interface method.
17142         Emit invokespecial also when calling super or private methods.
17143
17144         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
17145
17146 1998-12-06  Per Bothner  <bothner@cygnus.com>
17147
17148         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
17149
17150 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17151
17152         * java-tree.h (java_layout_seen_class_methods): New function
17153         prototype.
17154         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17155         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17156         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17157         * parse.y (method_declarator:): Defined action.
17158         (issue_warning_error_from_context): input_filename saved, set to
17159         the appropriate value and restored after java_error is called.
17160         (build_unresolved_array_type): Fixed comment.
17161         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17162         (method_header): Deal with return type the same way type are
17163         handled for fields and method's parameters and local variables
17164         types are handled.
17165         (check_method_redefinition): Removed extra CR.
17166         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17167         (java_layout_seen_class_methods): New function.
17168         (java_layout_classes): Call java_layout_seen_class_methods.
17169
17170 1998-12-03  Per Bothner  <bothner@cygnus.com>
17171
17172         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
17173
17174 1998-12-03  Per Bothner  <bothner@cygnus.com>
17175
17176         * jcf-dump.c (main):  Fix error message.
17177         * jcf-path.c (add_entry):  Style fix.
17178
17179 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17180
17181         * class.c (layout_class_method): Call build_java_argument_signature
17182         on constructors too.
17183         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17184         (patch_method_invocation): Define a primary when resolving an
17185         expression name. Augmented comment on code checking illegal `this'
17186         usage. Loosened it test by accepting NEW_CLASS_EXPR.
17187
17188 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17189
17190         * class.c (layout_class_method): Don't report error on non-static
17191         overriding static if the method is private.
17192         * java-tree.h (finish_class): Prototype added.
17193         * lex.c (java_get_line_col): Handle col argument -2 value.
17194         * parse.h: All static method declarations moved to parse.y.
17195         * parse.y: Now contains all static method declarations previously
17196         found in parse.h.
17197         (find_expr_with_wfl, missing_return_error,
17198         unreachable_stmt_error): New functions.
17199         (java_get_real_method_name): Identify constructors bearing class
17200         names in source code compiled classes only.
17201         (java_complete_expand_methods): Call missing_return_error.
17202         (invocation_mode): Private methods invoked as static methods.
17203         (java_complete_tree): Call unreachable_stmt_error.
17204
17205 1998-12-01  Tom Tromey  <tromey@cygnus.com>
17206
17207         * Makefile.in (+target): Removed.
17208         (+xmake_file): Likewise.
17209         (+tmake_file): Likewise.
17210         (.NOEXPORT): Removed duplicate.
17211
17212 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17213
17214         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17215
17216         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
17217
17218         * jvgenmain.c: Remove the xmalloc prototype, we get it from
17219         libiberty.h.  Provide an xmalloc definition.
17220
17221         * jvspec.c: Remove the xmalloc prototype.
17222
17223         * parse-scan.y: Include config.h and system.h.  Don't include
17224         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
17225         Provide an xstrdup definition.
17226
17227 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
17228
17229         * jcf-path.c (add_entry): Recognize ".jar" too.
17230         * lang-specs.h: Likewise.
17231
17232 1998-11-26  Per Bothner  <bothner@cygnus.com>
17233
17234         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
17235         soft_monitorenter_node, soft_monitorexit_node, throw_node.
17236
17237         * jcf-write.c (generate_bytecode_insns):
17238         Handle pre/post-increment/decrement of long.
17239
17240         * jcf-write.c (generate_bytecode_insns):
17241         Handle missing exception handler (finally for synchronized).
17242
17243 1998-11-25  Per Bothner  <bothner@cygnus.com>
17244
17245         * java-tree.h (end_params_node):  Declare global.
17246         * decl.c (end_params_node):  New global.
17247         (init_decl_processing, start_java_method):  Use end_params_node for
17248         end of list of parameter types.  Follows correct gcc conventions.
17249         * expr.c (pop_argument_types, pop_arguments):  Likewise.
17250         * lang.c (put_decl_node):  Likewise.
17251         * typeck.c (various places):  Likewise.
17252         * class.y (various places):  Likewise.
17253         * parse.y (various places):  Likewise.
17254
17255         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
17256         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
17257
17258         * class.c:  Add #include flags.h, remove no-longer needed declaration.
17259
17260         * class.c (layout_class_method):  Remove commented-out code, re-format.
17261         Don't add vtable entry (or index) for private methods.
17262         * expr.c (expand_invoke):  A private method is implicitly final.
17263         * class.c (make_class_data):  If inlining or optimizing,
17264         skip private methods.
17265
17266         * class.c (finish_class):  New function.  Calls existing methods,
17267         but alls emits deferred inline functions.
17268         * jcf-parse.c (parse_class_file):  Call finish_class.
17269         * parse.y (java_complete_expand_methods):  Likewise.
17270
17271         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
17272
17273         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
17274
17275 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
17276
17277         * jcf-write.c (generate_bytecode_conditional): Fix typo.
17278
17279 1998-11-24  Per Bothner  <bothner@cygnus.com>
17280
17281         * (generate_classfile): Always write class access flag with
17282         ACC_SUPER set.
17283
17284 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17285
17286         * class.c (maybe_layout_super_class): New function.
17287         (layout_class): Reorganized. Loop on class methods dispatched into
17288         a new function. Call maybe_layout_super_class.
17289         (layout_class_methods, layout_class_method): New functions.
17290         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17291         class.
17292         (expand_invoke): Likewise.
17293         * java-tree.h (all_class_list): New global variable declared.
17294         (layout_class_methods, layout_class_method): New function
17295         prototypes.
17296         (LAYOUT_SEEN_CLASS_METHODS): New macro.
17297         * jcf-parse.c (all_class_list): New global variable.
17298         (load_class): Extended what class_or_name can be. Use parser
17299         context mechanism to save globals before calling jcf_parse.
17300         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17301         is set on the file name.
17302         (jcf_parse): Layout class methods when Object is loaded, otherwise
17303         record class in all_class_list for delayed method layout.
17304         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17305         * lang.c (put_decl_node): Decode <init> into the decl context
17306         class name.
17307         * lex.c (java_allocate_new_line): Use xmalloc.
17308         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17309         pointers, not TREE_LIST elements.
17310         (struct parser_ctxt): Fixed comment indentations, added comments
17311         and reordered some fields.
17312         (java_check_methods): Function prototype removed.
17313         * parse.y (java_push_parser_context): Use xmalloc.
17314         (java_parser_context_restore_global): Pop extra pushed ctxp only
17315         when there's nothing next.
17316         (maybe_create_class_interface_decl): Fixed comment, add new
17317         created class decl to all_class_list.
17318         (method_header): Use GET_REAL_TYPE on argument's types.
17319         (method_declarator): Use GET_REAL_TYPE, change type to the real
17320         type in TREE_LIST dependency node. Build argument list with the
17321         real type.
17322         (create_jdep_list): Use xmalloc. Removed allocation error message.
17323         (obtain_incomplete_type): Fixed leading comment. Broadened
17324         incoming argument meaning.
17325         (register_incomplete_type): Use xmalloc. Removed allocation error
17326         message.
17327         (safe_layout_class): Fixed leading comment.
17328         (jdep_resolve_class): Reversed if statement condition and switch
17329         if and else bodies.
17330         (resolve_and_layout): Fixed leading comment. Broadened incoming
17331         argument meaning.
17332         (complete_class_report_errors): New local variable name, for
17333         clarity. purify_type_name used for all error cases.
17334         (java_get_real_method_name): Stricter check on constructors.
17335         (java_check_regular_methods): Reverse methods list only if not
17336         already laid out. Layout artificial constructor.
17337         (java_check_methods): Deleted.
17338         (source_start_java_method): Obtain incomplete type for patchable
17339         method arguments.
17340         (java_layout_classes): Fixed leading comment. Use
17341         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17342         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17343         before returning. Fixed comments.
17344         (java_expand_classes): Check for errors up front.
17345         (patch_method_invocation): Class to search is resolved and laid
17346         out.
17347
17348 1998-11-24  Per Bothner  <bothner@cygnus.com>
17349
17350         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
17351
17352         * javaop.h (int8):  Removed - not used.
17353         (jbyte):  Redefine portably with correct signedness.
17354
17355         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
17356
17357         * jcf-write.c (generate_bytecode_insns):  Fix typo
17358         OPCODE_getstatic to OPCODE_getfield.
17359
17360         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
17361         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
17362         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17363
17364 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17365
17366         * jcf-parse.c (jcf_parse_source): Function returned type is
17367         void. Added prototype.
17368         (jcf_parse): Function returned type is void.
17369         (yyparse): Remove call to fclose on the last parsed file.
17370
17371         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17372
17373 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17374
17375         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17376         (layout_class): Cope with methods featuring WFL in decl names.
17377         * decl.c (unqualified_object_id_node): New global variable,
17378         initialized.
17379         (build_decl_no_layout): Removed.
17380         * expr.c (build_primtype_type_ref): Handle Double.
17381         (java_lang_expand_expr): Fixed indentations.
17382         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17383         (flag_wall, flag_redundant, flag_not_overriding,
17384         flag_static_local_jdk1_1, unqualified_object_id_node): Global
17385         variable declarations.
17386         (build_decl_no_layout): Removed prototype.
17387         (java_get_real_method_name): Added prototype.
17388         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17389         (java_parse_abort_on_error): Macro now just returns.
17390         * jcf-parse.c (jcf_parse_source): Check fclose returned
17391         value. Call emit_register_classes if java_report_errors returns
17392         zero.
17393         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17394         flag_static_local_jdk1_1): New integer flags.
17395         (lang_decode_option): New flags set here.
17396         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17397         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17398         the flag_redundant variable.
17399         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17400         when parsing java.lang.Object class.
17401         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17402         NULL_TREE to build.
17403         (resolve_qualified_expression_name): Fixed indentation.
17404         (patch_array_ref): Changed prototype.
17405         (not_initialized_as_it_should_p): Prototype removed.
17406         (java_report_errors): Added function prototype.
17407         * parse.y (formal_parameter:): Changed error message for not yet
17408         supported final parameters.
17409         (class_type_list:): Set both PURPOSE and VALUE of created
17410         TREE_LIST to be class_type.
17411         (primary_no_new_array:): Handle class literals on primitive types.
17412         (parse_warning_context): Reinstalled correct force_error and
17413         do_warning flags setups.
17414         (java_report_errors): Changed prototype. Return java_error_count
17415         value.
17416         (variable_redefinition_error): Consider treating variable type as
17417         a fake pointer.
17418         (create_interface): Warn about redundant abstract modifier if
17419         flag_redundant is set. Changed error message.
17420         (lookup_field_wrapper): Save/restore globals before/after looking
17421         up field.
17422         (duplicate_declaration_error_p): Consider treating declaration
17423         type as a fake pointer.
17424         (register_fields): Extract real type from dependency node. Check
17425         for duplicate field declaration after type adjustment. Use
17426         DECL_INITIAL to store static final initialized values.
17427         (method_header): Extract real function type from dependency node.
17428         (check_abstract_method_header): Use GET_METHOD_NAME.
17429         (obtain_incomplete_type): Layout fake pointer type.
17430         (safe_layout_class): Don't try to check for methods before layout.
17431         (java_complete_class): Don't check for correct throws clause
17432         elements inheritance here.
17433         (resolve_and_layout): Broadened name parameter meaning.
17434         (reset_method_name): Use GET_METHOD_NAME.
17435         (java_get_real_method_name): New function.
17436         (java_check_regular_methods): Don't check methods in
17437         java.lang.Object.  Verify lineage of throws clause elements. Use
17438         flag_no_overriding in warning report.
17439         (check_throws_clauses): Don't check if class was from
17440         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17441         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17442         (declare_local_variables): Use flag_static_local_jdk1_1 to report
17443         warning on unsupported final local variables. Use build_decl
17444         instead of build_decl_no_layout. Get real local variable type from
17445         dependency node.
17446         (source_start_java_method): Get real parameter type from
17447         dependency node. Call build_decl instead of build_decl_no_layout.
17448         (java_layout_classes): Reverse tree and layout type and class as
17449         required. Mark class as loaded when done.
17450         (resolve_field_access): Fixed indentation. Restricted condition
17451         leading to static field access code generation. Set field_type
17452         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17453         (resolve_qualified_expression_name): Initialize type_found to
17454         null. Handle static field resolved during qualification. Fixed
17455         layout on non primitive field decl types.
17456         (not_accessible_p): Fixed typo in comment.
17457         (patch_method_invocation): Resolve and layout class to search from
17458         type.
17459         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17460         layout non primitive type, if necessary. Make method node only to
17461         report errors.
17462         (find_applicable_accessible_methods_list): Consider WFL'ed method
17463         decl names. Fixed indentation.
17464         (argument_types_convertible): Resolve and layout target type if
17465         necessary.
17466         (java_complete_tree): Fixed indentation problems. Rewrote
17467         CALL_EXPR thrown exceptions check. Re-installed further processing
17468         of the assignment in certain cases.
17469         (patch_assignment): Call maybe_build_primttype_type_ref to perform
17470         inlining on class literals.
17471         (valid_builtin_assignconv_identity_widening_p): Cope with constant
17472         0 literal.
17473         (valid_method_invocation_conversion_p): Likewise.
17474         (patch_string): Temporary disable forbidden use of `this' in
17475         explicit constructor invocations when doing string concatenation
17476         within their scope.
17477         (patch_unaryop): Added comment. Reinstalled code to disable
17478         further check on assignment operation with cast expression RHS.
17479         (patch_switch_statement): Fixed indentation.
17480         (build_try_statement): Call build_decl instead of
17481         build_decl_no_layout.
17482         (patch_synchronized_statement): Likewise.
17483         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17484         IS_UNCHECKED_EXPRESSION_P.
17485         (check_thrown_exceptions_do): Changed leading comment. Resolve and
17486         layout argument exception type.
17487         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17488         of IS_UNCHECKED_EXPRESSION_P.
17489
17490 1998-11-18  Anthony Green  <green@cygnus.com>
17491
17492         * jcf-parse.c (yyparse): Open class file in binary mode.
17493
17494 1998-11-15  Per Bothner  <bothner@cygnus.com>
17495
17496         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
17497
17498         * jcf-write.c (perform_relocations):  Move check out one loop.
17499
17500 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
17501
17502         * Make-lang.in: Fix reference to srcdir.
17503         * jv-scan.c: Add missing xmalloc prototype.
17504         * jvgenmain.c: Ditto.
17505
17506 1998-11-15  Per Bothner  <bothner@cygnus.com>
17507
17508         * decl.c (error_mark_node), java-tree.h:  New global.
17509         * parse.y:  Use empty_stmt_node instead of size_zero_node.
17510         (build_if_else_statement):  If missing else, use empty_stmt_node.
17511
17512         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
17513         (java_complete_expand_method):  Complain if return is missing.
17514         (java_check_regular_methods):  Comment out incorrect error check.
17515         (not_accessible_p):  Fix incorrect handling of protected methods.
17516         (patch_method_invocation):  Pass correct context to not_accessible_p.
17517         (find_applicable_accessible_methods_list):  Likewise.
17518         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17519         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17520         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17521         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17522
17523         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17524         (push_int_const):  Remove reundant NOTE_PUSH.
17525         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17526         (- case SWITCH_EXPR):  Fix code generation bug.
17527         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17528         (generate_classfile):  More robust for abstract methods.
17529
17530 1998-11-15  Anthony Green  <green@cygnus.com>
17531
17532         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17533         * Make-lang.in: Ditto.
17534
17535         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17536         * jvgenmain: Ditto.
17537
17538 1998-11-15  Per Bothner  <bothner@cygnus.com>
17539
17540         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17541
17542         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17543
17544 1998-11-14  Per Bothner  <bothner@cygnus.com>
17545
17546         Allow uses of interface types to verify.  This is not really
17547         type-safe, but it matches what Sun does, and is OK as long as
17548         there are appropriate run-time checks.
17549         * verify.c (merge_types):  If merging two interface types,
17550         just set the result to java.lang.Object.
17551         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17552
17553 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17554
17555         * gjavah.c (main): Handle --output-class-directory argument.
17556         * jvspec.c (lang_specific_driver): Translate `-d' into
17557         -foutput-class-dir.
17558         * jcf.h (jcf_write_base_directory): Declare.
17559         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17560         * lang-options.h: Mention -foutput-class-dir.
17561         * jcf-write.c (jcf_write_base_directory): New global.
17562         (make_class_file_name): Put generated .class file into `-d'
17563         directory, or into source directory if -d not given.  Function now
17564         static.
17565         (write_classfile): Free class file name.  Handle case where class
17566         file name is NULL.
17567         (DIR_SEPARATOR): New macro.
17568         Include <sys/stat.h>
17569
17570         * Makefile.in (prefix): New macro.
17571
17572 1998-11-12  Per Bothner  <bothner@cygnus.com>
17573
17574         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17575         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17576         here (done in patch_invoke instead).
17577         (case_identity):  Moved here from parse.y.
17578
17579         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17580         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17581         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17582         so they can be efficiently scanned without recursion.
17583         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17584         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17585         in BLOCK iteratively, rather than recursively.
17586
17587         * parse.y (do_unary_numeric_promotion):  New function.
17588         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17589
17590         * parse.y (patch_newarray):  Various fixes.
17591
17592         Re-do handling of switch statements (for proper block scoping).
17593         * parse.y:  Add just a single block for the enture switch block,
17594         but don't create any "case blocks".
17595         (group_of_labels):  Rmeoved unneeded non-terminal.
17596         CASE_EXPR and DEFAULT_EXPR are added to current block.
17597         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17598         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17599         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17600         * parse.y (wfl_operator, print_int_node): Make non-static.
17601         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17602         as part of recursive scan of block.
17603         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17604         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17605
17606         * parse.y:  Make various production be non-typed (void).
17607         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17608         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17609         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17610
17611         * jcf-write.c (struct jcf_handler):  New type.
17612         (struct jcf_switch_state):  New type.
17613         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17614         (alloc_handler, emit_unop, emit_reloc):  New functions.
17615         (adjust_typed_op):  Add extra parameter ("max type" offset).
17616         (emit_switch_reloc, emit_case-reloc):  New function.
17617         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17618         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17619         exception handling, method calls, object/array creation, and more.
17620
17621         * class.c:  Remove some unused variables.
17622         * constants.c (find_string_constant):  New function.
17623         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17624         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17625         if flag_emit_class_files.
17626
17627 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17628
17629         * jcf-io.c (find_class): Added explanatory comment.
17630
17631         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17632         trailing slash to `.zip' entries.
17633
17634         * jvspec.c (lang_specific_driver): Correctly handle case where
17635         GC_NAME not defined.
17636
17637 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17638
17639         * jvspec.c (GC_NAME): New define.
17640         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17641         if required.
17642         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17643
17644 1998-11-11  Per Bothner  <bothner@cygnus.com>
17645
17646         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17647
17648 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17649
17650         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17651
17652 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17653
17654         * class.c (is_compiled_class): Call safe_layout_class for class
17655         compiled from source.
17656         * conver.h (convert_to_integer, convert_to_real,
17657         convert_to_pointer): Added prototypes.
17658         * decl.c (init_decl_processing): Non longer push the decls of
17659         `methodtable', `constants', `Class', `Field', `dispatchTable'
17660         `jexception' and `Method'.
17661         * expr.c (build_invokeinterface): New function.
17662         (expand_invoke): static variable CLASS_IDENT now in
17663         build_invokeinterface. Use build_invokeinterface.
17664         (expand_java_field_op): Moved code to inline
17665         java.lang.PRIMTYPE.TYPE into a function.
17666         (build_primtype_type_ref): New function.
17667         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17668         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17669         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17670         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17671         (DECL_LOCAL_STATIC_VALUE): New macro.
17672         (build_invokeinterface, build_primtype_type_ref): New function
17673         prototypes.
17674         (java_parse_abort_on_error): Macro rewritten.
17675         * jcf-parse.c (current_method): Add comment to declaration.
17676         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
17677         Function prototypes fixed.
17678         (jcf_parse_source): push/pop parser context. save/restore global.
17679         (parse_source_file): Fixed leading comment. Now take a
17680         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
17681         classes and pop the parser context anymore.
17682         (yyparse): Push parser context, save globals, parse the source
17683         file, restore globals and pop the parser context when processing a
17684         source file.
17685         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
17686         * lex.c (java_parse_doc_section): New function.
17687         (java_lex): Call java_parse_doc_section when appropriate. Build an
17688         operator around INSTANCEOF_TK.
17689         * lex.h (java_lineterminator, java_sprint_unicode,
17690         java_unicode_2_utf8, java_lex_error, java_store_unicode):
17691         Prototypes rewritten.
17692         (java_parse_escape_sequence, java_letter_or_digit_p,
17693         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
17694         java_read_unicode, java_store_unicode, java_read_char,
17695         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
17696         Added function prototypes.
17697         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
17698         define.
17699         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
17700         New macros
17701         (struct parser_ctxt): New fields: deprecated,
17702         current_parsed_class_un, gclass_list.
17703         (fix_method_argument_names, issue_warning_error_from_context,
17704         resolve_package, lookup_package_type): New function prototypes.
17705         (resolve_expression_name): Fixed function prototype.
17706         (find_applicable_accessible_methods_list): Fixed indentation, added
17707         extra argument in prototype.
17708         (check_final_assignment, build_null_of_type, check_deprecation,
17709         check_method_redefinition, reset_method_name,
17710         java_check_regular_methods, java_check_abstract_methods,
17711         maybe_build_primttype_type_ref): New function prototype.
17712         * parse.y (conver.h): Include.
17713         (INSTANCEOF_TK): Tagged <operator>.
17714         (single_type_import_declaration): Use REGISTER_IMPORT macro.
17715         (relational_expression:): Build binop for instanceof.
17716         (java_push_parser_context): Remember ctxp->gclass_list across
17717         contexts.
17718         (java_pop_parser_context): Simply return if no context
17719         exists. Remember gclass_list across contexts.
17720         (issue_warning_error_from_context): New function.
17721         (parse_error_context): Don't setup ctxp->elc here. Call
17722         issue_warning_error_from_context instead.
17723         (parse_warning_context): Likewise.
17724         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
17725         setup. Link new class/interface to ctxp->gclass_list.
17726         (add_superinterfaces): Register interface as incomplete if not
17727         loaded.
17728         (create_class): Remember class unqualified name in
17729         ctxp->current_parsed_class_un. Check class deprecation.
17730         (register_fields): Check field deprecation. Remember static final
17731         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
17732         processing INIT.
17733         (method_header): New local variable ORIG_ARG. Use unqualified
17734         current class name for check on constructor errors. Promote return
17735         type if of record type. Argument list fix moved in
17736         fix_method_argument_names, called here. Check method deprecation.
17737         (fix_method_argument_names): New function.
17738         (method_declarator): Promote record typed arguments.
17739         (safe_layout_class): Check class methods before layout.
17740         (java_complete_class): Compute field layout when patched.
17741         (do_resolve_class): Try to load class after having it renamed
17742         after the package name.
17743         (get_printable_method_name): Use DECL_CONTEXT.
17744         (reset_method_name): New function.
17745         (check_method_redefinition): Use reset_method_name.
17746         (java_check_regular_methods): New local variable
17747         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
17748         names for error report. Check for compile-time error when method
17749         found has default (package) access.
17750         (java_check_abstract_methods): Now takes an interface DECL node as
17751         an argument. Also reinstall real name on unchecked
17752         overriding/hiding methods for error report.
17753         (java_check_methods): Fixed leading comment. Get classes to verify
17754         from ctxp->gclass_list. Use CHECK_METHODS macro and set
17755         CLASS_METHOD_CHECKED_P on class verification.
17756         (lookup_java_method2): Get real method name if necessary.
17757         (find_in_imports): Don't check package class access here.
17758         (resolve_package, lookup_package_type): New functions.
17759         (java_layout_classes): Fixed leading comment. Take classes to be
17760         laid out from ctxp->gclass_list.
17761         (java_complete_expand_methods): Don't expand native and abstract
17762         methods.
17763         (java_expand_classes): New function.
17764         (resolve_expression_name): Use additional argument ORIG.  Retrieve
17765         values of static final field of primitive types.
17766         (resolve_field_access): Handles static final field of promotive
17767         type.
17768         (resolve_qualified_expression_name): Handle STRING_CST as
17769         primaries and package name resolution. Check deprecation on found
17770         decls. Set where_found and type_found on non static field resolved
17771         during qualification. Layout non primitive field decl types.
17772         (check_deprecation): New function.
17773         (maybe_access_field): Simplified.
17774         (patch_method_invocation_stmt): Local variable CLASS_TYPE
17775         removed. Reverse method's argument when primary is a type. Don't
17776         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
17777         instead. Include abstract class in the list of class searchable
17778         for constructors. Use DECL_CONTEXT of found method for access
17779         checks. Check method deprecation.
17780         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
17781         converting arguments. Handle INVOKE_INTERFACE.
17782         (lookup_method_invoke): Search constructor using existing
17783         infrastructure (don't rely on lookup_java_constructor anymore).
17784         (find_applicable_accessible_methods_list): Extra argument flag
17785         LC. Now include constructor in the search.
17786         (qualify_ambiguous_name): Conditional expression are primaries.
17787         (not_initialized_as_it_should_p): static final are always
17788         initialized.
17789         (java_complete_tree): Pass extra NULL argument to
17790         resolve_expression_name. Stricter test to carry on patching
17791         assignments. New case for INSTANCEOF_EXPR.
17792         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
17793         (check_final_assignment, maybe_build_primttype_type_ref): New
17794         functions.
17795         (patch_assignment): Detect resolved static finals and carry normal
17796         assignment error check on them. Inline PRIMTYPE.TYPE read access.
17797         (try_builtin_assignconv): Access constant 0 on all primitive
17798         types.
17799         (valid_builtin_assignconv_identity_widening_p): Accept identical
17800         types. Accept all promoted type on int type.
17801         (valid_ref_assignconv_cast_p): Accept a null pointer to be
17802         assigned to a reference.
17803         (valid_method_invocation_conversion_p): Accept to check null
17804         pointers.
17805         (build_binop): Merge declaration and initialization of local
17806         variable BINOP.
17807         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
17808         numeric types. Improved validity test for qualify operators on
17809         references.
17810         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
17811         and PREINCREMENT_EXPR. Also detect resolved static finals of a
17812         primitive type and issue the appropriate error message.
17813         (resolve_type_during_patch): Mark class loaded when resolved.
17814         (patch_cast): Allow null to be cased to reference types.
17815         (build_null_of_type): New function.
17816         (patch_array_ref): Handle array on references correctly.
17817         (patch_return): Removed unused local variable MODIFY. Force
17818         boolean to be returned as integers. Allows null to be returned by
17819         a function returning a reference.
17820         * typeck.c (convert_to_integer, convert_to_real,
17821         convert_to_pointer): Prototypes moved to convert.h
17822         (lookup_argument_method): Use method real name, if necessary.
17823
17824 1998-10-30  Tom Tromey  <tromey@cygnus.com>
17825
17826         * class.c (build_class_ref): Changed name of primitive classes to
17827         start with `_Jv_'.
17828
17829         * class.c (make_class_data): Renamed fields: nmethods to
17830         method_count, method_count to dtable_method_count.  Always set
17831         `state' field to 0.
17832         * decl.c (init_decl_processing): Likewise.
17833
17834 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17835
17836         * class.c (layout_class): Don't mangle <finit>, produce
17837         __finit<class> instead. Don't verify artificial methods.
17838         * decl.c (finit_identifier_node): New declared global.
17839         (init_decl_processing): finit_identifier_node initialized.
17840         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
17841         * java-tree.h (finit_identifier_node): Declared as extern.
17842         (struct lang_decl): New field called_constructor.
17843         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
17844         (CLASS_HAS_FINIT_P): New macro.
17845         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
17846         explicit constructor invocation.
17847         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
17848         CALL_SUPER_CONSTRUCTOR_P): New macros.
17849         (write_classfile): Added prototype.
17850         * jcf-parse.c (jcf_parse_source): Parse and remember for
17851         generation if the file was seen on the command line.
17852         (parse_source_file): Don't write the class file here.
17853         (yyparse): Loop on files rewritten. Set current_jcf.
17854         (parse_zip_file_entries): Parse class file only if it was found.
17855         * lang.c (init_parse): Don't open command line provided filename
17856         here.
17857         (lang_parse): Don't set main_jcf anymore.
17858         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
17859         (JCONSTRUCTOR_CHECK): New macro.
17860         (JBSC_TYPE_P): New macro.
17861         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
17862         (COMPLETE_CHECK_OP_2): New macro.
17863         (struct parse_ctxt): New field explicit_constructor_p.
17864         (check_class_interface_creation): Fixed prototype indentation.
17865         (patch_method_invocation_stmt): Prototype reflects added argument.
17866         (patch_invoke): Likewise.
17867         (complete_method_declaration, build_super_invocation,
17868         verify_constructor_circularity,
17869         build_this_super_qualified_invocation, get_printable_method_name,
17870         patch_conditional_expr, maybe_generate_finit, fix_constructors,
17871         verify_constructor_super, create_artificial_method,
17872         start_artificial_method_body, end_artificial_method_body,
17873         generate_field_initialization_code): New function prototypes.
17874         * parse.y: Fixed leading comment
17875         (constructor_header:, constructor_body:, block_end:): Rules tagged
17876         <node>.
17877         (type_declaration:): Call maybe_generate_finit.
17878         (method_declaration:): Action for method_body: placed in new
17879         function complete_method_declaration, called here.
17880         (constructor_declaration:): Defined actions. Removed leading
17881         FIXME.
17882         (constructor_header:): New rule with action.
17883         (constructor_body:): Rule rewritten using block_begin: and
17884         block_end:. Defined actions.
17885         (constructor_declarator:, explicit_constructor_invocation:):
17886         Defined actions.
17887         (block:): Use new rules block_begin: block_end:.
17888         (block_begin:, block_end:): New rules and actions.
17889         (block_statements:): Fixed error message for explicit
17890         constructors.
17891         (method_invocation:): Call build_this_super_qualified_invocation
17892         if primary is `this' or `super' was seen.
17893         (conditional_expression:): Action defined.
17894         (extra_ctxp_pushed_p): New static global flag.
17895         (java_parser_context_save_global): Create parser context if
17896         necessary. Use extra_ctxp_pushed_p to remember it.
17897         (java_parser_context_restore_global): Pop extra parser context if
17898         one exists.
17899         (build_array_from_name): Array on primitive types are marked
17900         loaded.
17901         (register_fields): Restore new name in field initializer
17902         expression if type was altered. Non static fields initialized upon
17903         declaration marked initialized.
17904         (maybe_generate_finit): New function.
17905         (maybe_generate_clinit): Use create_artificial_method,
17906         start_artificial_method_body, end_artificial_method_body. Generate
17907         debug info for enclosed initialization statements.
17908         (method_header): Fixed leading comment. Check constructor
17909         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
17910         accordingly.
17911         (complete_method_declaration, constructor_circularity_msg,
17912         verify_constructor_circularity): New functions.
17913         (get_printable_method_name): New function.
17914         (check_method_redefinition): Don't rename <finit> methods. Fix
17915         declared constructor names. Error message for
17916         constructors modified.
17917         (java_check_regular_methods): Local variable seen_constructor
17918         renamed saw_constructor. Skip verification on constructors. Create
17919         default constructor with create_artificial_method.
17920         (java_check_methods): Removed unnecessary empty line.
17921         (create_artificial_method, start_artificial_method_body,
17922         end_artificial_method_body): New functions.
17923         (java_layout_classes): Changed leading comment. Reverse fields
17924         list if necessary. Always layout java.lang.Object if being
17925         defined.
17926         (java_complete_expand_methods): Verify constructor circularity.
17927         (java_complete_expand_method): Call fix_constructor on
17928         constructors.  Local variable no_ac_found removed. Restore
17929         bindings if method body expansion failed.
17930         (fix_constructors, verify_constructor_super,
17931         generate_field_initialization_code): New function.
17932         (java_expand_classes): Fixed leading comment. Write class file
17933         here.
17934         (resolve_expression_name): Check for illegal instance variable
17935         usage within the argument scope of an explicit constructor
17936         invocation.
17937         (resolve_qualified_expression_name): Pass extra from_super flag
17938         when invoking patch_method_invocation_stmt. New case for
17939         conditional expression when used as a primary. Check for error
17940         when acquiring super.
17941         (patch_method_invocation_stmt): Added extra argument super. New
17942         local variable is_static_flag. Set class_to_search according to
17943         the nature of the constructor invocation. Don't add `this'
17944         argument when expanding NEW_CLASS_EXPR. Check for illegal method
17945         invocation within the argument scope of explicit constructor
17946         invocation. Set is_static according to is_static_flag. Provide
17947         extra `super' argument to patch_invoke invocation.
17948         (patch_invoke): New argument from_super. Loop on arguments
17949         indentation fixed. Pass from_super to invocation_mode. New switch
17950         case INVOKE_SUPER. Fixed error message in switch default case.
17951         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
17952         value.
17953         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
17954         (lookup_method_invoke): Fixed prototypes in candidates list. Error
17955         message takes constructors into account.
17956         (find_applicable_accessible_methods_list): Fixed indentation.
17957         (qualify_ambiguous_name): Take explicit constructor invocation
17958         into account. Deal with a conditional expression as a primary to
17959         a method call.
17960         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
17961         case. Added extra argument to patch_method_invocation_stmt.
17962         Register calls made to explicit constructor `this'. Don't call
17963         save_expr in ARRAY_REF case when emitting class files. Check for
17964         illegal use of this when expanding explicit constructor invocation
17965         arguments.
17966         (complete_function_arguments): Set and reset parser context
17967         explicit_constructor_p field value when appropriate.
17968         (build_super_invocation, build_this_super_qualified_invocation):
17969         New functions.
17970         (patch_assignment): Fixed typo.
17971         (patch_unaryop): Check on final fields occurs only when a decl
17972         exits.
17973         (patch_return): Take constructors into account.
17974         (patch_conditional_expr): New function.
17975         * typeck.c (build_java_signature): Removed unnecessary empty line.
17976
17977 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17978
17979         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
17980
17981 1998-10-28  Tom Tromey  <tromey@cygnus.com>
17982
17983         * decl.c (init_decl_processing): Renamed fields.
17984         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
17985         interface_len, msize fields.
17986
17987         * class.c (make_class_data): Removed subclass_head and
17988         subclass_next fields.
17989         * decl.c (init_decl_processing): Removed subclass_head and
17990         subclass_next fields.
17991
17992 1998-10-28  Jeffrey A Law  (law@cygnus.com)
17993
17994         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
17995         * mangle.c (emit_unicode_mangled_name): Similarly.
17996
17997 1998-10-26  Nick Clifton  <nickc@cygnus.com>
17998
17999         * jcf-parse.c (get_constant): Place braces around code to compute
18000         'd' when REAL_ARITHMETIC is not defined.
18001
18002 1998-10-25  H.J. Lu  (hjl@gnu.org)
18003
18004         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18005         dependency.
18006
18007 1998-10-23  Tom Tromey  <tromey@cygnus.com>
18008
18009         * lang-specs.h: `.zip' files are input to jc1.
18010
18011 1998-10-22  Per Bothner  <bothner@cygnus.com>
18012
18013         * jvspecs.c:  Add (but don't enable) support for combining multiple
18014         .class and .java input filenames to a single jc1 invocation.
18015         Add support for -C flag (copile to .class files).
18016         Translate -classpath and -CLASSPATH arguments.
18017         * lang-specs.h:  Don't set %2 spec.
18018
18019 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18020
18021         * jcf-path.c (add_entry): Don't add trailing separator if entry is
18022         a .zip file.
18023         (add_path): Don't add trailing separator to non-empty path
18024         elements.
18025
18026         * lang.c (lang_decode_option): Check for -fclasspath and
18027         -fCLASSPATH before examining other `-f' options.
18028
18029         * java-tree.h (finalize_identifier_node): Don't declare.
18030         * class.c (make_class_data): Don't push "final" field.
18031         * decl.c (init_decl_processing): Don't push "final" field.
18032         (finalize_identifier_node): Removed.
18033         (init_decl_processing): Don't set finalize_identifier_node.
18034
18035         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18036
18037 1998-10-11  Anthony Green  <green@cygnus.com>
18038
18039         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18040         (JV_SCAN_SOURCES): New macro.
18041         (JCF_DUMP_SOURCES): Likewise.
18042         (jcf-dump$(exeext)): New target.
18043         (jv-scan$(exeext)): New target.
18044
18045 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18046
18047         * Makefile.in (LEX): Removed.
18048         (LEXFLAGS): Likewise.
18049         (SET_BISON): New macro.
18050         (BISON): Removed.
18051         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
18052         spurious diffs in parse.c.
18053         ($(PARSE_SCAN_C)): Likewise.
18054         (PARSE_DIR): New macro.
18055         (PARSE_C): Use it.
18056         (PARSE_SCAN_C): Likewise.
18057         (PARSE_RELDIR): New macro.
18058
18059         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18060
18061         * jcf-io.c (find_class): Use saw_java_source to determine when to
18062         look for `.java' file.
18063         * jcf-parse.c (saw_java_source): New global.
18064         (yyparse): Set it if `.java' file seen.
18065
18066         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18067         (GCJH_SOURCES): Likewise.
18068         * Makefile.in (datadir): New macro.
18069         (libjava_zip): Likewise.
18070         (JAVA_OBJS): Added jcf-path.o.
18071         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18072         (../gcjh$(exeext)): Likewise.
18073         (jcf-path.o): New target.
18074         * java-tree.h (fix_classpath): Removed decl.
18075         * jcf-parse.c (fix_classpath): Removed.
18076         (load_class): Don't call fix_classpath.
18077         * parse.y (read_import_dir): Don't call fix_classpath.
18078         * lex.h: Don't mention classpath.
18079         * lex.c (java_init_lex): Don't initialize classpath.
18080         * jcf-io.c (classpath): Removed global.
18081         (find_class): Use jcf_path iteration functions.  Correctly search
18082         class path for .java file.
18083         (open_in_zip): New argument `is_system'.
18084         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
18085         classpath-related options.
18086         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18087         and -I.
18088         (lang_init): Call jcf_path_init.
18089         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18090         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
18091         Correctly put braces around second string in each entry.
18092         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
18093         classpath-related options.
18094         (help): Updated for new options.
18095         * jcf.h: Declare functions from jcf-path.c.  Don't mention
18096         `classpath' global.
18097         * jcf-path.c: New file.
18098
18099         * jcf-depend.c: Include jcf.h.
18100
18101         * jcf-write.c (localvar_alloc): Returns `void'.
18102         (localvar_free): Removed unused variable.
18103
18104         * lang.c (OBJECT_SUFFIX): Define if not already defined.
18105         (init_parse): Use OBJECT_SUFFIX, not ".o".
18106
18107 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18108
18109         * class.c (emit_register_classes): Renamed from
18110         emit_register_class.
18111         * java-tree.h (emit_register_classes): Prototype renamed from
18112         emit_register_class.
18113         * jcf-parse.c (yyparse): Call emit_register_classes once before
18114         returning.
18115         * parse.y (java_expand_classes): No longer register classes.
18116
18117 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18118
18119         * class.c (is_compiled_class): New local variable
18120         seen_in_zip. Identify classes found in currently compiled source
18121         file(s).
18122         * decl.c (complete_start_java_method): Fixed typo.
18123         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18124         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18125         (CLASS_P): Moved around.
18126         (java_parse_abort_on_error): Macro moved from jcf-parse.c
18127         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18128         java-tree.h
18129         (jcf_parse_source): Changed leading comment. Removed unnecessary
18130         fclose and CLASS_FROM_SOURCE_P marking.
18131         (parse_source_file): New local variables remember_for_generation
18132         and filename. Mark parsed file name identifier node. Removed block
18133         executed when parse_only was null. Set remember_for_generation.
18134         Use it as an argument to java_pop_parser_context.
18135         (yyparse): New local variables several_files, list, next node and
18136         current_file_list. Split ampersand separated file names into
18137         current_file_list. Iterate through the list and parse accordingly.
18138         * parse.h (java_pop_parser_context): New function prototype.
18139         * parse.y (ctxp_for_generation): New static global variable.
18140         (java_pop_parser_context): New argument generate. Link popped ctxp
18141         to ctxp_for_generation list accordingly.
18142         (java_complete_expand_methods): Fixed indentation.
18143         (java_expand_classes): New function.
18144
18145 1998-10-17  Per Bothner  <bothner@cygnus.com>
18146
18147         * Makefile.in:  Link with libiberty.a instead of memmove.o.
18148
18149 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18150
18151         * lex.c (setjmp.h): No longer included.
18152         * lex.h (setjmp.h): Included.
18153         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18154         (duplicate_declaration_error_p): Renamed from
18155         duplicate_declaration_error.
18156         (build_array_from_name): New function prototype.
18157         * parse.y (setjmp.h): No longer included.
18158         (variable_declarator_id): Define action.
18159         (build_array_from_name): New function.
18160         (duplicate_declaration_error_p): Renamed from
18161         duplicate_declaration_error.  Fixed leading comment.
18162         (register_fields): Main `for' loop reorganized. Uses
18163         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18164         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18165         build_array_from_name.
18166         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18167         types.
18168         (read_import_dir): Don't try to skip `.' and `..'.
18169         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18170         build_array_from_name. Main `for' loop reorganized.
18171         (resolve_qualified_expression_name): When building access to a
18172         field, use the type where the field was found, not its own type.
18173         (maybe_access_field): Use field DECL_CONTEXT if the type where the
18174         field was found is null.
18175         (qualify_ambiguous_name): Sweep through all successive array
18176         dimensions.
18177
18178 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18179
18180         * java-tree.h (pop_labeled_block, lang_printable_name,
18181         maybe_add_interface, set_super_info, get_access_flags_from_decl,
18182         interface_of_p, inherits_from_p, fix_classpath,
18183         complete_start_java_method, emit_handlers, init_outgoing_cpool,
18184         make_class_data, register_class, alloc_name_constant): New
18185         function prototypes.
18186         * lang.c (lang_decode_option): Set argc argument unused. Fixed
18187         indentation. Added cast to remove warning.
18188         (lang_printable_name): Set v argument unused.
18189         (lang_print_error): Added argument to lang_printable_name call.
18190         (java_dummy_print, print_lang_decl, print_lang_type,
18191         print_lang_identifier, lang_print_xnode): All argument marked
18192         unused.
18193         * lex.c (java_unget_unicode): Removed unnecessary argument.
18194         (java_allocate_new_line): Unused local variable is gone.
18195         (java_read_char): Added parenthesis in expressions to remove
18196         warnings.  Added final return statement.
18197         (java_read_unicode): Added parenthesis in expression to remove
18198         warning.
18199         (java_parse_end_comment): Fixed java_unget_unicode invocation.
18200         (java_parse_escape_sequence): Likewise.
18201         (java_lex): Unused local variables are gone. Fixed
18202         java_unget_unicode invocation.
18203         * lex.h (set_float_handler): Prototype added when JC1_LITE not
18204         defined.
18205         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18206         lang_printable_name invocation in macro.
18207         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18208         Likewise.
18209         (duplicate_declaration_error): Suppressed unused argument in
18210         prototype.
18211         (identical_subpath_p): Function declaration is gone.
18212         (patch_invoke): Suppressed unused argument in prototype.
18213         (patch_cast, build_labeled_block, check_thrown_exceptions):
18214         Likewise.
18215         * parse.y (setjmp.h): Included
18216         (toplev.h): Likewise.
18217         (field_declaration:): Suppressed unused local
18218         (label_decl:): Fixed build_labeled_block invocation.
18219         (java_pop_parser_context): Put extra parenthesis around assignment
18220         in if.
18221         (yyerror): Suppressed unused local variables.
18222         (variable_redefinition_error): Fixed lang_printable_name
18223         invocation.
18224         (create_interface): Suppressed unused local variables.
18225         (create_class): Likewise.
18226         (duplicate_declaration_error): Suppressed unused argument. Fixed
18227         lang_printable_name invocation.
18228         (register_fields): Suppressed unused local variable. Fixed
18229         duplicate_declaration_error invocation.
18230         (method_header): Suppressed unused local variable.
18231         (method_declarator, parser_check_super): Likewise.
18232         (java_complete_class): Suppressed unused local variable. Fixed
18233         fatal error message.
18234         (complete_class_report_errors): Added default: in switch.
18235         (java_check_regular_methods): Fixed lang_printable_name
18236         invocations.
18237         (check_throws_clauses): Likewise.
18238         (java_check_abstract_methods): Suppressed unused local
18239         variable. Fixed lang_printable_name invocation.
18240         (read_import_entry): Added supplemental return statement.
18241         (read_import_dir): Suppressed unused local variables.
18242         (check_pkg_class_access, declare_local_variables): Likewise.
18243         (source_start_java_method): Suppressed unused extern variable
18244         declarations
18245         (expand_start_java_method): Suppressed unused extern and local
18246         variable declarations.
18247         (java_complete_expand_methods): Likewise.
18248         (java_complete_expand_method): Suppressed unused local variables.
18249         (make_qualified_name): Likewise.
18250         (resolve_qualified_expression_name): Added default: in
18251         switch. Fixed lang_printable_name invocation.
18252         (class_instance_creation_expression): Added parenthesis around
18253         expressions.
18254         (patch_method_invocation_stmt): Fixed lang_printable_name and
18255         patch_invoke invocations.
18256         (check_for_static_method_reference): Fixed lang_printable_name
18257         invocation.
18258         (patch_invoke): Suppressed unused arguments and local variables.
18259         (lookup_method_invoke): Suppressed unused local variables.
18260         (qualify_ambiguous_name): Added default: in switch.
18261         (identical_subpath_p): Function removed.
18262         (patch_assignment): Suppressed unused local variables. Suppressed
18263         unnecessary if statement. Fixed lang_printable_name invocations.
18264         (try_builtin_assignconv): Fixed lang_printable_name invocations.
18265         (valid_ref_assignconv_cast_p): Parenthesis around
18266         expression. Suppressed unused local variables.
18267         (build_binop): Suppressed unused local variables. fixed
18268         lang_printable_name invocations.
18269         (string_constant_concatenation): Suppressed unused local
18270         variables.
18271         (patch_unaryop): Fixed lang_printable_name invocation.
18272         (patch_cast): Suppressed unnecessary argument. Fixed
18273         lang_printable_name invocation.
18274         (patch_array_ref): Fixed lang_printable_name invocation.
18275         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18276         (build_labeled_block): Suppressed unused argument.
18277         (generate_labeled_block): Fixed build_labeled_block invocation.
18278         (build_loop_body): Suppressed unused local variables.
18279         (patch_loop_statement): Likewise.
18280         (patch_exit): Fixed lang_printable_name invocation.
18281         (patch_switch_statement): Likewise.
18282         (case_identity): First argument marked unused.
18283         (patch_try_statement): Fixed lang_printable_name invocations.
18284         (patch_synchronized_statement, patch_throw_statement): Likewise.
18285         (check_thrown_exceptions): Fixed check_thrown_exceptions and
18286         lang_printable_name invocations.
18287         (check_thrown_exceptions_do): Suppressed unused argument.
18288
18289 1998-10-14  Tom Tromey  <tromey@cygnus.com>
18290
18291         * jcf-write.c (write_classfile): Add output class file as target.
18292         * lang-options.h: Added -MD, -MMD, -M, and -MM.
18293         * jcf.h: Added declarations for dependency-tracking functions.
18294         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18295         * lang.c (lang_decode_option): Recognize -MD and -MMD.
18296         (finish_parse): Call jcf_dependency_write.
18297         (dependency_tracking): New global.
18298         (DEPEND_SET_FILE): New define.
18299         (DEPEND_ENABLE): New define.
18300         (init_parse): Enable dependency tracking if required.
18301         Include "flags.h".
18302         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18303         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18304         (../gcjh$(exeext)): Likewise.
18305         (jcf-depend.o): New target.
18306         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18307         (GCJH_SOURCES): Likewise.
18308         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
18309         dep_name argument.
18310         (find_classfile): Added dep_name argument.
18311         (find_class): Compute name of dependency.
18312         (open_in_zip): Call jcf_dependency_add_file.
18313         * gjavah.c (output_file): No longer global.
18314         (usage): Don't mention "gjavah".
18315         (help): Likewise.
18316         (java_no_argument): Likewise.
18317         (version): Likewise.
18318         (main): Recognize and handle -M family of options.
18319         (print_mangled_classname): Return is void.
18320         (process_file): Handle case where output is suppressed.
18321         (HANDLE_END_FIELD): Likewise.
18322         (HANDLE_METHOD): Likewise.
18323         * jcf-depend.c: New file.
18324
18325 1998-10-13  Jeffrey A Law  (law@cygnus.com)
18326
18327         * java-tree.def: Add missing newline at EOF.
18328
18329 1998-10-13  Tom Tromey  <tromey@cygnus.com>
18330
18331         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18332         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
18333         function.
18334         Include <config.h> and "system.h".
18335         (disassemble_method): Undefine RET to avoid clash with
18336         config/i386/i386.h.
18337
18338 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18339
18340         * decl.c (runtime_exception_type_node, error_exception_type_node):
18341         New global variables.
18342         (init_decl_processing): Initialized.
18343         * expr.c (java_lang_expand_expr): Set caught exception type to
18344         null if catch handler argument doesn't exit.
18345         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18346         tree codes.
18347         * java-tree.h (runtime_exception_type_node,
18348         error_exception_type_node): Global variables declared.
18349         (DECL_FUNCTION_THROWS): New macro.
18350         (DECL_FUNCTION_BODY): Modified comment.
18351         (DECL_SPECIFIC_COUNT): Likewise.
18352         (struct lang_decl): New field throws_list.
18353         (IS_UNCHECKED_EXPRESSION_P): New macro.
18354         * lex.c (java_lex): Generate location information for THROW_TK.
18355         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18356         EXCEPTIONS_P): New macros.
18357         (enum jdep_code): New value JDEP_EXCEPTION.
18358         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18359         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18360         PATCH_METHOD_RETURN_ERROR): New macros.
18361         (patch_method_invocation_stmt): Added new argument to prototype.
18362         (patch_synchronized_statement, patch_throw_statement,
18363         check_thrown_exceptions, check_thrown_exceptions_do,
18364         purge_unchecked_exceptions, check_throws_clauses): New function
18365         prototypes.
18366         * parse.y Fixed typo in keyword section.
18367         (throw:): Rule tagged <node>.
18368         (THROW_TK): Keyword tagged <operator>.
18369         (method_header:): Last argument to call to method_header passed
18370         from throws: rule.
18371         (throws:, class_type_list:, throw_statement:,
18372         synchronized_statement:, synchronized:): Defined actions.
18373         (method_header): New local variable current. Register exceptions
18374         from throws clause.
18375         (java_complete_tree): Complete and verify exceptions from throws
18376         clause.
18377         (complete_class_report_errors): Error message on exceptions not
18378         found
18379         (java_check_regular_methods): Fixed typo. Shortcut on private
18380         overriding methods. Changed error message on method
18381         redefinition. Check for throws clause compatibility.
18382         (check_throws_clauses): New function.
18383         (java_check_abstract_methods): Use DECL_NAME for wfl or current
18384         method. Changed error message on method redefinition.
18385         (currently_caught_type_list): New static variable.
18386         (java_complete_expand_methods): Purge unchecked exceptions from
18387         throws clause list. Call PUSH_EXCEPTIONS before walk and
18388         POP_EXCEPTIONS after.
18389         (resolve_qualified_expression_name): Pass new argument as NULL to
18390         patch_method_invocation_stmt.
18391         (patch_method_invocation_stmt): New argument ref_decl. Invoke
18392         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18393         argument list when appropriate. Use new argument if non null to
18394         store selected method decl.
18395         (patch_invoke): Convert if necessary args of builtin types before
18396         forming CALL_EXPR. Argument list no longer reversed here.
18397         (invocation_mode): Treat final methods as static methods.
18398         (java_complete_tree): New cases for THROW_EXPR: and
18399         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18400         function call.
18401         (complete_function_arguments): No more RECORD_TYPE
18402         conversion. Function parameter nodes no longer saved.
18403         (valid_ref_assignconv_cast_p): Avoid handling null type.
18404         (patch_binop): Fixed null constant reference handling.
18405         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18406         BUILD_THROW macros.
18407         (patch_try_statement): Fixed comments. Record caught types in
18408         list, push the list, expand try block and pop the list.
18409         (patch_synchronized_statement, patch_throw_statement,
18410         check_thrown_exceptions, check_thrown_exceptions_do,
18411         purge_unchecked_exceptions): New functions.
18412         * typeck.c (lookup_argument_method): Allow WFL in place of method
18413         DECL_NAME during method definition check
18414
18415 1998-10-09  Tom Tromey  <tromey@cygnus.com>
18416
18417         * gjavah.c (decode_signature_piece): New function.
18418         (print_c_decl): Use it.  Added `name_override' argument.
18419         (print_method_info): Use name_override argument to print_c_decl.
18420         (seen_fields): Removed.
18421         (print_field_info): Don't update seen_fields.
18422         (struct method_name): New structure.
18423         (method_name_list): New global.
18424         (print_method_info): Add new method to list of methods.
18425         (name_is_method_p): New function.
18426         (print_field_info): If field name has same name as method, then
18427         change field name.
18428         (process_file): Parse methods before fields.
18429         (field_pass): New global.
18430         (HANDLE_END_FIELD): Take field_pass into account.
18431
18432 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18433
18434         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18435         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18436
18437 1998-10-03  Anthony Green  <green@cygnus.com>
18438
18439         * jvspec.c: Fix bug in jvgenmain_spec patch.
18440
18441 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18442
18443         * Makefile.in (lang.o:): Install dependency on java-tree.def.
18444         * decl.c (soft_exceptioninfo_call_node): New global variable.
18445         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18446         takes extra integer argument. soft_exceptioninfo_call_node
18447         initialized.
18448         * except.c (java_set_exception_lang_code): New function
18449         (method_init_exceptions): Called here.
18450         (prepare_eh_table_type): New function.
18451         (expand_end_java_handler): Called here.
18452         * expr.c (build_java_throw_out_of_bounds_exception): Now features
18453         one argument. Modified generation of call to
18454         soft_badarrayindex_node to use new argument.
18455         (build_java_arrayaccess): Pass faulty index value to
18456         build_java_throw_out_of_bounds_exception.
18457         (generate_name): New function.
18458         (java_lang_expand_expr): New local variables node, current,
18459         has_finally_p. Expand TRY_EXPR node.
18460         (process_jvm_instruction): Replace top of the stack with thrown
18461         object reference when entering exception handler.
18462         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18463         specific tree codes.
18464         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18465         global.
18466         (DECL_SPECIFIC_COUNT): New macro.
18467         (prepare_eh_table_type, java_set_exception_lang_code,
18468         generate_name): New function declarations.
18469         (match_java_method): Declaration deleted.
18470         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18471         macros.
18472         * lex.c (TRY_TK, CATCH_TK): Generate location information.
18473         * parse.h (redefinition_error, refine_accessible_methods_list,
18474         can_cast_to_p): Function declaration removed.
18475         (classitf_redefinition_error, variable_redefinition_error,
18476         parse_jdk1_1_error, find_applicable_accessible_methods_list,
18477         find_most_specific_methods_list, argument_types_convertible,
18478         enter_a_block, valid_builtin_assignconv_identity_widening_p,
18479         valid_cast_to_p, valid_method_invocation_conversion_p,
18480         try_reference_assignconv, add_stmt_to_compound,
18481         build_jump_to_finally, build_tree_list, patch_try_statement,
18482         java_get_catch_block): New function declarations.
18483         * parse.y (string_buffer_type): Global variable deleted.
18484         (group_of_labels, catches, catch_clause, catch_clause_parameter,
18485         finally): Rules tagged <node>.
18486         (TRY_TK, CATCH_TK): Token tagged <operator>.
18487         (class_body_declaration:, class_member_declaration:,
18488         formal_parameter:, explicit_constructor_invocation:,
18489         interface_member_declaration:, constant_declaration:,
18490         primary_no_new_array:, class_instance_creation_expression:,
18491         array_creation_expression:): Issue error on unsuported JDK1.1
18492         features.
18493         (try_statement:, catches:, finally:): Define actions.
18494         (catch_clause_parameter): New rule.
18495         (catch_clause:): Use new rule catch_clause_parameter.
18496         (parse_jdk1_1_error): New function.
18497         (redefinition_error): Renamed classitf_redefinition_error.
18498         (variable_redefinition_error): New function.
18499         (check_class_interface_creation): Call
18500         classitf_redefinition_error.
18501         (java_complete_tree): Added error message on JDEP_TYPE: case.
18502         (complete_class_report_errors): Fixed indentation.
18503         (declare_local_variables): Call variable_redefinition_error.
18504         (source_end_java_method): Call java_set_exception_lang_code and
18505         emit_handlers where appropriate.
18506         (java_method_add_stmt): Call add_stmt_to_block.
18507         (add_stmt_to_block): New function.
18508         (lookup_method_invoke): Fixed outside comment. new local variable
18509         candicates.  Call find_applicable_accessible_methods_list and
18510         find_most_specific_methods_list when searching for a
18511         method. Modified error report to list possible candidates when
18512         applicable.
18513         (find_applicable_accessible_methods_list,
18514         find_most_specific_methods_list, argument_types_convertible): New
18515         function.
18516         (refine_accessible_methods_list): Function deleted.
18517         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18518         expr (if applicable) before calling patch_array_ref.
18519         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18520         (enter_block): Fixed comment.
18521         (enter_a_block): New function.
18522         (patch_assignment): Reorganized. Call try_reference_assignconv for
18523         references. Call valid_cast_to_p instead of can_cast_to_p.
18524         (try_reference_assignconv,
18525         valid_builtin_assignconv_identity_widening_p): New functions.
18526         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18527         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18528         functions.
18529         (build_string_concatenation): Don't resolve StringBuffer.
18530         (patch_cast): Fixed inverted arguments.
18531         (patch_array_ref): Code to save array expr deleted. Call
18532         valid_cast_to_p instead of can_cast_to_p.
18533         (generate_labeled_block): Call generate_name.
18534         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18535         patch_try_statement): New functions.
18536         * typeck.c (match_java_method): Function deleted.
18537
18538 1998-10-02  Anthony Green  <green@cygnus.com>
18539
18540         * jvspec.c: jvgenmain_spec uses different temporary file names.
18541
18542 1998-10-02  Anthony Green  <green@cygnus.com>
18543
18544         * jvspec.c (lang_specific_driver): Fail if user specifies
18545         --main= when not linking.
18546
18547 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18548
18549         * class.c (make_class_data): Push value for `thread' field.
18550         * decl.c (init_decl_processing): Added `thread' field to class.
18551
18552         * class.c (add_field): Always make static fields externally
18553         visible.
18554
18555 1998-09-26  Anthony Green  <green@cygnus.com>
18556
18557         * expr.c (build_java_athrow,
18558         build_java_throw_out_of_bounds_exception, expand_invoke,
18559         build_newarray, expand_java_multianewarray, build_java_monitor):
18560         Update comments to reflect _Jv_* function names.
18561
18562 1998-09-25  Per Bothner  <bothner@cygnus.com>
18563
18564         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18565         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18566         * parse.y (expand_start_java_method):  Likewise.
18567
18568 1998-09-24  Per Bothner  <bothner@cygnus.com>
18569
18570         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18571
18572         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18573         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18574         * expr.c:  Remove no-longer-needed calls to promote_type.
18575         * decl.c (give_name_to_locals):  Liekwise.
18576         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18577         * parse.y:  Add/remove promote_type calls as appropriate.
18578         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18579         (parse_signature_string):  Likewise.
18580         (build_java_array_type):  Fix for now signature convenions.
18581
18582         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18583
18584 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18585
18586         * class.c (init_class_processing): libjava function renamed to
18587         _Jv_RegisterClass.
18588
18589 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18590
18591         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18592         * java-tree.def: Fixed DEFTREECODE third argument.
18593         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18594         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18595         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18596         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18597         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18598         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18599         * lang.c (java_tree_code_type, java_tree_code_length,
18600         java_tree_code_name): New arrays.
18601         (lang_init): Append Java tree node definitions to Gcc ones.
18602         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18603         defined.
18604         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18605         wfl_to_string.
18606         (java_lex): Allow declaration of empty string constants. Retain
18607         location information on CASE_TK and DEFAULT_TK.
18608         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18609         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18610         Modified to be more robust.
18611         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18612         (build_new_invocation, try_builtin_assignconv,
18613         patch_switch_statement, string_constant_concatenation,
18614         build_string_concatenation, patch_string_cst, patch_string,
18615         java_expand_switch): New function declarations.
18616         * parse.y: Rules related to switch and EH tagged <node>.
18617         (label_id): Set to NULL_TREE
18618         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18619         tree nodes.
18620         (this_or_super:): Fixed indentation.
18621         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18622         statement_expression:): Removed call to RULE on all sub-rules.
18623         (switch_expression:, switch_labels:): New rules.
18624         (switch_statement:, switch_block:, switch_block_statement_groups:,
18625         switch_block_statement_group:, switch_labels:, switch_label:):
18626         Defined actions.
18627         (throw_statement:, synchronized_statement:, try_statement:):
18628         Defined temporary actions.
18629         (class_instance_creation_expression:): Call
18630         build_new_invocation. Fixed indentation.
18631         (field_access): Fixed indentation.
18632         (method_invocation): Likewise.
18633         (make_qualified_primary): Use THIS_EXPR.
18634         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18635         resolving from SUPER, set *type_found.
18636         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18637         (java_complete_tree): Removed unused local variable `location'. Case
18638         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18639         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18640         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18641         STRING_CST: case. default: checks for patchable strings.
18642         (complete_function_arguments): Transform string constant or
18643         crafted StringBuffer if necessary.
18644         (build_method_invocation): Fixed comments.
18645         (build_new_invocation): New function.
18646         (patch_assignment): Call try_builtin_assignconv to figure a valid
18647         assignment conversion between builtin types.
18648         (try_builtin_assignconv): New function.
18649         (build_binop): Use URSHIFT_EXPR directly to call build.
18650         (operator_string): Use UNARY_PLUS_EXPR.
18651         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18652         operator.
18653         (do_merge_string_cste, merge_string_cste,
18654         string_constant_concatenation, build_string_concatenation,
18655         patch_string, patch_string_cst): New function.
18656         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18657         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18658         (build_newarray_node): Use NEW_ARRAY_EXPR.
18659         (build_this): Use THIS_EXPR.
18660         (build_return): Enable debug information on return statement.
18661         (build_if_else_statement): Likewise.
18662         (complete_labeled_statement): Fixed related comment.
18663         (build_loop_body): Fixed comment.
18664         (build_bc_statement): Enable debug information on break/continue
18665         statements.
18666         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18667         context.
18668         (patch_switch_statement, case_identity, java_expand_switch): New
18669         functions.
18670
18671 1998-09-21  Per Bothner  <bothner@cygnus.com>
18672
18673         * buffer.h (BUFFER_INIT):  New macro.
18674         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
18675         Pass (struct jcf_partial *state) to most functions.
18676         (jcf_block, jcf_relocation):  New types.
18677         Support labels, branches, conditionals, loops.
18678
18679 1998-09-21  Tom Tromey  <tromey@cygnus.com>
18680
18681         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
18682
18683 1998-09-21  Per Bothner  <bothner@cygnus.com>
18684
18685         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
18686         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
18687         not integer_type_node (INT_TYPE_SIZ bits).
18688
18689         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
18690
18691         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
18692         * jcf-dump.c (print_exception_table):  New function.
18693         (disassemble_method):  Better handling of wide instructions.
18694         Make more robust for bad input.
18695
18696 1998-09-30  Jeffrey A Law  (law@cygnus.com)
18697
18698         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
18699         FreeBSD.
18700
18701 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18702
18703         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
18704
18705 1998-09-17  Tom Tromey  <tromey@cygnus.com>
18706
18707         * Makefile.in ($(PARSE_H)): Removed target.
18708
18709 1998-09-17  Jeffrey A Law  (law@cygnus.com)
18710
18711         * Makefile.in (JAVA_OBJS): Add memmove.o
18712         (memmove.o): New target & rules.
18713
18714 1998-09-15  Tom Tromey  <tromey@cygnus.com>
18715
18716         * expr.c (expand_invoke): Don't generate a call to the class init
18717         code.
18718
18719 1998-09-14  Jeffrey A Law  (law@cygnus.com)
18720
18721         * Makefile.in: Add many missing dependencies.
18722         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
18723         as appropriate.
18724         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
18725         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
18726
18727 1998-09-11  Per Bothner  <bothner@cygnus.com>
18728
18729         * decl.c (complete_start_java_method):  If method is static (and
18730         not private) call _Jv_InitClass.
18731         * expr.c (expand_invoke):  Don't call build_class_init.
18732
18733         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
18734
18735 1998-09-10  Jeffrey A Law  (law@cygnus.com)
18736
18737         * Make-lang.in (GCJ): Define before using.
18738
18739 1998-09-09  Jeffrey A Law  (law@cygnus.com)
18740
18741         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
18742         losing due to namespace pollution in GNU getopt.h
18743
18744 1998-09-09  Tom Tromey  <tromey@cygnus.com>
18745
18746         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
18747         (java.all.cross): Likewise.
18748         (java.rest.encap): Likewise.
18749
18750 1998-09-08  Jeffrey A Law  (law@cygnus.com)
18751
18752         * gjavah.c (print_class_decls): Fix thinko in arglist
18753         * jcv-io.c (find_classfile): Similarly.
18754
18755 1998-09-07  Jeffrey A Law  (law@cygnus.com)
18756
18757         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
18758
18759 1998-09-05  Tom Tromey  <tromey@cygnus.com>
18760
18761         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
18762         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
18763         * Makefile.in (PARSE_C): New macro.
18764         (PARSE_H): Likewise.
18765         (PARSE_SCAN_C): Likewise.
18766         ($(PARSE_C)): Target renamed from parse.c.
18767         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
18768         (clean): Remove parse-scan.c as well.
18769         (parse.o): Depend on $(PARSE_C).
18770
18771 1998-09-05  Anthony Green  <green@cygnus.com>
18772
18773         * README, license.terms: Removed.
18774
18775         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
18776         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
18777         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
18778         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
18779         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
18780         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
18781         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
18782         and Java trademark attribution.
18783
18784 1998-09-04  Tom Tromey  <tromey@cygnus.com>
18785
18786         * Makefile.in: Use gcjh, not gjavah.
18787         * config-lang.in (stagestuff): Use gcjh, not gjavah.
18788         * Make-lang.in: Changed gjavah to gcjh everywhere.
18789
18790 1998-09-03  Per Bothner  <bothner@cygnus.com>
18791
18792         * gjavah.c:  Support new -prepend -add -append flags.
18793         (print_method_info):  Method is not virtual if class is final.
18794
18795 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18796
18797         * jv-scan.c: Fixed copyright assignment.
18798         * keyword.gperf: Likewise.
18799         * keyword.h: Likewise.
18800         * lex.c: Fixed copyright assignment.
18801         (java_lex): Push unicode back when parsing '<'.
18802         * lex.h: Fixed copyright assignment.
18803         * parse-scan.y: Likewise.
18804         * parse.h: Fixed copyright assignment.
18805         (build_debugable_stmt, complete_for_loop): New function prototypes.
18806         * parse.y: Fixed copyright assignment.
18807         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
18808         size_zero_node when completing a loop with no exit condition.
18809         (for_statement_nsi:): Define action.
18810         (for_init:, for_update:): Return size_zero_node when empty.
18811         (declare_local_variables): Call build_debugable_stmt.
18812         (build_debugable_stmt): New function.
18813         (build_loop_body): Build debugable statement around loop
18814         condition part.
18815         (complete_loop_body): Take into account the debugable statement
18816         around the EXIT_EXPR.
18817         (complete_loop_body): New function.
18818         (patch_exit_expr): Fixed condition inversion.
18819
18820 1998-09-02  Tom Tromey  <tromey@cygnus.com>
18821
18822         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
18823         name of thread define.
18824         * jvspec.c (THREAD_NAME): New macro.
18825         (GCLIB): Likewise.
18826         (THREADLIB): Likewise.
18827         (lang_specific_driver): Recognize attempt to link with thread
18828         library or gc library.  Recognize -ljava on command line so it
18829         isn't linked against more than once.
18830
18831 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18832
18833         * parse-scan.y (report_main_declaration): Name of the class
18834         containing `main' can be a qualified name.
18835
18836 1998-08-31  Tom Tromey  <tromey@cygnus.com>
18837
18838         * config-lang.in: Changed gjavac to gjc everywhere.
18839         * Make-lang.in: Changed gjavac to gjc everywhere.
18840
18841 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18842
18843         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
18844         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
18845         and install the files.
18846         * Makefile.in (JAVA_OBJS_LITE): New variable.
18847         (compiler:): Now include jv-scan as a dependency.
18848         (../jv-scan$(exeext), parse-scan.c): New targets.
18849         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
18850         * config-lang.in (compilers): Removed gcj, gjavah from the list.
18851         * jcf-parse.c (parse_source_file): Call java_layout_classes and
18852         check for errors even if parse_only.
18853         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
18854         defined.
18855         (yylex): New function. Uses java_lex body.
18856         (java_lex): Removed commented out statement. Remove local variable
18857         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
18858         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
18859         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
18860         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
18861         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
18862         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
18863         where appropriate.
18864         (java_lex_error): Empty if JC1_LITE is defined.
18865         (java_get_line_col): Return 0 if JC1_LITE is defined.
18866         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
18867         SET_MODIFIER_CTX): Moved into the section containing the macros
18868         conditionally defined by JC1_LITE.
18869         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
18870         argument if JC1_LITE is defined.
18871         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
18872         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
18873         is defined.
18874         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
18875         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
18876         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
18877         to different values according to JC1_LITE.
18878         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
18879         declared if JC1_LITE set.
18880         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
18881         defined if JC1_LITE not set.
18882         (struct parser_ctx): Reorganized and skip the jc1 front end part
18883         if JC1_LITE set.
18884         (java_layout_classes): New function definition.
18885         (java_push_parser_context, java_init_lex, yyparse, yylex,
18886         yyerror): Prototype always declared. All other static function
18887         prototypes declared only if JC1_LITE is not set.
18888         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
18889         declared in parse.h.
18890         (java_layout_classes): New function.
18891         (java_complete_expand_methods): No longer layout the class here.
18892         * parse-scan.y: New file.
18893         * jv-scan.c: New file.
18894
18895 1998-08-25  Tom Tromey  <tromey@cygnus.com>
18896
18897         * gjavah.c (main): Handle -friend option.
18898         (friend_specs): New global.
18899         (generate_access): Handle friend_specs.
18900         (process_file): Likewise.
18901         (MAX_FRIENDS): New macro.
18902         (friend_count): New global.
18903         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
18904         Changed all callers.
18905
18906 1998-08-24  Per Bothner  <bothner@cygnus.com>
18907
18908         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
18909         (main):  Handle processing all the entries of a named .zip archive.
18910         * jcf-io.c (jcf_trim_old_input):  New function.
18911         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
18912
18913 1998-08-24  Per Bothner  <bothner@cygnus.com>
18914
18915         * lang.c (flag_assume_compiled):  Make default be on.
18916
18917 1998-08-21  Per Bothner  <bothner@cygnus.com>
18918
18919         * jcf-dump.c:  Add bunches of flags to control output more.
18920         (process_class):  New function;  support printing more than one class.
18921         (main): Support new --print-main and --javap flags.
18922         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
18923         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
18924
18925 1998-08-20  Per Bothner  <bothner@cygnus.com>
18926
18927         Change mangling of dispatch table to match C++ vtable (w/thunks).
18928         * class.c (build_dtable_decl), java-tree.h:  New function.
18929         (make_class_data):  Call it.
18930         * decl.c (init_decl_processing):  Likewise.
18931
18932 1998-08-19  Warren Levy  <warrenl@cygnus.com>
18933
18934         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
18935         soft_anewarray; adjust args passed.
18936         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
18937         match _Jv_NewObjectArray.
18938
18939 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18940
18941         * decl.c (push_labeled_block, pop_labeled_block): New functions.
18942         * expr.c (loopup_label): Call create_label_decl.
18943         (create_label_decl): New function.
18944         (java_lang_expand_expr): Call expand_start_bindings with argument
18945         set to zero.
18946         * java-tree.h Added space after PROTO in function declarations
18947         when necessary.
18948         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
18949         (create_label_decl, push_labeled_block): New function
18950         declarations.
18951         * lex.c (label_id): Initialize.
18952         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
18953         switch.
18954         * parse.h Added space after PROTO in function declarations when
18955         necessary.
18956         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
18957         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
18958         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
18959         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
18960         macros.
18961         (struct parser_ctxt): New fields current_loop,
18962         current_labeled_block.
18963         (build_if_else_statement, patch_if_else_statement,
18964         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
18965         generate_labeled_block, complete_labeled_statement,
18966         build_bc_statement, patch_bc_statement, patch_loop_statement,
18967         build_new_loop, build_loop_body, complete_loop_body): New function
18968         declarations.
18969         * parse.y (java_warning_count): New global variable.
18970         (label_id): New static variable.
18971         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
18972         (block:): Return size_zero_node when block is empty.
18973         (empty_statement:): Return size_zero_node.
18974         (statement:): Implement supplemental action when for_statement: is
18975         reduced.
18976         (label_decl:): New rule.
18977         (labeled_statement:): Rewritten using label_decl. Actions
18978         implemented.
18979         (labeled_statement_nsi:): Likewise.
18980         (if_then_statement): Actions implemented.
18981         (while_expression): New rule.
18982         (while_statement:): Rewritten using while_expression. Actions
18983         implemented.
18984         (while_statement_nsi:): Likewise.
18985         (do_statement_begin:): New rule.
18986         (do_statement:): Rewritten using do_statement_begin. Actions
18987         implemented.
18988         (for_statement:): Rewritten using for_begin. Actions implemented.
18989         (for_statement_nsi:): Likewise.
18990         (for_header:, for_begin:): New rules.
18991         (for_init:): Actions implemented.
18992         (statement_expression_list:, break_statement:,
18993         continue_statement:): Likewise.
18994         (yyerror): Count number of issued warning(s).
18995         (java_report_errors): Report error(s) and/or warning(s).
18996         (java_complete_class): Use build_java_argument_signature to
18997         recompute completed method signature.
18998         (java_check_regular_methods): New locals method_wfl and aflags.
18999         Use method_wfl instead of lookup_cl during error reports. Fixed
19000         indentation and modified some error messages. Use
19001         lang_printable_name in method instead of the DECL_NAME. New code
19002         to issue warnings on methods not overriding corresponding methods
19003         private to a different package.
19004         (java_method_add_stmt): Call add_stmt_to_compound.
19005         (add_stmt_to_compound): New function.
19006         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19007         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19008         (build_if_else_statement, patch_if_else_statement,
19009         build_labeled_block, generate_labeled_block,
19010         complete_labeled_statement, build_new_loop, build_loop_body,
19011         complete_loop_body, patch_loop_statement, build_bc_statement,
19012         patch_bc_statement, patch_exit_expr): New functions.
19013         * typeck.c (build_java_signature): Build argument signature before
19014         enclosing it in between parenthesis.
19015
19016 1998-08-17  Warren Levy  <warrenl@cygnus.com>
19017
19018         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19019         (JAVA_OBJS): Added reminder comment
19020
19021 1998-08-13  Nick Clifton  <nickc@cygnus.com>
19022
19023         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19024         be interpreted as a long long.
19025
19026 1998-08-13  Warren Levy  <warrenl@cygnus.com>
19027
19028         * decl.c (init_decl_processing): Use _Jv_InitClass, not
19029         soft_initialise_class.  Use _Jv_NewMultiArray, not
19030         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
19031         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
19032         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
19033         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19034
19035 1998-08-12  Per Bothner  <bothner@cygnus.com>
19036
19037         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19038         length_identifier_node):  New global tree node constants.
19039         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
19040         Replace uses by super_identifier_node etc.
19041         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
19042
19043         * parse.y (resolve_field_access):  Don't special-case ".length" if
19044         flag_emit_class_files.
19045         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
19046         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
19047         and ARRAY.length.
19048
19049 1998-08-11  Per Bothner  <bothner@cygnus.com>
19050
19051         * decl.c (init_decl_processing): Remove unused method_type_node fields.
19052         * class.c (make_method_value):  Remove init for removed fields.
19053
19054         * class.c (layout_class):  Use build_java_argument_signature.
19055         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
19056
19057         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
19058         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
19059         (build_java_signature):  Don't use push_java_argument_signature.
19060
19061         * typeck.c (lookup_argument_method):  New function.
19062         * parse.y (java_check_regular_methods):  Use lookup_argument_method
19063         instead of lookup_java_method2 followed by lookup_java_method.
19064
19065         * parse.y (check_method_redefinition):  Minor optimization.
19066
19067         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
19068         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19069
19070 1998-08-10  Tom Tromey  <tromey@cygnus.com>
19071
19072         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19073         c-pragma.o.
19074
19075         * gjavah.c (java_float_finite): Use K&R-style definition.
19076         (java_double_finite): Likewise.
19077         (generate_access): Now returns void.  Changed all callers.
19078         (last_access_generated): Removed.
19079         (process_file): Only make a single pass over the .class file.
19080
19081 1998-07-29  Per Bothner  <bothner@cygnus.com>
19082
19083         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
19084         for compatibility for G++ (with -fvtable-thunks).
19085         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
19086
19087         * gjavah.c (process_file):  Use public inheritance for super-class.
19088
19089 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19090
19091         * lex.c (java_init_lex): Initialize ctxp->package.
19092         * parse.h (struct parser_ctxt): package and package_len replaced
19093         by tree package, an identifier node. Field method_decl_list is
19094         gone. Fixed comments.
19095         (lookup_field_wrapper, merge_qualified_name, not_accessible,
19096         class_in_current_package): New function prototypes.
19097         * parse.y (array_type:): Set class loaded flag on primitive type
19098         arrays.
19099         (package_declaration:): Assign ctxp->package to the
19100         identifier node.
19101         (method_invocation:): Handle invocation of method qualified by
19102         `super'.
19103         (single_type_import_declaration:): Removed ambiguity check.
19104         (java_pop_parser_context): New local variable `next'. Reset and
19105         set IMPORT_CLASSFILE_NAME flags on current and previous import
19106         list.
19107         (java_accstring_lookup): Use new local macro COPY_RETURN.
19108         (lookup_field_wrapper): New function.
19109         (parser_qualified_classname): Use merge_qualified_name.
19110         (parser_check_super_interface): Broaden error message.
19111         (do_resolve_class): Check for qualified class name in the current
19112         compilation unit if appropriate.
19113         (process_imports): Check for already defined classes.
19114         (check_pkg_class_access): Got rid of call to
19115         get_access_flags_from_decl.
19116         (java_complete_expand_methods): Call safe_layout_class based on
19117         the current class size.
19118         (make_qualified_primary): Build a WFL qualification on primary if
19119         none exists.
19120         (merge_qualified_name): New function.
19121         (make_qualified_name): Use merge_qualified_name.
19122         (resolve_expression_name): Use safe_lookup_field.
19123         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19124         (resolve_qualified_expression_name): Likewise. Check on resolved
19125         element accessibility.
19126         (not_accessible_p, class_in_current_package): New functions.
19127         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19128         (patch_method_invocation_stmt): Merged common pieces. Check
19129         accessibility of invoked method.
19130         (check_for_static_method_reference): Add returned type in error
19131         message.
19132         (invocation_mode): Get rid of bogus check on PRIVATE methods.
19133         (refine_accessible_methods_list): Merged two conditions in test.
19134         (java_complete_class): Sanity check on stabilize_ref gone.
19135         * zextract.c (read_zip_archive): Cast lseek second argument to long.
19136
19137 1998-07-28  Per Bothner  <bothner@cygnus.com>
19138
19139         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
19140
19141 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19142
19143         * gjavah.c (F_NAN): Removed.
19144         (F_NAN_MASK): New macro.
19145         (F_POSITIVE_INFINITY): Removed.
19146         (F_NEGATIVE_INFINITY): Likewise.
19147         (java_float_finite): Rewrote.
19148         (D_NAN_MASK): Renamed.
19149         (java_double_finite): Rewrote.
19150         (D_POSITIVE_INFINITY): Removed.
19151         (D_NEGATIVE_INFINITY): Likewise.
19152
19153         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19154         If verbose, print underlying representation of value in hex.
19155
19156 1998-07-24  Per Bothner  <bothner@cygnus.com>
19157
19158         * buffer.h, buffer.c:  New files.
19159         * Makefile.in (JAVA_OBJS):  Add buffer.o.
19160
19161         Support locals variables and writing their debug entries to .class.
19162         * jcf-write.c:  Simplify some by user new buffer type.
19163         (vode_buffer_grow):  Removed.
19164         (struct localvar_info):  New type.
19165         (localsvars, localvartable):  New buffers.
19166         (localvar_alloc, localvar_free):  New functions.
19167         (generate_bytecode_insns):  Handle local variables.
19168         (generate_classfile):  Write LocalVariableTable attribute.
19169
19170 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19171
19172         * jcf-io.c (open_in_zip): Check the zipfile magic number.
19173         * zipfile.h (ZIPMAGIC): New macro.
19174
19175 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19176
19177         * Makefile.in (gjavah.o): Updated dependencies.
19178         (jcf-dump.o): Likewise.
19179         (all.indirect): Use ../gjavah.
19180         (../gjavah$(exeext)): Likewise.
19181         (clean): Don't remove gjavah.
19182         (clean): Remove parse.c, not java/parse.c.
19183         * Make-lang.in (java): Added gjavah.
19184         (gjavah$(exeext)): New target.
19185         (GJAVAH_SOURCES): New macro.
19186         (java.all.build): Added gjavah.
19187         (java.all.cross): Likewise.
19188         (java.rest.encap): Likewise.
19189         * config-lang.in (compilers, stagestuff): Added gjavah.
19190
19191 1998-07-23  Tom Tromey  <tromey@cygnus.com>
19192
19193         * gjavah.c (java_float_finite): New function.
19194         (java_double_finite): Likewise.
19195         (F_POSITIVE_INFINITY): New macro.
19196         (F_NEGATIVE_INFINITY): Likewise.
19197         (F_NAN): Likewise.
19198         (D_POSITIVE_INFINITY): Likewise.
19199         (D_NEGATIVE_INFINITY): Likewise.
19200         (D_NAN): Likewise.
19201         (print_field_info): Use java_float_finite and java_double_finite.
19202
19203 1998-07-23  Per Bothner  <bothner@cygnus.com>
19204
19205         * parse.y (method_header):  Name "this" implicit argument.
19206
19207 1998-07-22  Per Bothner  <bothner@cygnus.com>
19208
19209         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
19210         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
19211         (put_linenumber):  New function.
19212         (generate_bytecode_insns, generate_classfile):  Write line numbers.
19213
19214 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19215
19216         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19217         (lookup_name, build_known_method_ref, build_class_init,
19218         build_invokevirtual, invoke_build_dtable, match_java_method,
19219         build_field_ref, pushdecl_force_head, build_java_binop,
19220         binary_numeric_promotion, build_decl_no_layout,
19221         build_java_arrayaccess, build_newarray, build_anewarray,
19222         build_java_array_length_access, build_java_arraynull_check): New
19223         extern function prototypes.
19224         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19225         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19226         java-tree.h.
19227         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19228         to NULL
19229         * jcf.h (jcf_out_of_synch): New extern function prototype.
19230         * parse.h: Static/global function implemented in parse.y
19231         prototyped and declarations moved at the end of the file.
19232         (DECL_P): Check that the argument isn't null.
19233         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19234         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19235         (QUAL_DECL_TYPE): New macro.
19236         (PARAMS): Macro definition removed.
19237         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19238         (return_statement:): Call build_return.
19239         (field_access:): Call make_qualified_primary in sub rule.
19240         (method_invocation:): Build method invocation and call
19241         make_qualified_primary when processing primaries.
19242         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19243         get_type_from_signature.
19244         (java_check_regular_method): Extra integer 0 argument when calling
19245         lookup_java_method2.
19246         (lookup_java_interface_method2): Extra method DECL argument when
19247         calling lookup_java_interface_method2.
19248         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19249         COMPOUND_EXPR node.
19250         (java_complete_expand_method): Layout current class iff not
19251         already done. Don't process interface's methods.
19252         (java_complete_expand_method): Use super class only if it
19253         exists. Use current class otherwise.
19254         (make_qualified_primary): New function.
19255         (resolve_expression_name): Process qualified expression or
19256         expression from primary the same way.
19257         (resolve_expression_name): Two last arguments to
19258         resolve_field_access are now NULL_TREEs.
19259         (resolve_field_access): New variable is_static. Local field must
19260         be DECLs. is_static computed on field DECLs only. Append code in
19261         where_found to the field access if necessary. Use QUAL_DECL_TYPE
19262         to initialize field_type.
19263         (resolve_qualified_expression_name): New local variable,
19264         previous_call_static and is_static. Handle primaries with function
19265         calls, casts, array references and `this'. `super' now handled as
19266         `(super_class)this'. Use is_static to clarify boolean expressions.
19267         Added code to handle case where a proper handle is required to
19268         access a field. Use QUAL_DECL_TYPE where applicable.
19269         (maybe_access_field): New function.
19270         (patch_method_invocation_stmt): New arguments primary, where,
19271         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19272         deleted. Use `where' as a type to search from if specified. Check
19273         for static method reference where forbidden. Append primary or
19274         current_this to the argument list if not calling constructor nor
19275         static methods.
19276         (check_for_static_method_reference): New function.
19277         (patch_invoke): Layout the class on which new is done if
19278         necessary.
19279         (lookup_method_invoke): Changed format to report errors on
19280         methods.
19281         (qualify_ambiguous_name): New local variable this_found. Now
19282         handle things from primaries. Method call are considered
19283         expression names.
19284         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19285         changed into NULLs.
19286         (not_initialized_as_it_should_p): Comply with the new DECL_P.
19287         (java_complete_tree): New case fo RETURN_EXPR. Process function
19288         call arguments in separate function.
19289         (complete_function_arguments): New function.
19290         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19291         anymore.
19292         (patch_assignment): Take the return function slot into account as
19293         a RHS. Distinguish assignment from a return.
19294         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19295         when checking methods in interfaces.
19296         (resolve_type_during_patch): NULL argument to unresolve_type_p
19297         instead of NULL_TREE.
19298         (patch_newarray): Fixed typo in comment.
19299         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19300         (build_return, patch_return): New functions.
19301         * typeck.c (lookup_java_constructor): Fixed typo in comment.
19302
19303 1998-07-21  Per Bothner  <bothner@cygnus.com>
19304
19305         * constants.c (find_name_and_type_constant, find_fieldref_index,
19306         find_methodref_index):  New methods.
19307         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
19308         just return given method.  Also, rename to build_known_method_ref.
19309         (expand_invoke):  Rename call to build_invoke_non_interface.
19310         * java-tree.h, parse.h:  Update prototype.
19311         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
19312         (such as expand_expr_stmt) if flag_emit_class_files.
19313         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19314         STACK_TARGET, IGNORE_TARGET):  New macros.
19315         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
19316         (generate_bytecode_insn):  New function to generate method's bytecode.
19317         (generate_classfile):  Node generate Code attribute for a method.
19318         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19319         push_long_const, field_op, adjust_typed_op, maybe_wide):
19320         New functions used by generate_bytecode_insn.
19321
19322         * typeck.c (signature_include_return):  Remove variable.
19323         (push_java_argument_signature, build_java_argument_signature):  New.
19324         (build_java_signature):  Use push_java_argument_signature.
19325         * parse.y:  Use build_java_argument_signature instead of fiddling
19326         with signature_include_return.
19327
19328 1998-07-17  Tom Tromey  <tromey@cygnus.com>
19329
19330         * gjavah.c (print_c_decl): Always generate JArray<>* for array
19331         types.
19332
19333         * Makefile.in (all.indirect): Added gjavah$(exeext).
19334         (gjavah$(exeext)): Added $(exeext).
19335         (clean): Likewise.
19336
19337 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19338
19339         * class.c (layout_class): Call to java_layout_parsed_class replace
19340         by safe_layout_class.
19341         * expr.c (build_java_array_length_access): Removed static storage
19342         class in the function definition.
19343         (build_java_arraynull_check): Likewise.
19344         Also fixed typos in two comments.
19345         * lex.c (java_init_lex): Initialize static global kw_length.
19346         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19347         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19348         java_lex_error.
19349         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19350         * parse.h (resolve_no_layout): New static function declaration.
19351         (get_identifier_in_static): Declaration removed.
19352         (java_layout_parsed_class): Function name declaration changed to
19353         safe_layout_class.
19354         (build_newarray_node, patch_newarray, resolve_type_during_patch,
19355         not_initialized_as_it_should_p, build_this): New static function
19356         declarations.
19357         (pushdecl_force_head, build_java_binop, int_fits_type_p,
19358         binary_numeric_promotion, stabilize_reference,
19359         build_decl_no_layout, build_java_arrayaccess): Extern function
19360         declarations moved into their own section.
19361         (build_newarray, build_anewarray, build_java_array_length_access,
19362         build_java_arraynull_check): New extern function declarations.
19363         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19364         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19365         fake tree codes.
19366         (CALL_CONSTRUCTOR_P): New macro.
19367         * parse.y (kw_length): New static global tree node.
19368         (return_statement): Tagged <node>.
19369         (RETURN_TK): Tagged <operator>.
19370         (variable_declarator_id:): Build variable declaration with an
19371         empty initialization value if a syntax error was found in the
19372         initialization part of the variable declaration.
19373         (statement_without_trailing_substatement:): return_statement: now
19374         uses the default rule.
19375         (return_statement:): Temporarily fixed to return NULL_TREE.
19376         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19377         (class_instance_creation_expression:): Class creation rules now
19378         call build_method_invocation upon reduction.
19379         (array_creation_expression:): Rules call build_newarray_node upon
19380         reduction.
19381         (dim_exprs:): Build a list of dimension expressions.
19382         (dim_expr:): Store location of the OSB_TK in the dimension
19383         expression node.
19384         (method_invocation:): Added a new error rule.
19385         (build_unresolved_array_type): WFL argument may also be an array
19386         on a primitive type. Name of the argument changed to reflect this.
19387         (method_declarator): Insert argument type at the beginning of the
19388         argument type list and later reverse the list.
19389         (unresolved_type_p): Argument 'returned' may be optionally
19390         NULL_TREE.
19391         (java_layout_class_from_source): Function renamed
19392         safe_layout_class.
19393         (resolve_and_layout): Now call resolve_no_layout and
19394         safe_layout_class.
19395         (resolve_no_layout): New function.
19396         (purify_type_name): New function.
19397         (complete_class_report_errors): Call purify_type_name during error
19398         report on a type not found.
19399         (process_imports): error_found local variable doesn't need to be
19400         initialized to zero.
19401         (declare_local_variables): New local type_wfl. Fixed typo in error
19402         message. type_wfl assigned to unresolved type and used to register
19403         incomplete type. Build a WFL around the variable initialization
19404         statement so that debug info can be generated on it.
19405         (source_start_java_method): Reverse argument list after they've
19406         been processed.
19407         (current_this): New static global variable.
19408         (java_complete_expand_methods): Set current_this when appropriate.
19409         (resolve_expression_name): Build correct static and non static
19410         field access bearing a simple name.
19411         (resolve_field_access): Resolve the length field of arrays. Handle
19412         f.m() cases.
19413         (patch_method_invocation_stmt): Set the type of the method
19414         invocation to error_mark_node. This value is later overridden by a
19415         valid type, if any. Don't handle qualified constructor invocation
19416         as qualified method invocation. Call lookup_method_invoke with its
19417         new flag. It's no longer necessary to access the selected method
19418         as the value of a tree list. Handle constructor invocation.
19419         (patch_invoke): Reverse argument list when invoking non interface
19420         methods. Insert call to new as the first argument of the
19421         constructor.
19422         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19423         defined within a final class. Return INVOKE_STATIC if the invoked
19424         method is a constructor.
19425         (lookup_method_invoke): New lc argument is a flag to indicate a
19426         constructor lookup. Now handle constructor lookup. Choose the most
19427         specific method in case several were matching the invocation
19428         requirements. Return a method decl instead of a tree list featuring
19429         one single method decl element.
19430         (refine_accessible_methods_list): New lc flag argument to
19431         indicate that a constructor is being looked up.
19432         (not_initialized_as_it_should_p): New function.
19433         (java_complete_tree): Now process fake tree codes
19434         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19435         save_expr on resolved function call arguments. Case on
19436         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19437         (patch_assignment): LHS can be a field access expression. When
19438         dealing with reference, lhs_type is the promoted type of the
19439         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19440         applicable.
19441         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19442         (patch_binop): Use not_initialized_as_it_should_p where
19443         applicable.
19444         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19445         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19446         where applicable.
19447         (resolve_type_during_patch): New function.
19448         (patch_cast): Call resolve_type_during_patch to resolve type and
19449         report error accordingly.
19450         (patch_array_ref): Use not_initialized_as_it_should_p where
19451         applicable. Array base expression is saved before being
19452         used. Promote the type of an array elements if it contains non
19453         builtin types.
19454         (build_newarray_node, patch_newarray, build_this): New functions.
19455
19456 1998-07-16  Tom Tromey  <tromey@cygnus.com>
19457
19458         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19459         increment it in `for' statement.
19460         (print_field_info): If number is inf or nan, don't print it.
19461         (print_method_info): If method name is `delete', just ignore it.
19462         (print_c_decl): Special-case jstringArray.
19463
19464         * gjavah.c (help): New function.
19465         (no_argument): New function.
19466         (usage): Changed text.
19467         (main): Rewrote argument handling.  Now handles -v, --help,
19468         --version.
19469         (version): New function.
19470         (found_error): New global.
19471         (main): Return found_error.
19472         (generate_access): Set found_error.
19473         (print_c_decl): Likewise.
19474
19475 1998-07-15  Tom Tromey  <tromey@cygnus.com>
19476
19477         * gjavah.c (print_c_decl): Don't print "," when examining field.
19478         Skip type name when looking at "[L" types.
19479         (process_file): Now static.
19480         (generate_access): Now returns int.
19481         (last_access_generated): New global.
19482         (process_file): Clear last_access_generated; make multiple passes
19483         over the class.
19484         (print_field_info): Just return if generate_access returns true.
19485         (print_method_info): Likewise.  Also, allow <init> functions to
19486         pass through.
19487         (print_c_decl): Added is_init argument.  Print constructors
19488         properly.
19489         (print_cxx_classname): Use UTF8_GET to extract characters from
19490         string.
19491         (print_base_classname): New function.
19492         (print_class_decls): New function.
19493         (process_file): Use it.
19494         (utf8_cmp): New function.
19495
19496 1998-07-13  Nick Clifton  <nickc@cygnus.com>
19497
19498         * lang-options.h: Format changed to match changes in gcc/toplev.c
19499         to implement a --help option.
19500
19501 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
19502
19503         * decl.c (init_decl_processing): Revert change to dtable_type.
19504
19505 1998-07-09  Per Bothner  <bothner@cygnus.com>
19506
19507         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19508
19509 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
19510
19511         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19512
19513         * lang.c (lang_init): Default flag_exceptions to 1, without
19514         checking to see if it's 2 first.
19515
19516 1998-07-08  Jeffrey A Law  (law@cygnus.com)
19517
19518         * constants.c: Include "system.h".
19519         * decl.c: Likewise.
19520         * lang.c (flag_new_exceptions): Get via extern now.
19521         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19522
19523 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19524
19525         * lex.c (java_lex): Return 0 when we see an invalid character in
19526         the input.
19527
19528         * lex.c (java_read_char): Specify extra argument when calling
19529         java_lex_error.
19530         (java_read_unicode, java_parse_end_comment,
19531         java_parse_escape_sequence): Likewise,
19532         (java_lex): Specify extra argument when calling
19533         java_lex_error. Test that IDs are beginning with a legal character
19534         for IDs. Handle invalid characters with an error message and a
19535         call to java_lex_error.
19536         (java_lex_error): Adjust column position by new argument
19537         `forward'. Issue an error even if in the middle of reporting an
19538         other error.
19539
19540 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19541
19542         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19543         we don't explicitly put a null pointer when we're copying it.
19544
19545 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19546
19547         * gjavah.c (print_cxx_classname): New function.
19548         (super_class_name): Likewise.
19549         (print_super_fields): Removed.
19550         (in_super): Removed.
19551         (print_field_info): Never generate #defines.
19552         (print_c_decl): Changed generated types to match JNI.  No longer
19553         print class name before method name.
19554         (print_method_info): Print "static" before static methods.
19555         Print "virtual" before non-final methods.
19556         (usage): Use exit(1), not exit(-1).
19557         (main): Likewise.
19558         (print_field_info): Use %.17g to print a double.
19559         (last_access): New globals.
19560         (process_file): Initialize last_access.
19561         (usage): Now static.
19562         (ACC_VISIBILITY): New define.
19563         (generate_access): New function.
19564         (print_field_info): Call it.
19565         (print_method_info): Likewise.  Also, generate information for all
19566         methods, not just native methods.  Return void.
19567         (print_c_decl): Return void.
19568         (print_field_info): Return void.
19569
19570 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19571
19572         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19573         processing the jc1 grammar file. Prefix bison functions and
19574         variables with java_.
19575         (parse.c): Dependencies on parse.h and lex.h
19576         * expr.c (build_java_arrayaccess): Function now global.
19577         * java-tree.h: Comment reorganized to carry on previous
19578         classification effort.
19579         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19580         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19581         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19582         java_parse (new prefix java_ generated by bison).
19583         (java_layout_parsed_class, java_register_parsed_class): Function
19584         call removed.
19585         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19586         * lex.c (static tree wfl_op): Variable deleted.
19587         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19588         ctxp fields to NULL_TREE.
19589         (java_lex): No longer create WFL for operators. Filename caching
19590         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19591         created as STRING_CST and later expanded. Removed extra argument
19592         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19593         and SUPER.
19594         (build_wfl_node): Removed code in comments.
19595         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19596         store token and location data in the current bison token.
19597         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19598         static/extern function declaration at the beginning of the file.
19599         (struct qualification): Data structure definition deleted.
19600         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19601         (qualify_ambiguous_name): Function declaration modified. Function
19602         now returns nothing.
19603         (build_array_ref, patch_array_ref, make_qualified_name,
19604         resolve_qualified_expression_name, maybe_generate_clinit,
19605         resolve_field_access): New static function declarations.
19606         (build_java_arrayaccess): New extern function declaration.
19607         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19608         (CALL_EXPR_PRIMARY): Macro deleted.
19609         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19610         (struct parser_ctxt): Field initialized_final
19611         removed. non_static_initialized, static_initialized: New fields.
19612         * parse.y (static tree kw_super, static tree kw_this): New global
19613         static.
19614         (%union): tree wfl field of operator member replaced by int
19615         location. WFLs are non longer created for operators.
19616         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19617         (qualified_name:): Now calls make_qualified_name to build the
19618         identifier.
19619         (type_declaration:): Consider generating <clinit> when class
19620         parsing completed.
19621         (variable_declarator:): Directly build an assignment node when the
19622         variable is initialized when declared.
19623         (this_or_super:): Build a WFL and set current location when THIS
19624         or SUPER are parsed.
19625         (expression_statement:): Wrap statement around a WFL.
19626         (primary_no_new_array:): Fixed typo. Changed value returned by
19627         THIS_TK because of its new type (temporary).
19628         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19629         (field_access:): Build qualified name with SUPER.
19630         (method_invocation:): Fixed returned value because of SUPER's new
19631         type.
19632         (array_access:): Use OSB_TK location information.
19633         (post_increment_expression:, post_decrement_expression:,
19634         unary_expression:, pre_increment_expression:,
19635         pre_decrement_expression:, unary_expression_not_plus_minus:,
19636         cast_expression:, multiplicative_expression:,
19637         additive_expression:, shift_expression:, relational_expression:,
19638         equality_expression:, and_expression:, exclusive_or_expression:,
19639         inclusive_or_expression:, conditional_and_expression:,
19640         conditional_or_expression:, assignment:): Use new location/token
19641         information available on operators.
19642         (create_class): Set super_decl_type to NULL_TREE when processing
19643         java.lang.Object.
19644         (register_fields): Field initialization is now a MODIFY_EXPR
19645         node. Chain initialization code to the matching lists (according
19646         to the field declaration modifiers).
19647         (maybe_generate_clinit): New function.
19648         (method_header): Don't set method's DECL_NAME to a WFL when adding
19649         methods to java.lang.Object.
19650         (resolve_and_layout): Now can return NULL_TREE if the type
19651         resolution fails. Otherwise, return the class DECL instead of its
19652         TYPE.
19653         (check_method_redefinition): Don't patch method DECL_NAME if it
19654         belongs to java.lang.Object.
19655         (process_imports): Simply assign error_found to the value returned
19656         by check_pkg_class_access.
19657         (declare_local_variables): Don't use their init statements (if
19658         any) when parsing error were previously found. Reuse MODIFY_EXPR
19659         build during parsing as an init statement.
19660         (java_method_add_stmt): Now return the current method body.
19661         (java_layout_parsed_class, java_register_parsed_class): Functions
19662         removed.
19663         (java_complete_expand_methods): Initialize the constant pool on a
19664         per class basis. Layout the classes before expanding their method
19665         bodies. Don't try expand artificial constructor code if error were
19666         found. Make the classes data and register them if no error were
19667         found.
19668         (java_complete_expand_method): Retrieve an artificial constructor
19669         argument list before entering its body. Assign the top block to
19670         the artificial constructor function body and set types of declared
19671         blocks and compound statements to void. Walk method body if not an
19672         artificial constructor.
19673         (make_qualified_name, cut_identifier_in_qualified): New functions.
19674         (resolve_expression_name): Fixed comments. Save/restore the
19675         current class CLASS_LOADED_P flag value. Build non qualified
19676         static field access and handle qualified expression names.
19677         (resolve_field_access, resolve_qualified_expression_name): New
19678         functions.
19679         (patch_method_invocation_stmt): Use the new expression resolution
19680         scheme, calling resolve_field_access when the function call is
19681         resolved as an expression.
19682         (qualify_ambiguous_name): Function rewritten to work on qualified
19683         expression produced by make_qualified_name.
19684         (java_complete_tree): Promote type when function's argument are
19685         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
19686         the assignment to discover further errors if RHS is a expression
19687         name that fails to evaluate. Declare LHS initialized even though
19688         the assignment failed. Don't use the location variable and removed
19689         extra argument in patch function calls. Now handle the ARRAY_REF
19690         case and build internal string representation when STRING_CSTs are
19691         walked.
19692         (build_method_invocation): Don't wrap function call around a WFL.
19693         (build_assignment): Likewise. Use the operator location
19694         information.
19695         (patch_assignment): Handle array access LHSs. Handle error
19696         provenance, resulting in a better error report.
19697         (build_binop): Use op_location from operator as binop location
19698         information.
19699         (build_unaryop, build_incdec, build_cast): Likewise.
19700         (patch_binop): Extract location information from the node. Fixed
19701         typo in error message.
19702         (patch_unary_op): Extract location information from the node.
19703         (build_array_ref, patch_array_ref): New functions.
19704
19705 1998-07-01  Tom Tromey  <tromey@cygnus.com>
19706
19707         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
19708         match _Jv_IsInstanceOf.
19709         * decl.c (init_decl_processing): Use _Jv_NewArray, not
19710         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
19711
19712 1998-06-30  Tom Tromey  <tromey@cygnus.com>
19713
19714         * decl.c (init_decl_processing): Functions are now named
19715         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
19716
19717 1998-06-29  Per Bothner  <bothner@cygnus.com>
19718
19719         * java-tree.h (load_class):  Add prototype.
19720         * class.c (is_compiled_class):  Add missing arg to load_class.
19721         * expr.c (expand_java_NEW):  Call load_class.
19722         * parse.y (process_import):  Removed bogus use of void return value.
19723
19724 1998-06-25  Per Bothner  <bothner@cygnus.com>
19725
19726         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
19727         Function name is "_Jv_Throw" instead of "soft_athrow".
19728         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
19729         Function name is "_Jv_AllocObject" instead of "soft_new".
19730         Takes an extra parameter (object size).
19731         * expr.c:  Update calls.
19732
19733 1998-06-24  Per Bothner  <bothner@cygnus.com>
19734
19735         * lex.c (java_get_line_col):  Handle end-of-file.
19736         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
19737
19738 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
19739
19740         * lang.c (lang_init): Make -fexceptions the default.
19741         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
19742         exception handling is not turned on.
19743
19744 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
19745
19746         * lang.c (flag_new_exceptions): Make this this default.
19747         * decl.c (end_java_method): Call emit_handlers.
19748         * except.c (method_init_exceptions): Set language code and version.
19749         (expand_start_java_handler): Enable exception, and call
19750         expand_eh_region_start.
19751         (expand_end_java_handler): Enable exception, and set up catch blocks.
19752         (emit_handlers): New routine to generate the saved handlers.
19753         * java-except.h (emit_handlers): Add prototype.
19754
19755 1998-06-12  Per Bothner  <bothner@cygnus.com>
19756
19757         We used to have three different representations of the constant pool:
19758         the CPool structure, the tree_constant_pool, and the constructures
19759         used to build the Class object (which may need class and string
19760         constants) in compiled code.  None were appropriate for compiling
19761         to .class files, so I did a major overhaul.
19762
19763         First, the tree_constant_pool array was removed.  Things were
19764         modified to the CPool structure in the JCF could be used.
19765         Second, a "capacity" field was added to the CPool, and functions
19766         written to search for a matching constant, adding one if not found.
19767         The code that generated the Class object was changed to use a CPool.
19768         The actual TREE_LISTs used to build the CONSTRUCTORs used for
19769         the static Class object are now only in build_constants_constructor.
19770         Finally, I wrote code which can generate a .class file (including its
19771         constant pool) from the RECORD_TYPE of a class.  This is a big step
19772         on the way to compiling Java source into .class files.
19773
19774         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
19775         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
19776
19777         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
19778         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
19779         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
19780         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
19781         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
19782         (lang_type):  Removed constant_pool field.
19783         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
19784         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
19785         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
19786         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
19787
19788         * constants.c (current_constant_pool_tags, current_constant_pool_data,
19789         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
19790         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
19791         (set_constant_entry, find_constant1, find_constant2,
19792         find_class_constant, count_constant_pool_bytes, write_constant_pool,
19793         find_utf8_constant, find_class_or_string_constant):  New functions.
19794
19795         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
19796         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
19797         (give_name_to_class, get_class_constant):  Likewise.
19798         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
19799         (get_name_and_type_constant, get_ref_constant):  Removed.
19800         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
19801         * parse.y:  Don't save/restore tree_constant_pool.
19802         * verify.c (verify_jvm_instructions):  Update for new approach.
19803         * expr.c (expand_invoke, expand_java_field_op): Likewise.
19804
19805         * lang-options.h:  Added -femit-class-file, -femit-class-files.
19806         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
19807         (lang_f_options):  Added "emit-class-file(s)".
19808
19809         * expr.c (build_java_arrayaccess):  Generate more efficient array
19810         bounds checking, by using unsigned compare.
19811
19812         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
19813
19814 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19815
19816         * parse.h: New comment on the handling of unresolved type
19817         identifiers. JDEPs are now part of the jdep_code enum.
19818         (typedef struct jdep): Now use enum jdep_code or int, depending on
19819         availability. Both are narrowed down to an 8 bits bitfield.
19820         (CALL_EXPR_PRIMARY): Fixed comment.
19821
19822 1998-06-10  Tom Tromey  <tromey@cygnus.com>
19823
19824         * Make-lang.in (java): Added gjavac and jvgenmain.
19825         (java.start.encap): Depend on gjavac.
19826         (java.rest.encap): Depend on jvgenmain.
19827
19828         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
19829         (JAVA_CROSS_NAME): Likewise.
19830         (java.all.build): Depend on jvgenmain and gjavac.
19831         (java.all.cross): Depend on jvgenmain and gjavac-cross.
19832         (jvgenmain$(exeext)): New target.
19833         (java.install-common): Wrote.
19834         * config-lang.in (compilers, stagestuff): Added gjavac and
19835         jvgenmain.
19836
19837 1998-06-10  Dave Brolley  <brolley@cygnus.com>
19838
19839         * lang.c (lang_decode_option): New argc/argv interface.
19840
19841 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19842
19843         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
19844         * decl.c (build_decl_no_layout): New function.
19845         * expr.c (java_lang_expand_expr): Layout declarations found in
19846         blocks before they're pushed.
19847         * jcf-parse.c (load_class): Save current line when parsing class
19848         file.
19849         (parse_source_file): Register class before expanding their
19850         methods.
19851         * lang.c (put_decl_node): Produce `null' when `void *' is
19852         processed.
19853         * lex.c (static tree wfl_op): New static global, for error report
19854         on casts.
19855         (java_init_lex): wfl_operator and wfl_op initialized
19856         here. Filename caching added for wfl_op. Return wfl_op when `(' is
19857         parsed.
19858         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
19859         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
19860         build_unresolved_array_type): New static function definitions.
19861         (build_decl_no_layout): New extern function declared.
19862         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
19863         faulty modifier exists.
19864         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
19865         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
19866         (UNARY_PLUS_EXPR): New fake operator.
19867         (struct parser_ctxt): New field osb_number.
19868         * parse.y (static tree wfl_operator): New static WFL for operator
19869         bound error messages.
19870         (DECR_TK, INCR_TK): Moved.
19871         (OP_TK): Tagged <operator>.
19872         (array_type:): Now call build_unresolved_array_type.
19873         (dim_expr:): Count the number of '[' seen.
19874         (post_increment_expression, post_decrement_expression,
19875         pre_increment_expression, pre_decrement_expression,
19876         unary_expression_not_plus_minus, unary_expression:): Actions are
19877         now building the corresponding unary expressions.
19878         (cast_expression:): Actions are now building cast expressions.
19879         (build_unresolved_array_type): New function.
19880         (create_interface): Reset the number of declared interfaces.
19881         (create_class): Likewise.
19882         (method_header): Methods declared within the scope of an interface
19883         are now implicitly set public and abstract.
19884         (java_complete_class): Variable's and parameter's type are patched
19885         with a promoted type.
19886         (declare_local_variables): Resolved non builtin types are promoted
19887         before being used to build a variable decl. Removed type patch
19888         posted on variable initialization statement.
19889         (source_start_java_method): Use build_decl_no_layout to build the
19890         decl of a parameter of incomplete type.
19891         (java_register_parsed_class): Process interfaces too. Call
19892         rest_of_decl_compilation on each processed class declarations.
19893         (java_complete_expand_methods): Don't attempt to expand things in
19894         interfaces.
19895         (java_complete_tree): Process CONVERT_EXPR, even though it always
19896         has a type. Propagate error_mark_node to node's type too. Promote
19897         method's call argument type and return error_mark_node if
19898         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
19899         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
19900         handle unary operator nodes.
19901         (build_assignment): Added comment.
19902         (print_int_node): New function.
19903         (patch_assignment): New second argument. New error handling. Use
19904         print_int_node. Handle references. Use can_cast_to_p to issue
19905         different error message according to the context and check upon
19906         the initialization of the RHS.
19907         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
19908         (operator_string): Handle more operators.
19909         (patch_binop): No longer use a function static
19910         wfl_operator. Improved error message on shift distance.
19911         (build_unaryop, build_incdec, build_cast, patch_unaryop,
19912         patch_cast): New functions.
19913
19914 1998-06-05  Per Bothner  <bothner@cygnus.com>
19915
19916         * jvspec.c:  New file.
19917         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
19918
19919         * java-tree.h (identifier_subst):  Add declaration.
19920
19921 1998-06-04  Tom Tromey  <tromey@cygnus.com>
19922
19923         * jvgenmain.c (main): Generate call to JvRunMain.
19924
19925         * class.c (make_class_data): Push value for "sync_info" field.
19926         * decl.c (init_decl_processing): Push "sync_info" field.
19927
19928 1998-06-03  Per Bothner  <bothner@cygnus.com>
19929
19930         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
19931         Java (source) name, not signature.
19932         Set TYPE_ALIGN to (at least) that of element_type.
19933
19934 1998-06-02  Per Bothner  <bothner@cygnus.com>
19935
19936         * class.c:  Moved classname-mangling-rekated code to ...
19937         * mangle.c:  ... this new file.
19938         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
19939         * Makefile.in:  Update for above changes.
19940
19941 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19942
19943         * expr.c (truthvalue_conversion): Convert integer and floating
19944         point value to their truth value.
19945         * lex.c (java_lex): Handle the `null' literal.
19946         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
19947         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
19948         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
19949         New macros.
19950
19951         * parse.y: Reorganization/documentation on token declaration.
19952         (binop_lookup[]): New added new tree codes.
19953         (relational_expression): Build corresponding binary operators.
19954         (equality_expression, conditional_and_expression,
19955         conditional_or_expression): Likewise.
19956         (java_complete_class): Fix crash in debug message.
19957         (java_complete_tree): Check initialization of method call
19958         arguments. Further bogus node evaluation to detect more error
19959         during assignments. Handles more binary operators.
19960         (patch_assignment): Use DECL_P.
19961         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
19962         code.
19963         (operator_string): Handle more case. Compacted source.
19964         (patch_binop): Changed function comment. Checking for
19965         uninitialized first operand takes the compound assignment into
19966         account and uses DECL_P. Checking for uninitialized second operand
19967         delayed to routine's end. Use macros to issue type bound error
19968         messages and issue messages on both operands if their types are
19969         different. Force fixed type into node. Handle all binary
19970         operators.
19971
19972 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19973
19974         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
19975         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
19976         build operator node and return tokens.
19977         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
19978         * parse.h (java_complete_tree): Changed returned type in prototype.
19979         (build_method_invocation, build_assignment, patch_assignment,
19980         patch_binop): New static function declarations.
19981         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
19982         BUILD_EXPR_WFL): New macros.
19983         * parse.y (enum tree_code binop_lookup[]): New static for token to
19984         TREE_CODE lookup.
19985         (%union): Parser union has new sub-structure `operator'.
19986         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
19987         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
19988         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
19989         ASSIGN_ANY_TK): Tokens tagged `operator'.
19990         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
19991         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
19992         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
19993         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
19994         (assignment_operator:): Rule tagged `operator'.
19995         (expression_statement:): Re-installed default rule.
19996         (method_invocation:): Sub rules call build_method_invocation.
19997         (postfix_expression:): Don't attempt to resolve name here. Just
19998         return an ID.
19999         (multiplicative_expression:): Sub-rules build corresponding binop
20000         expression node.
20001         (additive_expression:, shift_expression:, and_expression:,
20002         exclusive_or_expression:, inclusive_or_expression:): Likewise.
20003         (assignment:): Sub rule invoke build_assignment.
20004         (assignment_operator:): Default rules on sub rules.
20005         (force_error): Added documentation on this variable.
20006         (declare_local_variables): Build initialization calling
20007         build_assignment.
20008         (expand_start_java_method): Removed unused rtx declaration. Mark
20009         arguments as already initialized.
20010         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20011         (java_complete_expand_methods): Don't process next method if
20012         completion of the previous one triggered errors.
20013         (java_complete_expand_method): Call source_end_java_method if no
20014         error were found during completion.
20015         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20016         locals declaratilon. Handle names found within a class. Return
20017         error_mark_node when things aren't found.
20018         (patch_method_invocation_stmt): Return error_mark_node on failures.
20019         (patch_invoke): Removed unused local. Return the correct node.
20020         (java_complete_tree): Now returns a value. The BLOCK section binds
20021         local identifiers and the type of a BLOCK is now void. Assign the
20022         result of operand completion on COMPOUND_EXPR. Assign the
20023         encapsulated node of a WFL to the result of its completion, except
20024         when the node is an identifier. Now handle MODIFY_EXPR and several
20025         binary operators. Return error_mark_node on errors.
20026         (build_method_invocation, build_assignment, patch_assignment,
20027         build_binop, operator_string, patch_binop): New functions.
20028         * typeck.c (binary_numeric_promotion): New function.
20029
20030 1998-05-21  Per Bothner  <bothner@cygnus.com>
20031
20032         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
20033         Replace most uses of ident_subst by identifier_subst.
20034
20035         * class.c (push_class_static_dummy_field):  Removed function.
20036         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
20037         instead of looking got "class" static field.  Create that decl here.
20038         (class_identifier_node):  Removed;  no longer needed.
20039         (init_class_processing):  Don't init class_identifier_node.
20040         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
20041         Do nreverse 0 times (instead of twice) for Object and Class.
20042         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20043
20044 1998-05-20  Per Bothner  <bothner@cygnus.com>
20045
20046         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
20047         while initializing linenumber_count and linenumber_table.
20048         Do it before init_function_start (which calls emit_line_note).
20049         * expr.c (expand_byte_code):  Don't need to clear lineno here.
20050
20051 1998-05-18  Tom Tromey  <tromey@cygnus.com>
20052
20053         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20054         then mangle number as _N_.
20055
20056         * class.c (mangle_class_field): New function.
20057         (build_class_ref): Set assembler name of class reference using
20058         mangle_class_field.
20059         (push_class_static_dummy_field): Likewise.
20060
20061 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
20062
20063         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20064         of assigning to TREE_CODE.  The latter method exploits a feature
20065         of GCC that is not ANSI compliant.
20066
20067 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20068
20069         * decl.c (pushdecl_force_head): New function.
20070         (pushlevel): Removed conditional printf.
20071         (complete_start_java_method): Don't enter local variable scope if
20072         function is compiled from source code.
20073         * expr.c: parse.h now included
20074         (java_lang_expand_expr): New function.
20075         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20076         printf. Terminate buffer when doing directories.
20077         * jcf-parse.c (parse_source_file): Call lang_init_source before
20078         parsing and before code generation.
20079         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20080         use printf if the macro is defined.
20081         * lang.c (lang_init): Install lang_expand_expr hook on
20082         java_lang_expand_expr.
20083         (java_dummy_print): New function.
20084         (lang_init_source): New function.
20085         * lex.c (java_lex): Remember location of an opening brace at the
20086         second nesting level.
20087         (java_is_eol): Unget character seen after a CR if it is EOF.
20088         * parse.h: Now includes lex.h
20089         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20090         printf if the macro is defined.
20091         (expand_start_java_method, build_expr_block, enter_block,
20092         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20093         New static function declarations.
20094         (pushdecl_force_head): New extern function declaration.
20095         (INCOMPLETE_TYPE_P): New macro.
20096         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20097         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20098         BLOCK_EXPR_ORIGIN): New macros.
20099         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20100         DECL_SOURCE_LINE_LAST): New macros.
20101         (struct parser_ctxt): Removed field current_method_decl, redundant
20102         with the field current_function_decl. Added fields
20103         first_ccb_indent1 and pending_block.
20104         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20105         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20106         tagged <node>
20107         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20108         (compilation_unit:): Cosmetic on sub rule.
20109         (type_declaration:): Cosmetic on sub rules. Added an error rule.
20110         (variable_initializer:): Installed default rule on expression:.
20111         (method_declaration:): method_header: starts a new
20112         method. method_body: installs the function body, absorbs blocks
20113         emitted for temporary variable scopings, pops function's body block
20114         and merges function's last statement lineno in DECL_SOURCE_LINE.
20115         (method_body:): Installed default rules.
20116         (block:): Call enter_block when an opening brace is seen.  Absorb
20117         scoping blocks and call exit_block when a closing brace is seen.
20118         (block_statement:): Cosmetic changes.
20119         (method_invocation:): Create WFL around CALL_EXPR node.
20120         (patch_stage): Added comment around definition.
20121         (method_header): Try to use first_ccb_indent1 as the first line of
20122         the method, so BP debug info are emitted at the first opening
20123         brace of the function. If the function has no body, use the
20124         location of the function's name. Override currently defined method
20125         name with the matching WFL so we can point redefinition errors
20126         using the location where the function's name was declared.
20127         (check_abstract_method_header): Interprets DECL_NAME as an
20128         identifier or as a WFL, accordingly.
20129         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20130         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20131         location and name information out of it and reinstall DECL_NAME to
20132         its original identifier node value.
20133         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20134         function's source code).
20135         (read_import_dir): Test the value returned by find_class and issue
20136         a fatal accordingly.
20137         (declare_local_variables): Push a new block for the scope of the
20138         new variable(s) if code has been already generated at that nesting
20139         level. Pinpoint redefinition errors using the variable id
20140         WFLs. Generate initialization code if necessary. If the variable
20141         type is incomplete, register a patch on its decl.
20142         (source_start_java_method): Rewritten. Define a new block for the
20143         function's parameters. Build parameter decl out of function's
20144         arguments and register them for a patch if their types are
20145         incomplete.
20146         (expand_start_java_method): Includes the part of
20147         source_start_java_method that was pushing the parameter decls and
20148         completing the method start code.
20149         (source_end_java_method): Removed call the expand_end_bindings and
20150         poplevel (already taken care of). Reinstall function's arguments
20151         and get function's last line of code before calling
20152         expand_function_end.
20153         (java_method_add_stmt): New comment before the function's
20154         code. Complement the second operand of the current COMPOUND_EXPR
20155         if necessary.
20156         (java_complete_expand_methods): Don't generate debug info on line
20157         zero when expanding a generated constructor.
20158         (java_complete_expand_method): Set start and end line numbers for
20159         a artificially generated constructor to one and manually call
20160         enter_block and exit_block when defining it. For all methods:
20161         expand function's start calling the new expand_start_java_method
20162         and invoke java_complete_tree on the effective method's body, if
20163         any.
20164         (resolve_expression_name): Now use lookup_name_in_blocks to search
20165         local variable decls and print out an error when variables are
20166         undefined.
20167         (patch_method_invocation_stmt): Inserted comment before the
20168         function's code.
20169         (lookup_method_invoke): Chain method's arguments using chainon
20170         with the current arg list as a second argument. Inserted missing
20171         IDENTIFIER_POINTER when reporting an error on methods not found.
20172         (refine_accessible_methods_list): Don't retain constructors.
20173         (patch_arguments): Function removed.
20174         (java_complete_tree): Inserted comment before the function's
20175         code. New case for BLOCKs. Moved the WFL case a bit
20176         further. Complete function's arguments.
20177         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20178         maybe_absorb_scoping_blocks): New functions.
20179
20180 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20181
20182         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20183         previously set.
20184         * jcf-parse.c (parse_source_file, java_error_count): New forward
20185         and extern declarations.
20186         (java_parse_abort_on_error): Macro moved.
20187         (jcf_parse_source): fatal called if fopen fails. Now calls
20188         parse_source_file.
20189         (parse_source_file): New parse_only parameter. Reflects the
20190         elimination of the second pass.
20191         (yyparse): parse_source_file called with argument set to 0.
20192         * jcf.h (JCF_ZERO): Sets java_source to zero.
20193         * lex.c (java_init_lex): pass argument is gone. Function modified
20194         to be called once during the analysis of a file.
20195         (java_unget_unicode): Fixed typo in fatal message.
20196         (java_get_line_col): Likewise.
20197         (java_lval): Likewise. String literals no longer built during
20198         second pass.
20199         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20200         account.
20201         * parse.h (MODIFIER_WFL): New macro.
20202         (parse_check_super, parser_check_super_interface): Now return int.
20203         (parser_chain_incomplete_item, not_builtin_p,
20204         complete_method_decl): Declarations removed.
20205         (build_method_invocation_stmt, build_invoke): Renamed using the
20206         `patch' instead of `build'
20207         (register-incomplete_type, obtain_incomplete_type,
20208         java_complete_tree, java_complete_expand_method,
20209         unresolved_type_p, create_jdep_list): New function declarations.
20210         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20211         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20212         (jdep): New typedef on new struct _jdep.
20213         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20214         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20215         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20216         JDEP_RESOLVED_P): New macros.
20217         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20218         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20219         JDEP_VARIABLE): New enum values and jdep kinds.
20220         (jdeplist): New typedef on struct _jdeplist.
20221         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20222         macros.
20223         (CALL_EXPR_PRIMARY): New macro.
20224         (struct parser_ctxt): Fields java_pass, current_method_decl,
20225         method_decl_list deleted. New field jdeplist.
20226         (INCOMPLETE_P): Macro deleted.
20227         * parse.y (single_type_import_declaration:): Removed pass switch.
20228         (type_import_on_demand_declaration): Likewise.
20229         (field_declaration:): Removed pass switch on all sub rules.
20230         (class_declaration:): Call the complete_class_decl removed on
20231         class_body rules.
20232         (method_declaration:): Removed second pass switch. No longer chain
20233         methods decl when method_header reduced.
20234         (method_header:): Sub rules no longer depend on pass switch.
20235         (method_declarator:): Likewise.
20236         (method_body:): Likewise.
20237         (abstract_method_declaration:): Likewise.
20238         (block_statement:): Likewise.
20239         (local_variable_declaration:): Likewise.
20240         (argument_list:): Likewise.
20241         (method_invocation:): Likewise. Call to build_method_invocation_stmt
20242         removed. Partial CLASS_EXPR tree node built instead.
20243         (postfix_expression:): Removed pass switch on all sub rules.
20244         (java_pop_parser_context): Free classd_list content.
20245         (yyerror): Call obstrack_grow0 to finalize error message.
20246         (check_class_interface_creation): Comment modified to reflect new
20247         returned value meaning. Removed second pass switch. Return 1 if an
20248         error was found, 0 otherwise. Adjust pointer on filename if a
20249         leading path separator was found.
20250         (maybe_create_class_interface_decl): Removed first pass switch
20251         when linking the class decl to the class_list. Install a new
20252         jdep_list for the class.
20253         (add_superinterfaces): List of unresolved interfaces is
20254         gone. Unresolved interfaces are directly added to the current
20255         dependencies list.
20256         (create_interface): Second pass shortcut removed.
20257         ctpx->modifier_ctx access through MODIFIER_WFL.
20258         (create_class): Second pass shortcut removed. Call to
20259         register_incomplete_type replaces the call to
20260         parser_chain_incomplete_item.
20261         (complete_class_decl): Function removed.
20262         (duplicate_declaration_error): New way of retrieving redeclared
20263         item type.
20264         (register_fields): Call to lookup_modifier_cl replaced by
20265         MODIFIER_WFL. New way of handling unresolved type, using
20266         unresolved_type_p and obtain_incomplete_type.
20267         register_incomplete_type replaces call to parser_chain_incomplete_item.
20268         (patch_stage): New static global variable.
20269         (method_header): New way of handling unresolved type, using
20270         unresolved_type_p and obtain_incomplete_type. patch_stage used to
20271         indicates that the method decl needs to be patched.
20272         (check_abstract_method_header): Call to lookup_modifier_cl
20273         replaced by MODIFIER_WFL.
20274         (method_declarator): Incomplete argument type are registered
20275         calling register_incomplete_type. Patch on the declared method is
20276         issued in that case.
20277         (unresolved_type_p): New function.
20278         (parser_check_super_interface): New comment to reflect function's
20279         modified returned type (int). Function and has a new argument
20280         this_wfl. Call to parse_error_context uses this_wfl instead of
20281         relying on lookup_cl.
20282         (parser_check_super): Comment reflects function's new returned
20283         type (int). Function returns nonzero value on error.
20284         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20285         register_incomplete_type, jdep_resolve_class): New functions to
20286         handle incomplete types in declarations.
20287         (java_complete_class): Rewritten to work with the new incomplete
20288         type handling scheme.
20289         (complete_class_report_errors): Likewise.
20290         (complete_method_decl): Removed: it jobs is now handled by
20291         java_complete_class.
20292         (do_resolve_class): Class loaded in not already loaded and not
20293         found in Java source code.
20294         (java_check_regular_methods, java_check_abstract_methods): Don't
20295         call complete_method_decl anymore.
20296         (lookup_modifier_cl, not_builtin_p): Functions deleted.
20297         (read_import_dir): Got rid of the pass number dependency.
20298         (declare_local_variables): New handling of unresolved types (patch
20299         issued).
20300         (source_start_java_method): New parameter level. Function called
20301         with level set to 1 when argument types are potentially
20302         unresolved.  Called to complete the job with level set to 2 once
20303         types are complete.
20304         (source_end_java_method): Call to permanent_allocation
20305         removed. Waiting to be replaced by a more suitable obstack
20306         management.
20307         (java_complete_expand_methods, java_complete_expand_method,
20308         java_expand_finals): New functions.
20309         (build_method_invocation_stmt): Renamed
20310         patch_method_invocation_stmt. Extracts function call expression
20311         (wfl) and arguments (args) from CALL_EXPR tree operands.
20312         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20313         call. Patch the function and argument operand of the CALL_EXPR
20314         tree argument.
20315         (patch_argument, java_complete_tree): New functions.
20316
20317 1998-04-20  Per Bothner  <bothner@cygnus.com>
20318
20319         Recover from missing fields and methods (i.e. error instead of fatal).
20320         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
20321         * expr.c (expand_invoke):  Recover from missing method.
20322         (expand_java_field_op):  Recover from missing field.
20323         Inline references to java.lang.{Integer,Char,...}.TYPE.
20324         * typeck.c (get_type_from_signature), java-tree.h:  New function.
20325         * class.c (add_method):  Use get_type_from_signature.
20326         (build_class_ref):  Handle a class that was not found.
20327         * typeck.c (convert):  Handle conversion to pointers (for convenience).
20328         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
20329         instead of lookup_field to handle missing fields.
20330
20331         * jcf-parse.c (process_zip_dir):  Set java_source.
20332
20333 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
20334
20335         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20336
20337 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20338
20339         * jcf-parse.c (load_class): Don't change input_filename before
20340         calling jcf_parse_source (but still do it before calling
20341         jcf_parse).
20342         (jcf_parse_source): Assign input_filename after having saved the
20343         parser context.
20344         * lex.c (java_init_lex): Chain a WFL node to the import on demand
20345         list. ctxp->modifier_ctx zeroed according to its new
20346         definition. ctxp->filename initialized. Removed
20347         JAVA_MODIFIER_CTX_UNMARK.
20348         (java_unget_unicode): Update the character based column position.
20349         (java_allocate_new_line): ref_count not used anymore. Always free
20350         ctxp->p_line. Initialize c_line->char_col to 0.
20351         (java_get_unicode): Update the character based column position.
20352         (java_lex): Use ctxp->elc to store current position in source
20353         file, at the beginning of the parsed token. Set modifier_ctx entry
20354         corresponding to the parse modifier to a WFL node. Return a WFL
20355         node when an identifier is parsed.
20356         (java_lex_error): Now uses ctxp->elc to store current position in
20357         source.
20358         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20359         * lex.h (build_wfl_node): New function definitions.
20360         (struct java_line): ref_count and next fields are gone. New field
20361         char_col.
20362         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20363         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20364         (JAVA_COLUMN_DELTA): New macro.
20365         (java_lc): New typedef on new struct _java_lc.
20366         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20367         (parse_error_context, parse_warning_context): Changed prototypes.
20368         (java_get_line_col): Added as an available global function.
20369         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20370         (IC_DECL): Replaced by macro IC_TYPE
20371         (DEPEND_WFL): New macro.
20372         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20373         wrong modifier.
20374         (exit_java_complete_class): Removed a commented out statement.
20375         (struct parser_ctxt): Added comments on fields. modifier_ctx is
20376         now an array of tree nodes. Deleted fields line_list and
20377         e_line. New field elc, to replace e_line.
20378         * parse.y (array_type:): Build WFL node.
20379         (qualified_name:): Build a single WFL node out of two. Retain
20380         the location information of the first node in the resulting node.
20381         (package_declaration:): Use package name as a WFL node
20382         (single_type_import_declaration:): Use imported name as a WFL node.
20383         (type_import_on_demand_declaration:): Use root of the imported
20384         packages as a WFL node.
20385         (field_declaration:): Removed unused local variable cl.
20386         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20387         (yyerror): New static elc. Removed static error_line, error_pos.
20388         New local code_from_source. Save ctxp->elc into elc at the first
20389         pass. Call java_get_line_col to get a string of the line where
20390         the error occurred.
20391         (debug_line): Removed static function.
20392         (parse_error_context, parse_warning_context): Parameter cl is now
20393         a WFL node. Use its value to initialize ctxp->elc.
20394         (redefinition_error): Parameter cl is now a WFL node.
20395         (parse_add_interface): New parameter wfl. No longer call
20396         lookup_cl, use wfl instead.
20397         (check_class_interface_creation): Parameter cl is now a WFL node.
20398         (maybe_create_class_interface_decl): Likewise.
20399         (add_superinterfaces): New function.
20400         (create_interface): Removed local cl, node, super_decl,
20401         super_decl_type.  Function now uses id as a WFL node. Better
20402         warning/error report on obsolete or forbidden mix of
20403         modifiers. Now calls add_superinterfaces to register interfaces.
20404         (create_class): Removed local cl, node. Local variable id is used
20405         as a WFL node. Better error report on forbidden modifier
20406         mix. Uses add_superinterfaces to register interfaces.
20407         (find_field): Argument cl is now a WFL node. Now store the WFL
20408         node of a fields that needs to be checked for their
20409         initialization.
20410         (method_header): Local variable node non longer used. Local
20411         variable id replaces cl.
20412         (check_modifiers_consistency): Local variable cl is now a WFL
20413         node.
20414         (method_declarator): Local variable cl replaced by parameter id.
20415         (parser_qualified_name): Now uses parameter name as a WFL node.
20416         (parser_check_super_interface): New parameter wfl, for achieve
20417         greater accuracy during error reports.
20418         (parser_chain_incomplete_item): New parameter named location. Used,
20419         along the decl, to construct the incomplete item node.
20420         (java_complete_class): resolve_class now uses WFL node extracted
20421         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20422         where appropriate.
20423         (complete_method_decl): Unresolved function's argument types are WFL.
20424         (resolve_class): Parameter cl is now a WFL node.
20425         (resolve_and_layout): Likewise.
20426         (do_resolve_class): Likewise. Try first to use cl and then do the
20427         lookup on the decl when calling check_pkg_class_access.
20428         (complete_class_report_errors): Use IC_TYPE in place of
20429         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20430         instead of doing a lookup over the decl.
20431         (java_check_final): Use WFL info from field tree list.
20432         (lookup_cl): Rewritten and returns a statically defined WFL node.
20433         (lookup_modifier_cl): Now uses information from WFL nodes.
20434         (process_imports): Likewise.
20435         (read_import_dir): name and cl arguments replaced by a single WFL
20436         node. Function modified accordingly.
20437         (find_in_imports_on_demand): Now uses WFL node.
20438         (check_pkg_class_access): cl argument is now a WFL node.
20439         (declare_local_variables): Fixed to use WFL nodes.
20440         (resolve_expression_name): Likewise.
20441         (build_method_invocation_stmt): name_combo argument renamed
20442         wfl. Function modified to use WFL nodes.
20443         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20444         (lookup_method_invoke): cl is now a WFL node. Added missing
20445         IDENTIFIER_POINTER to class type decl name.
20446
20447 1998-04-14  Dave Brolley  <brolley@cygnus.com>
20448
20449         * lang.c (init_parse): Now returns char* containing the filename.
20450
20451 1998-04-10  Per Bothner  <bothner@cygnus.com>
20452
20453         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
20454
20455         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
20456         * class.c (make_class_data):  If flag_assume_compiled, initial class
20457         state is CSTATE_PREPARED; make superclass and interfaces direct
20458         references, rather than constant pool indexes.
20459
20460 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20461
20462         * parser.y: Include flags.h. Removed debug variable pl.
20463         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20464         (block:): Likewise.
20465         (labeled_statement_nsi:): Generate debug info when reducing
20466         expression_statement:.
20467         (check_pkg_class_access): get_access_flags_from_decl invocation
20468         fixed for new CLASS_* flags location.
20469         (source_end_java_method): Save/restore parser context when
20470         entering/leaving this routine. Restore lineno to its right value
20471         before calling expand_end_bindings.
20472         (build_method_invocation_stmt): build_invoke called with the
20473         current line information.
20474         (build_invoke): New argument cl. Wrap the function call around a
20475         wfl node.
20476         (refine_accessible_methods_list): Changed comment, removed
20477         unnecessary code.
20478         * parse.h: Fixed typo in comments.
20479         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20480         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20481         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20482         parser_ccb_indent.
20483         * lex.c (java_lex): Record the last closing curly bracket of a
20484         function.
20485         * jcf-parse.c (jcf_parse_source): Now calls
20486         java_check_methods. Clarified comment, fixed typo.
20487
20488 1998-04-09  Dave Brolley  <brolley@cygnus.com>
20489
20490         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20491         (finish_parse): Expose for non USE_CPPLIB builds.
20492
20493 1998-04-08  Jeffrey A Law  (law@cygnus.com)
20494
20495         * lang.c (lang_print_xnode): New function.
20496
20497 1998-04-03  Per Bothner  <bothner@cygnus.com>
20498
20499         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
20500         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
20501         used to build a class's dispatch table.
20502         (make_class_data):  Generate dispatch table if flag_assume_compiled.
20503         Set dtable of class object to address of class_dtable_decl.
20504
20505         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
20506         be volatile and have side effects - generates better code.
20507
20508         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
20509         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20510
20511         * expr.c (expand_invoke):  If class is final, method is
20512         effectively final, so can call it directly.
20513
20514         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
20515
20516         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
20517
20518 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20519
20520         * parse.y (build_method_invocation_stmt): Removed extra argument
20521         to build_invoke.
20522
20523 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20524
20525         * expr.c (dtable_indent): Now static global.
20526         (expand_invoke): Now call invoke_build_dtable and
20527         build_invokevirtual.
20528         (invoke_build_dtable, build_invokevirtual): New functions.
20529         * jcf-io.c (find_class): Defer issuing a warning by setting
20530         jcf->outofsynch to 1.
20531         * jcf-parse.c (jcf_out_of_synch): New function.
20532         (load_class): Test this_jcf.outofsynch flag and call
20533         jcf_out_of_synch accordingly.
20534         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20535         comment indentation.
20536         * lex.c (java_get_unicode): Fixed code indentation.
20537         (java_lex): Create string literal. Fixed typo. Removed several
20538         premature obstack_free.
20539         * parse.h: New enums for name resolution and invocation mode.
20540         (struct qualification): New data structure.
20541         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20542         (do_resolve_class, build_method_invocation_stmt,
20543         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20544         debug_line, identical_subpath_p, invocation_mode,
20545         refine_accessible_methods_list, build_invoke,
20546         lookup_method_invoke): New functions declared.
20547         (build_invokevirtual, invoke_build_dtable, match_java_method,
20548         build_field_ref, jcf_out_of_synch): New references to external
20549         functions.
20550         (struct parse_ctxt): Removed artificial_constructor field.
20551         * parse.y: (array_type:): Type defined for this rule.
20552         (class_type:): Installed default rule for interface_type:.
20553         (array_type:): Now build Java array type.
20554         (qualified_name:): Now use obstack_grow0.
20555         (method_declaration:): Skip the artificial constructor added to
20556         the list, if any.
20557         (abstract_method_declaration:): Execute the code only during pass 1.
20558         (block:): Installed default rule in block_statements:.
20559         (block_statement:): Add the statement to the method during pass 2.
20560         (statement_expression): Installed default rule for
20561         method_invocation:.
20562         (argument_list:): Added code to build the argument list.
20563         (method_invocation:): Added call to create the method invocation
20564         node.
20565         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20566         (debug_line): New function for debug.
20567         (complete_class_decl): No longer do something during pass 1.
20568         (method_header): Use BUILD_PTR_FROM_NAME.
20569         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20570         obstack_free.
20571         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20572         function's main comment.
20573         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20574         classes.
20575         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20576         (resolve_class): Now works with arrays.
20577         (do_resolve_class, resolve_and_layout): New functions.
20578         (java_check_regular_methods): Reverse method list before and after
20579         having processed it. No longer set ctxp->artificial_constructor.
20580         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20581         accordingly. Fixed typo in issued error message. Now use
20582         obstack_grow0.
20583         (find_in_imports_on_demand): Now use obstack_grow0.
20584         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20585         (source_end_java_method): Call expand_expr_stmt instead of
20586         expand_expr. Calls it before calling expand_function_end.
20587         (java_method_add_stmt): Do nothing if errors were found during
20588         parsing.
20589         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20590         (build_method_invocation_stmt, build_invoke, invocation_mode,
20591         lookup_method_invoke, refine_accessible_methods_list,
20592         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20593         New functions.
20594         * typeck.c (build_java_signature): Properly end method signature
20595         if return type skipped.
20596         (match_java_method): New function.
20597
20598 1998-03-16  Per Bothner  <bothner@cygnus.com>
20599
20600         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20601
20602 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20603
20604         * expr.c (build_invoke_non_interface): New function.
20605         (methods_ident, ncode_ident): Now static globals.
20606         (expand_invoke): Use build_invoke_non_interface.
20607         * java-tree.h (struct lang_decl): New field function_decl_body.
20608         (DECL_FUNCTION_BODY): New macro.
20609         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20610         CLASS_FROM_SOURCE_P.
20611         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20612         before starting pass 2. Call to java_generate_parsed_class replaced
20613         by java_register_parsed_class.
20614         * lex.c: Fixed typo in header. Some line width related formating.
20615         * lex.h: Some line width related formating.
20616         * parse.h (source_end_java_method, resolve_expression_name,
20617         complete_class_decl, maybe_create_class_interface_decl,
20618         check_class_interface_creation): New static function declarations.
20619         (java_layout_parsed_class, java_method_add_stmt): New function
20620         declarations.
20621         (struct parser_ctxt): Field mark_class_generate removed. New
20622         fields class_list and artificial_constructor.
20623         * parse.y: Fixed typo in header.
20624         (class_declaration:): Call complete_class_decl when class body
20625         parsed.
20626         (method_declaration:): Call source_end_java_method in pass 2 when
20627         the method body is defined.
20628         (postfix_expression:): Do expression name resolution on sub-rule
20629         name during pass 2.
20630         (create_class, create_interface): Merged common pieces.
20631         (check_class_interface_creation, maybe_create_class_interface_decl):
20632         New functions.
20633         (complete_class_decl): New function.
20634         (register_fields): Fixed line width related typo.
20635         (method_header): Correctly skip first argument when fixing
20636         argument line. Changed the loop.
20637         (java_check_circular_reference): Now use ctxp->class_list.
20638         (java_complete_class): Removed start/stop marking.
20639         (java_check_regular_methods): Now takes a class decl as an
20640         argument.  Add default constructor if none were encountered.
20641         (java_check_methods): Now use ctxp->class_list. Changed call to
20642         java_check_regular_methods.
20643         (source_start_java_method): Set DECL_ARG_TYPE for each function
20644         arguments.
20645         (source_end_java_method, java_method_add_stmt): New functions.
20646         (java_generate_parsed_class): No longer exists.
20647         (java_layout_parsed_class, java_register_parsed_class): New functions.
20648         (resolve_expression_name): New function.
20649
20650 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20651
20652         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20653         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20654         until pass initializations are done. Call read_import_dir with
20655         pass set to 0.
20656         * parse.h: (lookup_modifier_cl): New function declared.
20657         (INTERFACE_FIELD_MODIFIERS): New macro.
20658         (OBSOLETE_MODIFIER_WARNING): New macro.
20659         * parse.y: (register_fields): Class type and current field name in
20660         local variables. Check modifier(s) if adding field(s) to an interface.
20661         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20662         and report errors using the faulty modifier line context.
20663         (lookup_modifier_cl): New function.
20664         (read_import_dir): Detect and report default import processing
20665         failure.
20666
20667 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20668
20669         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20670         * class.c (is_compiled_class): Return 1 after making sure it
20671         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20672         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
20673         * java-tree.h (flag_assume_compiled): Add decl.
20674         * lang.c (lang_f_options): Add the flag.
20675         (flag_assume_compiled): Add decl, default to 0.
20676
20677 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20678
20679         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
20680         (is_compiled_class): Likewise.
20681         (layout_class): Likewise.
20682         (layout_class): Detect and lay out classes defined in source code.
20683         (interface_of_p, add_interface_do, may_add_interface): New
20684         function.
20685         (add_interface): Now use add_interface_do.
20686         (add_method_1): New function.
20687         (add_method): Now use add_method_1.
20688         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
20689         (complete_start_java_method): New function.
20690         (start_java_mehod): Now call complete_start_java_method.
20691         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
20692         (expand_invoke): Likewise and fixed typo.
20693         *gjava.c: (print_super_field): Use new argument to find_class
20694         DO_CLASS_FILE.
20695         (main): Likewise.
20696         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
20697         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
20698         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
20699         IDENTIFIER_NODE.
20700         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
20701         (add_method_1, push_class): New prototypes.
20702         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
20703         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
20704         directory where the class was found.
20705         (find_class): New argument DO_CLASS_FILE. Function find_class
20706         modified accordingly.
20707         *jcf-parse.c: (fix_class_path): New function.
20708         (load_class): Use new VERBOSE argument. load_class now finds and
20709         loads/parses .class/.java files. Save read_state of current_jcf
20710         if necessary.
20711         (java_parser_abort_on_error): New macro.
20712         (jcf_parse_source, parse_source_file): New function.
20713         (jcf_parse): Fixed typo.
20714         (yyparse): Call parse_source_file () only.
20715         (process_zip_dir): Fixed typo, fix zdir->filename_length when
20716         writing the real class name back in the zip directory entry.
20717         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
20718         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
20719         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
20720         (find_class): Prototype fixed.
20721         *lex.c: Added 1998 time stamp.
20722         Removed all static global variables, moved into the parser
20723         context data structure.. Now include unistd.h if SEEK_SET not
20724         defined.
20725         (java_init_lex): Rewritten.
20726         (java_sneak_unicode): Modified current unicode access in current line.
20727         (java_unget_unicode): Likewise.
20728         (java_allocate_new_line): New allocation management.
20729         (java_read_char): Modified access and storage of unget_utf8_value.
20730         New way of processing current unicode.
20731         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
20732         (java_get_unicode): Now use the parser context.
20733         (java_lineterminator): Likewise.
20734         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
20735         of the reentrant parser implementation. Function now use the
20736         parser context data structure and java_lval. Fixed production of
20737         the float and double constant "out of range" error message. Fixed
20738         obstack use. Return integer value when hitting a modifier. Now
20739         return type for TRUE, FALSE and other predefined types. Return
20740         identifier as a TREE_LIST list containing the current line context
20741         as the TREE_VALUE sub-node.
20742         (java_unicode_2_utf8): Fixed typo in declaration.
20743         (java_lex_error): Now use the parser context data structure.
20744         *lex.h: Added 1998 time stamp.
20745         (struct java_line): New fields ref_count and next.
20746         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20747         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
20748         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
20749         *parse.h: Added 1998 time stamp.
20750         (java_parse_source_file): Renamed from parse_source_file.
20751         (YYERROR_NOW, YYNOT_TWICE): Fixed.
20752         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
20753         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
20754         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
20755         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
20756         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
20757         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
20758         (struct parser_ctxt): New data structure to keep the parser context.
20759         *parse.y: Added 1998 time stamp, got rid of static global variables.
20760         (java_error_count, ctxp): New global variables.
20761         (%union): New value field.
20762         (numeric_type, integral_type): Rules removed.
20763         (primitive_type): Rule defined to handle integral, float, double and
20764         boolean types.
20765         (qualified_name, package_declaration,
20766         single_type_import_declaration, type_import_on_demand_declaration,
20767         modifiers, class_declaration, super, interfaces,
20768         interface_type_list, class_body, field_declaration,
20769         field_declaration, variable_declarators, variable_declarator,
20770         variable_declarator_id, method_declaration, method_header,
20771         formal_parameter_list, formal_parameter, method_body, block,
20772         static, interface_declaration, extends_interfaces,
20773         abstract_method_declaration, local_variable_declarators): Rules now
20774         define actions.
20775         (force_error, do_warning): New global statics.
20776         (push_parser_context, parser_context_save_global,
20777         parser_context_restore_global, pop_parser_context): New functions.
20778         (yyerror): Now uses the global parser context. Fixed use of obstack.
20779         (parse_error, parse_error_context, parse_warning_context,
20780         java_accstring_lookup, redefinition_error, check_modifiers,
20781         parser_add_interface, create_interface, create_class, find_field,
20782         duplicate_declaration_error, register_fields, method_header,
20783         check_modifiers_consistency, check_abstract_method_header,
20784         method_declarator, parser_qualified_classname,
20785         parser_check_super_interface, parser_check_super,
20786         parser_chain_incomplete_item, java_check_circular_reference,
20787         layout_class_from_source, java_complete_class,
20788         complete_method_decl, resolve_class, complete_class_report_errors,
20789         java_check_final, check_method_redefinition,
20790         java_check_regular_methods, java_check_abstract_methods,
20791         java_check_methods, lookup_java_interface_method2,
20792         lookup_java_method2, lookup_cl, find_name_in_single_imports,
20793         process_imports, find_in_imports, read_import_entry,
20794         read_import_dir, find_in_imports_on_demand,
20795         check_pkg_class_access, not_builtin_p, declare_local_variables,
20796         source_start_java_method, java_generate_parsed_class): New
20797         functions.
20798         *typeck.c: (signature_include_return): New global variable.
20799         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
20800         to add the function returned type in the signature.
20801
20802 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
20803
20804         * jcf-io.c (open_in_zip): Use strncmp and LEN.
20805
20806 1998-01-29  Dave Brolley  <brolley@cygnus.com>
20807
20808         * Make-lang.in (java.info): Added.
20809         (java.install-info): Added
20810
20811 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
20812
20813         * Makefile.in (clean): Also remove java/parse.c.
20814
20815 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
20816
20817         Add a pair of -fbounds-check/-fno-bounds-check options.
20818         * lang.c (lang_decode_option): Add code to grok arguments.
20819         (flag_bounds_check): Add decl.
20820         (lang_f_options): New array w/ the option in it.
20821         * java-tree.h (flag_bounds_check): Add decl.
20822         * lang-options.h: New file.
20823         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
20824         of a static macro value.
20825         (JAVA_ARRAY_EXCEPTION): Delete macro.
20826
20827 1998-01-23  Per Bothner  <bothner@cygnus.com>
20828
20829         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
20830         * expr.c (build_anewarray):  Add missing promote_type.
20831
20832 1998-01-22  Per Bothner  <bothner@cygnus.com>
20833
20834         Add array types with known length to optimize bounds checking.
20835         * typeck.c (build_java_array_type):  Take length parameter.
20836         (java_array_type_length, build_prim_array_type):  New functions.
20837         * java-tree.h:  Update for new functions.
20838         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
20839         * class.c:  Use build_prim_array_type.
20840         * expr.c (can_widen_reference_to):  Handle known-length array types.
20841         (verify_jvm_instructions):  Keep track of integer push instructions
20842         followed by newarray/anewarray, so we can build known-length arrays.
20843         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
20844         (java_array_data_offset):  New function.
20845         (build_java_array_length_access):  New function.  Optimize if constant.
20846         (build_java_arrayaccess):  Constant fold bounds check.
20847         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
20848         (build_newarray, build_anewarray):  New functions.
20849         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
20850         * verify.c (merge_types):  Handle known-lengh array types.
20851
20852 1998-01-19  Per Bothner  <bothner@cygnus.com>
20853
20854         * expr.c (expand_byte_code):  Fix performace bug, which caused
20855         searching linenumber_table to be linear rather than constant.
20856
20857 1997-12-12  Per Bothner  <bothner@cygnus.com>
20858
20859         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
20860
20861         * decl.c, java-tree.h (soft_fmod_node):  New global.
20862         * decl.c (init_decl_processing):  Define __builtin_fmod.
20863         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
20864         using __builtin_fmod.
20865
20866 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20867
20868         * keyword.h: New file, output of keyword.gperf as processed by
20869         gperf.
20870         * lex.c (java_lex_init): Initialize java_error_flag.
20871         * parse.c (YYERROR_NOW): Uses java_error_flag.
20872         * parse.y: New static java_error_flag. Useless definition of
20873         buffer_error gone.
20874         * parse.y (java_error): Portable error recovery using
20875         java_error_flag (not yet completely tuned).
20876
20877 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
20878
20879         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
20880
20881 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20882
20883         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
20884         (parse.c, lex.c, keyword.h): New rules for Java source code
20885         front-end.
20886         * parse.c: Renamed into jcf-parse.c.
20887         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
20888         * keyword.gperf: New file, Java keywords.
20889         * parse.y: New file, Java language grammar.
20890         * parse.h: New file, Java language grammar definitions.
20891         * lex.c: New file, Java language lexer.
20892         * lex.h: New file, Java language lexer definitions.
20893
20894 1997-12-03  Per Bothner  <bothner@cygnus.com>
20895
20896         * decl.c (clinit_identifier_node), java-tree.h:  New global.
20897         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
20898         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
20899         * expr.c (expand_java_field_op):  Check for invalid assignment
20900         to final field.
20901
20902         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
20903
20904 1997-10-27  Per Bothner  <bothner@cygnus.com>
20905
20906         * verify.c (verify_jvm_instructions):  When processing a handler,
20907         attempt to set the current_subr to the right value.
20908         (More complicated code combines Sep 17 and Oct 22 versions.)
20909
20910 1997-10-24  Per Bothner  <bothner@cygnus.com>
20911
20912         * class.c (push_class):  Figure out (guess) name of source file.
20913         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
20914         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
20915         (parse_class_file):  Change return type from int to void.
20916         Call debug_start_source_file/debug_end_source_file.
20917
20918         * expr.c (build_java_binop):  Fix masking 2nd operand.
20919         * decl.c (init_decl_processing):  Set sizetype first.
20920
20921 1997-10-22  Per Bothner  <bothner@cygnus.com>
20922
20923         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
20924         (Revert Sep 17 change.)
20925
20926 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20927
20928         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
20929         .class extension in their name and fix thing so we don't process
20930         them parse_zip_file_entries().
20931         (parse_zip_file_entries): Cleaned unused local variables.
20932
20933 1997-10-20  Per Bothner  <bothner@cygnus.com>
20934
20935         * expr.c (can_widen_reference_to):  Allows equal array element types.
20936         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
20937         * jcf-dump.c (RET):  Get (and print) index.
20938
20939         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
20940         Promote element type to POINTER_TYPE.
20941
20942 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20943
20944         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
20945         find_in_current_zip, jcf_figure_file_type): Moved from
20946         jcf-reader.c to parse.c.
20947         * zextract.c: (read_zip_archive): takes file_comment_length possible
20948         field into account.
20949
20950 1997-10-20  Per Bothner  <bothner@cygnus.com>
20951
20952         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
20953
20954         * verify.c (merge_types):  Handle array types even better ...
20955
20956 1997-10-17  Per Bothner  <bothner@cygnus.com>
20957
20958         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
20959
20960         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
20961         * class.c (make_class_data):  Don't build fields_decl if no fields.
20962         When building fields_decl, skip if DECL_ARTIFICIAL.
20963
20964         * expr.c (java_stack_swap):  Update stack_type_map.
20965         * verify.c (merge_types):  Handle array types better.
20966
20967 1997-10-15  Per Bothner  <bothner@cygnus.com>
20968
20969         * class.c (add_field):  Don't promote short integral fields to
20970         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
20971         * expr.c (push_value):  Promote and convert short integral values.
20972
20973         * decl.c, java-tree.h (integer_two_node):  New constant node.
20974         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
20975
20976 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20977
20978         * class.c (append_gpp_mangled_type): Use function argument
20979         unpromoted type to generate mangled name.
20980
20981 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20982
20983         * constants.c (build_constant_data_ref): Now uses current_class
20984         instead of main_class.
20985         (build_constants_constructor): Now uses current_class instead of
20986         main_class.
20987         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
20988         of the global variable SeepZipFiles done here.
20989         * zextract.c (read_zip_archive): extra_field optional field taken
20990         into account while computing the position of the class file in the
20991         archive.
20992         * verify.c (verify_jvm_instructions): Use current_jcf to search
20993         the constant pool.
20994         * parse.c (load_class): First search for the class to load in the
20995         current zip file. Saves current_jcf (restored before returning
20996         from that function). Don't call JCF_FINISH in the class was found
20997         in the current ZIP file.
20998         (jcf_parse): If the class was found in the current ZIP file, save
20999         its tree_constant_pool (for later reuse).
21000         (parse_class_file): New function. Process each method defined in
21001         the current class and record the class as to be later registered.
21002         (yyparse): Rewritten. Figure the type of the current file and switch
21003         accordingly.
21004         * lang.c: New global variable current_jcf.
21005         (lang_init): Removed compiling_from_source test (done later, in
21006         yyparse). Removed call the jcf_parse ().
21007         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21008         (typedef struct JCF): New fields seen_in_zip (to mark a class found
21009         in the current ZIP file) and zip_offset (offset to the class data in
21010         the current zip file).
21011         * jcf-reader.c: zipfile.h included.
21012         localToFile: New ZipFileCache static global variable
21013         (parse_zip_file_entries): New function. Browse the current ZIP
21014         file directory and process each class found.
21015         (process_zip_dir): New function. Register each class found in the
21016         ZIP file directory. The class aren't parsed but a valid JCF is
21017         link to each of them.
21018         (find_in_current_zip): New function. Search for a class in the
21019         current ZIP file directory. If found, prepare the class so that it
21020         can be loaded.
21021         (jcf_figure_file_type): New function. Examine the file structure
21022         to figure a class file, a ZIP file. If none of these categories are
21023         matched, a source file is assumed.
21024         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21025         SeenZipFile: New global variable.
21026         (open_in_zip): Use zipmember's length to accelerate the search for
21027         a member. If zipmember was NULL and zip file successfully read,
21028         return 0.
21029         * java-tree.h: New global variable current_jcf declared.  Added
21030         declaration for current_constant_pool_tags, current_constant_pool_data,
21031         current_constant_pool_length, current_constant_pool_data_ref.
21032         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21033         store the JCF of classes seen in a zip file) and tree *constant_pool
21034         (to save a loaded class constant pool). current_class declared here.
21035         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21036         retrieve method_ref_constant.
21037         (PUSHC): java_push_constant_from_pool now uses current_jcf.
21038         (OBJECT): get_class_constant now uses current_jcf.
21039         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21040         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21041         (expand_invoke): Now uses current_class instead of main_class
21042         (build_class_init): Now uses current_class instead of main_class
21043         * class.c: New static global variable registered_class.
21044         (register_class): New function.
21045         (emit_register_class): Modified to use registered_class instead of
21046         main_class
21047         (is_compiled_class): Now take into account class seen in the archive.
21048
21049 1997-10-06  Per Bothner  <bothner@cygnus.com>
21050
21051         * except.h:  Renamed to: java-except.h.
21052         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
21053         * except.c:  Add semi-working (commented out) implementation.
21054
21055         * expr.c (expand_iinc):  Add needed flush_quick_stack.
21056         * parse.c (set_source_filename):  New function.
21057         (give_name_to_class):  Set input_filename from package.classname.java.
21058
21059         * jcf-io.c (find_class):  Don't look first in ".".
21060
21061 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21062
21063         * zextract.c (read_zip_archive): Now takes into account the
21064         extra_field field.
21065         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21066
21067 1997-09-20  Per Bothner  <bothner@cygnus.com>
21068
21069         * constants.c, java-tree.h (build_internal_class_name):  New function.
21070         (alloc_class_constant):  Re-implement using build_internal_class_name.
21071         * class.c (make_class_data):  Likewise.
21072         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
21073
21074 1997-09-17  Per Bothner  <bothner@cygnus.com>
21075
21076         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
21077         to NULL before pushing an exception handler target.
21078
21079         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
21080         (java_stack_swap, java_stack_dup):  Re-write to be safe from
21081         clobbering registers.
21082         (build_class_init):  New function.
21083
21084 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21085
21086         * typeck.c (build_java_array_type): Temporary use
21087         permanent_obstack to create the array 'length' field.
21088         * expr.c (lookup_label): Temporay use permanent_obstack to create
21089         label if not found.
21090         * class.c (push_super_field): Tempory use permanent_obstack.
21091
21092 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21093
21094         * typeck.c (type_for_mode): Now handles double_type_node and
21095         float_type_node.
21096         * verify.c (verify_jvm_instructions): The instruction following
21097         the wide bytecode is checked. OPCODE_ret added to the list of
21098         wide.
21099
21100 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21101
21102         * class.c (make_class): Temporary use permanent_obstack. Set the
21103         class CLASS_P field to 1.
21104         (push_class): Temporary use permanent_obstack.
21105         (set_super_info): Temporary use permanent_obstack.
21106         (add_method): Temporary use permanent_obstack, set
21107         METHOD_TRANSIENT().
21108         (add_field): Temporary use permanent_obstack. Sets
21109         FIELD_VOLATILE() and FIELD_TRANSIENT().
21110         (build_class_ref): Temporary use permanent_obstack if the class
21111         isn't compiled.
21112         (build_static_field_ref): Temporary use permanent_obstack when
21113         creating field's rtl.
21114         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21115         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21116         and fields. Function finalized, as far as flag handling.
21117         (push_class_static_dummy_field): Temporary use permanent_obstack.
21118         (emit_register_class): Force generation of class registration at
21119         -O3 or deeper.
21120         * decl.c (end_java_method): Call permanent_allocation() before
21121         returning.
21122         * expr.c (can_widen_reference_to): Added comment to interface
21123         handling, fixed typo.
21124         (lookup_field): Now uses CLASS_P() to correct FIXME
21125         (expand_invoke): Verification on public && !static &&
21126         !abstract moved into soft_lookupinterfacemethod (kaffe).
21127         Use Object class dtable if objectref is an array when expanding
21128         invokeinterface.
21129         (java_push_constant_from_pool): Temporary use permanent_obstack
21130         for CONSTANT_string
21131         * parse.c (get_ref_constant): Temporary use permanent_obstack to
21132         create constant references.
21133         (get_constant): Temporary use permanent_obstack to create constant.
21134         (load_class): Temporary use permanent_obstack to load class.
21135         (jcf_parse): Temporary use permanent_obstack to perform class
21136         layout.
21137         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21138         (build_java_signature): Temporary use permanent_obstack.
21139         * verify.c: (verify_jvm_instruction): removed unnecessary verification
21140         on ACC_SUPER flag.
21141         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21142         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21143         (CLASS_P): Defined
21144
21145 1997-09-11  Per Bothner  <bothner@cygnus.com>
21146
21147         * class.c (append_gpp_mangled_type):  Fix typo.
21148         (emit_register_class):  Use main_class to get class object, rather
21149         than looking for no-longer-existing static decl starting with _CL.
21150         * typeck.c (parse_signature_type):  Promote array element type
21151         if it is a RECORD_TYPE.
21152
21153 1997-09-10  Per Bothner  <bothner@cygnus.com>
21154
21155         * class.c (push_class_static_dummy_field):  New function.
21156         (mangle_static_field):  New. Do G++-style mangling of static fields.
21157         (layout_class):  Mandle static fields here, not in add_field.
21158         (build_class_ref):  The class object is now a dummy static field.
21159         * decl.c (find_local_variable):  Look for best, instead of first match.
21160         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
21161         (build_java_athrow):  Don't check here if exception is Throwable.
21162         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
21163         (TYPE_USED):  Removed.  No longer used ...
21164         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
21165         * verify.c (push_pending_label):  New function.
21166         (push_pending_block):  Renamed to check_pending_block.
21167         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
21168         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
21169         re-checking possible handlers) after a store (less wasted work).
21170         Check for null handler (finally) before calling add_handler.
21171         Various changes to (finally?) correctly handle try/finally.
21172
21173 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
21174
21175         * class.c: Include stdio.h.
21176
21177 1997-09-04  Per Bothner  <bothner@cygnus.com>
21178
21179         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21180         to make sure class is initialized before static/special invoke.
21181
21182         * verify.c (verify_jvm_instructions):  On a store instruction,
21183         call find_local_variable to force pre-allocation of decl and rtx.
21184         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
21185
21186 1997-09-03  Per Bothner  <bothner@cygnus.com>
21187
21188         * class.c (build_class_ref):   Strip off "promoted_" if need be.
21189         (make_field_value): Call build_java_signature when needed.
21190         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
21191         * expr.c (build_java_athrow):  Don't push_value of exception.
21192         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21193         match specification of [fd]cmp[lg] for NaNs.
21194         (expand_byte_code):  Add support for exception handler ranges.
21195         * except.c:  Add skeleton for EH code-generation.
21196         * verify.c (merge_types):  Treat all promoted integral types as equal.
21197         * constants.c (build_constants_constructor):  To force creation of
21198         current_constant_pool_data_ref, call build_constant_data_ref.
21199
21200         * javaop.def (lload):  Fix typo.
21201         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
21202
21203 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
21204
21205         * parse.c: Don't include function.h.
21206
21207 1997-08-27  Per Bothner  <bothner@cygnus.com>
21208
21209         * except.[ch]:  New files.
21210         * Makefile.in (JAVA_OBJS):  Add except.o
21211         * expr.c:  Temporary warning about unimplemented exceptions.
21212         * verify.c:  Verify exception handlers.
21213
21214         * jcf-dump.c (disassemble_method):  Print exception table.
21215
21216 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21217
21218         * expr.c (verify_jvm_instructions): Started a thorough
21219         verification of invoke* bytecodes.
21220         (expand_byte_code): flush quick stack if PC is the target of a
21221         branch.  and undef RET (conflicting with config/i386/i386.h).
21222         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21223         used.
21224         (expand_invoke): Now handles invokeinterface and do more
21225         verification according to the bytecode.
21226         (lookup_field): Don't try to load the class if processing
21227         dtable_type.
21228         (can_widen_reference_to): Now handles interfaces.
21229         * decl.c (init_decl_processing): New global variable
21230         soft_lookupinterfacemethod_node, declared in java-tree.h.
21231         Call set_super_info on string_type_node.
21232         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21233         defined.
21234         * class.c (set_super_info): Fills the CLASS_* flags according to
21235         access_flags.
21236         (get_access_flags_from_decl): Handles all class flags.
21237
21238 1997-08-26  Per Bothner  <bothner@cygnus.com>
21239
21240         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
21241         * parse.c (yyparse):  Check for abstract method, and missing code.
21242         * expr.c (expand_byte_code):  Change interface.
21243         * lang.c (put_decl_node):  Print promoted types prettier.
21244         * verify.c (verify_jvm_instruction):  Change interface.
21245         Partial support for scanning exception table.
21246         For load instructions, handle promoted integral types.
21247
21248 1997-08-21  Per Bothner  <bothner@cygnus.com>
21249
21250         * verify.c:  New file, with contents moved from expr.c.
21251         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
21252         * typeck.c (is_array_type_p):  Moved here from expr.c.
21253         * java-tree.h:  Add some now-needed function declarations.
21254         * Makefile.in (JAVA_OBJS): Added verify.o.
21255
21256 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21257
21258         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21259         METHOD_ABSTRACT flag.
21260
21261         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21262         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21263         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21264
21265         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21266         variables.
21267         (start_java_method): Hook for SYNCHRONIZED methods.
21268
21269         * expr.c (build_java_jsr, build_java_ret): New functions
21270         (JSR,PRE): New macros
21271         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21272         (verify_jvm_instructions): tableswitch, lookupswitch,
21273         monitorenter, monitorexit, goto_w: verified.
21274         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21275         (build_java_monitor): New function.
21276         (MONITOR_OPERATION): Modified to call build_java_monitor()
21277         (verify_jvm_instructions): Started a thorough verification of
21278         invoke* bytecodes.
21279
21280 1997-08-19  Per Bothner  <bothner@cygnus.com>
21281
21282         Support verification of jsr/ret subroutines (used for try/finally).
21283         * decl.c (return_address_type_node):  New type node.
21284         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21285         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21286         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
21287         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21288         TYPE_USED):  New macros for special types in type_map.
21289
21290         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
21291         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
21292         BCODE_JUMP_TARGET.
21293         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
21294
21295         * expr.c (can_widen_reference_to):  New function.
21296         (pop_type):  Use it.
21297         (merge_type_state):  Support handling start of subroutine.
21298         (push_pending_block):  Return char* error message, instead of calling
21299         fatal on an error.  Also handle subroutines.
21300         (verify_jvm_instructions):  Handle errors from push_poending_block.
21301         Support jsr and ret instructions.
21302
21303 1997-08-19  Per Bothner  <bothner@cygnus.com>
21304
21305         * jcf-io.c (find_classfile):  Fix thinko.
21306         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
21307
21308 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
21309
21310         * Makefile.in (BISON): Remove.
21311
21312 1997-08-07  Per Bothner  <bothner@cygnus.com>
21313
21314         * Makefile.in:  Convert to autoconf.
21315         * config-lang.in (outputs):  Added java/Makefile.
21316
21317         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21318         Rename cc1java to jc1.
21319
21320         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
21321         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
21322
21323         * class.c (class_depth):  Do load_class if needed.
21324
21325         Mostly better verification.
21326         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
21327         (init_decl_processing):  Change return type of soft_checkcast.
21328         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
21329         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21330         lang_print_error):  New functions.
21331         (lang_init):  Set global hook print_error_function to lang_print_error.
21332         * expr.c:  In the type_map ptr_type_node is only used for null now.
21333         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
21334         (merge_types):  Dererence pointer to record types before comparing.
21335         (decode_newarray_type, merge_types):  On error just return NULL.
21336         (build_java_binop):  Add preliminary implementation (with warning)
21337         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21338         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
21339         (expand_compare, expand_java_goto, expand_java_call):  Don't
21340         push_pending_block, since that only makes sense when verifying.
21341         (merge_type_state):  Different return codes.
21342         (push_pending_block):  A block may need to be verified more than once.
21343         (expand_byte_code):  Warn about unused code at code generation time.
21344         (verify_jvm_instruction):  Changed logic, since code may need to be
21345         re-verified if type-state has changed.  Also, better error handling.
21346         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21347         Improve newarray, anewarray, ?aload, athrow,
21348         * java-tree.h (LABEL_CHANGED):  New macro.
21349
21350 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21351
21352         * decl.c (soft_athrow_node): New global variable initialized.
21353         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21354         * typeck.c (convert): Added support for REAL_TYPE.
21355         (convert_to_char): New function.
21356         (convert): Handle CHAR_TYPE.
21357         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21358         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21359         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21360         promoted type.
21361         (verify_jvm_instructions): Added break a the end of bogus unop: label.
21362         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21363         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21364         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21365         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21366         to Use The Right Things.
21367         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21368         compatible with INT. BOOLEAN is made equivalent to BYTE.
21369         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21370         OPCODE_ifnonnull): Now supported.
21371         (build_java_athrow): New function.
21372
21373 1997-08-04  Per Bothner  <bothner@cygnus.com>
21374
21375         Rename method name <init> to match G++ (and fix mangling).
21376         * class.c (layout_class):  Replace method name of <init> by class name.
21377         (make_method_value):  Do inverse renaming of constructor from <init>.
21378         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
21379         * typeck.c (lookup_java_constructor):  New function.
21380         * expr.c (expand_invoke):  If method_name is <init>, call
21381         lookup_java_constructor to find constructor.
21382
21383         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
21384
21385 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21386
21387         * parse.c (get_class_constant): Modified to handle array "classes"
21388         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21389         wide type.
21390         (convert): Modified to handle real type.
21391         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21392         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21393         variables declared.
21394         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21395         soft_multianewarray, soft_newarray_node, soft_throw_node): New
21396         global variables initialized.
21397         (find_local_variable): Handles the case of a pointer
21398         (end_java_method): Restore the use of one more scope
21399         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21400         build_java_array_length_access, expand_java_arrayload,
21401         expand_java_arraystore, expand_java_array_length,
21402         expand_java_multianewarray, expand_java_anewarray,
21403         build_java_check_indexed_type, is_array_type_p,
21404         build_java_throw_out_of_bound_exception): New functions.
21405         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21406         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21407         OPCODE_<t>aload): Implemented code for verification.
21408         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21409         ARRAY_NEW_MULTI): Macro defined.
21410         (CONVERT): Modified to invoke convert().
21411         (case OPCODE_aload2): Fixed index typo from 2 to 1.
21412
21413 1997-07-31  Per Bothner  <bothner@cygnus.com>
21414
21415         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
21416         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
21417         (make_class_data):  Field name needs '/' as package prefix.
21418         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
21419
21420 1997-07-25  Per Bothner  <bothner@cygnus.com>
21421
21422         Implement debug information for local variables.
21423         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21424         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21425         DECL_LOCAL_SLOT_CHAIN):  New macros.
21426         (struct lang_decl_var):  New type.
21427         * parse.c (give_name_to_locals):  Move to decl.c.
21428         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
21429         (start_java_method):  Re-write parameter handling.
21430         (pending_local_decls):  New global variable.
21431         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
21432         (find_local_variable):  Accept pc so we can skips decls not in range.
21433         (struct binding_level):  Add end_pc field.
21434         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21435         (various):  Change so current pc gets passed to find_local_variable.
21436
21437         * decl.c (init_decl_processing):  Re-arrange fields in
21438         class_type_node and and method_type_node to match kaffe 0.9.1.
21439         * class.c (make_method_value, make_class_data):  Update
21440         initializations to match.
21441
21442 1997-07-16  Per Bothner  <bothner@cygnus.com>
21443
21444         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21445         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
21446         (push_super_field):  New function.
21447         (make_class_data):  Handle inheritance of class static initializer.
21448         (layout_class):  New name mangling.
21449         * constants.c (build_constant_data_ref):  Init type of data array
21450         to a one-element array.
21451         (build_constants_constructor):  Set DECL_SIZE from complete array type.
21452         * decl.c:  Rename class_type, object_type etc to class_type_node,
21453         object_type_node etc.  Make former inherit from latter.
21454         * expr.c (expand_invoke):  Add cast of function address.
21455         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
21456         * parse.c (yyparse):  Don't call layout_class here.
21457         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
21458
21459 1997-06-14  Per Bothner  <bothner@cygnus.com>
21460
21461         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
21462         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
21463         (alloc_class_constant):  New.
21464         * expr.c (expand_invoke):  Make sure method's class is initialized.
21465         * class.c (interits_from_p, emit_register_class):  New functions.
21466         * parse.c (yyparse):  Call emit_register_class.
21467
21468 1997-06-09  Per Bothner  <bothner@cygnus.com>
21469
21470         * constants.c:  New file, to handle constant pool.
21471         * Makefile.in (JAVA_OBJS):  Add constants.o.
21472         * decl.c (init_decl_processing):  Update, fix, finish various structs.
21473         (pushdecl_top_level):  New.
21474         * parse.c (layout_class):  Moved to class.c.
21475         * expr.c (java_push_constant_from_pool):  New function.
21476         * class.c (build_class_ref):  Make work fully
21477         (make_class_data):  Emit super-class, constant pool, interface vector.
21478
21479 1997-06-03  Per Bothner  <bothner@cygnus.com>
21480
21481         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
21482         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
21483         * class.c (class_depth):  New function.
21484         (lookup_named_class):  Replaced by new function lookup_class.
21485         * decl.c (object_type_node, string_type_node):  New.
21486         Remove various types that we no longer need.
21487         * expr.c (verify_jvm_instructions):  New separate verifier pass.
21488         (push_type, pop_type):  New functions for verifier.
21489         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
21490         (expand_byte_code):  Simplify, since we assume already verified.
21491         (expand_invoke):  Now mostly works.
21492         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21493         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
21494         * parse.c:  Wait to allocate class object until we know its name.
21495         (layout_class):  Calculate DECL_VINDEX for each virtual method.
21496         * typeck.c (get_array_type):  Rename to ...
21497         (build_java_array_type):  ... and provide working implementation.
21498         (build_java_signature):  New function - build Java signature of type.
21499         (set_java_signature):  New function - cache signature with type.
21500         (lookup_java_method):  New function.
21501
21502 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
21503
21504         * class.c (ident_subst):  Take extra SUFFIX parameter.
21505         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
21506         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
21507         (build_class_ref):  Actually implement.
21508         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
21509         * decl.c (builtin_function):  New.
21510         (init_decl_processing):  Update for current Kaffe.  Declare some
21511         builtin Kaffe functions.
21512         * expr.c (build_address_of):  New.
21513         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21514         Renamed (from expand_java_new etc), and added working implementations.
21515         (build_field_ref):  Now also handle static fields.
21516         (expand_invoke):  Implement invokestatic, and start implement rest.
21517         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
21518         * javaop.def:  Rename invokevirt -> invokevirtual.
21519         * lang.c (use_handles):  Removed.
21520         * parse.c:  Add support for ConstantValue attribute.
21521         Handle nested loading of a class.  (JPOOL_UTF):  New.
21522
21523 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21524
21525         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21526
21527 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21528
21529         * Make-lang.in (java.install-man):  New empty rule.
21530         * typeck.c (set_local_type):  New function.
21531         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21532         not find_stack_slot.  Call set_local_type.
21533
21534 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21535
21536         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21537         and building RECORD_TYPE CONSTRUCTORs.
21538         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21539
21540         * lang.c (use_handles):  Change the default to 0.
21541         * decl.c:  Define and build class_type, field_type, utf8const_type.
21542         * class.c (make_class_data, make_field_value,
21543         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21544         hashUtf8String, strLengthUtf8, mangled_classname:
21545         Functions to build reflective data structures.
21546         * parse.c (yyparse):  Call make_class_data.
21547
21548         * jcf-io.c (open_class, find_classfile):  New functions.
21549         * jcf-dump.c:  Support reading classfile from explicitly-named
21550         class file (without CLASSPATH searching).
21551
21552 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21553
21554         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21555         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21556         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21557         (get_constant):  Now trivial for CONSTANT_Utf8.
21558
21559         * jcf.h:  Make NEW_CPOOL the default.
21560         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21561
21562 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21563
21564         New directory.