OSDN Git Service

* jcf-parse.c (set_source_filename): Constify variable "dot".
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
2
3         * lang.c (java_post_options): Constify variable "dot".
4
5         * jcf-parse.c (set_source_filename): Constify variable "dot".
6         (load_class): Constify variable "separator".
7         Use get_identifier_with_length.
8
9 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
10
11         * jcf-dump.c (version): Update copyright notice dates.
12
13 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
14
15         * jvspec.c (lang_specific_driver): Remove unused
16         saw_verbose_flag variable.
17         * jcf-dump.c (main): Remove unused general_purpose_bits
18         variable.
19         * builtins.c (initialize_builtins): Remove unused float_ftype_float
20         variable.
21         * expr.c (java_stack_pop): Remove unused val variable.
22         (build_jni_stub): Remove unused res_type variable.
23         * verify-impl.c (check_field_constant): Remove unused len variable.
24
25 2009-10-20  Joel Dice <dicej@mailsnare.net>
26
27         PR java/28474
28         * mangle_name.c (append_unicode_mangled_name): Fix mangling
29         of names with multiple underscores and "U".
30         (unicode_mangling_length): Likewise.
31
32 2009-10-03  Simon Baldwin  <simonb@google.com>
33
34         * config-lang.in (lang_dirs): Remove zlib.
35
36 2009-09-28  Richard Henderson  <rth@redhat.com>
37
38         * builtins.c (initialize_builtins): Update call to
39         build_common_builtin_nodes.
40         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
41
42 2009-09-14  Richard Henderson  <rth@redhat.com>
43
44         * builtins.c (initialize_builtins): Update call to
45         build_common_builtin_nodes.
46         * decl.c (java_init_decl_processing): Don't call
47         default_init_unwind_resume_libfunc.
48         * except.c: Include tree-iterator.h.
49         (build_exception_object_var): New.
50         (build_exception_object_ref): Use it.
51         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
52         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
53         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
54
55 2009-09-13  Richard Guenther  <rguenther@suse.de>
56         Rafael Avila de Espindola  <espindola@google.com>
57
58         * decl.c (do_nothing): Remove.
59         (java_init_decl_processing): Do not set lang_eh_runtime_type.
60         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
61         * lang.c (java_eh_personality): New.
62         (java_eh_personality_decl): Likewise.
63         (LANG_HOOKS_EH_PERSONALITY): Define.
64
65 2009-09-03  Diego Novillo  <dnovillo@google.com>
66
67         * lang.c (lang_hooks): Remove const qualifier.
68
69 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
70
71         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
72         type.
73
74 2009-09-01  Richard Guenther  <rguenther@suse.de>
75
76         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
77         * java-tree.h (java_mark_addressable): Likewise.
78         * typeck.c (java_mark_addressable): Likewise.
79
80 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
81
82         * Make-lang.in (java.install-pdf): Install gcj.pdf in
83         $(pdfdir)/gcc, alongside the other manuals.
84
85 2009-08-12  Andrew Haley  <aph@redhat.com>
86
87         * builtins.c (compareAndSwapInt_builtin): Use
88         flag_use_atomic_builtins.
89         (compareAndSwapLong_builtin): Likewise.
90         (compareAndSwapObject_builtin): Likewise.
91         * jvspec.c: Add flag_use_atomic_builtins.
92         * gcj.texi: Likewise.
93         * java-tree.h: Likewise.
94         * lang.opt: Likewise.
95
96 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
97
98         PR debug/40990
99         * lang.c (put_decl_node): Outputs different level of information
100         depending on the verbosity level.
101
102 2009-07-31  Andrew Haley  <aph@redhat.com>
103
104         PR java/40867
105         * decl.c (java_replace_references): Set EXPR_LOCATION on all
106         generated expressions.
107         (binding_level.loc): new field.
108         (clear_binding_level): Initialize loc.
109         (set_input_location): New function.
110         (pushlevel): Set new binding_level.loc.
111         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
112         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
113         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
114
115 2009-07-17  Richard Guenther  <rguenther@suse.de>
116
117         PR c/40401
118         * java-gimplify.c (java_genericize): Do not gimplify here.
119         But replace all local references.
120         (java_gimplify_expr): Do not replace local references here.
121         (java_gimplify_modify_expr): Likewise.
122         * jcf-parse.c (java_parse_file): Do not finalize the CU or
123         optimize the cgraph here.
124         * decl.c (java_replace_reference): Make static.
125         (java_replace_references): New function.
126         (end_java_method): Clear base_decl_map.
127         * java-tree.h (java_replace_references): Declare.
128         (java_replace_reference): Remove.
129
130 2009-07-14  Taras Glek  <tglek@mozilla.com>
131             Rafael Espindola  <espindola@google.com>
132
133         * Make-lang.in (java.install-plugin): New target for
134         installing plugin headers.
135
136 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
137
138         * class.c: Replace %J by an explicit location. Update all calls.
139         
140 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
141
142         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
143
144 2009-06-29  Andrew Haley  <aph@redhat.com>
145
146         PR java/40590
147         * java-tree.h (cxx_keyword_p): New declaration.
148         * mangle_name.c (utf8_cmp): Move here from mangle.c.
149         (cxx_keywords): Likewise.
150         (cxx_keyword_p): Likewise.
151         (MANGLE_CXX_KEYWORDS): New macro.
152         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
153         (append_gpp_mangled_name): Likewise.
154         * mangle.c: Move code to mangle_name.c. 
155         (mangle_member_name): Don't call cxx_keyword_p.
156
157 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
158
159         * java-gimplify.c (java_gimplify_block): New argument to
160         build_empty_stmt.
161         * expr.c (force_evaluation_order): Same.
162         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
163         * class.c: Same.
164         * decl.c: Same.
165         * jcf-parse.c: Same.
166         * constants.c: Same.
167         * resource.c: Same.
168         * except.c: Same.
169         * builtins.c: Same.
170         * expr.c: Same.
171         * java-tree.h (PUSH_FIELD): Add location field.
172         
173 2009-06-09  Ian Lance Taylor  <iant@google.com>
174
175         * verify.h: Remove extern "C".
176
177 2009-06-07  Ian Lance Taylor  <iant@google.com>
178
179         * jcf-parse.c (handle_constant): Change local variable 'kind' to
180         unsigned int.
181
182 2009-06-01  Ian Lance Taylor  <iant@google.com>
183
184         * jcf-io.c (find_class): Use CONST_CAST.
185
186 2009-05-27  Ian Lance Taylor  <iant@google.com>
187
188         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
189         $(LINKER).
190         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
191
192 2009-05-26  Ian Lance Taylor  <iant@google.com>
193
194         * Make-lang.in (jvspec.o): Use $(COMPILER).
195         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
196         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
197
198 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
199
200         * Make-lang.in (GCJ): Renamed to...
201         (XGCJ): ... this.
202
203 2009-04-27  Ian Lance Taylor  <iant@google.com>
204
205         * builtins.c (java_builtins): Add casts to enum type.
206         * verify-impl.c (check_class_constant): Add cast to enum type.
207         (check_constant, check_wide_constant): Likewise.
208
209 2009-04-27  Richard Guenther  <rguenther@suse.de>
210
211         PR java/38374
212         * constants.c (build_constants_constructor): Retain the old
213         pointer type as valid TYPE_POINTER_TO after patching the
214         type of the constant pool decl.
215
216 2009-04-24  Ian Lance Taylor  <iant@google.com>
217
218         * jcf-parse.c (handle_constant): Add cast to enum type.
219
220 2009-04-21  Taras Glek <tglek@mozilla.com>
221
222         * builtins.c: Update GTY annotations to new syntax
223         * decl.c: Likewise
224         * java-tree.h: Likewise
225         * jcf.h: Likewise
226         * lang.c: Likewise
227
228 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
229
230         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
231         license notices.
232
233 2009-04-18  Ian Lance Taylor  <iant@google.com>
234
235         * verify-impl.c (verify_instructions_0): Add cast to enum type.
236
237 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
238
239         * builtins.c (compareAndSwapLong_builtin,
240         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
241         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
242
243 2009-03-31  Richard Guenther  <rguenther@suse.de>
244
245         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
246         the first operand of binary and comaprison expressions.
247
248 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
249
250         PR rtl-optimization/323
251         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
252         Give an error for -fexcess-precision=standard for processors where
253         the option is significant.
254
255 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
256
257         * lang.opt: Unify help text for -Wdeprecated.
258
259 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
260
261         * jcf-dump.c (version): Update copyright notice dates.
262
263 2009-01-16  Richard Guenther  <rguenther@suse.de>
264
265         PR tree-optimization/38835
266         PR middle-end/36227
267         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
268
269 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
270
271         PR bootstrap/38262
272         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
273
274 2008-11-04  Andrew Haley  <aph@redhat.com>
275
276         PR java/37068
277         * jcf-parse.c (java_emit_static_constructor): Don't call
278         cgraph_build_static_cdtor.  Rewrite.
279
280 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
281
282         * Make-lang.in (check-java-subtargets): New target.
283
284 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
285
286         PR target/35483
287         * Make-lang.in (class.o): Depend on $(TM_P_H).
288         (expr.o): Same.
289         * class.c: Include tm_p.h.
290         * expr.c: Include tm_p.h.
291
292 2008-10-14  Andrew Haley  <aph@redhat.com>
293
294         * constants.c (build_constant_data_ref): Make sure we only build
295         one copy of the decl for the constant pool.
296
297 2008-09-22  Andrew Haley  <aph@redhat.com>
298
299         * expr.c (rules): Add new rule for
300         gnu.java.lang.VMCPStringBuilder.toString.
301         (rewrite_rule.new_classname): New field.
302         (maybe_rewrite_invocation): Use new_classname field instead of
303         DECL_CONTEXT (*method_p).
304         Allow rewrite_arglist to be NULL.
305
306 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
307
308         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
309         (java_get_callee_fndecl): Kill.
310
311 2008-09-17  Jan Hubicka  <jh@suse.cz>
312
313         PR c++/18071
314         * class.c (add_method_1): Do not initialize DECL_INLINE.
315         (make_local_function_alias): Likewise.
316         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
317         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
318
319 2008-09-09  Richard Guenther  <rguenther@suse.de>
320
321         * decl.c (build_result_decl): Remove no longer applicable
322         promotion.
323
324 2008-09-05  David Daney  <ddaney@avtrex.com>
325
326         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
327
328 2008-08-21  David Daney  <ddaney@avtrex.com>
329
330         * class.c (make_class_data): Don't add field_index when
331         flag_reduced_reflection set.
332
333 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
334
335         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
336
337 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
338
339         PR 28875
340         * lang.c (java_handle_option): Replace set_Wunused with
341         warn_unused.
342
343 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
344
345         * gcj.texi: Update copyright years.  Do not list GPL as
346         Invariant Section.
347
348 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
349
350         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
351         from ctype's sizes.
352
353         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
354         alignment.
355
356 2008-07-29  Jan Hubicka  <jh@suse.cz>
357
358         * lang.c (java_post_options): Remove handling of flag_no_inline.
359
360 2008-07-28  Richard Guenther  <rguenther@suse.de>
361
362         Merge from gimple-tuples-branch.
363
364         2008-07-18  Richard Guenther  <rguenther@suse.de>
365
366         * expr.c: Include tree-iterator.h.
367         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
368
369         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
370
371         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
372         * expr.c: Same.
373
374         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
375
376         * java-gimplify.c (java_gimplify_expr): Same.
377         (java_gimplify_modify_expr): Same.
378         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
379
380         2008-05-02  Diego Novillo  <dnovillo@google.com>
381
382         * expr.c (build_java_throw_out_of_bounds_exception): Fix
383         mixed declarations and code.
384
385         2008-05-02  Doug Kwan  <dougkwan@google.com>
386         
387         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
388         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
389
390         2008-02-19  Diego Novillo  <dnovillo@google.com>
391
392         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
393
394         * java-gimplify.c (java_gimplify_self_mod_expr): Change
395         gimple_seq arguments to gimple_seq *.  Update all users.
396
397         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
398
399         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
400         sequences.
401         (java_gimplify_self_mod_expr): Same.                                    
402         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
403         sequences.
404
405 2008-07-24  Jan Hubicka  <jh@suse.cz>
406
407         * java/decl.c: Include cgraph.h
408         (end_java_method): Remove non-unit-at-a-time code.
409         (java_mark_decl_local): Likewise; sanity check that we don't touch
410         finalized nodes.
411
412 2008-07-15  Jan Hubicka  <jh@suse.cz>
413
414         * lang.c (java_init_options): Enable unit-at-a-time by default.
415
416 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
417
418         * Make-lang.in (jvspec.o): Fix dependencies.
419
420 2008-07-06  Tom Tromey  <tromey@redhat.com>
421
422         * Make-lang.in (java/parse.o-warn): Remove.
423         (java/jcf-io.o-warn): Remove.
424
425 2008-07-05  Tom Tromey  <tromey@redhat.com>
426
427         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
428         (compare_path): Remove.
429         (java_or_class_file): Likewise.
430         (memoized_dirlist_entry): Likewise.
431         (memoized_dirlist_hash): Likewise.
432         (memoized_dirlist_lookup_eq): Likewise.
433         (memoized_dirlists): Likewise.
434         (caching_stat): Likewise.
435         (find_class): Use stat.
436         * jcf.h (JCF_USE_SCANDIR): Remove.
437
438 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
439
440         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
441         doc/rebuild-gcj-db.1
442         (java.uninstall): Likewise.
443         (java.maintainer-clean): Likewise.
444         (aot-compile.pod): New rule.
445         (rebuild-gcj-db.pod): New rule.
446         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
447         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
448
449 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
450
451         * Make-lang.in (java/jcf-io.o-warn): New.
452
453 2008-06-24  Tom Tromey  <tromey@redhat.com>
454
455         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
456         * expr.c (add_type_assertion): Rename argument.
457         (build_java_arrayaccess): Don't name variable 'throw'.
458         (ARRAY_NEW_MULTI): Don't name variable 'class'.
459         * jcf-io.c (find_class): Don't name variable 'class'.
460         * mangle.c (compression_table_add): Don't name variable 'new'.
461         * constants.c (cpool_for_class): Rename argument.
462         (alloc_constant_fieldref): Likewise.
463         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
464         'class'.
465         (read_class): Likewise.
466         (parse_zip_file_entries): Likewise.
467         (process_zip_dir): Likewise.
468         * decl.c (java_mark_class_local): Rename argument.
469         * class.c (GEN_TABLE): Use type_name, not typename.
470         (gen_indirect_dispatch_tables): Likewise.
471         (add_field): Rename argument.
472         (is_compiled_class): Likewise.
473         (safe_layout_class): Likewise.
474         (emit_assertion_table): Likewise.
475         * typeck.c (has_method): Rename argument.
476
477 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
478
479         * class.c (ident_subst, mangled_classname, unmangle_classname,
480         gen_indirect_dispatch_tables, add_method_1,
481         build_fieldref_cache_entry, make_local_function_alias,
482         layout_class, java_treetreehash_find, java_treetreehash_new,
483         split_qualified_name): Fix for -Wc++-compat.
484         * constants.c (set_constant_entry, cpool_for_class): Likewise.
485         * decl.c (make_binding_level, java_dup_lang_specific_decl,
486         start_java_method): Likewise.
487         * except.c (prepare_eh_table_type): Likewise.
488         * expr.c (type_assertion_hash, note_instructions): Likewise.
489         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
490         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
491         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
492         Likewise.
493         * jcf-parse.c (reverse, java_read_sourcefilenames,
494         annotation_grow, rewrite_reflection_indexes, java_parse_file,
495         process_zip_dir): Likewise.
496         * jcf-path.c (add_entry, add_path, jcf_path_init,
497         jcf_path_extdirs_arg): Likewise.
498         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
499         * jvgenmain.c (do_mangle_classname): Likewise.
500         * lang.c (put_decl_string): Likewise.
501         * verify-impl.c (make_state_copy, make_state, add_new_state):
502         Likewise.
503
504 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
505
506         * gcj.texi: Expand TABs, remove whitespace from blank lines.
507
508 2008-06-14  Tom Tromey  <tromey@redhat.com>
509
510         PR java/36247:
511         * class.c (build_class_ref): Initialize this_classdollar when
512         needed.
513
514 2008-05-23  Andrew Haley  <aph@redhat.com>
515
516         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
517         pathname of source file.
518
519 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
520
521         * jcf-dump.c (print_constant): Use
522         HOST_LONG_LONG_FORMAT.
523
524 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
525
526         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
527         DECL_PURE_P.
528
529 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
530
531         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
532         (build_classdollar_field): Don't set TREE_INVARIANT.
533         (get_dispatch_table): Don't set TREE_INVARIANT.
534         (make_class_data): Don't set TREE_INVARIANT.
535         (build_symbol_entry): Don't set TREE_INVARIANT.
536         (emit_symbol_table): Don't set TREE_INVARIANT.
537         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
538         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
539         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
540         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
541
542 2008-04-03  Tom Tromey  <tromey@redhat.com>
543
544         * Make-lang.in (java_OBJS): New variable.
545
546 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
547
548         * java-tree.h (insert_block): Kill.
549         * decl.c (insert_block): Kill.
550                 
551 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
552
553         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
554         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
555         gpl.texi.
556
557 2008-03-27  Tom Tromey  <tromey@redhat.com>
558
559         * Make-lang.in: Revert automatic dependency patch.
560
561 2008-03-25  Tom Tromey  <tromey@redhat.com>
562
563         * Make-lang.in: Removed most explicit .o targets.
564         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
565         ($(GCJ)$(exeext)): Update.
566         (JAVA_OBJS): New variable.
567         (JCFDUMP_OBJS): Reformat.
568         (java_OBJS): New variable.
569         (java/jvspec.o-warn): Update.
570         (java/parse.o-warn): Remove.
571         (JAVA_TREE_H): Remove.
572         (java/jcf-io.o): Reduce to variable setting.
573         (ALL_CPPFLAGS): Likewise.
574
575 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
576
577         * mangle.c (java_mangle_decl): Remove dead check.
578
579 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
580
581         * jcf-parse.c (java_parse_file): Assert binding levels are
582         left in order.
583         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
584         Delete.
585
586 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
587
588         * jcf-dump.c (version): Update copyright notice dates.
589
590 2008-02-29  Tom Tromey  <tromey@redhat.com>
591
592         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
593         method.
594         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
595
596 2008-02-26  Tom Tromey  <tromey@redhat.com>
597
598         * lang.c (java_post_options): Remove conditional.
599         * expr.c (expand_byte_code): Remove old location code.
600         * jcf-parse.c (set_source_filename): Remove old location code.
601         (give_name_to_class): Likewise.
602         (jcf_parse): Likewise.
603         (duplicate_class_warning): Likewise.
604         (parse_class_file): Likewise.
605         (java_parse_file): Likewise.
606         * decl.c (finish_method): Remove old location code.
607         * class.c (push_class): Remove old location code.
608
609 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
610
611         PR other/35107
612         * Make-lang.in (jc1): Add $(GMPLIBS).
613
614 2008-01-23  David Daney  <ddaney@avtrex.com>
615
616         * class.c (hide)  Rename to...
617         (java_hide_decl) ... this throughout, and make public.
618         * resource.c (Jr_count): Remove.
619         (compile_resource_data): Call java_mangle_resource_name to generate
620         decl name.  Make resource decl public and hidden.
621         * mangle.c (java_mangle_resource_name): New function.
622         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
623         functions.
624
625 2008-01-04  Andrew Haley  <aph@redhat.com>
626
627         PR java/17779
628         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
629         C90.
630
631 2008-01-03  Andrew Haley  <aph@redhat.com>
632
633         PR java/17779
634         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
635         we're about to re-layout the type.
636
637 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
638
639         * lang.c (java_classify_record): Don't return
640         RECORD_IS_INTERFACE for now.
641
642 2007-12-18  Andrew Haley  <aph@redhat.com>
643
644         PR java/27643
645         * jcf-parse.c (java_parse_file): Remove call to
646         java_mark_class_local.
647         (parse_class_file): Reinstate call to java_mark_class_local here.
648         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
649         already set, call java_mangle_decl() and make_decl_rtl() to
650         rewrite its name as a hidden alias.
651
652 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
653
654         PR debug/7081
655         * lang.c (java_classify_record): New.
656         (LANG_HOOKS_CLASSIFY_RECORD): Override.
657
658 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
659
660         PR 34081/C++
661         * decl.c (finish_method): Pass 'false' for the new
662         allocate_struct_function parameter.
663
664 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
665
666         * expr.c (build_jni_stub): Use the computed jni func type for
667         variable meth.
668
669 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
670
671         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
672
673 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
674
675         * expr.c (type_assertion_hash): Hash type uids rather than
676         tree pointers.
677
678 2007-11-17  David Daney  <ddaney@avtrex.com>
679             Andrew Haley  <aph@redhat.com>
680
681         * constants.c (build_constants_constructor):  Use POINTER_SIZE
682         insead of BITS_PER_WORD in big-endian work around.
683
684 2007-11-07  Tom Tromey  <tromey@redhat.com>
685
686         PR java/34019:
687         * gcj.texi (Input Options): Add missing noun.
688
689 2007-11-02  Tom Tromey  <tromey@redhat.com>
690
691         PR java/33765:
692         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
693         * zipfile.h (ZIPEMPTYMAGIC): New define.
694
695 2007-11-01  Tom Tromey  <tromey@redhat.com>
696
697         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
698         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
699         (java/jcf-io.o): Depend on zipfile.h.
700
701 2007-10-17  Richard Guenther  <rguenther@suse.de>
702
703         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
704         dependencies.
705
706 2007-10-03  Andrew Haley  <aph@redhat.com>
707
708         PR java/33639
709         * class.c (mangled_classname): Detect and replace illegal
710         characters in assembly language symbols.
711         (gen_indirect_dispatch_tables): Call mangled_classname() on
712         the type.
713
714 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
715
716         * lang.c (java_print_error_function): Add third argument.
717
718 2007-09-15  Tom Tromey  <tromey@redhat.com>
719
720         * java-tree.h (struct lang_decl_func) <function_decl_body>:
721         Remove.
722         <init_final>: Likewise.
723         * lang.c (java_dump_tree): Update.
724         * java-tree.h (DECL_FUNCTION_BODY): Remove.
725
726 2007-09-11  Jan Hubicka <jh@suse.cz>
727
728         * decl.c (java_expand_body): Kill.
729         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
730
731 2007-09-06  Tom Tromey  <tromey@redhat.com>
732
733         * jcf-parse.c (parse_class_file): Re-enter the current file.
734
735 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
736
737         * boehm.c (mark_reference_fields): Move misaligned pointer check
738         after JREFERENCE_TYPE_P test
739
740 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
741
742         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
743         if pointer is misaligned.
744
745 2007-09-06  Tom Tromey  <tromey@redhat.com>
746
747         * lang.c (java_post_options): Update.
748         * jcf-parse.c (set_source_filename): Update.
749         (give_name_to_class): Update.
750         (jcf_parse): Update.
751         (duplicate_class_warning): Update.
752         (parse_class_file): Update.
753         (java_parse_file): Update.
754         * expr.c (expand_byte_code): Update.
755
756 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
757
758         * decl.c (finish_method): Use set_cfun.
759
760 2007-09-04  Andrew Haley  <aph@redhat.com>
761
762         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
763         when using the ARM EABI.
764
765 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
766
767         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
768
769 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
770
771         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
772         CONST_CAST.
773         * jcf.h (JCF_FINISH): Likewise.
774
775 2007-08-28  Tom Tromey  <tromey@redhat.com>
776
777         * Make-lang.in (java.tags): Don't tag '*.y' files.
778
779 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
780
781         * lang.c (java_decl_ok_for_sibcall): Likewise.
782
783 2007-08-21  Paul Brook  <paul@codesourcery.com>
784             Nathan Sidwell  <nathan@codesourcery.com>
785             Mark Mitchell  <mark@codesourcery.com>
786             Joseph Myers  <joseph@codesourcery.com>
787
788         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
789         date.
790
791 2007-08-20  Richard Guenther  <rguenther@suse.de>
792
793         * lang.c (java_tree_inlining_walk_subtrees): Remove.
794         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
795
796 2007-08-17  Tom Tromey  <tromey@redhat.com>
797
798         * typeck.c (find_method_in_interfaces): Update.
799         * jcf-parse.c (load_class): Update.
800         * java-gimplify.c (java_gimplify_component_ref): Removed.
801         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
802         arguments.
803         (java_gimplify_expr): Update.
804         * decl.c (java_init_decl_processing): Update.
805         * class.c (set_constant_value): Update.
806         (make_class_data): Update.
807         (finish_class): Update.
808         (build_static_field_ref): Update.
809         (is_compiled_class): Update.
810         (maybe_layout_super_class): Update.
811         (layout_class): Update.
812         (layout_class_method): Update.
813         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
814         (lang_decl_var) <am, final_iud, cif>: Removed fields.
815         (lang_decl_func) <init_calls_this>: Removed field.
816         (lang_type) <dot_class, verify_method>: Removed fields.
817         (FIELD_NESTED_ACCESS): Removed.
818         (FIELD_NESTED_ACCESS_P): Removed.
819         (DECL_FIELD_FINAL_IUD): Removed.
820         (DECL_LOCAL_FINAL_IUD): Removed
821         (LOCAL_FINAL_P): Removed.
822         (FINAL_VARIABLE_P): Removed.
823         (CLASS_FINAL_VARIABLE_P): Removed.
824         (DECL_BIT_INDEX): Removed.
825         (DECL_INIT_CALLS_THIS): Removed.
826         (FIELD_LOCAL_ALIAS): Removed.
827         (FIELD_LOCAL_ALIAS_USED): Removed.
828         (FIELD_THISN): Removed.
829         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
830         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
831         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
832         (TYPE_DOT_CLASS): Removed.
833         (TYPE_VERIFY_METHOD): Removed.
834         (ID_CLASSDOLLAR_P): Removed.
835         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
836         Removed.
837         (classdollar_identifier_node): Removed.
838         (TYPE_UNKNOWN): Removed.
839         (CLASS_FROM_SOURCE_P): Removed.
840         * expr.c (build_jni_stub): Update.
841         (force_evaluation_order): Update.
842         (build_java_empty_stmt): Update.
843         (build_class_init): Update.
844         (java_stack_swap): Update.
845         (build_jni_stub): Update.
846
847 2007-08-17  Tom Tromey  <tromey@redhat.com>
848
849         * java-tree.h (LABEL_TYPE_STATE): Removed.
850         (load_type_state): Removed.
851         (LABEL_PC): Removed.
852         (LABEL_VERIFIED): Removed.
853         (type_states): Declare.
854         * expr.c (type_states): New global.
855         (load_type_state): Now static.  Use type_states.  Changed
856         argument.
857         (lookup_label): Don't set LABEL_PC.
858         (expand_byte_code): Don't use LABEL_VERIFIED.
859         (note_instructions): Initialize type_states.
860         * verify-glue.c (vfy_note_stack_depth): Rewrote.
861         (vfy_note_stack_type): Use type_states.
862         (vfy_note_local_type): Likewise.
863
864 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
865
866         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
867         * jcf.h (JCF_FINISH): Likewise.
868
869 2007-07-31  Nick Clifton  <nickc@redhat.com>
870
871         * java-gimplify.c: Change copyright header to refer to version 3
872         of the GNU General Public License and to point readers at the
873         COPYING3 file and the FSF's license web page.
874         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
875         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
876         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
877         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
878         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
879         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
880         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
881
882 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
883
884         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
885
886 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
887
888         * lang.c (java_get_callee_fndecl): Constify.
889
890 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
891
892         * mangle.c (set_type_package_list): Constify.
893         * verify-glue.c (vfy_make_string): Delete.
894         * verify.h (vfy_make_string): Likewise.
895
896 2007-07-26  Tom Tromey  <tromey@redhat.com>
897
898         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
899         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
900         EXIT_BLOCK_LABELED_BLOCK): Likewise.
901         * lang.c (java_tree_inlining_walk_subtrees): Update.
902         (java_dump_tree): Likewise.
903         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
904         Remove.
905         * decl.c (push_labeled_block, pop_labeled_block): Remove.
906         * java-gimplify.c (java_gimplify_labeled_block_expr,
907         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
908         (java_gimplify_expr): Update.
909
910 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
911
912         * class.c (java_treetreehash_hash, java_treetreehash_compare):
913         Constify. 
914         * expr.c (type_assertion_eq): Likewise.
915         * jcf-io.c (compare_path): Likewise.
916         * jcf-parse.c (cmpstringp): Likewise.
917         * verify-impl.c (get_one_type, compute_argument_types,
918         compute_return_type): Likewise. 
919
920 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
921
922         PR target/32462
923         PR libgcj/32465
924         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
925
926 2007-07-12  Richard Guenther  <rguenther@suse.de>
927
928         * expr.c (expand_java_return): RETURN_EXPR has void type.
929         (build_jni_stub): Likewise.  Use a comparison against zero
930         for null-pointer test in COND_EXPR.
931         (build_field_ref): Build POINTER_PLUS_EXPR with correct
932         type.  Convert result instead.
933         (build_invokevirtual): Likewise.
934
935 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
936
937         PR 32617
938         * lang.c (java_init): Remove setting of force_align_functions_log.
939         * class.c (add_method_1): Set DECL_ALIGN of non-static method
940         to cope with ptrmemfunc_vbit_in_pfn.
941
942 2007-07-03  David Daney  <ddaney@avtrex.com>
943
944         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
945         include path.
946         (doc/gcj.dvi): Same.
947         (doc/gcj.pdf): Same.
948         (java/index.html): Same.
949
950 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
951
952         * class.c (make_class_data): Build the index in sizetype.
953         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
954         adding to a pointer type.
955         (build_symbol_entry): Likewise.
956         * expr.c (build_java_arrayaccess): Likewise.
957         (build_field_ref): Likewise.
958         (build_known_method_ref): Likewise.
959         (build_invokevirtual): Likewise.
960         * except.c (build_exception_object_ref): Do a
961         NEGATIVE and then a POINTER_PLUS_EXPR instead
962         of a MINUS_EXPR.
963
964 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
965
966         * typeck.c (java_signed_type): Remove.
967         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
968         * java-tree.h (java_signed_type): Remove.
969
970 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
971
972         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
973         (print_constant): Likewise.
974
975 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
976
977         * expr.c (build_java_binop): Use unsigned_type_for instead of
978         java_unsigned_type.
979         * java-tree.h (java_unsigned_type): Remove.
980         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
981         * typeck.c (java_unsigned_type): Remove.
982
983 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
984
985         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
986         instead of checking GIMPLE_STMT_P in chain_next.
987
988 2007-04-06  Colin Walters  <walters@redhat.com>
989
990         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
991         * jcf-io.c (open_class): Copy 'filename'.
992
993 2007-04-03  Andrew Haley  <aph@redhat.com>
994
995         * jvgenmain.c (main): Change main to use class$, not class$$.
996         (do_mangle_classname): Likewise.
997         * class.c (hide): New function.
998         (add_field): Hide everything that shouldn't be visible outside a
999         DSO.
1000         (build_static_class_ref): Likewise.
1001         (build_classdollar_field): Likewise.
1002         (make_class_data): Likewise.
1003         (layout_class_method): Likewise.
1004         * expr.c (special_method_p): New function.
1005
1006         * class.c (push_class): Don't bogusly guess the source filename.
1007         * jcf-parse.c (give_name_to_class): Don't set input_location from
1008         DECL_ARTIFICIAL decls.
1009
1010 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1011
1012         * typeck.c (java_signed_or_unsigned_type): Removed.
1013         (java_signed_type): use get_signed_or_unsigned_type instead of
1014         java_signed_or_unsigned_type.
1015         (java_unsigned_type): Ditto.
1016         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1017         * java-tree.h (java_signed_or_unsigned_type): Removed.
1018
1019 2007-03-26  Tom Tromey  <tromey@redhat.com>
1020
1021         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1022         (java.maintainer-clean): Likewise.
1023         (java.install-man): Likewise.
1024         (.INTERMEDIATE): Removed grmiregistry.pod.
1025         (grmiregistry.pod): Removed.
1026         * gcj.texi (Invoking gcjh): Removed.
1027         (Invoking gjnih): Likewise.
1028         (Invoking grmiregistry): Likewise.
1029         (direntry): Updated.
1030         (Top): Likewise.
1031         (which-gcj): Removed.
1032
1033 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1034
1035         * Make-lang.in: Add install-pdf target as copied from
1036         automake v1.10 rules.
1037
1038 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1039
1040         * gcj.texi: Standardize title page.
1041
1042 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1043
1044         * class.c: Fix a comment typo.
1045
1046 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1047             Brooks Moses  <brooks.moses@codesourcery.com>
1048             Lee Millward  <lee.millward@codesourcery.com>
1049
1050         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1051         of build3.
1052         (BUILD_MONITOR_EXIT): Likewise.
1053
1054         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1055         (java_gimplify_modify_expr): Likewise.
1056
1057         * class.c (cache_this_class_ref): Use build_call_expr.
1058         (build_static_field_ref): Likewise.
1059         (emit_indirect_register_classes): Likewise.
1060         (emit_register_classes): Likewise.
1061
1062         * resource.c (write_resource_constructor): Use build_call_expr.
1063
1064         * builtins.c (builtin_creator_function): Change interpretation of
1065         the second parameter to be the whole CALL_EXPR instead of the arglist.
1066         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1067         (min_builtin): Likewise.
1068         (abs_builtin): Likewise.
1069         (java_build_function_call_expr): Likewise.
1070         (convert_real): Likewise.
1071         (UNMARSHAL3): Likewise.
1072         (UNMARSHAL4): Likewise.
1073         (UNMARSHAL5): Likewise.
1074         (build_arglist_for_builtin): Delete.  Fix callers to use
1075         build_call_expr instead.
1076         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1077         accessors.
1078         (compareAndSwapInt_builtin): Likewise.
1079         (compareAndSwapLong_builtin): Likewise.
1080         (compareAndSwapObject_builtin): Likewise.
1081         (putVolatile_builtin): Likewise.
1082         (getVolatile_builtin): Likewise.
1083         (VMSupportsCS8_builtin): Likewise.
1084         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1085         instead of arglist.
1086
1087         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1088         (build_java_throw_out_of_bounds_exception): Likewise.
1089         (java_check_reference): Likewise.
1090         (build_java_arraystore_check): Likewise.
1091         (build_newarray): Likewise.
1092         (build_anewarray): Likewise.
1093         (expand_java_multinewarray): Use build_call_list instead of build3.
1094         (build_java_monitor): Use build_call_nary instead of build3.
1095         (java_create_object): Likewise.
1096         (expand_java_NEW): Likewise.
1097         (build_instanceof): Likewise.
1098         (expand_java_CHECKCAST): Likewise.
1099         (build_java_soft_divmod): Likewise.
1100         (build_java_binop): Likewise.
1101         (build_field_ref): Likewise.
1102         (build_class_init): Likewise.
1103         (rewrite_arglist_getcaller): Use build_call_expr.
1104         (build_invokeinterface):  Use build_call_nary instead of build3.
1105         (expand_invoke): Use build_call_list instead of build3.
1106         (build_jni_stub): Use build_call_nary, build_call_list, or
1107         build_call_expr instead of build3.
1108         (expand_java_field_op): Use build_call_expr instead of build3.
1109         (force_evaluation_order): Use new CALL_EXPR accessors.
1110
1111         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1112
1113 2007-02-15  David Daney  <ddaney@avtrex.com>
1114
1115         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1116         (java.maintainer-clean):Add gc-analyze.1.
1117         (.INTERMEDIATE): Add gc-analyze.pod.
1118         (gc-analyze.pod): New rule.
1119         (java.install-man): Install gc-analyze.1
1120         * gcj.texi: Add new section for the gc-analyze program.
1121
1122 2007-02-07  Andrew Haley  <aph@redhat.com>
1123
1124         * class.c (uncache_this_class_ref): New.
1125         * expr.c (build_jni_stub): Initialize the class.
1126         (expand_byte_code): Call uncache_this_class_ref after generating
1127         code.
1128
1129 2007-02-06  Tom Tromey  <tromey@redhat.com>
1130
1131         PR java/30714:
1132         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1133
1134 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1135
1136         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1137
1138 2007-02-02  Andrew Haley  <aph@redhat.com>
1139
1140         * expr.c (expand_byte_code): Call cache_this_class_ref() and
1141         cache_cpool_data_ref().
1142         Set TYPE_CPOOL_DATA_REF.
1143         (cache_cpool_data_ref): New function.
1144         * constants.c (build_ref_from_constant_pool): Remove special-case
1145         code for flag_indirect_classes.
1146         (build_constant_data_ref): Move special-case code for
1147         flag_indirect_classes here from build_ref_from_constant_pool.
1148         * decl.c (finish_method): Move class initialization from here to
1149         cache_this_class_ref.
1150         * class.c (cache_this_class_ref): New function.
1151         (build_class_ref): Use this_classdollar for the ouput class.
1152
1153 2007-02-02  David Daney  <ddaney@avtrex.com>
1154
1155         * class.c (is_compiled_class): Move check to avoid reloading
1156         current class.
1157         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1158         already set.
1159
1160 2007-02-01  Andrew Haley  <aph@redhat.com>
1161
1162         PR java/30641
1163         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1164
1165 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1166
1167         * class.c, jcf-parse.c: Fix comment typos.
1168
1169 2007-01-30  Tom Tromey  <tromey@redhat.com>
1170
1171         * gcj.texi (Strings): Fix documentation for JvNewString.
1172
1173 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1174
1175         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1176         typos.
1177
1178 2007-01-30  Ben Elliston  <bje@au.ibm.com>
1179
1180         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1181
1182 2007-01-29  Tom Tromey  <tromey@redhat.com>
1183
1184         PR java/30607:
1185         * jvspec.c (lang_specific_driver): Handle separate -I argument.
1186         * lang.opt (-I): Add 'Separate'.
1187
1188 2007-01-29  Andrew Haley  <aph@redhat.com>
1189
1190         * class.c (add_method_1): Mark fndecl as external unless we are
1191         compiling it into this object file.
1192
1193 2007-01-24  Andrew Haley  <aph@redhat.com>
1194
1195         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1196         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1197
1198 2007-01-22  Andrew Haley  <aph@redhat.com>
1199
1200         * builtins.c (VMSupportsCS8_builtin): New function.
1201
1202 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1203
1204         PR java/30454
1205         * jcf-io.c (opendir_in_zip): Close the file
1206         and free zipf before returning after an error.
1207
1208 2007-01-16  Tom Tromey  <tromey@redhat.com>
1209
1210         * java-tree.def: Added copyright header.
1211
1212 2007-01-15  Tom Tromey  <tromey@redhat.com>
1213
1214         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1215         case.
1216         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1217         Removed case.
1218         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1219         (EXPR_WFL_NODE): Likewise.
1220         (EXPR_WFL_LINECOL): Likewise.
1221         (EXPR_WFL_FILENAME): Likewise.
1222         (EXPR_WFL_LINENO): Likewise.
1223         (build_expr_wfl, expr_add_location): Don't declare.
1224         (build_unknown_wfl): Removed.
1225         (EXPR_WFL_FILENAME_NODE): Removed.
1226         (EXPR_WFL_COLNO): Removed.
1227         (EXPR_WFL_SET_LINECOL): Removed.
1228         (DECL_FUNCTION_WFL): Removed.
1229         (DECL_FIELD_FINAL_WFL): Removed.
1230         (struct lang_decl_func) <wfl>: Removed field.
1231         <called_constructor>: Likewise.
1232         <inner_access>: Likewise.
1233         (struct lang_decl_var) <wfl>: Removed field.
1234         (DECL_CONSTRUCTOR_CALLS): Removed.
1235         (DECL_FUNCTION_ACCESS_DECL): Likewise.
1236         (DECL_FUNCTION_INNER_ACCESS): Likewise.
1237         (DECL_SPECIFIC_COUNT): Likewise.
1238         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1239         * expr.c (build_expr_wfl): Removed.
1240         (expr_add_location): Likewise.
1241
1242 2007-01-12  Tom Tromey  <tromey@redhat.com>
1243
1244         * jcf-dump.c (main): Updated call to find_class.
1245         * lang.c (java_init): Removed dead code.
1246         * jcf-parse.c (read_class): Don't use java_source field.  Removed
1247         dead code.
1248         (parse_zip_file_entries): Don't use java_source field.
1249         (process_zip_dir): Likewise.
1250         (jcf_parse): Removed dead code.
1251         (java_parse_file): Likewise.
1252         (read_class): Updated call to find_class.
1253         * jcf-io.c (find_class): Don't use java_source field.  Removed
1254         'source_ok' argument, .java logic.
1255         * jcf.h (JCF) <java_source>: Removed field.
1256         (JCF_ZERO): Updated.    (find_class): Updated.
1257         * decl.c: Removed dead code.
1258         * class.c: Removed dead code.
1259
1260 2007-01-11  Tom Tromey  <tromey@redhat.com>
1261
1262         * typeck.c (convert): Don't use flag_emit_class_files.
1263         * lang.c (java_post_options): Don't use flag_emit_class_files.
1264         (java_handle_option): Don't use flag_extraneous_semicolon or
1265         flag_redundant.
1266         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1267         flag_emit_class_files.
1268         (load_class): Likewise.
1269         * java-tree.h (flag_emit_class_files): Don't declare.
1270         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1271         (flag_extraneous_semicolon): Don't declare.
1272         (flag_not_overriding): Likewise.
1273         (flag_static_local_jdk1_1): Likewise.
1274         (flag_redundant): Likewise.
1275         * expr.c (build_newarray): Don't use flag_emit_class_files.
1276         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1277         flag_emit_class_files.
1278         (build_class_ref): Likewise.
1279         * builtins.c (check_for_builtin): Don't use
1280         flag_emit_class_files.
1281
1282 2007-01-10  Tom Tromey  <tromey@redhat.com>
1283
1284         * lang.c (java_can_use_bit_fields_p): Removed.
1285         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1286
1287 2007-01-09  Andrew Haley  <aph@redhat.com>
1288
1289         * expr.c (build_java_arrayaccess): Rewrite to generate array
1290         access in canonical form.
1291         (expand_java_arraystore): Use build_fold_addr_expr() on address of
1292         array access.
1293
1294 2007-01-03  Andrew Haley  <aph@redhat.com>
1295
1296         PR java/28754
1297         * expr.c (expand_java_field_op): If we're initializing a field's
1298         declaring interface we should not also initialize the class
1299         context in which it was referenced.
1300
1301 2007-01-02  Tom Tromey  <tromey@redhat.com>
1302
1303         * java-tree.h (compiling_from_source, current_encoding,
1304         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1305         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1306         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1307         JTI_WFL_OPERATOR): Removed
1308         (finit_identifier_node, instinit_identifier_node,
1309         length_identifier_node, super_identifier_node,
1310         continue_identifier_node, access0_identifier_node, wfl_operator):
1311         Removed.
1312         (cyclic_inheritance_report,
1313         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1314         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1315         DECL_FIXED_CONSTRUCTOR_P): Removed.
1316         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1317         Removed.
1318         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1319         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1320         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1321         import_list, import_demand_list>: Removed.
1322         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1323         cxx_keyword_p): Removed.
1324         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1325         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1326         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1327         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1328         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1329         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1330         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1331         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1332         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1333         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1334         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1335         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1336         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1337         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1338         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1339         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1340         java_parse_abort_on_error, extract_field_decl): Removed.
1341         (finput): Declare.
1342         * lang.c: (compiling_from_source, current_encoding): Removed.
1343         (java_handle_option): Ignore -fencoding.
1344         * parse.h: Don't include lex.h.
1345         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1346         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1347         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1348         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1349         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1350         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1351         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1352         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1353         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1354         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1355         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1356         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1357         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1358         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1359         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1360         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1361         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1362         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1363         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1364         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1365         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1366         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1367         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1368         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1369         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1370         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1371         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1372         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1373         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1374         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1375         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1376         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1377         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1378         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1379         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1380         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1381         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1382         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1383         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1384         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1385         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1386         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1387         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1388         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1389         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1390         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1391         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1392         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1393         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1394         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1395         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1396         SET_CPC_STATIC_INITIALIZER_STMT,
1397         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1398         java_complete_class, java_check_circular_reference,
1399         java_fix_constructors, java_layout_classes, java_reorder_fields,
1400         java_method_add_stmt, java_get_line_col, reset_report,
1401         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1402         java_finish_classes, ctxp, ctxp_for_generation,
1403         ctxp_for_generation_last): Removed.
1404         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1405         * mangle.c (utf8_cmp): New function.
1406         (cxx_keywords): New global.
1407         (cxx_keyword_p): New function.
1408         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1409         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1410         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1411         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1412         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1413         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1414         * Make-lang.in (java.srcextra): Do nothing.
1415         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1416         (JAVA_OBJS): Don't mention deleted files.
1417         (java.mostlyclean): Likewise.
1418         (java.clean): Likewise.
1419         (JAVA_LEX_C): Removed.
1420         (buffer.o, check-init.o, parse.o): Remove unused targets.
1421         (typeck.o): Updated.
1422         * jcf-parse.c (read_class): Comment out unused code.
1423         (java_layout_seen_class_methods): New function.
1424         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1425         Removed.
1426         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
1427         (init_jcf_parse): Removed.
1428         * config-lang.in (gtfiles): Remove deleted files.
1429         * decl.c (java_init_decl_processing): Don't initialize
1430         finit_identifier_node, instinit_identifier_node,
1431         length_identifier_node, super_identifier_node,
1432         continue_identifier_node, access0_identifier_node.  Don't call
1433         init_jcf_parse.
1434         * class.c (cyclic_inheritance_report): New global.
1435         (add_method_1): Don't use
1436         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1437         (maybe_layout_super_class): Comment out code.
1438         (safe_layout_class): New function.
1439         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1440         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1441         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1442         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1443         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1444         (java_gimplify_case_expr): Removed.
1445         (java_gimplify_default_expr): Likewise.
1446         (java_gimplify_new_array_init): Likewise.
1447         * parse.y: Removed.
1448         * keyword.gperf, keyword.h: Removed.
1449         * chartables.h: Removed.
1450         * check-init.c: Removed.
1451         * buffer.c, buffer.h: Removed.
1452         * convert.h: Removed.
1453         * gen-table.pl: Removed.
1454         * lex.c, lex.h: Removed.
1455
1456 2007-01-02  Andrew Haley  <aph@redhat.com>
1457
1458         * expr.c (expand_java_arraystore): Make sure we perform a bounds
1459         check at runtime before we perform a type check.
1460
1461 2006-12-19  Andrew Haley  <aph@redhat.com>
1462
1463         * decl.c: Bump minor BC ABI version.
1464
1465 2006-12-13  Gary Benson  <gbenson@redhat.com>
1466
1467         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1468
1469 2006-12-12  Tom Tromey  <tromey@redhat.com>
1470
1471         * lang-specs.h: Pass -M options to jc1.
1472         * jcf-depend.c (jcf_dependency_add_file): Don't emit
1473         dependencies.
1474
1475 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
1476
1477         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1478
1479 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
1480
1481         * lang-specs.h: Pass '%U'-based options as separate arguments.
1482
1483 2006-12-05  Tom Tromey  <tromey@redhat.com>
1484
1485         PR java/29495:
1486         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1487         classes as well.
1488         * class.c (add_field): Handle ACC_SYNTHETIC.
1489         (add_method_1): Likewise.  Handle bridge and varargs.
1490         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1491         annotation.
1492         (set_class_decl_access_flags): Handle synthetic and annotation.
1493         * java-tree.h (METHOD_BRIDGE): New macro.
1494         (METHOD_VARARGS): Likewise.
1495         (TYPE_SYNTHETIC): Likewise.
1496         (TYPE_ANNOTATION): Likewise.
1497         (lang_type): New fields 'synthetic' and 'annotation'.
1498         (lang_decl_func): New fields 'varargs' and 'bridge'.
1499
1500 2006-12-04  Andrew Haley  <aph@redhat.com>
1501
1502         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1503         there's no map.
1504
1505 2006-11-29  Gary Benson  <gbenson@redhat.com>
1506
1507         * expr.c (rewrite_arglist_getcaller): Reorder.
1508
1509 2006-11-29  Andrew Haley  <aph@redhat.com>
1510
1511         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1512         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1513
1514 2006-11-23  Andrew Haley  <aph@redhat.com>
1515
1516         * expr.c (rewrite_arglist_getcaller): New.
1517         (rewrite_arglist_getclass): Fix indentation.
1518         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
1519         gnu.classpath.VMStackWalker.getCallingClassLoader().
1520         * builtins.c (initialize_builtins): Remove duplicate def'n of
1521         __sync_synchronize.
1522         Add __builtin_return_address.
1523
1524 2006-11-22  Andrew Haley  <aph@redhat.com>
1525
1526         * jcf-reader.c (get_attribute): Mark attr_type unused.
1527
1528         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1529
1530 2007-01-08  Richard Guenther  <rguenther@suse.de>
1531
1532         * lex.c (do_java_lex): Use build_int_cst_wide_type.
1533         * jcf-parse.c (get_constant): Likewise.
1534
1535 2006-11-12  Jan Hubicka  <jh@suse.cz>
1536
1537         * resource.c (compile_resource_data): Update for new varpool names.
1538         * java/class.c (build_utf8_ref): Likewise.
1539
1540 2006-11-12  David Daney  <ddaney@avtrex.com>
1541
1542         PR java/29805
1543         * typeck.c (build_java_array_type): Increase buffer sizes.
1544
1545 2006-11-11  Richard Guenther  <rguenther@suse.de>
1546
1547         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1548         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1549
1550 2006-11-06  Andrew Haley  <aph@redhat.com>
1551
1552         * java-tree.h (CONSTANT_LazyFlag): New.
1553         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1554         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1555         reflection_data.
1556         (handle_constant): Return 0 for dummy cpool entries.
1557         Handle constants of kind Class.
1558         Handle constants of kind NameAndType.
1559         (handle_enclosingmethod_attribute): New.
1560         (handle_signature_attribute): New.
1561         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1562         (HANDLE_SIGNATURE_ATTRIBUTE): New.
1563         (handle_constant): Use unmangle_classname()rather than calling
1564         identifier_subst() directly.
1565
1566 2006-11-02  Andrew Haley  <aph@redhat.com>
1567
1568         * java-tree.h (FIELD_ENUM): New.
1569         (lang_decl_var.field_enum): New.
1570         (lang_type.enum_class): New.
1571         (CLASS_ENUM): New.
1572         * class.c (set_class_decl_access_flags): Handle enum types.
1573         (add_field): Handle enum fields.
1574         (get_access_flags_from_decl): Likewise.
1575
1576         * class.c (make_class_data): Put reflection_data into rodata.
1577
1578 2006-11-01  Andrew Haley  <aph@redhat.com>
1579
1580         * jcf-parse.c (field_offsets, bit_obstack): New variables.
1581         (jcf_parse): Write end marker to annotation_data.
1582         (java_parse_file): Create field_offsets bitmap.  Destroy it.
1583         (annotation_grow, annotation_rewrite_byte) 
1584         (annotation_rewrite_short, annotation_rewrite_int) 
1585         (annotation_read_short, annotation_write_byte) 
1586         (annotation_write_short, annotation_write_int) 
1587         (handle_long_constant, handle_constant, handle_element_value) 
1588         (handle_annotation, handle_annotations) 
1589         (handle_annotation_attribute, rewrite_reflection_indexes) 
1590         (handle_member_annotations, handle_parameter_annotations) 
1591         (handle_default_annotation): New functions.
1592         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
1593         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
1594         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1595         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1596         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1597         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
1598         (TYPE_REFLECTION_DATA): New.
1599         (TYPE_REFLECTION_DATASIZE): New.
1600         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1601         an enum.
1602         * jcf-reader.c (get_attribute): Pass field/method index and
1603         attribute type to get_attribute().
1604         * constants.c (find_class_or_string_constant): Make nonstatic.
1605         (cpool_for_class): Likewise.
1606         (build_constants_constructor): Separate string and scalar types.
1607         * class.c (make_class_data): Generate field_indexes permutation.
1608         Pass it to rewrite_reflection_indexes().
1609         (make_class_data): Generate constructor for reflection_data field.
1610
1611 2006-10-20  Tom Tromey  <tromey@redhat.com>
1612
1613         * gcj.texi (Top): Don't mention jv-scan.
1614         (Invoking gcj): Likewise.
1615         (Invoking gcjh): Likewise.
1616         (Invoking gjnih): Likewise.
1617         (Invoking gij): Likewise.
1618         (Invoking gcj-dbtool): Likewise.
1619         (Invoking jv-scan): Removed.
1620         * parse-scan.y: Removed.
1621         * jv-scan.c: Removed.
1622         * config-lang.in (stagestuff): Don't mention jv-scan.
1623         * Make-lang.in (java): Removed jv-scan.
1624         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1625         (JVSCAN_OBJS): Removed.
1626         (jv-scan$(exeext)): Likewise.
1627         (JAVA_MANFILES): Removed jv-scan.1.
1628         (java.uninstall): Don't mention jv-scan.
1629         (java.mostlyclean): Likewise.
1630         (java.maintainer-clean): Likewise.
1631         (.INTERMEDIATE): Likewise.
1632         (java/jv-scan.o): Removed.
1633         (jv-scan.pod): Likewise.
1634         (java.srcextra): Don't mention parse-scan.c.
1635         (java.mostlyclean): Likewise.
1636         (java/parse-scan.c): Removed.
1637         (java/parse-scan.o-warn): Removed.
1638         (java/parse-scan.o): Removed.
1639
1640 2006-10-20  Tom Tromey  <tromey@redhat.com>
1641
1642         * lang.c (java_handle_option): Don't use
1643         jcf_write_base_directory.
1644         * jcf.h (jcf_write_base_directory): Removed.
1645         * parse.y (java_expand_classes): Don't call write_classfile.
1646         * config-lang.in (gtfiles): Removed jcf-write.c.
1647         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1648         (java/jcf-write.o): Removed.
1649         * jcf-parse.c (parse_class_file): Don't call write_classfile.
1650         * java-tree.h (write_classfile): Removed declaration.
1651         * jcf-write.c: Removed.
1652
1653 2006-10-20  Tom Tromey  <tromey@redhat.com>
1654
1655         * Make-lang.in (java): Removed gjnih, gcjh.
1656         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1657         (GCJH_OBJS): Removed.
1658         (GJNIH_OBJS): Likewise.
1659         (gjnih$(exeext)): Likewise.
1660         (gcjh$(exeext)): Likewise.
1661         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1662         (java.install-common): Don't special case gcjh.
1663         (java.uninstall): Don't mention gcjh, gjnih.
1664         (java.mostlyclean): Likewise.
1665         (java.maintainer-clean): Likewise.
1666         (.INTERMEDIATE): Likewise.
1667         (gcjh.pod): Removed.
1668         (gjnih.pod): Likewise.
1669         (GCJH_TARGET_INSTALL_NAME): Removed.
1670         (java/gjavah-jni.o): Removed.
1671         (java/gjavah.o): Likewise.
1672         * config-lang.in (stagestuff): Removed gjnih, gcjh.
1673         * gjavah.c: Removed.
1674
1675 2006-10-17  Tom Tromey  <tromey@redhat.com>
1676
1677         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1678         "string" case.
1679
1680 2006-10-17  Tom Tromey  <tromey@redhat.com>
1681
1682         * jvgenmain.c (main): Handle -findirect-dispatch.
1683         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1684         jvgenmain.
1685
1686 2006-10-06  Andrew Haley  <aph@redhat.com>
1687
1688         * builtins.c (compareAndSwapInt_builtin): Check that we really do
1689         have a compare_and_swap builtin.
1690         (compareAndSwapLong_builtin): Likewise.
1691         (compareAndSwapObject_builtin): Likewise.
1692
1693 2006-10-04  Andrew Haley  <aph@redhat.com>
1694
1695         * builtins.c (java_builtins): Add compareAndSwapInt,
1696         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1697         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1698         putObjectVolatile, getObjectVolatile, getIntVolatile,
1699         getLongVolatile, getLong.
1700         (UNMARSHAL3): New macro.
1701         (UNMARSHAL4): Likewise.
1702         (UNMARSHAL5): Likewise.
1703         (build_arglist_for_builtin): New function.
1704         (build_addr_sum, build_check_this): New functions.
1705         (putObject_builtin. compareAndSwapInt_builtin,
1706         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1707         putVolatile_builtin, getVolatile_builtin): New builtins.
1708
1709 2006-06-08  Andrew Haley  <aph@redhat.com>
1710  
1711         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1712         get_symbol_table_index().
1713         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1714         private method.
1715         (build_known_method_ref): New arg: special.  Pass it to
1716         get_symbol_table_index.
1717         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1718         the method list.
1719         (build_invokevirtual): New arg: special.  Pass it to
1720         get_symbol_table_index.
1721         (expand_invoke): New variable: special.
1722         Pass it to maybe_rewrite_invocation().
1723         Pass it to build_known_method_ref().
1724         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1725         build the symbol table conbstructor.
1726         (emit_symbol_table): Extract SPECIAL from the method list and pass
1727         it to build_symbol_entry().
1728         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1729         special accordingly.
1730  
1731 2006-09-08  Andrew Haley  <aph@redhat.com>
1732
1733         * class.c (layout_class_method): Use build_java_signature, not
1734         build_java_argument_signature.  Use lookup_java_method, not
1735         lookup_argument_method.
1736
1737 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1738             Bryce McKinlay  <bryce@mckinlay.net.nz>
1739
1740         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1741
1742 2006-07-18  Tom Tromey  <tromey@redhat.com>
1743
1744         * lang.opt: Added missing -W options.
1745
1746 2006-07-12  Tom Tromey  <tromey@redhat.com>
1747
1748         PR java/28329:
1749         * lang-specs.h: Pass '%U'-based options as separate arguments.
1750         Use -faux-classpath.
1751         * lang.c (java_handle_option): Handle OPT_faux_classpath.
1752         * lang.opt (faux-classpath): New option.
1753
1754 2006-07-07  Tom Tromey  <tromey@redhat.com>
1755
1756         * class.c (make_class_data): Set value for reflection_data field.
1757         * decl.c (java_init_decl_processing): Add reflection_data field.
1758
1759 2006-07-07  Tom Tromey  <tromey@redhat.com>
1760
1761         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1762         earlier.
1763         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1764
1765 2006-07-07  Andrew Haley  <aph@redhat.com>
1766
1767         * jcf-parse.c (set_source_filename): Don't check for
1768         CLASS_FROM_CURRENTLY_COMPILED_P.
1769         Remove // comments.
1770
1771 2006-07-07  Andrew Haley  <aph@redhat.com>
1772
1773         * java-tree.h (java_read_sourcefilenames): Declare.
1774         * lang.c (java_handle_option): Call java_read_sourcefilenames().
1775         * lang.opt (fsource-filename): New opt.
1776         * lang-specs.h: Add -fsource-filename.
1777         * jcf-parse.c (num_files, filenames): New variables.
1778         (reverse, cmpstringp, java_read_sourcefilenames,
1779         find_sourcefile): New.
1780         (set_source_filename): Call find_sourcefile to find the real name
1781         of a source file.
1782
1783 2006-06-27  Tom Tromey  <tromey@redhat.com>
1784
1785         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1786         Signature, LocalVariableTypeTable, annotation attributes.
1787         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1788         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1789         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1790         (HANDLE_METHOD): Likewise.
1791         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1792         (print_annotation): New function.
1793         (print_element_value): Likewise.
1794         (indent): Likewise.
1795         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1796         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1797         (print_parameter_annotations): New function.
1798         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1799         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1800         Likewise.
1801         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1802         (print_annotations): New function.
1803
1804 2006-06-23  Tom Tromey  <tromey@redhat.com>
1805
1806         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
1807         emitting class files, always use 1.5.
1808         * gcj.texi (Input Options): Document -fsource.
1809         (Code Generation): Document -ftarget.
1810
1811 2006-06-21  Tom Tromey  <tromey@redhat.com>
1812
1813         PR java/28089:
1814         * expr.c (expand_java_field_op): Initialize field's declaring
1815         class.
1816
1817 2006-06-20  Tom Tromey  <tromey@redhat.com>
1818
1819         * expr.c (push_value): Always flush quick stack.
1820
1821 2006-06-19  Tom Tromey  <tromey@redhat.com>
1822
1823         * expr.c (push_value): Also flush quick stack if value is a
1824         component_ref.
1825
1826 2006-06-19  Tom Tromey  <tromey@redhat.com>
1827
1828         * expr.c (push_value): Flush quick stack if value has side
1829         effects.
1830
1831 2006-06-13  Tom Tromey  <tromey@redhat.com>
1832
1833         * class.c (is_compiled_class): Explicitly check for current
1834         class.
1835
1836 2006-06-09  Tom Tromey  <tromey@redhat.com>
1837
1838         * gjavah.c (decompile_method): Don't decompile a static field
1839         accessor method.
1840
1841 2006-06-06  Tom Tromey  <tromey@redhat.com>
1842
1843         * lang-specs.h <jc1>: Add .jar file to command line if
1844         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
1845
1846 2006-06-05  Tom Tromey  <tromey@redhat.com>
1847
1848         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1849         synthetic, enum, annotation.
1850         * jcf.h (ACC_BRIDGE): New macro.
1851         (ACC_VARARGS): Likewise.
1852         (ACC_SYNTHETIC): Likewise.
1853         (ACC_ENUM): Likewise.
1854         (ACC_ANNOTATION): Likewise.
1855
1856 2006-06-04  Tom Tromey  <tromey@redhat.com>
1857
1858         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1859         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1860         and -ftarget.
1861         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1862         when needed.  Handle classpath-setting.
1863         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1864         * lang-specs.h: Rewrote.
1865
1866 2006-06-04  Tom Tromey  <tromey@redhat.com>
1867
1868         * jcf-io.c (find_class): Set source_ok to 0.
1869         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1870         (parse_class_file): Don't call java_mark_class_local.
1871         (java_parse_file): Skip .java files.  Call java_mark_class_local
1872         before lowering any code.
1873         (parse_zip_file_entries): Don't call duplicate_class_warning
1874         here.
1875         (process_zip_dir): ... call it here.
1876         * class.c (add_field): Don't mark field external if it is being
1877         compiled into this object.
1878         (make_class_data): Handle situation where class_dtable_decl is
1879         created before Class is compiled.
1880         (is_compiled_class): Don't assume files in zip are compiled into
1881         this object.
1882         (layout_class_method): Don't mark method external if it is being
1883         compiled into this object.
1884
1885 2006-06-04  Tom Tromey  <tromey@redhat.com>
1886
1887         * jcf-path.c (jcf_path_compute): New function.
1888         * jcf.h (jcf_path_compute): Declare.
1889
1890 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1891
1892         * decl.c: Include langhooks.h.
1893         (builtin_function): Remove.
1894         (java_init_decl_processing): Replace calls to builtin_function
1895         with add_builtin_function.
1896         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1897         (java/decl.o): Depend on langhooks.h.
1898         * java-tree.h (builtin_function): Remove.
1899
1900 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1901
1902         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1903
1904 2006-09-12  Tom Tromey  <tromey@redhat.com>
1905
1906         * expr.c (push_value): Always flush quick stack.
1907
1908 2006-09-12  Tom Tromey  <tromey@redhat.com>
1909
1910         PR java/29013:
1911         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1912         the push of the called method's return result.
1913
1914 2006-09-12  Tom Tromey  <tromey@redhat.com>
1915
1916         * jvspec.c (lang_specific_driver): Read spec file even if
1917         -fsyntax-only.
1918
1919 2006-09-12  Tom Tromey  <tromey@redhat.com>
1920
1921         PR java/28754:
1922         * expr.c (expand_java_field_op): Initialize field's declaring
1923         interface if necessary.
1924
1925 2006-09-12  Tom Tromey  <tromey@redhat.com>
1926
1927         PR java/28892:
1928         * expr.c (expand_java_field_op): No error for assignments not in
1929         class initializer or constructor.
1930
1931 2006-08-22  Andrew Haley  <aph@redhat.com>
1932
1933         * decl.c (java_add_stmt): Give the statement list a type.
1934
1935 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1936             Bryce McKinlay  <bryce@mckinlay.net.nz>
1937
1938         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1939
1940 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1941
1942         PR java/8923
1943         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1944         or '--' is used with a constant operand.
1945         (java_complete_lhs): When processing a '++' or '--' expression,
1946         don't call java_complete_tree but java_complete_lhs, so that a
1947         static final variable operand is never replaced by its value. This
1948         avoids an ICE later on.
1949         (patch_unaryop): Fixed typo in comment.
1950
1951 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1952
1953         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1954
1955 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1956
1957         * builtins.c (check_for_builtin): If a builtin could result in a
1958         direct call being generated, don't use it if flag_indirect_dispatch
1959         is set.
1960
1961 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1962
1963         * gcj.texi (Invocation): Corrections for Invocation API example.
1964
1965 2006-07-04  Andrew Haley  <aph@redhat.com>
1966
1967         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1968         entry.
1969
1970 2006-06-21  Andrew Haley  <aph@redhat.com>
1971
1972         * java-tree.h (update_aliases): Remove
1973         * expr.c (expand_iinc): Remove call to update_aliases().
1974         (STORE_INTERNAL): Likewise.
1975         * decl.c (update_aliases, initialize_local_variable) 
1976         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1977
1978 2006-06-19  Andrew Haley  <aph@redhat.com>
1979
1980         PR java/1305
1981         PR java/27908
1982         * expr.c (java_modify_addr_for_volatile): New function.
1983         (expand_java_field_op): Handle volatile fields.
1984         * java-gimplify.c (java_gimplify_component_ref): Call
1985         java_modify_addr_for_volatile to give the field_ref the correct
1986         volatile type.
1987         (java_gimplify_modify_expr): Likewise.
1988         * java-tree.h (java_modify_addr_for_volatile): New decl.
1989
1990 2006-06-17  Karl Berry  <karl@gnu.org>
1991
1992         * gcj.texi (@dircategory): Use "Software development" instead
1993         of "Programming", following the Free Software Directory.
1994
1995 2006-06-16  Andrew Haley  <aph@redhat.com>
1996
1997         * class.c (make_class_data): When using flag_indirect_classes,
1998         don't initialize the vtable of Class instances.
1999
2000 2006-06-09  Andrew Haley  <aph@redhat.com>
2001
2002         PR java/1305
2003         PR java/27908
2004         * builtins.c (initialize_builtins): Add __sync_synchronize().
2005         * class.c (add_field): Mark volatile fields.
2006         * java-gimplify.c (java_gimplify_expr): Call new functions to
2007         handle self-modifying exprs and COMPONENT_REFs.
2008         (java_gimplify_component_ref): New.
2009         (java_gimplify_modify_expr): Add handling for volatiles.
2010
2011 2006-06-08  Tom Tromey  <tromey@redhat.com>
2012
2013         * gcj.texi (libgcj Runtime Properties): Document
2014         gnu.gcj.user.realname.
2015
2016 2006-06-08  Andrew Haley  <aph@redhat.com>
2017
2018         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2019         get_symbol_table_index().
2020         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2021         private method.
2022         (build_known_method_ref): New arg: special.  Pass it to
2023         get_symbol_table_index.
2024         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2025         the method list.
2026         (build_invokevirtual): New arg: special.  Pass it to
2027         get_symbol_table_index.
2028         (expand_invoke): New variable: special.
2029         Pass it to maybe_rewrite_invocation().
2030         Pass it to build_known_method_ref().
2031         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2032         build the symbol table conbstructor.
2033         (emit_symbol_table): Extract SPECIAL from the method list and pass
2034         it to build_symbol_entry().
2035         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2036         special accordingly.
2037
2038 2006-06-06  David Daney  <ddaney@avtrex.com>
2039
2040         * gcj.texi (libgcj Runtime Properties): Document
2041         gnu.gcj.runtime.NameFinder.show_raw and
2042         gnu.gcj.runtime.NameFinder.remove_unknown.
2043
2044 2006-06-06  Tom Tromey  <tromey@redhat.com>
2045
2046         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2047         synthetic, enum, annotation.
2048         * jcf.h (ACC_BRIDGE): New macro.
2049         (ACC_VARARGS): Likewise.
2050         (ACC_SYNTHETIC): Likewise.
2051         (ACC_ENUM): Likewise.
2052         (ACC_ANNOTATION): Likewise.
2053
2054 2006-06-06  Mike Stump  <mrs@apple.com>
2055
2056         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2057         installing during build.
2058
2059 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2060
2061         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2062         classname-to-library resolution mechanism.
2063         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2064         mechanism deprecated.
2065         (libgcj Runtime Properties): Document
2066         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2067
2068 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2069
2070         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2071         bit wide type.
2072         (jword): Define to uint64 on 64-bit arches.
2073         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2074
2075 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2076
2077         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2078         typos.
2079
2080 2006-05-26  Tom Tromey  <tromey@redhat.com>
2081
2082         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2083         * verify-glue.c (vfy_class_type): New function.
2084         * verify-impl.c (check_constant): Allow 'ldc class'.
2085         * verify.h (vfy_class_type): Declare.
2086
2087 2006-05-25  Andrew Haley  <aph@redhat.com>
2088
2089         PR java/27756
2090         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2091         update all lifetimes, not just the first one.
2092
2093 2006-05-24  Tom Tromey  <tromey@redhat.com>
2094
2095         * java-tree.h: Fixed flag documentation.
2096
2097 2006-05-24  Tom Tromey  <tromey@redhat.com>
2098
2099         PR libgcj/27729:
2100         * jcf.h (ACC_INVISIBLE): Changed value.
2101
2102 2006-05-24  Andrew Haley  <aph@redhat.com>
2103
2104         PR java/27754
2105         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2106         COMPOUND_EXPR.
2107
2108 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2109
2110         * lang.opt (femit-class-file): Remove VarExists.
2111
2112 2006-05-16  Tom Tromey  <tromey@redhat.com>
2113
2114         * verify-impl.c (verify_instructions_0) <op_return>: Special case
2115         for Object.<init>.
2116
2117 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2118
2119         PR driver/26885
2120         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2121         $(GCC_OBJS).
2122
2123 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2124
2125         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2126         (java/expr.o): Replace target.h with $(TARGET_H).
2127         (java/parse.o): Likewise.
2128
2129 2006-05-10  Andrew Haley  <aph@redhat.com>
2130
2131         * class.c (emit_indirect_register_classes): Fix comment.
2132
2133 2006-05-04  Tom Tromey  <tromey@redhat.com>
2134
2135         * java-tree.h (uses_jv_markobj_p): Declare.
2136         * class.c (uses_jv_markobj_p): Removed.
2137         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2138         (get_boehm_type_descriptor): Use it.
2139         (uses_jv_markobj_p): Moved from class.c.  Return bool.
2140
2141 2006-05-04  Tom Tromey  <tromey@redhat.com>
2142
2143         * java-tree.def (THIS_EXPR): Now a tcc_expression.
2144
2145 2006-05-04  Andrew Haley  <aph@redhat.com>
2146
2147         * class.c (make_field_value): Always build_address_of fdecl if
2148         there is an initializer.
2149
2150 2006-05-03  Andrew Haley  <aph@redhat.com>
2151
2152         PR libgcj/27352
2153         * expr.c (maybe_rewrite_invocation): New function.
2154         (rewrite_arglist_getclass): Likewise.
2155         (rules): New.
2156         (expand_invoke): Call maybe_rewrite_invocation.
2157         * parse.y (patch_invoke): Likewise.
2158         * java-tree.h: (maybe_rewrite_invocation): New function.
2159
2160 2006-04-21  Andrew Haley  <aph@redhat.com>
2161
2162         * lang.c (java_init): Handle flag_indirect_classes.
2163         * jvgenmain.c: Use "class$$" instead of "class$".
2164         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2165         DECLs.
2166         (mangle_class_field): Special case "class$$" as well as "class$".
2167         * constants.c (build_ref_from_constant_pool): If
2168         flag_indirect_classes, generate a ref into the heap.
2169         * decl.c (constants_field_decl_node,
2170         constants_data_field_decl_node): New.
2171         * class.c (build_static_class_ref): New.
2172         (build_classdollar_field): Factor out from build_class_ref().
2173         (make_field_value): Handle static fields in heap.
2174         (make_class_data): Make sure we get a static ref to class.
2175         Make class initializer const if flag_indirect_classes.
2176         (register_class): Build a class_ref for initialization if
2177         flag_indirect_classes.
2178         (emit_indirect_register_classes): New.
2179
2180 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2181
2182         * expr.c, gjavah.c: Fix comment typos.
2183
2184 2006-04-03  Andrew Haley  <aph@redhat.com>
2185
2186         PR java/26858
2187         * expr.c (build_field_ref): Don't check the field offset if
2188         flag_syntax_only.
2189
2190 2006-03-30  Andrew Haley  <aph@redhat.com>
2191
2192         PR java/26858
2193         * lang.c (java_attribute_table): New.
2194         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2195         * expr.c (build_field_ref): Add a null pointer check for all
2196         fields of offset > 4k.  Don't do so for accesses via the this
2197         pointer, which we know can never be null.
2198         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2199         methods nonnull.
2200
2201 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
2202
2203         * Make-lang.in: Rename docdir to gcc_docdir.
2204
2205 2006-03-30  Tom Tromey  <tromey@redhat.com>
2206
2207         PR java/26042:
2208         * parse.y (java_reorder_fields): Reset superclass field's size as
2209         well.
2210
2211 2006-03-28  Tom Tromey  <tromey@redhat.com>
2212
2213         PR java/26390:
2214         * parse.y (find_most_specific_methods_list): Added 'class'
2215         argument.
2216         (lookup_method_invoke): Updated.
2217
2218 2006-03-15  Tom Tromey  <tromey@redhat.com>
2219
2220         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2221         non-static method calls.
2222
2223 2006-03-15  David Daney  <ddaney@avtrex.com>
2224
2225         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2226         declaration.
2227
2228 2006-03-15  David Daney  <ddaney@avtrex.com>
2229
2230         * lang.opt (-freduced-reflection): New option.
2231         * lang.c (java_post_options): Generate an error if
2232         -freduced-reflection used with -fjni or -findirect-dispatch.
2233         * java-tree.h (flag_reduced_reflection): Declare new variable.
2234         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2235         if bitmap overflows and flag_reduced_reflection set.
2236         * class.c (uses_jv_markobj_p): New function.
2237         (make_class_data): Moved generation of vtable to before
2238         reflection data, generate less reflection data if
2239         flag_reduced_reflection set.
2240         * gcj.texi: Document -freduced-reflection.
2241
2242 2006-03-15  Tom Tromey  <tromey@redhat.com>
2243
2244         PR java/26638:
2245         * class.c (get_interface_method_index): Don't put <clinit> into
2246         interface table.
2247
2248 2006-03-15  Tom Tromey  <tromey@redhat.com>
2249
2250         * parse.y (analyze_clinit_body): Ignore empty statements.
2251
2252 2006-03-08  David Daney  <ddaney@avtrex.com>
2253
2254         * gcj.texi: Document -static-libgcj option.
2255
2256 2006-02-20  Andrew Haley  <aph@redhat.com>
2257
2258         * jcf-parse.c (parse_class_file): Set input_location from
2259         current_class.
2260
2261 2006-02-15  Andrew Haley  <aph@redhat.com>
2262
2263         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2264         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2265         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2266
2267 2006-02-09  Andrew Haley  <aph@redhat.com>
2268
2269         PR java/26192
2270         * expr.c (expand_invoke): Allow methods in arrays to be resolved
2271         in their superclass.
2272
2273         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2274         array types.
2275         
2276 2006-02-08  Tom Tromey  <tromey@redhat.com>
2277
2278         PR java/22578:
2279         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2280         * builtins.c (convert_real): New function.
2281         (java_builtins): Handle Float.intBitsToFloat,
2282         Float.floatToRawIntBits, Double.longBitsToDouble,
2283         Double.doubleToRawLongBits.
2284
2285 2006-02-07  Andrew Haley  <aph@redhat.com>
2286
2287         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
2288         class other than the one in which we expected to find it, ignore
2289         the result.
2290
2291         PR java/25535
2292         * constants.c (build_constants_constructor): move initializer into
2293         first halfword on a 64-bit big-endian machine.
2294
2295 2006-02-04  Tom Tromey  <tromey@redhat.com>
2296
2297         PR java/25676:
2298         * builtins.c (max_builtin): Skip floating point 'max'.
2299         (min_builtin): Skip floating point 'min'.
2300         (check_for_builtin): Never return NULL_TREE.
2301
2302 2006-02-04  Tom Tromey  <tromey@redhat.com>
2303
2304         PR java/26097:
2305         * expr.c (push_type): Avoid side effect in gcc_assert.
2306
2307 2006-02-04  Roger Sayle  <roger@eyesopen.com>
2308
2309         * decl.c (java_init_decl_processing): Create char_type_node as a
2310         regular INTEGER_TYPE node.
2311         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2312         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2313         test for char_type_node and promoted_char_type_node as special
2314         instances of INTEGER_TYPE tree codes.
2315         (promote_type,build_java_signature): Likewise.
2316         * jcf-write.c (adjust_typed_op): Likewise.
2317         * mangle.c (mangle_type): Likewise.
2318         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2319         * parse.h (JINTEGRAL_TYPE_P): Likewise.
2320
2321 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
2322
2323         * expr.c (java_stack_swap): Revert gcc_assert patch.
2324
2325 2006-02-03  Ben Elliston  <bje@au.ibm.com>
2326
2327         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2328         * typeck.c: Likewise.
2329         * verify-impl.c: Likewise.
2330         * class.c: Likewise.
2331         * decl.c: Likewise.
2332         * jcf-parse.c: Likewise.
2333         * constants.c: Likewise.
2334         * check-init.c: Likewise.
2335         * jcf-write.c: Likewise.
2336         * verify-glue.c: Likewise.
2337         * mangle.c: Likewise.
2338         * expr.c: Likewise.
2339         * lang.c: Likewise.
2340         * boehm.c: Likewise.
2341
2342 2006-02-01  Jan Hubicka  <jh@suse.cz>
2343
2344         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2345         * lang.c (java_init_options): Set no_unit_at_a_time_default.
2346
2347 2006-01-30  Andrew Haley  <aph@redhat.com>
2348
2349         PR java/21428
2350         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2351
2352 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
2353
2354         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2355         Update copyright notice dates.
2356
2357 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2358
2359         * jvspec.c (lang_specific_spec_functions): Remove.
2360
2361 2006-01-06  Tom Tromey  <tromey@redhat.com>
2362
2363         * gcj.texi (Arrays): Added more documentation for
2364         JvNewObjectArray.
2365         (Primitive types): Correct information about primitive classes.
2366         (Reference types): New node.
2367         (Index): New node.
2368
2369 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
2370
2371         * jcf-parse.c (set_source_filename): Set the decl source location
2372         even when returning early.
2373
2374 2005-12-15  Tom Tromey  <tromey@redhat.com>
2375             Andrew Haley  <aph@redhat.com>
2376
2377         PR java/25429
2378         * parse.y (resolve_expression_name): Don't generate accessor
2379         methods for constant fields.
2380
2381 2005-12-13  Andrew Haley  <aph@redhat.com>
2382
2383         PR java/25366
2384         PR java/25368
2385         * class.c (maybe_layout_super_class): Update current_class before
2386         calling do_resolve_class.
2387
2388 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
2389
2390         PR java/25330
2391         * jcf-write.c (write_classfile): Use PID in temporary class
2392         file. Save/restore errno when reporting error.
2393
2394 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2395
2396         PR java/9861
2397         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2398         to bare_function_type and including the return type
2399         * builtins.c (initialize_builtins) : Change builtin mangled name
2400         constants to conform to new mangling scheme
2401
2402 2005-12-08  Andrew Haley  <aph@redhat.com>
2403
2404         PR libgcj/25265
2405         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2406         (soft_abstractmethod_node): New.
2407         * expr.c (build_field_ref): Add in-line check for missing field.
2408         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2409
2410 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2411
2412         * Make-lang.in (java.all.build, java.install-normal): Remove.
2413
2414 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2415
2416         * Make-lang.in: Remove all dependencies on s-gtype, except for
2417         gt-java-parse.h.
2418
2419 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
2420
2421         * class.c (build_utf8_ref, emit_register_classes): Use
2422         switch_to_section and get_section.
2423
2424 2005-12-06  Tom Tromey  <tromey@redhat.com>
2425
2426         PR java/25283:
2427         * parse.y (patch_new_array_init): Revert previous patch.
2428         (lookup_method_invoke): Use size-less array type when creating an
2429         anonymous constructor.
2430
2431 2005-12-05  Tom Tromey  <tromey@redhat.com>
2432
2433         * parse.y (patch_new_array_init): Don't set length on array.
2434
2435 2005-12-02  Richard Guenther  <rguenther@suse.de>
2436
2437         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2438         buildN instead of build.
2439         * class.c (finish_class): Likewise.
2440         * expr.c (java_create_object): Likewise.
2441
2442 2005-11-28  Tom Tromey  <tromey@redhat.com>
2443
2444         PR java/18278:
2445         * expr.c (build_jni_stub): Unwrap the return value.
2446         * java-tree.h (soft_unwrapjni_node): New define.
2447         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2448         * decl.c (java_init_decl_processing): Initialize
2449         soft_unwrapjni_node.
2450
2451 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
2452
2453         * gcj.texi (gij options): Add -Xss documentation.
2454
2455 2005-11-08  Wil Mahan  <wmahan@gmail.com>
2456
2457         PR java/23617
2458         * zextract.c (read_zip_archive): Fix out of memory error when
2459         reading jar files with zip-style comments.
2460
2461 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
2462
2463         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2464         formats.
2465         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2466
2467 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2468             Wil Mahan <wmahan@gmail.com>
2469
2470         PR java/23620
2471         * class.c (make_class): Create empty binfo here.
2472         (set_super_info): Only create binfo if we have superclasses.
2473
2474 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
2475
2476         PR java/24127
2477         * parse.y (method_header): Make the result of the rule a NULL_TREE
2478         when a parsing error occurs.
2479
2480 2005-09-29  Tom Tromey  <tromey@redhat.com>
2481
2482         PR java/24120:
2483         * jcf-io.c (memoized_dirlist_hash): New function.
2484         (caching_stat): Use it.
2485
2486 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
2487
2488         PR java/21418
2489         * class.c (inherits_from_p): Try to lay out super class
2490         if it is not already laid out.
2491         (maybe_layout_super_class): Handle the case where SUPER_CLASS
2492         is a NULL_TREE.
2493
2494 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
2495
2496         * builtins.c (max_builtin, min_builtin, abs_builtin,
2497         java_build_function_call_expr): Use fold_buildN.
2498         * class.c (layout_class_method): Likewise.
2499         * expr.c (java_truthvalue_conversion, build_java_jsr,
2500         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2501         build_java_binop, build_field_ref, expand_compare,
2502         build_known_method_ref, build_invokevirtual,
2503         process_jvm_instruction): Likewise.
2504         * parse.y (patch_binop, patch_exit_expr): Likewise.
2505         * typeck.c (convert_ieee_real_to_integer): Likewise.
2506         (convert): Don't call fold after convert_ieee_real_to_integer.
2507
2508 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
2509
2510         PR java/23891
2511         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2512         the newly created type. Set import lists here, not in create_class.
2513         (jdep_resolve_class): Set current_class.
2514         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
2515         the current package context, not ctxp->package.
2516         (cicp_cache): Removed.
2517         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2518         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2519         * java-tree.h (TYPE_PACKAGE): New macro.
2520         (struct lang_type): New member 'package'.
2521
2522 2005-09-09  Andrew Haley  <aph@redhat.com>
2523
2524         PR libgcj/23182 
2525         * expr.c (pop_type_0): If the expected type is object or ptr
2526         (i.e. void*), return the type of the object we just popped from
2527         the stack.
2528
2529 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
2530
2531         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2532         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2533
2534 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
2535
2536         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2537         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2538         typos.  Follow spelling conventions.
2539
2540 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
2541
2542         PR java/23431
2543         * typeck.c (lookup_do): Look up interfaces for the original class,
2544         not the base class.
2545         * parse.y (java_check_regular_methods): Fix diagnostic message for
2546         more restrictive overriding of a method from an interface.
2547
2548 2005-08-16  Tom Tromey  <tromey@redhat.com>
2549
2550         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2551         class' initial state.
2552
2553 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2554
2555         PR java/22113
2556         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2557         `literal_token' for large numeric input tokens.
2558
2559 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2560
2561         PR java/19870
2562         * parse.y (nested_field_access_p): Rename to nested_member_access_p
2563         and expand to handle method accesses across nested classes.
2564         (build_outer_method_access_method): Rename to
2565         build_nested_method_access_method.  Minor adjustments to comments.
2566         (resolve_expression_name): Use the newly-renamed
2567         nested_member_access_p method.
2568         (resolve_qualified_expression_name): Likewise.
2569         (patch_method_invocation): Also consider static methods for access
2570         method generation.  Minor adjustments to comments.
2571         (maybe_use_access_method): Use the more general
2572         nested_memeber_access_p to determine access across nested class
2573         boundaries.  Allow THIS_ARG to be NULL (for static methods).
2574
2575 2005-08-15  Tom Tromey  <tromey@redhat.com>
2576
2577         PR java/23300.
2578         * expr.c (build_field_ref): Don't generate otable reference when
2579         DECL_FIELD_OFFSET is 0.
2580         * class.c (maybe_layout_super_class): Pass outer class to
2581         do_resolve_class.
2582
2583 2005-08-15  Tom Tromey  <tromey@redhat.com>
2584
2585         * java-tree.h (LABEL_IN_SUBR): Removed.
2586         (LABEL_IN_SUBR): Likewise.
2587         (LABEL_IS_SUBR_START): Likewise.
2588         (LABEL_SUBR_START): Likewise.
2589         (LABEL_SUBR_CONTEXT): Likewise.
2590         (LABEL_CHANGED): Likewise.
2591         (LABEL_RETURN_LABEL): Likewise.
2592         (LABEL_RETURN_TYPE_STATE): Likewise.
2593         (LABEL_RETURN_LABELS): Likewise.
2594         (RETURN_MAP_ADJUSTED): Likewise.
2595         (LABEL_PENDING_CHAIN): Likewise.
2596
2597 2005-08-15  Tom Tromey  <tromey@redhat.com>
2598
2599         * Make-lang.in (JAVA_OBJS): Removed verify.o
2600         (java/verify.o): Removed.
2601         * verify.c: Removed.
2602         * lang.c (flag_new_verifier): Removed.
2603         (java_post_options): Updated.
2604         * java-tree.h (flag_new_verifier): Removed.
2605         (verify_jvm_instructions): Removed.
2606         * expr.c (pop_type_0): Assume flag_new_verifier is true.
2607         (build_java_check_indexed_type): Likewise.
2608         (expand_java_arraystore): Likewise.
2609         (expand_java_arrayload): Likewise.
2610         (pop_arguments): Likewise.
2611         (expand_byte_code): Likewise.
2612         (process_jvm_instruction): Likewise.
2613
2614 2005-08-10  Andrew Haley  <aph@redhat.com>
2615
2616         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2617         type mismatches to make legal GIMPLE.
2618
2619 2005-08-10  Robin Green <greenrd@greenrd.org>
2620
2621         PR java/23230:
2622         * parse.y (maybe_use_access_method): Generalize check from
2623         java.lang.Object to any superclass of current_class
2624
2625 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2626
2627         * class.c (build_class_ref): Wrap the primary class type in a
2628         NOP_EXPR.
2629         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2630         primary class type from the NOP_EXPR in which it was placed.
2631
2632 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
2633
2634         * expr.c (expand_load_internal): Fix missing parens in
2635         predicate.
2636
2637 2005-07-28  Andrew Haley  <aph@redhat.com>
2638
2639         * expr.c (expand_load_internal): Convert to destination type.
2640
2641 2005-07-22  Manfred Hollstein  <mh@suse.com>
2642
2643         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2644         (check_constant): Likewise.
2645         (check_wide_constant): Likewise.
2646
2647 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2648
2649         Make CONSTRUCTOR use VEC to store initializers.
2650         * check-init.c (check_init): Update to cope with VEC in
2651         CONSTRUCTOR_ELTS.
2652         * class.c (make_field_value, make_method_value, get_dispatch_table,
2653         make_class_data, emit_symbol_table, emit_catch_table,
2654         emit_assertion_table): Use build_constructor_from_list instead of
2655         build_constructor.
2656         * constants.c (build_constants_constructor): Likewise.
2657         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2658         VEC in CONSTRUCTOR_ELTS.
2659         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2660         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2661         of a TREE_LIST.
2662         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2663         CONSTRUCTOR_ELTS.
2664         * parse.y (build_new_array_init): Use build_constructor_from_list
2665         instead of build_constructor.
2666         (patch_new_array_init): Update to cope with VEC in
2667         CONSTRUCTOR_ELTS.
2668         (array_constructor_check_entry): Likewise.
2669
2670 2005-07-12  Tom Tromey  <tromey@redhat.com>
2671
2672         * jvspec.c (lang_specific_driver): Put filelist_filename first on
2673         command line.
2674
2675 2005-07-12  Tom Tromey  <tromey@redhat.com>
2676
2677         PR java/19674:
2678         * parse-scan.y (interface_member_declaration): Added
2679         empty_statement.
2680
2681 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2682         
2683         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2684         (LABEL_PENDING_CHAIN): Ditto.
2685         (LABEL_PC): Ditto.
2686         (DECL_BIT_INDEX): Ditto.        
2687
2688 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2689
2690         PR java/18119
2691         * parse.y (inner_class_accessible): New function. Logic moved from
2692         check_inner_class_access.
2693         (check_inner_class_access): Use inner_class_accessible.
2694         (resolve_inner_class): Simplify arguments. Create circularity hash
2695         here. Keep looking for classes if we found one that was inaccessible. 
2696         Return the inaccessible class only if there is no other match.
2697         (do_resolve_class): Update for new resolve_inner_class arguments.
2698         Don't create circularity_hash here.
2699
2700 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2701
2702         PR java/21045
2703         * parse.y (add_exception_to_throws): New function.
2704         (purge_unchecked_exceptions): Removed.
2705         (get_constructor_super): Renamed from verify_constructor_super. Now
2706         returns the super constructor after verification.
2707         (java_complete_expand_method): Don't use purge_unchecked_exceptions
2708         or save/restore the exception list.
2709         (check_thrown_exceptions): Add uncaught exceptions in anonymous
2710         class initializers and constructors to the throws clause of the method. 
2711
2712 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
2713
2714         PR java/19674
2715         * parse.y (interface_member_declaration): Allow empty statements in
2716         interface declarations.
2717
2718 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2719
2720         * Makefile.in (parse.o): Adjust dependencies.
2721         * parse.y: Include tree-dump.h.
2722
2723 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2724
2725         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
2726         flag for quoting.
2727
2728 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2729
2730         * parse.y (issue_warning_error_from_context): Call
2731         pp_output_formatted_text to be able to get the buffer.
2732
2733 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
2734
2735         * parse.y (issue_warning_error_from_context): Update for the
2736         renaming of pp_format_text to pp_format.
2737
2738 2005-06-28  Paul Brook  <paul@codesourcery.com>
2739
2740         * decl.c (java_init_decl_processing): Call
2741         default_init_unwind_resume_libfunc.
2742
2743 2005-06-27  Tom Tromey  <tromey@redhat.com>
2744
2745         PR java/21540, PR java/13788:
2746         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2747         fold_constant_for_init.
2748         (patch_binop): Added 'folding' argument.  Updated all callers.
2749         (patch_unaryop) <NOP_EXPR>: New case.
2750         (fold_constant_for_init) <NOP_EXPR>: Likewise.
2751         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2752
2753 2005-06-25  Jan Hubicka  <jh@suse.cz>
2754
2755         * builtins.c (define_builtin): Accept new flags parameter.
2756         (initialize_builtins): Mark the builtins const and nothrow accordingly.
2757
2758 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2759
2760         * all files: Update FSF address in copyright headers.
2761
2762 2005-06-24  Tom Tromey  <tromey@redhat.com>
2763
2764         * verify-impl.c (verify_instructions_0): Correctly handle
2765         situation where PC falls off end.
2766
2767 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2768
2769         PR java/20697
2770         * parse.y (find_most_specific_methods_list): Remove special case for
2771         inner classes.
2772
2773 2005-06-15  Tom Tromey  <tromey@redhat.com>
2774
2775         PR libgcj/21906:
2776         * class.c (make_method_value): Use soft_abstractmethod_node for
2777         abstract method.
2778         * java-tree.h (soft_abstractmethod_node): New define.
2779         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2780         * decl.c (java_init_decl_processing): Initialize
2781         soft_abstractmethod_node.
2782
2783 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
2784
2785         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2786
2787 2005-06-13  Per Bothner  <per@bothner.com>
2788
2789         * expr.c (int highest_label_pc_this_method,
2790         start_label_pc_this_method): New globals.
2791         (lookup_label): Add start_label_pc_this_method to pc for label, and
2792         update highest_label_pc_this_method.  This prevents conflicts between
2793         labels from different methods.
2794         * java-tree.h: Declare new globals.
2795         * jcf-parse.c (parse_class_file): If needed bump
2796         start_label_pc_this_method and reset highest_label_pc_this_method.
2797
2798 2005-06-13  Tom Tromey  <tromey@redhat.com>
2799
2800         PR java/21844:
2801         * parse.y (nested_field_access_p): Handle case where outer field
2802         is inherited by enclosing class.
2803
2804 2005-06-12  Per Bothner  <per@bothner.com>
2805
2806         * class.c (inherits_from_p): Do load_class if needed.
2807
2808 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2809
2810         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2811         * java-tree.h (parse_error_context): Move...
2812         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2813         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2814         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2815
2816 2005-06-08  Roger Sayle  <roger@eyesopen.com>
2817
2818         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2819
2820 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
2821
2822         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2823         msgid for argument name.
2824         * gjavah.c (error): Likewise.
2825         * java-tree.h (parse_error_context): Likewise.
2826         * parse.y (parse_error_context, parse_warning_context,
2827         issue_warning_error_from_context): Likewise.
2828
2829 2005-06-01  Tom Tromey  <tromey@redhat.com>
2830
2831         PR java/21722:
2832         * class.c (build_static_field_ref): Don't fold constant fields if
2833         current class is from a .class file and we're using indirect
2834         dispatch.
2835
2836 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2837
2838         * java/verify-glue.c: Don't include errors.h and include toplev.h.
2839         * java/Make-lang.in: Updates dependencies.
2840
2841 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
2842
2843         PR java/19870.
2844         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2845         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2846         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2847         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2848         * jcf-write.c (generate_classfile): Use
2849         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2850         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2851         * parse.y (build_outer_field_access): Rename to
2852         build_nested_field_access. Support static fields and outer-to-inner
2853         class accesses.
2854         (outer_field_access_p): Rename to nested_field_access_p. Support
2855         static fields and generalise to outer-to-inner class and sibling
2856         inner class accesses.
2857         (outer_field_expanded_access_p): Rename to
2858         nested_field_expanded_access_p and support static fields.
2859         (outer_field_access_fix): Rename to nested_field_access_fix and
2860         support static fields.
2861         (build_outer_field_access_expr): Rename to
2862         build_nested_field_access_expr and support static fields.
2863         (build_outer_field_access_methods): Rename to
2864         build_nested_field_access_methods and support static fields. For
2865         static fields, generate accessors without class instance parameters.
2866         (build_outer_field_access_method): Rename to
2867         build_nested_field_access_method and support static fields.
2868         (build_outer_method_access_method): Use
2869         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2870         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2871         (resolve_expression_name): Consider static field accesses across
2872         nested classes.
2873         (resolve_qualified_expression_name): Likewise.
2874         (java_complete_lhs): Use nested_field_access_fix instead of
2875         outer_field_access_fix.
2876         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2877         Use nested_field_expanded_access_p instead of
2878         outer_field_expanded_access_p. Use nested_field_access_fix instead
2879         of outer_field_access_fix.
2880         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2881         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2882
2883 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2884
2885         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2886         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2887         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2888         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2889         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2890         (parse_version): Calculate version ID using new method. Use bit-flags
2891         for flag_indirect_dispatch and flag_bootstrap_classes.
2892
2893 2005-05-25  Richard Henderson  <rth@redhat.com>
2894
2895         PR libgcj/21692
2896         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2897         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2898         DECL_CONTEXT; avoid pushdecl_top_level.
2899         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2900         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2901         (layout_class_method): Likewise.
2902         * decl.c (java_mark_cni_decl_local): New.
2903         (java_mark_class_local): Use it.
2904         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2905         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2906         (struct lang_decl_func): Add local_cni;
2907         (struct lang_decl_var): Add class_field, vtable.
2908         (java_mangle_decl): Declare.
2909         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2910         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2911         (mangle_obstack_1): New.
2912         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2913         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2914         lhd_set_decl_assembler_name for things that don't need mangling.
2915         (mangle_class_field): Rename from java_mangle_class_field, make
2916         static, don't call init_mangling or finish_mangling.
2917         (mangle_vtable): Similarly.
2918         (mangle_local_cni_method_decl): New.
2919         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2920         gcc_assert, and MANGLE_RAW_STRING.
2921         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2922
2923 2005-05-25  DJ Delorie  <dj@redhat.com>
2924
2925         * class.c (set_constant_value): Move warning control from if() to
2926         warning(OPT_*).
2927
2928 2005-05-24  Richard Henderson  <rth@redhat.com>
2929
2930         * builtins.c (define_builtin): Don't call make_decl_rtl.
2931         * constants.c (build_constant_data_ref): Likewise.
2932         * class.c (build_utf8_ref): Likewise.
2933         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2934         (get_dispatch_table, layout_class_method): Likewise.
2935         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2936         by hand.
2937         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2938         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2939         to determine if we need a non-zero address.
2940         * decl.c (builtin_function): Don't call make_decl_rtl.
2941         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2942         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2943         * resource.c (compile_resource_data): Likewise.
2944         * parse.y (resolve_field_access): Re-word comment to avoid
2945         building DECL_RTL.
2946
2947 2005-05-24  Richard Henderson  <rth@redhat.com>
2948
2949         * class.c (registered_class): Take it out of class_roots; turn into
2950         a vec of trees.
2951         (register_class): Make static.  Don't duplicate decl node.  Use
2952         VEC_safe_push.
2953         (emit_register_classes): Use VEC_iterate.  Use output_constant
2954         instead of assemble_integer.  Don't call mark_decl_referenced
2955         directly.
2956         * java-tree.h (register_class): Remove decl.
2957
2958 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2959
2960         PR java/17845
2961
2962         * parse.y (register_package, package_list): Remove.
2963         (package_declaration): Do not call register_package.
2964         (do_resolve_class): Do not use package_list.
2965
2966 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2967
2968         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2969         unused variable.
2970
2971 2005-05-15  Tom Tromey  <tromey@redhat.com>
2972
2973         PR java/21519:
2974         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2975         NOTE_PUSH.
2976
2977 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2978
2979         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2980
2981 2005-05-11  Tom Tromey  <tromey@redhat.com>
2982
2983         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2984         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2985         (parse_version): Use it.
2986         * lang.opt (-fbootstrap-classes): New option.
2987
2988 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
2989
2990         PR java/21436
2991         * class.c (maybe_layout_super_class): Look for imports in this_class.
2992         * parse.h (ctxp_for_generation_last): New.
2993         (do_resolve_class): Add a parameter.
2994         * parse.y (ctxp_for_generation_last): New.
2995         (java_pop_parser_context): Add at end of list.
2996         (find_in_imports, find_in_imports_on_demand): Look in ctxp
2997         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
2998         the given type are NULL.
2999         (do_resolve_class): Look into the imports of the new second parameter.
3000         Adjust recursive calls.
3001         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3002         calls to do_resolve_class.
3003         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3004         (java_complete_class): Do not do that here.
3005
3006 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3007
3008         PR java/20309
3009         * Make-lang.in (java): Add gjnih.
3010         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3011         (GJNIH_OBJS): New variable.
3012         (gjnih$(exeext)): New target.
3013         (JAVA_MANFILES): Add gjnih.1.
3014         (java.uninstall): Add gjnih.1.
3015         (java.mostlyclean): Add gjnih.
3016         (java.maintainer-clean): Add gjnih.1.
3017         (java/gjavah-jni.o): New target.
3018         (.INTERMEDIATE): Add gjnih.pod.
3019         (gjnih.pod): New target.
3020         * config-lang.in (stagestuff): Add gjnih.
3021         * gcj.texi (Top): Add gjnih node.
3022         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3023         -bootclasspath options.
3024         (Invoking gjnih): New node.
3025         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3026         (TOOLNAME): New macro.
3027         (error): Replace hard-coded gcjh with TOOLNAME.
3028         (process_file): Likewise.
3029         (usage): Likewise.
3030         (version): Likewise.
3031         (help): Likewise.  Add help output for -force, -old, -trace and -J
3032         options.
3033         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3034         (options): Add force, old, trace and J fields.
3035         (main): Handle -force, -old, -trace and -J options.
3036
3037 2005-05-03  Tom Tromey  <tromey@redhat.com>
3038
3039         PR java/21245:
3040         * gjavah.c (main): Unlink output file on error.
3041
3042 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3043
3044         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3045         copyright.
3046
3047 2005-04-29  Tom Tromey  <tromey@redhat.com>
3048
3049         * expr.c (build_jni_stub): Updated for change to build_block.
3050
3051 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3052
3053         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3054
3055 2005-04-28  Andrew Haley  <aph@redhat.com>
3056
3057         PR java/19285
3058         * java-tree.h (soft_resolvepoolentry_node): New.
3059         (alloc_constant_fieldref): Declare.
3060         * expr.c (expand_java_field_op): Don't call class_init for
3061         accesses to static fields with indirect dispatch.
3062         * builtins.c (initialize_builtins): Add "__builtin_expect".
3063         * decl.c (soft_resolvepoolentry_node): New variable.
3064         (java_init_decl_processing): Create a decl for
3065         "_Jv_ResolvePoolEntry".
3066         * class.c (build_fieldref_cache_entry): New function.
3067         (build_static_field_ref): Rewrite for indirect dispatch.
3068         * constants.c (find_name_and_type_constant_tree): New function.
3069         (alloc_constant_fieldref): Likewise.
3070         (build_constants_constructor): Handle CONSTANT_Fieldref and
3071         CONSTANT_NameAndType.
3072
3073         PR java/21115
3074         * expr.c (force_evaluation_order): Convert outgoing args smaller
3075         than integer.
3076
3077 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3078
3079         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3080         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
3081         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3082
3083 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3084
3085         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3086         to `unlock_stream' with `unlock_std_streams'.
3087
3088 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3089
3090         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3091         instead of just expr.h.
3092
3093 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3094
3095         * gjavah.c (main): Unlock the stdio streams.
3096         * jcf-dump.c (main): Likewise.
3097         * jv-scan.c (main): Likewise.
3098         * jvgenmain.c (main): Likewise.
3099
3100 2005-04-23  DJ Delorie  <dj@redhat.com>
3101
3102         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3103         parse.y: Adjust warning() callers.
3104
3105 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
3106
3107         * gcj.texi (Object fields): Change "Integer" to "Int" in example
3108         contructor.
3109
3110 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3111
3112         * gcj.texi: Fix typos and bogus example.
3113
3114 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
3115
3116         * except.c: Fix a comment typo.
3117
3118 2005-04-19  Julian Brown  <julian@codesourcery.com>
3119
3120         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3121         indirect dispatch with PIC.
3122
3123 2005-04-18  Andrew Haley  <aph@redhat.com>
3124
3125         * java-except.h (struct eh_range.handler): Remove unused field.
3126         (handle_nested_ranges): Remove function declaration.
3127         (sanity_check_exception_range): Add function declaration.       
3128         * verify.c (verify_jvm_instructions): Remove call to
3129         handle_nested_ranges.
3130         * verify-glue.c (verify_jvm_instructions_new): Call
3131         sanity_check_exception_range.
3132         * except.c (link_handler, eh_range_freelist, link_handler,
3133         handle_nested_ranges): Remove.
3134         (add_handler): Rewrite.
3135         (sanity_check_exception_range): New function.
3136         (print_ranges): New function.
3137
3138 2005-04-13  Julian Brown  <julian@codesourcery.com>
3139
3140         * decl.c (finish_method): Give methods once-only linkage.
3141
3142 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
3143
3144         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3145
3146 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3147
3148         * java-tree.h: Don't use PARAMS().
3149
3150 2005-04-07  Per Bothner  <per@bothner.com>
3151
3152         * class.c (push_class): By default, suppress debug output.
3153         (finish_class): Enable debug output for classes we're emitting.
3154
3155 2005-04-07  Andrew Haley  <aph@redhat.com>
3156
3157         * gcj.texi: Correct gcj-dbtool instructions.
3158
3159 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
3160
3161         * gcj.texi: Fix a typo.
3162         * lang.c: Fix a comment typo.
3163
3164 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
3165
3166         * gcj.texi (Invoking gij): Add descriptions of new -X options.
3167         Mention recognized-and-ignored compatibility options.
3168         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3169         JvFree.
3170         (About CNI): Add Memory allocation section.
3171
3172 2005-04-01  Tom Tromey  <tromey@redhat.com>
3173
3174         * decl.c (java_init_decl_processing): Fix types of
3175         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3176         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3177         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3178
3179 2005-03-31  Jan Hubicka  <jh@suse.cz>
3180
3181         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3182         * class.c: Include cgraph.h
3183         (make_local_functoin_alias): Mark aslias as needed.
3184         * resource.c: Include cgraph.h
3185         (compile_resource_data): Go via cgraph interface.
3186
3187 2005-03-30  Ian Lance Taylor  <ian@airs.com>
3188
3189         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3190
3191 2005-03-30  Tom Tromey  <tromey@redhat.com>
3192
3193         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3194         inner_class_info_index==0 or outer_class_info_index==0.
3195
3196 2005-03-29  Tom Tromey  <tromey@redhat.com>
3197
3198         * gcj.texi (libgcj Runtime Properties): Document
3199         gnu.gcj.runtime.endorsed.dirs.
3200
3201 2005-03-24  Anthony Green  <green@redhat.com>
3202
3203         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3204         'gcj-dbtool -p'.
3205
3206 2005-03-23  Tom Tromey  <tromey@redhat.com>
3207
3208         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3209         (parse_version): Use it.
3210
3211 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3212
3213         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3214
3215 2005-03-18  Andrew Haley  <aph@redhat.com>
3216
3217         PR java/20522
3218         * decl.c (update_aliases): Don't update variables that are about
3219         to die.
3220         (maybe_poplevels): Add comment.
3221
3222 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
3223
3224         PR java/20502
3225         * jcf-parse.c (duplicate_class_warning): New function.
3226         (java_parse_file): Call duplicate_class_warning if 
3227         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3228         (parse_zip_file_entries): Likewise. Also set
3229         CLASS_FROM_CURRENTLY_COMPILED_P.
3230
3231 2005-03-16  Andrew Haley  <aph@redhat.com>
3232
3233         * expr.c (expand_java_arrayload): Don't generate a
3234         NullPointerException based on the type of the node.
3235         (build_java_array_length_access): Likewise.
3236
3237 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
3238
3239         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3240
3241 2005-03-11  Tom Tromey  <tromey@redhat.com>
3242
3243         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3244         (libgcj Runtime Properties): Document the default .db.
3245
3246 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3247
3248         PR java/20312
3249         * parse.y (checks_throws_clauses): Check exceptions list even when
3250         the base class does not come from a source file being compiled.
3251         (java_complete_lhs): Remove unused variable 'wfl'.
3252
3253 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
3254
3255         PR java/20338
3256         * decl.c (finish_method): Emit _Jv_InitClass for private static
3257         methods inside inner classes as well.
3258
3259 2005-03-08  Julian Brown  <julian@codesourcery.com>
3260         * Revert patch from 2005-03-08 for causing bootstrap failure on
3261         ppc-darwin.
3262
3263 2005-03-08  Julian Brown  <julian@codesourcery.com>
3264
3265         * decl.c (finish_method): Give methods once-only linkage.
3266
3267 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3268
3269         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3270
3271 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
3272
3273         * verify-glue.c (vfy_is_assignable_from): Perform static check using
3274         can_widen_reference_to if the C++ ABI is in use.
3275         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3276         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3277         type_isresolved, init_state, set_pc, state_get_pc,
3278         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3279         (verify_fail): Report the current PC from the verifier context.
3280         (free_state): Remove #if 0 block to enable this function.
3281         (free_verifier_context): Call free_state on state_list iterator
3282         values before freeing them.
3283         * expr.c (pop_type_0): Pop correct type for error message when stack
3284         contains a multi-word type.
3285
3286 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3287
3288         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3289         for known NULL array length access.
3290
3291 2005-03-07  Tom Tromey  <tromey@redhat.com>
3292
3293         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3294
3295 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
3296
3297         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3298         typeck.c: Update copyright.
3299
3300 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
3301
3302         Remove xref code.
3303         * xref.c, xref.h: Remove file.
3304         * Make-lang.in (java/xref.o): Remove.
3305         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3306         * lang.c (flag_emit_xref): Remove definition.
3307         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3308         * typeck.c (convert): Remove use of do_not_fold.
3309         * parse.y (do_not_fold): Remove definition.
3310         (parser grammar): Remove xref code.
3311         (maybe_create_class_interface_decl, create_class): Likewise.
3312         (register_fields, method_header, finish_method_declaration): Likewise.
3313         (declare_local_variables, source_end_java_method): Likewise.
3314         (java_complete_expand_classes): Do not set do_not_fold.
3315         (java_complete_expand_method): Remove xref code.
3316         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3317         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3318         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3319         (patch_synchronized_statement, patch_throw_statement): Likewise.
3320         (maybe_build_class_init_for_field): Likewise.
3321
3322 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
3323
3324         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3325         instead of IS_NON_TYPE_CODE_CLASS.
3326
3327 2005-03-04  Andrew Haley  <aph@redhat.com>
3328
3329         PR java/18362
3330         * class.c (set_method_index): Don't set method_index if it is
3331         NULL_TREE.
3332         (layout_class_method): Don't complain about "non-static method foo
3333         overrides static method" in the case of indirect dispatch.
3334
3335 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3336
3337         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3338         warning.
3339         * Make-lang.in: Don't elide warnings in jcf-io.c.
3340
3341 2005-03-01  Per Bothner  <per@bothner.com>
3342
3343         PR java/8608
3344         * check-init.c (wfl): Remove static.
3345         (final_assign_error, check_init): Replace calls to parse_error_context
3346         by plain error.
3347         (check_init): Save, set, and restore input_location for each exp.
3348
3349 2005-03-01  Per Bothner  <per@bothner.com>
3350
3351         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3352         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3353         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3354
3355 2005-03-01  Per Bothner  <per@bothner.com>
3356
3357         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3358
3359 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3360
3361         PR libgcj/16923
3362         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3363         JvVMOption.
3364
3365 2005-02-22  Tom Tromey  <tromey@redhat.com>
3366
3367         PR java/20056:
3368         * verify-impl.c (EITHER): New define.
3369         (types_compatible): Handle it.
3370         (check_field_constant): Use it.
3371
3372 2005-02-18  Tom Tromey  <tromey@redhat.com>
3373
3374         PR java/20056:
3375         * verify-impl.c (types_equal): Fixed test.
3376
3377         PR java/20056:
3378         * verify-glue.c (vfy_class_has_field): New function.
3379         * verify.h (vfy_class_has_field): Declare.
3380         * verify-impl.c (check_field_constant): Added 'putfield'
3381         argument.
3382         (verify_instructions_0): Updated.
3383         (types_equal): New function.
3384
3385 2005-02-14  Tom Tromey  <tromey@redhat.com>
3386
3387         PR java/19921:
3388         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3389         stack effect of multianewarray.
3390
3391 2005-02-14  Andrew Haley  <aph@redhat.com>
3392
3393         PR java/19907
3394         * expr.c (expand_byte_code): Call promote_arguments().
3395         (promote_arguments): New function.
3396         * decl.c (check_local_unnamed_variable): Remove special case for
3397         new verifier.
3398         (find_local_variable): Promote all boolean types to int
3399         when searching for local variable decls.
3400
3401 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
3402
3403         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3404         parse-scan.y: Update copyright.
3405
3406 2005-02-11  Per Bothner  <per@bothner.com>
3407
3408         PR java/15543
3409         * parse-scan.y (input_location): Remove variable.
3410         (main_input_filename): New - replaces input_filename, which isn't
3411         settable if USE_MAPPED_LOCATION.
3412         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3413         so we don't reference input_location or wfl_operator in that case.
3414         * jv-scan.c (expand_location): Remove - no longer used.
3415         (main): Set main_input_filename rather than input_filename.
3416
3417 2005-02-09  Richard Henderson  <rth@redhat.com>
3418
3419         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3420         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3421
3422 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
3423
3424         * expr.c (add_type_assertion): Use the proper enumeration type,
3425         since this is what htab_find_slot() is expecting.
3426
3427 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
3428
3429         * gcj.texi: Update copyright dates.
3430
3431 2005-02-02  Tom Tromey  <tromey@redhat.com>
3432
3433         * gcj.texi (libgcj Runtime Properties): Default library_control
3434         to 'cache'.
3435
3436 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
3437
3438         PR java/15543
3439         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3440         (modifiers) when square brackets are present in a declaration for
3441         a final paramter.
3442         * jv-scan.c (main): Set input_filename and input_line.
3443
3444 2005-02-01  Tom Tromey  <tromey@redhat.com>
3445
3446         PR java/19742:
3447         * gjavah.c (get_field_name): Don't override name for JNI header.
3448
3449 2005-02-01  Roger Sayle  <roger@eyesopen.com>
3450
3451         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3452         of unsigned types using iushr and lushr JVM bytecodes.
3453
3454 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3455
3456         PR java/19738
3457         * gjavah.c (jni_print_float): Do not emit floating-point
3458         initialiser for a static final field.
3459         (jni_print_double): Likewise.
3460
3461 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
3462
3463         Revert:
3464         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3465         * gjavah.c (print_field_info): Mark static data members of
3466         floating-point type with "__extension__".
3467
3468 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3469
3470         * gjavah.c (print_field_info): Mark static data members of
3471         floating-point type with "__extension__".
3472
3473 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3474
3475         PR java/9157
3476         * parse.y (build_string_concatenation): Remove redundant if.
3477         (patch_conditional_expr): Attempt to patch_string() the condition
3478         of a ?: as well, in addition to its other operands.
3479
3480 2005-01-25  Tom Tromey  <tromey@redhat.com>
3481
3482         * Make-lang.in (java/java-tree-inline.o): Removed.
3483
3484 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
3485
3486         PR java/19070
3487         * parse.y (patch_binop): Allow comparisons against NULL only
3488         if the other operand is of a reference type.
3489
3490 2005-01-24  Tom Tromey  <tromey@redhat.com>
3491
3492         * java-tree.h (gcj_abi_version): Declare.
3493         * class.c (make_class_data): Push gcj_abi_version into "next"
3494         field.  Renamed field.
3495         * decl.c (gcj_abi_version): New global.
3496         (parse_version): New function.
3497         (java_init_decl_processing): Call it.  Renamed 'next' field.
3498         Include version.h.
3499         (GCJ_BINARYCOMPAT_ADDITION): New define.
3500
3501 2005-01-24  Roger Sayle  <roger@eyesopen.com>
3502
3503         PR java/19295
3504         * jcf-write.c (generate_bytecode_insns): Conversions between
3505         integer types of the same precision shouldn't generate widening
3506         or narrowing conversion bytecodes.
3507
3508 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
3509
3510         * java-except.h, java-tree.h: Remove unused prototypes.
3511
3512 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
3513
3514         PR java/18091:
3515         * jcf-write.c (perform_relocations): Don't call memcpy if source
3516         and destination are the same.
3517
3518 2005-01-17  Tom Tromey  <tromey@redhat.com>
3519
3520         * verify-impl.c (get_short): Sign extend.
3521         (get_int): Likewise.
3522
3523 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
3524
3525         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3526         with TYPE_SIZE.
3527
3528 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3529
3530         * verify.c: Revert to the version before the BC-ABI merge.
3531
3532 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3533
3534         PR java/19277
3535         * check-init.c (check_init): Take care of references that do not
3536         have an explicit final variable declaration (e.g. array length
3537         access) for pre/post in/de-crement operators.
3538
3539 2005-01-08  Mark Wielaard  <mark@klomp.org>
3540
3541         * parse.y (process_imports): Allocate (and free) original_name only
3542         when not already defined.
3543         * jcf-parse.c (read_class): Free results of find_class() and
3544         lrealpath().
3545         (java_parse_file): Keep pointer to head of file_list and free when
3546         done. Free result of lrealpath().
3547
3548 2005-01-05  Tom Tromey  <tromey@redhat.com>
3549
3550         * gcj.texi (Standard Properties): java.ext.dirs is now used.
3551
3552 2004-12-20  Andrew Haley  <aph@redhat.com>
3553
3554         * typeck.c: Use fold_convert for ints and booleans.
3555
3556 2004-12-17  Andrew Haley  <aph@redhat.com>
3557
3558         PR java/18931
3559         * typeck.c (convert): Use a CONVERT_EXPR when converting to
3560         BOOLEAN_TYPE or CHAR_TYPE.
3561         (convert_to_boolean, convert_to_char) : Remove.
3562         * convert.h (convert_to_boolean, convert_to_char) : Remove.
3563         * expr.c (expand_load_internal): Do type conversion if type is not
3564         as required.
3565
3566 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
3567
3568         PR target/18459
3569         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3570         Update comment.
3571
3572 2004-12-07  Andrew Haley  <aph@redhat.com>
3573
3574         PR java/18811:
3575         * jcf-parse.c (load_class): Remove sanity test for missing inner
3576         class file.
3577
3578 2004-12-06  Tom Tromey  <tromey@redhat.com>
3579
3580         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3581         (java.uninstall): Likewise.
3582         (java.maintainer-clean): Likewise.
3583         (.INTERMEDIATE): Likewise.
3584         (java.install-man): Likewise.
3585         (gcj-dbtool.pod): New target.
3586         * gcj.texi (Code Generation): Document -findirect-dispatch.
3587         (libgcj Runtime Properties): Document
3588         gnu.gcj.precompiled.db.path.
3589         (Top): Link to "Invoking gcj-dbtool".
3590
3591 2004-12-06  Tom Tromey  <tromey@redhat.com>
3592
3593         PR java/14853:
3594         * java-tree.h (extract_field_decl): Declare.
3595         * parse.y (extract_field_decl): Renamed from
3596         strip_out_static_field_access_decl.  No longer static.
3597         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3598
3599 2004-12-03  Tom Tromey  <tromey@redhat.com>
3600
3601         * lang.c (flag_new_verifier): Define.
3602         (java_post_options): Set flag_new_verifier if indirect dispatch
3603         is being used.
3604         * lang.opt (fnew-verifier): Removed.
3605
3606 2004-12-03  Tom Tromey  <tromey@redhat.com>
3607
3608         PR bootstrap/14614:
3609         * Make-lang.in (java.install-common): Only install transformed
3610         gcjh if gcj-cross exists.
3611
3612 2004-12-03  Andrew Haley  <aph@redhat.com>
3613
3614         PR java/18812
3615         * except.c (link_handler): Patch 'outer' field of siblings of the
3616         range we're demoting.
3617
3618 2004-12-03  Andrew Haley  <aph@redhat.com>
3619
3620         PR java/18697
3621         * class.c (layout_class_method): Don't fail to override a method
3622         simply because it has DECL_ARTIFICIAL set.
3623
3624 2004-12-02  Tom Tromey  <tromey@redhat.com>
3625
3626         PR java/16675:
3627         * parse.y (craft_constructor): Special case null_pointer_node.
3628
3629 2004-12-02  Tom Tromey  <tromey@redhat.com>
3630
3631         PR java/18741:
3632         * java-gimplify.c (java_gimplify_expr): Don't call
3633         SET_EXPR_LOCATION unless wrapped tree is an expression.
3634
3635 2004-11-27  Per Bothner  <per@bothner.com>
3636
3637         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
3638         Fix fencepost error in 'i', which got executed one too many times.
3639         Also, fold memcpy into explicit loop, as originally intended.
3640         Also, free temporary 'buf' which otherwise leaks.
3641
3642 2004-11-27  Per Bothner  <per@bothner.com>
3643
3644         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3645         local static variables if not USE_MAPPED_LOCATION.
3646
3647 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
3648
3649         * class.c, decl.c, expr.c: Fix comment typos.
3650
3651 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
3652
3653         PR java/18305
3654         * decl.c (end_java_method): Call
3655         attach_init_test_initialization_flags on all the init_decls.
3656         * parse.y (attach_init_test_initialization_flags): Move to ...
3657         * expr.c (attach_init_test_initialization_flags): here and
3658         support BIND_EXPR also.
3659         * java-tree.h (attach_init_test_initialization_flags): Prototype.
3660         * jcf-parse.c (parse_class_file): Don't disable class init
3661         optimization.
3662
3663 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
3664
3665         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3666         in diagnostics.
3667
3668 2004-11-24  Richard Henderson  <rth@redhat.com>
3669
3670         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3671         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3672
3673 2004-11-24  Tom Tromey  <tromey@redhat.com>
3674
3675         * verify.c (defer_merging): Don't use C++-style comment.
3676         * verify.h (java_opcode): Added java_opcode_end.
3677         * class.c (build_class_ref): Remove C++ comment and old FIXME.
3678
3679         * verify-impl.c (vfy_push_type): Removed bogus "return".
3680         (initialize_stack): Use vfy_alloc and vfy_free.
3681         (verify_instructions_0): Likewise.
3682
3683         * Merged gcj-abi-2-dev-branch to trunk.
3684
3685 2004-11-24  Andrew Haley  <aph@redhat.com>
3686
3687         * jcf-parse.c (parse_class_file): Set file_start_location.
3688
3689 2004-11-10  Tom Tromey  <tromey@redhat.com>
3690
3691         * class.c (make_field_value): Don't call build_static_field_ref.
3692         (build_static_field_ref): Don't emit direct references when using
3693         indirect dispatch.
3694
3695         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
3696         -verbose:class into man page synopsis.
3697
3698 2004-11-09  Tom Tromey  <tromey@redhat.com>
3699
3700         * expr.c (build_java_arraystore_check): Still generate check if
3701         element type is itself an array.
3702
3703 2004-11-08  Tom Tromey  <tromey@redhat.com>
3704
3705         * java-tree.h (soft_check_assignment_node): Removed.
3706         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3707         * decl.c (java_init_decl_processing): Don't initialize
3708         soft_check_assignment_node.
3709
3710 2004-11-05  Tom Tromey  <tromey@redhat.com>
3711
3712         * class.c (layout_class_methods): Don't add Miranda methods when
3713         using indirect dispatch.
3714
3715 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
3716
3717         * class.c (make_class_data): Call emit_assertion_table to set the
3718         'assertion_table' field.
3719         (build_signature_for_libgcj): Move here from expr.c.
3720         (add_assertion_table_entry): New function. Callback for assertion
3721         hashtable traversal.
3722         (emit_assertion_table): New. Take class argument, and generate
3723         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3724         * decl.c (init_decl_processing): Define assertion_entry_type record.
3725         Push 'assertion_table' class field instead of 'verify'.
3726         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3727         (type_assertion_hash): Include 'assertion_code' in hash.
3728         (add_type_assertion): Rewritten. Take class and assertion_code
3729         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3730         (can_widen_reference_to): Use new add_type_assertion() arguments.
3731         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3732         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3733         (verify_identifier_node): Removed.
3734         (assertion_entry_type, assertion_table_type): New.
3735         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3736         assertion code definitions.
3737         (struct type_assertion): Add assertion_code. Rename 'source_type' and
3738         'target_type' to 'op1' and 'op2'.
3739         (add_type_assertion): Declare.
3740         (lang_printable_name_wls): Remove unused definition.
3741         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3742         to emit runtime assertion.
3743         (vfy_note_stack_type): Clean up non-C90 declarations.
3744         (vfy_note_local_type): Likewise.
3745         * verify.h (vfy_is_assignable_from): Declare.
3746         * verify-impl.c (is_assignable_from_slow): Remove unused function.
3747         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3748         instead of is_assignable_from_slow().
3749         (types_compatible): Reinstate ref_compatible() call.
3750
3751 2004-11-04  Tom Tromey  <tromey@redhat.com>
3752
3753         * class.c (build_static_field_ref): Reverted previous patch.
3754
3755         * class.c (build_static_field_ref): Don't emit direct references
3756         when using indirect dispatch.
3757
3758 2004-11-03  Tom Tromey  <tromey@redhat.com>
3759
3760         * expr.c (expand_java_arrayload): Set lhs_type_node.
3761         (expand_java_arraystore): Set rhs_type_node.
3762
3763 2004-11-02  Tom Tromey  <tromey@redhat.com>
3764
3765         * jcf-parse.c (compute_class_name): Use filename length from zip
3766         directory, not strlen.
3767
3768         * expr.c (expand_invoke): Mark new interface methods as abstract.
3769
3770 2004-11-01  Tom Tromey  <tromey@redhat.com>
3771
3772         * verify-impl.c (push_jump): Removed check for uninitialized
3773         objects.
3774         (push_exception_jump): Likewise.
3775         (handle_ret_insn): Likewise.
3776         (handle_jsr_insn): Likewise.
3777         (state_check_no_uninitialized_objects): Removed.
3778
3779         * decl.c (check_local_unnamed_variable): Recognize
3780         promoted-to-int parameters when using the new verifier.
3781         * expr.c (expand_java_arraystore): Explicitly request array type
3782         when using new verifier.
3783         (expand_java_arrayload): Likewise.
3784         (invoke_build_dtable): Don't pass object_type_node as
3785         expression argument to build_java_indirect_ref.
3786         (build_java_check_indexed_type): Do nothing.
3787         (build_java_arraystore_check): Handle case where array doesn't
3788         have array type.
3789         (build_java_array_length_access): Likewise.
3790         (expand_invoke): Handle case where interface overrides a method
3791         from Object.
3792         (pop_type_0): Always succeed for reference types.
3793         (process_jvm_instruction): Don't pop a value in a dead
3794         exception handler.
3795         (pop_arguments): Convert arguments to correct types.
3796
3797 2004-10-29  Andrew Haley  <aph@redhat.com>
3798
3799         * jcf-parse.c (give_name_to_class): Remove line that was
3800         incorrectly merged.
3801
3802 2004-10-29  Andrew Haley  <aph@redhat.com>
3803
3804         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3805
3806 2004-10-20  Andrew Haley  <aph@redhat.com>
3807
3808         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3809
3810 2004-10-26  Tom Tromey  <tromey@redhat.com>
3811
3812         * verify.h (vfy_notify_verified): Removed.
3813         * verify-glue.c (vfy_notify_verified): Removed.
3814
3815 2004-10-26  Tom Tromey  <tromey@redhat.com>
3816
3817         * verify-impl.c (debug_print_state): Declare `i' before code.
3818         (merge_types): Modify `t' when it is null_type.
3819
3820 2004-10-26  Tom Tromey  <tromey@redhat.com>
3821
3822         * verify-impl.c (type_print): Renamed from print.  Now static and
3823         takes an argument.
3824         (debug_print_state): Use type_print.
3825
3826 2004-10-25  Tom Tromey  <tromey@redhat.com>
3827
3828         * expr.c (build_invokeinterface): Compute correct offset for
3829         index into interface methods.
3830
3831 2004-10-20  Tom Tromey  <tromey@redhat.com>
3832
3833         * java-tree.h (verify_jvm_instructions_new): Declare.
3834
3835         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3836         command line.
3837
3838         * verify-impl.c (verify_instructions): Correctly handle wide
3839         types on the stack.
3840         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3841         (vfy_get_component_type): Strip pointer types.
3842         (vfy_find_class): Use get_type_from_signature.  Strip pointer
3843         types.
3844         Include java-except.h.
3845
3846 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3847
3848         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3849         vfy_push_type_t, set_variable, add_new_state, merge_into,
3850         handle_jsr_insn, branch_prepass, check_class_constant,
3851         check_wide_constant, get_one_type, compute_static_types,
3852         verify_instructions_0): Clean up C99 declarations after statements.
3853
3854 2004-10-20  Tom Tromey  <tromey@redhat.com>
3855
3856         * verify-impl.c (merge_refs): Compare reference against iterator,
3857         not ref2.
3858
3859         * verify-glue.c (vfy_tag): Mask off resolved flag.
3860
3861 2004-10-19  Tom Tromey  <tromey@redhat.com>
3862
3863         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3864         (init_state_with_stack): Initialize `this_type' in state.
3865         (verify_method): Use debug_print.
3866         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3867         (vfy_note_stack_depth): Reverted last patch.
3868         (vfy_note_stack_type): Note pointer to Object, not Object.
3869         (vfy_note_local_type): Likewise.
3870
3871         * verify.h (vfy_note_instruction_seen): Declare.
3872         * verify-glue.c (verify_jvm_instructions_new): Set
3873         BCODE_EXCEPTION_TARGET on target instruction.
3874         (vfy_note_instruction_seen): New function.
3875         * verify-impl.c (FLAG_INSN_SEEN): New define.
3876         (verify_instructions_0): Set flag on instruction.  Save state for
3877         PC=0 later.
3878         (verify_instructions): Call vfy_note_instruction_seen.
3879
3880         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3881         (verify_jvm_instructions_new): Call method_init_exceptions,
3882         add_handler, and handle_nested_ranges.
3883         * verify-impl.c (verify_method): Return 1 on success.
3884         (verify_instructions_0): Save the state at PC=0.
3885
3886         * verify-impl.c (init_type_from_class): Set is_resolved and
3887         ref_next on new ref_intersection.
3888         (init_type_from_string): Likewise.
3889
3890 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3891
3892         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3893         if flag_new_verifier is set.
3894         * java-tree.h (flag_new_verifier): Declare.
3895         * lang.opt (fnew-verifier): New option.
3896         * verify-impl.c: Work around namespace pollution by undef'ing
3897         'current_class'.
3898         (struct verifier_context): Make 'bytecode' const.
3899         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3900         (types_compatible): For the BC-ABI, always consider reference types
3901         compatible.
3902         (check_class_constant): Use vfr->current_class.
3903         (check_constant): Likewise.
3904         (check_wide_constant): Likewise.
3905         (check_field_constant): Check for 'L' at start of type name.
3906         (get_one_type): Return pointer instead of type. Set type result in
3907         caller via passed type pointer.
3908         (compute_argument_types): Update to use new get_one_type arguments.
3909         (compute_return_type): Likewise.
3910         (make_verifier_context): New. Allocate and initialize 'vfr'.
3911         (free_verifier_context): New. Free 'vfr' and its contents.
3912         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3913         and free_verifier_context.
3914
3915 2004-10-15  Tom Tromey  <tromey@redhat.com>
3916
3917         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3918         * verify.h (vfy_fail): Fixed formatting.
3919
3920         * verify-impl.c (vfr): Fixed comment formatting.
3921         (collapse_type): New function.
3922         (verify_instructions): Notify compiler about type map.
3923         * verify.h (vfy_note_stack_depth): Updated.
3924         (vfy_note_stack_type): Likewise.
3925         (vfy_note_local_type): Likewise.
3926         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3927         Declare.
3928         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3929         state.  Added `method' argument.
3930         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3931         argument.
3932         (vfy_note_local_type): New function.
3933         (vfy_unsuitable_type): Likewise.
3934         (vfy_return_address_type): Likewise.
3935         (vfy_null_type): Likewise.
3936
3937         * verify.h (VFY_IN_GCC): Removed.
3938         (VFY_WANT_TYPEMAP): Removed.
3939         * verify-impl.c (verify_instructions_0): Removed useless "\".
3940         (struct state) <next>: Uncomment.
3941
3942 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3943
3944         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3945         C-style.
3946
3947 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3948
3949         * Make-lang.in (verify.o): Re-enabled this target.
3950         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3951         (vfy_get_interface): Likewise.
3952         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3953         * verify.h (verify_jvm_instructions_new): Declare.
3954         * verify-impl.c (free_state): Temporarily comment out unused
3955         function.
3956
3957 2004-10-06  Tom Tromey  <tromey@redhat.com>
3958
3959         * java-tree.h (JV_STATE_READ): New enum value.
3960
3961 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3962
3963         * verify.h: New file.
3964
3965 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3966
3967         * verify-impl.c, verify-glue.c, verify.h: New files.
3968         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3969
3970 2004-09-24  Andrew Haley  <aph@redhat.com>
3971
3972         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3973         for a slot if it's of pointer type.
3974
3975 2004-09-14  Tom Tromey  <tromey@redhat.com>
3976
3977         * class.c (make_class_data): Correctly initialize "state" field.
3978         Initialize "engine" field.
3979         * decl.c (java_init_decl_processing): Add "engine" field.
3980
3981 2004-09-10  Andrew Haley  <aph@redhat.com>
3982
3983         PR java/12760
3984         * expr.c (build_invokeinterface): Use fast method for interface
3985         dispatch.
3986         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
3987         JTI_ITABLE_PTR_TYPE.
3988         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
3989         (emit_symbol_table): Add new arg, element_size.
3990         * decl.c (java_init_decl_processing): Initialize Class.itable.
3991         * class.c (GEN_TABLE): New macro.
3992         (gen_indirect_dispatch_tables): Use it.  Add itable.
3993         (make_class_data): Add new arg for emit_symbol_table().
3994         Emit itable.
3995         (add_miranda_methods): Make sure search_class has been parsed.
3996         (emit_symbol_table): Add new arg, element_size.
3997
3998 2004-09-06  Andrew Haley  <aph@redhat.com>
3999
4000         * verify.c (merge_types): Return Object for all merges of
4001         interfaces.
4002         * expr.c (add_type_assertion): Don't generate assertions when
4003         source type is array of Object.
4004
4005 2004-09-03  Andrew Haley  <aph@redhat.com>
4006
4007         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4008
4009         * lang.c (java_post_options): Force flag_verify_invocations if
4010         we're not using indirect dispatch.
4011
4012         * expr.c (pop_type_0): Move test for interfaces before call to
4013         can_widen_reference_to().
4014         (build_signature_for_libgcj): Remove generation of canonical array
4015         type.
4016         (add_type_assertion): Canonicalize both arrays.
4017         Don't assert that type X can be assigned to Object.
4018         Don't assert that type X an be assigned to type X.
4019         Don't assert that Object can be assigned to type X.
4020         (can_widen_reference_to): Warn whenever we generate an assertion.
4021         (process_jvm_instruction): Use throwable_type_node for the type of
4022         an exception class.
4023
4024 2004-09-01  Andrew Haley  <aph@redhat.com>
4025
4026         * decl.c (java_init_decl_processing): Change
4027         verify_identifier_node to "__verify".
4028         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4029         * java-tree.h (verify_identifier_node): Change to "__verify".
4030
4031         * expr.c (build_signature_for_libgcj): New function.
4032         (add_type_assertion): Use it to construct signatures for
4033         source_type and target_type.
4034
4035 2004-08-27  Andrew Haley  <aph@redhat.com>
4036
4037         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4038         (verify_identifier_node): New.
4039         (TYPE_VERIFY_METHOD): New.
4040         (struct type_assertion): New type.
4041         * expr.c (type_assertion_eq): New function.
4042         (type_assertion_hash): New function.
4043         (add_type_assertion): New function.
4044         (can_widen_reference_to): Call add_type_assertion().
4045         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4046         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4047         (finish_class): Output TYPE_VERIFY_METHOD (type).
4048
4049         * decl.c (end_java_method): Nullify unused fields.
4050
4051 2004-08-17  Andrew Haley  <aph@redhat.com>
4052
4053         * verify.c (defer_merging): Quieten.
4054         * jcf-parse.c (load_class): Only try to open a class file if it's
4055         java.lang.Object or if it's part of the current compilation.
4056         Check that the class we just tried to load is the class we just
4057         loaded.  Quieten.
4058         (java_parse_file): Set flag_verify_invocations off if we're
4059         compiling from .class.
4060         (parse_zip_file_entries): Abort if we try to read a dummy class.
4061         * expr.c (can_widen_reference_to): Quieten.
4062         (build_invokevirtual): Abort if we try to invokevirtual an
4063         interface.
4064         (expand_invoke): Don't build a non-interface call to an interface.
4065         (build_instanceof): Don't do premature optimization if
4066         flag_verify_invocations is not set.
4067         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4068         from superclass.
4069         (build_static_field_ref): Add correct type conversion for
4070         field_address.
4071         (add_miranda_methods): Disable generation of Miranda methods for
4072         dummy classes.
4073         (layout_class_method): Don't complain about non-static method
4074         overrides static method with dummy classes.
4075
4076 2004-08-13  Tom Tromey  <tromey@redhat.com>
4077
4078         * class.c (build_static_field_ref): Re-enable atable lookups for
4079         static fields.
4080
4081         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4082
4083 2004-08-11  Tom Tromey  <tromey@redhat.com>
4084
4085         * gcj.texi (libgcj Runtime Properties): Document new properties.
4086
4087 2004-08-06  Andrew Haley  <aph@redhat.com>
4088
4089         * jcf-parse.c (load_class): Check that we really have loaded the
4090         class we're looking for.
4091
4092 2004-07-19  Andrew Haley  <aph@redhat.com>
4093
4094         * verify.c (verify_jvm_instructions): Comment change only.
4095
4096         * typeck.c (build_java_array_type): Add size field to array name.
4097
4098         * java-tree.h (LOCAL_SLOT_P): New.
4099         (update_aliases): Add PC argument.
4100         (pushdecl_function_level): New function.
4101
4102         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4103         MODIFY_EXPR, and SAVE_EXPR.
4104         (java_gimplify_modify_expr): New function.
4105
4106         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4107         (expand_iinc): Pass PC to update_aliases().
4108         (STORE_INTERNAL): Likewise.
4109         (process_jvm_instruction): Likewise.
4110
4111         * decl.c (base_decl_map): New variable.
4112         (uniq): New variable.
4113         (update_aliases): Rewrite with more thorough checking.
4114         (debug_variable_p): New function.
4115         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4116         (check_local_named_variable): Delete whole function.
4117         (initialize_local_variable): New function.
4118         (check_local_unnamed_variable): Add checks and comments.
4119         (find_local_variable): Rewrite.
4120         (java_replace_reference): New function.
4121         (function_binding_level): New variable.
4122         (pushdecl_function_level): New function.
4123         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4124         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4125         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4126         function_binding_level.
4127         (end_java_method): Null unused fields to save memory.
4128
4129 2004-06-29  Andrew Haley  <aph@redhat.com>
4130
4131         * except.c (expand_start_java_handler): Push a new binding level.
4132         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4133         register_exception_range() to register where we'll do it.
4134         (expand_end_java_handler): Remove old bogus code.  Replace with
4135         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4136         the top of the expression we're curently building.
4137         (maybe_end_try): Delete.
4138         * decl.c (binding_level.exception_range): New field.
4139         (clear_binding_level): Add field exception_range.  Reformat.
4140         (poplevel): Call expand_end_java_handler().
4141         (poplevel): Call java_add_stmt only if functionbody is false.
4142         (maybe_poplevels): Don't call maybe_end_try() from here.
4143         (end_java_method): Clear no longer used trees in function decl.
4144         (register_exception_range): New function.
4145         * java-tree.h (register_exception_range, struct eh_range): Declare.
4146
4147 2004-06-22  Andrew Haley  <aph@redhat.com>
4148
4149         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4150         the otable.
4151         * check-init.c (get_variable_decl): Teach check-init about
4152         FIELD_DECLs addressed via the otable.
4153         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4154         CLASS_PARSED_P.
4155
4156 2004-05-28  Andrew Haley  <aph@redhat.com>
4157
4158         * jcf-parse.c (load_class): Don't try to read a class that we've
4159         already read.
4160
4161         * expr.c (build_invokeinterface): Use the old-fashioned way of
4162         doing indirect dispatch: look up interfaces by name.
4163         * java-tree.h (enum java_tree_index): Add
4164         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4165         * decl.c (java_init_decl_processing): Add
4166         soft_lookupinterfacemethodbyname_node.
4167
4168         * gjavah.c (print_method_info): Final methods have vtable entries,
4169         so gjavah needs to output them.
4170         * class.c (layout_class_method): Generate vtable entries for final
4171         methods.
4172         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4173         dispatch, even if a method is final.
4174
4175 2004-05-25  Andrew Haley  <aph@redhat.com>
4176
4177         * class.c (build_symbol_entry): Convert the names of constructors
4178         to init_identifier_node when generating an entry for the indirect
4179         dispatch table.
4180
4181         * expr.c (build_known_method_ref): Generate indirect calls for
4182         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4183
4184 2004-05-24  Andrew Haley  <aph@redhat.com>
4185
4186         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4187         atable element is of the right type.
4188
4189         * class.c (build_static_field_ref): Cast pointer to correct type
4190         for field.
4191
4192 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4193
4194         * Merged with HEAD as of 20040514. Diff against
4195         gcj-abi-2-merge-20040514.
4196
4197 2004-04-16  Andrew Haley  <aph@redhat.com>
4198
4199         * verify.c (check_pending_block): Disable subroutine checks.
4200         (defer_merging): New function.
4201         (merge_types): If types are dummy, use defer_merging to combine them.
4202         (verify_jvm_instructions): If invocation is invokeinterface and
4203         target is dummy, assume target really is an interface.
4204
4205         * parse.y (patch_invoke): Break out call to java_create_object.
4206
4207         * lang.c (flag_verify_invocations): New.
4208
4209         * jcf-parse.c (load_class): If we've already failed to load a
4210         class, don't try again.
4211         (load_class): If we can't find a .class file, don't fail, but emit
4212         a warning.
4213         (parse_class_file): Don't act on dummy methods.
4214
4215         * java-tree.h (flag_verify_invocations): New.
4216         (TYPE_DUMMY): New.
4217         (lang_type.dummy_class): New field.
4218         (java_create_object): New function.
4219         (METHOD_DUMMY): New.
4220
4221         * expr.c (build_field_ref): Widen field offset.
4222         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4223         that each of its elements is compatible with the one we're
4224         popping.
4225         (pop_type_0): Issue a warning to say that we need to generate a
4226         runtime check.
4227         (java_create_object): New function.
4228         (build_field_ref): Only generate hard refs if we're not using
4229         indirect dispatch.
4230         (expand_java_field_op): If we're using !verify_invocations and we
4231         see a missing field, generate a decl for it.
4232
4233         (expand_invoke): If a class doesn't have the method we seek and
4234         we're using !flag_verify_invocations, generate a decl for the
4235         method now.
4236
4237         (build_known_method_ref): Always use indirect dispatch via the
4238         atable for static methods.
4239
4240         (expand_java_NEW): Break out object creation into new function,
4241         java_create_object.
4242
4243         (can_widen_reference_to): Issue a warning to say that we need to
4244         generate a runtime check.
4245
4246         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4247         (make_method_value): Also use index for interfaces.
4248         (make_class_data): Skip dummy field for inherited data.
4249         Don't build method array for dummy methods.
4250         Set size_in_byte to -1 when using inirect dispatch
4251         Don't build a hard class ref if we don't have a hard ref to our
4252         superclass, or if we're using inirect dispatch.
4253         Null out dispatch tables.
4254
4255         (layout_class_method): Don't complain about non-static method
4256         overrides static method is method is artificial.
4257
4258         (build_static_field_ref): Disable atable references to static
4259         fields for the time being.
4260
4261         (layout_class_methods): Check for CLASS_INTERFACE as
4262         well as CLASS_ABSTRACT.
4263
4264 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4265
4266         * class.c (make_class_data): Don't check flag_inline_functions.
4267         * lang.c (flag_really_inline): Remove unused flag.
4268         (java_handle_option): Don't set it here.  Remove special handling
4269         of flag_inline_functions for Java.
4270         (java_init): Don't set flag_inline_trees here.  Already done...
4271         (java_post_options): ...here.  Don't clear flag_inline_functions.
4272
4273 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4274
4275         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4276         (java_gimplify_exit_block_expr): New function.
4277         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4278         LABELED_BLOCK_EXPR.
4279         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4280         (EXIT_BLOCK_EXPR): Likewise.
4281         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4282         (LABELED_BLOCK_BODY): Likewise.
4283         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4284         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4285         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
4286         TREE_OPERAND.
4287         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4288         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4289         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
4290         second operand of EXIT_BLOCK_EXPR.
4291         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4292         TREE_OPERAND.
4293         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4294
4295 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4296
4297         * xref.h (xref_flag_value): Remove.
4298         (xref_set_data, xref_get_data): Likewise.
4299         (xref_set_current_fp): Likewise.
4300         (XREF_NONE): Likewise.
4301         (XREF_GET_DATA): Likewise.
4302         * xref.c (xref_flag_value): Remove.
4303         (xref_set_data, xref_get_data): Likewise.
4304         (xref_set_current_fp): Likewise.
4305
4306 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4307
4308         * gjavah.c (output_directory): Make static.
4309         (temp_directory): Likewise.
4310
4311 2004-11-15  Tom Tromey  <tromey@redhat.com>
4312
4313         * decl.c (instn_ptr_type_node): Removed.
4314         (lineNumbers_ptr_type_node): Removed.
4315         (jint_type): Removed.
4316         (jint_ptr_type): Removed.
4317
4318 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
4319
4320         PR java/15576
4321         * check-init.c (check_init): Ignore DECL_EXPR.
4322         * expr.c (always_initialize_class_p): Reenable.
4323         (build_class_init): Use a variable to store the decl.  Also use
4324         boolean_false_node instead of integer_zero_node.
4325         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4326         to the block.
4327
4328 2004-11-08  Tom Tromey  <tromey@redhat.com>
4329
4330         PR java/16843:
4331         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4332         generating a JNI header.
4333         (print_field_info): Handle JNI headers.
4334         (jni_print_float): Likewise.
4335         (jni_print_double): Likewise.
4336
4337 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
4338
4339         * decl.c (end_java_method): Remove duplicated code.
4340
4341 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
4342             Gerald Pfeifer  <gerald@pfeifer.com>
4343
4344         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4345         as well.
4346
4347 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
4348
4349         PR java/17265
4350         * class.c: Reinstate 2004-08-18 patch.
4351         (make_local_function_alias): Don't create an alias for extern (native)
4352         functions.
4353
4354 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4355
4356         PR java/17265
4357         * class.c (make_local_function_alias): Revert 2004-08-18 change.
4358         (make_method_value): Likewise.
4359
4360 2004-10-21  Andrew Haley  <aph@redhat.com>
4361
4362         PR java/18091:
4363         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4364
4365 2004-10-20  Andrew Haley  <aph@redhat.com>
4366
4367         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4368         Remove duplicated code block.
4369
4370 2004-10-18  Steven Bosscher  <stevenb@suse.de>
4371
4372         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4373         New rules to work around old Bison warnings.
4374
4375 2004-10-17  Steven Bosscher  <stevenb@suse.de>
4376
4377         * class.c (ident_subst): Always alloca buffer.
4378         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4379         opcode after including javaop.def.
4380         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4381         conditional expression that exits, to avoid warnings.
4382         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4383         a user of an extension.
4384         * win32-host.c: Move check down to have non-empty file when
4385         WIN32 is not defined.
4386
4387         * Make-lang.in (java-warn): Add STRICT_WARN.
4388         (java/jcf-io.o-warn): Don't have Werror for this file.
4389         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4390
4391 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
4392
4393         * expr.c (expr_add_location): Move declaration to before all
4394         statements.
4395         * parse.y (java_expand_classes): Ditto.
4396         * lex.c (java_peek_unicode): Ditto.
4397
4398 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4399
4400         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4401         if possible, else convert `foo' to 'foo'.
4402         * class.c: Likewise.
4403         * decl.c: Likewise.
4404         * expr.c: Likewise.
4405         * jcf-io.c: Likewise.
4406         * jcf-parse.c: Likewise.
4407         * lang.c: Likewise.
4408         * lex.c: Likewise.
4409         * parse.h: Likewise.
4410
4411 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4412
4413         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4414         rename parameter 'msg' to 'msgid' in function declaration.
4415         (issue_warning_error_from_context): Likewise.
4416         (yyerror): Rename parameter 'msg' to 'msgid'.
4417         (all over): Use new quoting style for diagnostics.
4418
4419 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
4420
4421         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4422         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4423         Update copyright.
4424
4425 2004-10-14  Matt Austern  <austern@apple.com>
4426
4427         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4428         pointer_set_t* now.
4429
4430 2004-10-13  Tom Tromey  <tromey@redhat.com>
4431
4432         PR java/15578:
4433         * lang.opt (--extdirs): Document.
4434         * jvspec.c (lang_specific_driver): Recognize -encoding and
4435         -extdirs.
4436
4437 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
4438
4439         * parse.y (issue_warning_error_from_context): Use va_list *
4440         instead of va_list parameter.
4441         (parse_error_context): Update call.
4442         (parse_warning_context): Likewise.
4443
4444 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
4445
4446         * parse.y, parse-scan.y: Add list of diagnostic messages to
4447         insulate translation template from version of yacc/bison used
4448         to compile the grammar.
4449
4450 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
4451
4452         Prepare for %q, %< and %> in diagnostic message strings.
4453         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4454         Name second parameter 'msgid'.
4455         * parse.y: Additionally include pretty-print.h and diagnostic.h.
4456         (issue_warning_error_from_context): Use pretty-printer functions
4457         instead of vsprintf for constructing formatted messages. Rename
4458         parameter 'msg' to 'msgid'.
4459         (parse_error_context): Rename parameter 'msg' to 'msgid'.
4460         (parse_warning_context): Likewise.
4461
4462 2004-10-05  Andrew Haley  <aph@redhat.com>
4463
4464         PR java/17779
4465         * jcf-parse.c (parse_zip_file_entries): If a class has a
4466         superclass and a TYPE_SIZE of zero, lay it out.
4467
4468 2004-09-30  Andrew Haley  <aph@redhat.com>
4469
4470         PR java/17733
4471         * jcf-parse.c (compute_class_name): Rewrite.
4472
4473 2004-10-01  Jan Hubicka  <jh@suse.cz>
4474
4475         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4476
4477 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4478
4479         * lex.c: Fix a comment typo.
4480
4481 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4482
4483         * java-tree.h: Fix a comment typo.
4484
4485 2004-09-30  Per Bothner  <per@bothner.com>
4486
4487         Simplify lexer.  Implement --enable-mapped-location support.
4488         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
4489         (parse_source_file_1): Pass filename as extra parameter, so we can call
4490         linemap_add and set input_location here, rather than in both callers.
4491         (read_class): Pass copied filename to parse_source_file_1.
4492         Don't initialize wfl_operator - only needed for source compilation.
4493         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
4494         * lex.h:  Remove a bunch of debugging macros.
4495         * lex.h (struct_java_line, struct java_error):  Remove types.
4496         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
4497         (struct java_lc_s):  Remove prev_col field.
4498         (struct java_lexer):  New fields next_unicode, next_columns, and
4499         avail_unicode.  New position field, and maybe token_start field.
4500         Don't need hit_eof field - use next_unicode == -1 instead.
4501         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
4502         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
4503         * parse.h:  Various changes for USE_MAPPED_LOCATION.
4504         (EXPR_WFL_EMIT_LINE_NOTE): XXX
4505         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4506         (struct parser_ctxt):  New file_start_location field.
4507         Remove p_line, c_line fields since we no longer save lines.
4508         Remove elc, lineno, and current_jcf fields - no longer used.
4509         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
4510         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4511         source_location and is probably not needed anymore anyway.
4512         Use new expr_add_Location function.
4513         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
4514         (java_pop_parser_context):  Minor cleanup.
4515         (java_parser_context_save_global, java_parser_context_restore_global,
4516         java_pop_parser_context):  Save/restore input_location as a unit.
4517         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
4518         a source_location instead of a wfl context node.
4519         (check_class_interface_creation):  input_filename is not addressable.
4520         (create_artificial_method):  Calling java_parser_context_save_global
4521         and java_parser_context_restore_global is overkill.  Instead,
4522         temporarily set input_location from class decl.
4523         (java_layout_seen_class_methods): Set input_location from method decl.
4524         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4525         (finish_loop_body):  Likewise.
4526         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
4527         (java_sprint_unicode):  Take a character, not index in line.
4528         (java_sneak_uncode):  Replaced by java_peek_unicode.
4529         (java_unget_unicode):  No longer used.
4530         (java_allocate_new_line. java_store_unicode):  Removed, since we
4531         no longer remember "lines".
4532         (java_new_lexer):  Update for new data structures.
4533         (java_read_char):  Move unget_value checking to java_read_unicode.
4534         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4535         efficient functions that are used directly when lexing.
4536         (java_read_unicode_collapsing_terminators):  No longer needed.
4537         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4538         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4539         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
4540         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
4541         combine switch branches, and test for common token kinds earlier.
4542         (java_lex_error):  Rewrite.
4543         * jv-scan.c (expand_location): New function, copied from tree.c.
4544         (main): Set ctxp->filename instead of setting input_filename directly.
4545
4546 2004-09-30  Per Bothner  <per@bothner.com>
4547
4548         More cleanup for --enable-mapped-location.
4549         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
4550         input_location here.  Instead do it in give_name_to_class.
4551         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4552         * expr.c (expand_byte_code): Call linemap_line_start.
4553         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
4554         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
4555         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
4556         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
4557         to USE_MAPPED_LOCATION case.
4558
4559         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
4560         * jcf-parse.c (java_parse_file): Don't set input_filename.
4561         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4562         Create a list of TRANSLATION_UNIT_DECL.
4563         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
4564         reason is so we can set a DECL_SOURCE_LOCATION for each file.
4565         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4566         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4567         (file_start_location):  New static.
4568         (set_source_filename):  Avoid extra access to input_filename macro.
4569         Concatenate new name with class's package prefix.
4570         (set_source_filename, give_name_to_class): Update.
4571         (give_name_to_class):  Set class's "line 0" input_location here.
4572         (parse_class_file):  Set input_location as a unit.
4573
4574         * jcf-parse.c (load_class): Sanity test if missing inner class file.
4575
4576 2004-09-29  Per Bothner  <per@bothner.com>
4577
4578         * java-tree.h:  Redefine some macros and add some declaration
4579         to handle the USE_MAPPED_LOCATION case.
4580         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
4581         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
4582         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4583         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4584
4585         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4586         * decl.c (finish_method, java_add_stmt): Likewise.
4587         * java-gimplify.c (java-gimplify.c):  Likewise.
4588         * jcf-write.c (generate_bytecode_insns):  Likewise.
4589         * lang.c (java_post_options): Likewise - call linemap_add.
4590
4591 2004-09-29  Andrew Haley  <aph@redhat.com>
4592
4593         PR java/17007
4594         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4595         result of TRUNC_MOD_EXPR.
4596         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4597         * decl.c (java_init_decl_processing): Mark
4598         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4599
4600 2004-09-28  Tom Tromey  <tromey@redhat.com>
4601
4602         PR java/15710:
4603         * class.c (add_miranda_methods): Load superinterface if not
4604         already loaded.
4605
4606 2004-09-28  Andrew Haley  <aph@redhat.com>
4607
4608         PR java/17586
4609         * jcf-parse.c (load_class): Don't try to read a class that we've
4610         already read.
4611
4612 2004-09-28  Andrew Haley  <aph@redhat.com>
4613
4614         * jcf-parse.c (load_class): Back out previous broken patch.
4615
4616 2004-09-28  Andrew Haley  <aph@redhat.com>
4617
4618         PR java/17586
4619         * jcf-parse.c (load_class): Don't try to read a class that we've
4620         already read.
4621         Check that we really did read the right class.
4622
4623 2004-09-25  Tom Tromey  <tromey@redhat.com>
4624
4625         PR java/17500:
4626         * parse.y (create_artificial_method): Use add_method_1.
4627
4628 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
4629
4630         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4631         comment typos.
4632         * gcj.texi: Fix typos.
4633
4634 2004-09-24  Tom Tromey  <tromey@redhat.com>
4635
4636         PR java/15656:
4637         * parse.y (class_instance_creation_expression): Set `$$' to NULL
4638         in error parts of rule.
4639         (unary_expression): Don't call error_if_numeric_overflow when $1
4640         is NULL.
4641
4642 2004-09-24  Tom Tromey  <tromey@redhat.com>
4643
4644         PR java/16789:
4645         * parse.y (resolve_qualified_expression_name): Set
4646         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4647         * expr.c (force_evaluation_order): Check for empty argument list
4648         after stripping COMPOUND_EXPR.
4649
4650 2004-09-23  Andrew Haley  <aph@redhat.com>
4651
4652         PR java/16927:
4653         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4654         COND_EXPRs.
4655
4656 2004-09-23  Tom Tromey  <tromey@redhat.com>
4657
4658         PR java/17329:
4659         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4660         where operand is null.
4661
4662 2004-09-23  Tom Tromey  <tromey@redhat.com>
4663
4664         PR java/17380:
4665         * parse.y (not_accessible_p): Allow access to protected members
4666         even when class is not static.
4667
4668 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
4669
4670         * Make-lang.in: Revert the gcc-none.o change.
4671
4672 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
4673
4674         * parse.y (patch_anonymous_class): VEC_space returns true if there
4675         is space.
4676
4677 2004-09-21  Matt Austern  <austern@apple.com>
4678
4679         Fix bootstrap.
4680         * gjavah.c (free_method_name_list): Fix function definition so
4681         it's a proper C prototype.
4682
4683 2004-09-21  Tom Tromey  <tromey@redhat.com>
4684
4685         PR java/17575:
4686         * gjavah.c (free_method_name_list): New method.
4687         (main): Call it.
4688
4689 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
4690             Zack Weinberg  <zack@codesourcery.com>
4691
4692         * java-tree.def: Use tree_code_class enumeration constants
4693         instead of code letters.
4694         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4695         new tree-class enumeration constants.
4696
4697 2004-09-13  Tom Tromey  <tromey@redhat.com>
4698
4699         PR java/17216:
4700         * class.c (layout_class_method): Put synthetic methods into the
4701         vtable.
4702
4703 2004-09-11  Andrew Pinski  <apinski@apple.com>
4704
4705         * Make-lang.in (java/ggc-none.c): Change dependency
4706         for ggc.h into $(GGC_H).
4707
4708 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4709
4710         * Make-lang.in (java/win32-host.o): Add dependency on
4711         coretypes.h.
4712         * win32-host.c: Add includes for coretypes.h, jcf.h
4713
4714 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4715
4716         * Make-lang.in (GCJH_OBJS): Change dependency from
4717         ggc-none.o to java/ggc-none.o
4718         (JCFDUMP_OBJS): Likewise.
4719         (java/ggc-none.o): New target.
4720
4721 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4722
4723         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
4724         * class.c (build_utf8_ref, build_static_field_ref,
4725         make_field_value, make_method_value, get_dispatch_table,
4726         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4727         * constants.c (get_tag_node, build_ref_from_constant_pool,
4728         build_constants_constructor): Likewise.
4729         * decl.c (java_init_decl_processing): Likewise.
4730         * expr.c (build_java_array_length_access, build_newarray,
4731         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4732         build_java_binop, build_field_ref, expand_java_add_case,
4733         expand_java_call, build_known_method_ref, build_invokevirtual,
4734         build_invokeinterface, build_jni_stub): Likewise.
4735         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4736         * jcf-parse.c (get_constant): Likewise.
4737         * lex.c (do_java_lex): Likewise.
4738         * parse.y (patch_binop, patch_unaryop, patch_cast,
4739         build_newarray_node, patch_newarray): Likewise.
4740         * resource.c (compile_resource_data): Likewise.
4741         * typeck.c (build_prim_array_type): Likewise.
4742
4743 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4744
4745         * decl.c (java_init_decl_processing): Adjust
4746         initialize_sizetypes call.
4747
4748 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4749
4750         * jv-scan.c (fancy_abort): Add.
4751
4752 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4753
4754         * expr.c (build_java_arrayaccess): Use convert to change
4755         len's type.
4756
4757 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
4758
4759         * class.c (make_local_function_alias): Allocate extra space for 'L'
4760         in name buffer. Reported by Thomas Neumann.
4761
4762 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4763
4764         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4765         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
4766         * lex.c (do_java_lex): Adjust.
4767         (error_if_numeric_overflow): Likewise.
4768
4769 2004-08-18  Andrew Pinski  <apinski@apple.com>
4770
4771         * class.c (make_local_function_alias): Only make a new decl if we
4772         support alias attribute on all decls.
4773
4774 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
4775
4776         * class.c (make_local_function_alias): New function. Create local
4777         alias for public method DECL.
4778         (make_method_value): Use make_local_function_alias.
4779         * parse.y (craft_constructor): Don't special-case anonymous classes.
4780         Always set ctor_name to init_identifier_node.
4781         (lookup_method_invoke): Call layout_class_method when creating
4782         anonymous class constructor.
4783
4784 2004-08-18  Richard Henderson  <rth@redhat.com>
4785
4786         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4787         default case.  Treat '<' similarly.  Update for
4788         is_gimple_formal_tmp_var name change.
4789
4790 2004-08-17  Andrew Haley  <aph@redhat.com>
4791
4792         * lang.c (lang_printable_name): Obey verbose flag.
4793         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4794         lang_printable_name().
4795         (verify_constructor_circularity, get_printable_method_name,
4796         check_abstract_method_definitions, java_check_regular_methods,
4797         java_check_abstract_methods, check_inner_class_access,
4798         fix_constructors, patch_method_invocation, patch_return):
4799         Likewise.
4800         * expr.c (pop_type_0): Likewise.
4801
4802         * java-tree.h (lang_printable_name_wls): Delete.
4803
4804 2004-08-16  Tom Tromey  <tromey@redhat.com>
4805
4806         PR java/8473:
4807         * parse.y (primary): Changed for initialized and uninitialized
4808         array creations.
4809         (array_access): Handle array_creation_initialized.
4810         (array_creation_expression): Split into
4811         array_creation_initialized and array_creation_uninitialized.
4812
4813 2004-08-16  Andrew Haley  <aph@redhat.com>
4814
4815         * jcf-write.c (find_constant_index): Canonicalize NaNs when
4816         generating bytecode.
4817
4818 2004-08-16  Elliot Lee <sopwith@redhat.com>
4819
4820         PR java/9677
4821         * jcf-parse.c (java_parse_file): Handle filenames with embedded
4822         spaces, and quoted filelists.
4823
4824 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4825
4826         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4827         * class.c (build_utf8_ref, build_static_field_ref,
4828         make_field_value, make_method_value, get_dispatch_table,
4829         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4830         * constants.c (get_tag_node,  build_ref_from_constant_pool,
4831         build_constants_constructor): Likewise.
4832         * decl.c (java_init_decl_processing): Likewise.
4833         * expr.c (build_java_array_length_access, build_newarray,
4834         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4835         build_java_binop, build_field_ref, expand_java_add_case,
4836         expand_java_call, build_known_method_ref, build_invokevirtual,
4837         build_invokeinterface, build_jni_stub): Likewise.
4838         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4839         * jcf-parse.c (get_constant): Likewise.
4840         * lex.c (do_java_lex): Likewise.
4841         * parse.y (patch_binop, patch_unaryop, patch_cast,
4842         build_null_of_type, patch_newarray): Likewise.
4843         * resource.c (compile_resource_data): Likewise.
4844         * typeck.c (build_prim_array_type): Likewise.
4845
4846 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4847
4848         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4849         Don't create BLOCK here or call java_gimplify_block.
4850
4851 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4852
4853         * java-tree.h (flag_deprecated): Removed.
4854         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4855         * parse.y (check_deprecation): Check warn_deprecated instead of
4856         flag_deprecated.
4857
4858 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4859
4860         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4861         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4862         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4863         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4864         flag_force_classes_archive_check, flag_optimize_sci,
4865         flag_indirect_dispatch): Remove explicit declarations.
4866         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4867         final comment.
4868
4869 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4870
4871         PR bootstrap/14893
4872         * Make-lang.in (java.install-man): Install from either build
4873         tree or source tree, whichever has the file first.
4874
4875 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4876
4877         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4878         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4879         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4880         (do_java_lex): Likewise. Adjust force_fit_type call.
4881
4882 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4883             Andrew Haley  <aph@redhat.com>
4884
4885         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4886         checking trees as they're being built.
4887         (convert): Call convert_ieee_real_to_integer if we're
4888         converting a constant, even if we're writing a class file.
4889
4890 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4891
4892         PR java/16701
4893         * parse.y (fold_constant_for_init): Call resolve_field_access with
4894         correct current_class context.
4895
4896 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4897
4898         * decl.c (update_aliases, initialize_local_variable): Replace calls
4899         to build with calls to buildN.
4900         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4901         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4902         * parse.h (BUILD_THROW): Likewise.
4903         * parse.y (switch_expression, synchronized_statement,
4904         catch_clause_parameter, array_creation_expression,
4905         conditional_expression, make_qualified_name,
4906         resolve_qualified_expression_name, patch_method_invocation,
4907         patch_invoke, build_method_invocation, build_new_invocation,
4908         build_assignment, patch_assignment, build_binop, patch_binop,
4909         build_string_concatenation, build_incdec, patch_unaryop,
4910         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4911         patch_return, build_if_else_statement, build_labeled_block,
4912         build_new_loop, build_loop_body, build_bc_statement,
4913         build_assertion, encapsulate_with_try_catch, build_try_statement,
4914         build_try_finally_statement, patch_synchronized_statement,
4915         emit_test_initialization): Likewise, replace build with buildN.
4916
4917 2004-07-28  Eric Christopher  <echristo@redhat.com>
4918
4919         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4920         (java_unsafe_for_reeval): Ditto.
4921
4922 2004-07-26    <hp@bitrange.com>
4923
4924         * parse.y (build_super_invocation): Adjust declaration order to
4925         avoid declaration after statement.
4926
4927 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4928
4929         * decl.c: Rename all identifiers named `class' to `cl'.
4930
4931 2004-07-25  Richard Henderson  <rth@redhat.com>
4932
4933         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4934
4935 2004-07-23  Mike Stump  <mrs@apple.com>
4936
4937         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4938         * gjavah.c (throwable_p, decode_signature_piece,
4939         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4940         process_file): Likewise.
4941         * jcf-dump.c (main): Likewise.
4942         * jcf-io.c (read_zip_member): Likewise.
4943         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4944         give_name_to_class, get_class_constant): Likewise.
4945         * jcf-write.c (find_constant_wide, push_long_const,
4946         generate_classfile): Likewise.
4947         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4948         * parse.y (read_import_dir): Likewise.
4949         * typeck.c (parse_signature_type): Likewise.
4950         * verify.c (verify_jvm_instructions): Likewise.
4951         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4952
4953 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4954
4955         * Make-lang.in: Replace rmic and rmiregistry references with
4956         grmic and grmiregistry.
4957         * gcj.texi: Likewise.
4958
4959 2004-07-20  Andrew Haley  <aph@redhat.com>
4960
4961         PR java/16431.
4962         * verify.c (verify_jvm_instructions): Comment change only.
4963
4964         * typeck.c (build_java_array_type): Add size field to array name.
4965
4966         * java-tree.h (LOCAL_SLOT_P): New.
4967         (update_aliases): Add PC argument.
4968         (pushdecl_function_level): New function.
4969
4970         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4971         MODIFY_EXPR, and SAVE_EXPR.
4972         (java_gimplify_modify_expr): New function.
4973
4974         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4975         (expand_iinc): Pass PC to update_aliases().
4976         (STORE_INTERNAL): Likewise.
4977         (process_jvm_instruction): Likewise.
4978
4979         * decl.c (base_decl_map): New variable.
4980         (uniq): New variable.
4981         (update_aliases): Rewrite with more thorough checking.
4982         (debug_variable_p): New function.
4983         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4984         (check_local_named_variable): Delete whole function.
4985         (initialize_local_variable): New function.
4986         (check_local_unnamed_variable): Add checks and comments.
4987         (find_local_variable): Rewrite.
4988         (java_replace_reference): New function.
4989         (function_binding_level): New variable.
4990         (pushdecl_function_level): New function.
4991         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4992         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4993         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4994         function_binding_level.
4995         (end_java_method): Null unused fields to save memory.
4996
4997 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
4998
4999         * class.c (add_interface_do): Remove.
5000         (set_super_info, interface_of_p, maybe_add_interface,
5001         add_interface, make_class_data, layout_class,
5002         add_miranda_methods): Adjust BINFO accessors and addition.
5003         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5004         accessors.
5005         * jcf-write.c (generate_classfile): Likewise.
5006         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5007         check_circular_reference, java_complete_class,
5008         check_abstract_method_definitions,
5009         java_check_abstract_method_definitions,
5010         check_interface_throws_clauses, java_check_abstract_methods,
5011         lookup_java_interface_method2,
5012         find_applicable_accessible_methods_list): Adjust BINFO accessors
5013         and addition.
5014         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5015
5016 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5017
5018         * builtins.c (max_builtin, min_builtin,
5019         java_build_function_call_expr): Replace calls to build with buildN.
5020         * class.c (build_class_ref, build_static_field_ref,
5021         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5022         * constants.c (build_ref_from_constant_pool): Likewise.
5023         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5024         add_stmt_to_compound): Likewise.
5025         * except.c (build_exception_object_ref, expand_end_java_handler):
5026         Likewise.
5027         * java-gimplify.c (java_gimplify_case_expr,
5028         java_gimplify_default_expr, java_gimplify_block,
5029         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5030         * jcf-write.c (generate_bytecode_insns): Likewise.
5031         * typeck.c (convert_ieee_real_to_integer): Likewise.
5032
5033 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5034
5035         * java-tree.h (builtin_function): Declare.
5036
5037 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5038
5039         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5040         abuse restore_line_number_status.
5041
5042 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5043
5044         g++/15861
5045         * jcf-parse.c (java_emit_static_constructor): Specify default
5046         priority.
5047
5048 2004-07-13  Per Bothner  <per@bothner.com>
5049
5050         * java-tree.h (all_class_filename):  Remove useless macro.
5051         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5052         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5053         * parse.y (java_parser_context_restore_global):  Replace
5054         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5055         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5056
5057 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5058
5059         PR java/16474
5060         gjavah.c (print_field_info): Emit constant only if field is static.
5061
5062 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5063
5064         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5065         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5066         build_java_ret, build_java_throw_out_of_bounds_exception,
5067         build_java_array_length_access, java_check_reference,
5068         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5069         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5070         expand_java_arrayload, build_java_monitor, expand_java_return,
5071         expand_load_internal, expand_java_NEW, build_get_class,
5072         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5073         build_java_soft_divmod, build_java_binop, build_field_ref,
5074         expand_compare, expand_java_goto, expand_java_switch,
5075         expand_java_add_case, build_class_init, build_known_method_ref,
5076         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5077         expand_invoke, build_jni_stub, expand_java_field_op,
5078         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5079         force_evaluation_order, emit_init_test_initialization): Convert
5080         calls to "build" into calls to the prefered "buildN" functions.
5081
5082 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5083
5084         * java-tree.h (set_block): Remove.
5085         * lang.c (java_clear_binding_stack): New.
5086         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5087         * decl.c (struct binding_level): Remove this_block.
5088         (clear_binding_level): Likewise.
5089         (poplevel): Don't handle this_block.
5090         (set_block): Remove.
5091
5092 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5093
5094         * class.c (common_enclosing_context_p): Remove statement with no
5095         side-effects.
5096
5097 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5098
5099         PR java/8618
5100         * parse.y (create_anonymous_class): Remove 'location' argument. Use
5101         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5102         (craft_constructor): Inherit access flags for implicit constructor
5103         from the enclosing class.
5104         (create_class): Fix comment typo.
5105         (resolve_qualified_expression_name): Pass type of qualifier to
5106         not_accessible_p, not the type in which target field was found.
5107         (not_accessible_p): Handle inner classes. Expand protected
5108         qualifier-subtype check to enclosing instances, but don't apply this
5109         check to static members. Allow protected access to inner classes
5110         of a subtype. Allow private access within common enclosing context.
5111         (build_super_invocation): Get WFL line number info from current
5112         class decl.
5113         (build_incomplete_class_ref): Update for new create_anonymous_class
5114         signature.
5115         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5116         common_enclosing_instance_p.
5117         * class.c (common_enclosing_context_p): New. Determine if types
5118         share a common enclosing context, even across static contexts.
5119         (common_enclosing_instance_p): Renamed from
5120         common_enclosing_context_p. Determines if types share a common
5121         non-static enclosing instance.
5122         * java-tree.h (common_enclosing_instance_p): Declare.
5123         * jcf-write.c (get_method_access_flags): New. Surpress private flag
5124         for inner class constructors.
5125         (generate_classfile): Use get_method_access_flags.
5126
5127 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5128
5129         * class.c (interface_of_p): Check for null TYPE_BINFO.
5130
5131 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
5132
5133         * class.c (make_class): Do not create binfo here.
5134         (set_super_info): Create it here.
5135         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5136
5137 2004-07-08  Richard Henderson  <rth@redhat.com>
5138
5139         * expr.c (case_identity, get_primitive_array_vtable,
5140         java_expand_expr, emit_init_test_initialization): Remove.
5141         * java-tree.h (java_expand_expr): Remove.
5142         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5143
5144 2004-07-07  Per Bothner  <per@bothner.com>
5145
5146         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
5147         get internal error due to mismatched types.
5148
5149         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
5150
5151         * gcj.texi (Linking):   New node.  Document -lgij usage.
5152
5153 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5154
5155         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5156         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5157         * java/class.c (set_super_info, class_depth, interface_of_p,
5158         maybe_add_interface, add_interface, make_class_data,
5159         layout_class, add_miranda_methods): Adjust BINFO macros.
5160         * expr.c (can_widen_reference_to, lookup_field): Likewise.
5161         * jcf-write.c (generate_classfile): Likewise.
5162         * parse.y (patch_anonymous_class,
5163         check_inner_circular_reference, check_circular_reference,
5164         java_complete_class, check_abstract_method_definitions,
5165         java_check_abstract_method_definitions,
5166         check_interface_throws_clauses, java_check_abstract_methods,
5167         lookup_java_interface_method2,
5168         find_applicable_accessible_methods_list): Likewise.
5169         * typeck.c (find_method_in_interface): Likewise.
5170         * verify.c (merge_types): Likewise.
5171
5172 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5173
5174         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5175         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5176
5177 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5178
5179         * class.c (make_class): Use make_tree_binfo.
5180         (set_super_info, add_interface_do): Likewise.
5181         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5182
5183 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5184
5185         * verify.c: Correct array element access formatting thinko.
5186
5187 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5188
5189         * verify.c: Insert a short blurb at the start referring to the JVMS.
5190         (merge_type_state): Remove redundant nested if statement.
5191         (verify_jvm_instructions): Ensure current_subr is initialised to
5192         NULL_TREE.
5193         Minor formatting fixes all over the place.
5194
5195 2004-07-02  Richard Henderson  <rth@redhat.com>
5196
5197         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5198
5199 2004-07-01  Richard Henderson  <rth@redhat.com>
5200
5201         * class.c (registerClass_libfunc): Remove.
5202         (init_class_processing): Don't set it.
5203         (emit_register_classes): Take list_p parameter.  Fill it in
5204         with _Jv_RegisterClass calls.
5205         * decl.c (java_init_decl_processing): Don't call
5206         init_resource_processing.
5207         * jcf-parse.c (java_emit_static_constructor): New.
5208         (java_parse_file): Call it.
5209         * resource.c (registerResource_libfunc): Remove.
5210         (init_resource_processing): Remove.
5211         (write_resource_constructor): Take list_p parameter.  Fill it in
5212         with _Jv_RegisterResource calls.
5213         * java-tree.h: Update prototypes.
5214
5215 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
5216
5217         PR java/1262
5218         * class.c (layout_class_method): Do not override package-private
5219         method if its in a different package.
5220         (split_qualified_name): Move here from parse.y. Rename from
5221         breakdown_qualified. Add comment.
5222         (in_same_package): Move here from parse.y. Add comment.
5223         * java-tree.h (break_down_qualified, in_same_package): Declare.
5224         (in_same_package): Likewise.
5225         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5226         Callers updated.
5227
5228 2004-06-29  Andrew Haley  <aph@redhat.com>
5229
5230         * except.c (expand_start_java_handler): Push a new binding level.
5231         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5232         register_exception_range() to register where we'll do it.
5233         (expand_end_java_handler): Remove old bogus code.  Replace with
5234         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5235         the top of the expression we're curently building.
5236         (maybe_end_try): Delete.
5237         * decl.c (binding_level.exception_range): New field.
5238         (clear_binding_level): Add field exception_range.  Reformat.
5239         (poplevel): Call expand_end_java_handler().
5240         (poplevel): Call java_add_stmt only if functionbody is false.
5241         (maybe_poplevels): Don't call maybe_end_try() from here.
5242         (end_java_method): Clear no longer used trees in function decl.
5243         (register_exception_range): New function.
5244         * java-tree.h (register_exception_range, struct eh_range): Declare.
5245
5246 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
5247
5248         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5249
5250 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
5251
5252         Formatting fixes.
5253         * expr.c (class_has_finalize_method): Fix method name indentation.
5254         (expand_java_call): Remove K&R style parameter declaration.
5255         (expand_invoke): Fix statement indentation.
5256         (expand_java_field_op): Likewise.
5257         * parse-scan.y: Fix typo.
5258         (reset_report): Fix method name indentation.
5259         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5260         line. Fix typos.
5261         * verify.c (verify_jvm_instructions): Document parameters, insert
5262         page break.
5263         * lang.c (lang_init_source): Fix method name indentation.
5264         * class.c (common_enclosing_context_p): Likewise.
5265         (emit_symbol_table): Fix parameter list indentation.
5266         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5267         parameter declaration.
5268         * constants.c: Fix copyright notice indentation.
5269         * typeck.c (find_method_in_superclasses): Fix parameter list
5270         indentation.
5271         (find_method_in_interfaces): Likewise.
5272         * zextract.c (makelong): Fix method name indentation.
5273
5274 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5275
5276         PR java/15715.
5277         * parse.y (create_interface): Set correct access modifiers for
5278         interfaces.
5279         * jcf-write.c (get_classfile_modifiers): New function.
5280         (generate_classfile): Use get_classfile_modifiers, not
5281         get_access_flags.
5282
5283 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5284
5285         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5286         dependency to current parser context, not NULL_TREE, for top-level
5287         classes.
5288         (jdep_resolve_class): Enable member access check for all inner
5289         class dependencies.
5290
5291 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5292
5293         * parse.y (qualify_and_find): Pass type decl, not identifier, to
5294         load_class.
5295
5296 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5297
5298         PR java/15734
5299         * expr.c (expand_java_field_op): Ensure that target class for static
5300         field access has been loaded.
5301
5302 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5303             Ranjit Mathew  <rmathew@hotmail.com>
5304
5305         PR java/1207, java/16178
5306         * jcf-parse.c (load_class): Return immediately if passed a type decl
5307         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5308         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5309         before calling load_class.
5310         (qualify_and_find): Likewise.
5311         (find_in_imports_on_demand): Likewise.
5312         (find_applicable_accessible_methods_list): Likewise.
5313
5314 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
5315
5316         * parse.y (java_layout_seen_class_methods): Don't call load_class
5317         on class defined by source parser.
5318
5319 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
5320
5321         * parse.y (set_nested_class_simple_name_value): Removed.
5322         (java_complete_expand_class): Remove calls to
5323         set_nested_class_simple_name_value.
5324
5325 2004-06-22  Andrew Haley  <aph@redhat.com>
5326             Ranjit Mathew  <rmathew@hotmail.com>
5327
5328         Fixes PR java/16113.
5329         * decl.c (force_poplevels): Remove call to expand_end_bindings.
5330
5331 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
5332
5333         * parse.y (create_class): Correct diagnostic message about
5334         java.lang.Object extending anything else.
5335
5336 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5337
5338         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5339         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5340         * constants.c (build_ref_from_constant_pool): Likewise.
5341         * expr.c (build_java_array_length_access): Likewise.
5342         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5343         (invoke_build_dtable, build_invokevirtual): Likewise.
5344         (build_invokeinterface, java_expand_expr): Likewise.
5345         (emit_init_test_initialization): Likewise.
5346         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5347         * parse.y (make_qualifed_name, build_array_ref): Likewise.
5348
5349 2004-06-21  Andrew Haley  <aph@redhat.com>
5350
5351         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5352         block.
5353
5354 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
5355
5356         * jcf.h (struct JCF): Change java_source, right_zip and finished
5357         to unsigned int.
5358         * lex.h (struct java_lexer): Change hit_eof, read_anything,
5359         byte_swap and use_fallback to unsigned int.
5360         * parse.h (struct _jdep): Change flag0 to unsigned int.
5361
5362 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
5363
5364         Fixes PR java/13948
5365         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5366         before trying to lay out its methods.
5367         * jcf-parse.c (read_class): Track parsed files using canonical paths
5368         obtained via lrealpath from libiberty.
5369         (java_parse_file): Likewise.
5370         (parse_source_file_1): Rename formal parameter to reflect its
5371         modified purpose. Minor formatting fix.
5372
5373 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5374
5375         * class.c (emit_register_classes): Make the function uninlinable,
5376         do not set current_function_cannot_inline.
5377         * resource.c (write_resource_constructor): Do not reset
5378         flag_inline_functions around rest_of_compilation.
5379
5380 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
5381
5382         PR java/15769
5383         * expr.c (java_truthvalue_conversion): Handle
5384         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5385         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5386         i.e. return the expression.
5387
5388 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
5389
5390         * gjavah.c: Include version.h
5391
5392 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
5393
5394         * jcf-write.c (generate_bytecode_conditional): Correct handling
5395         of unordered conditionals. Add comment.
5396
5397 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
5398             Per Bothner  <per@bothner.com>
5399
5400         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5401         local variable was initialised upon declaration.
5402         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5403         variable was final and initialised upon declaration.
5404         * check-init.c (check_final_reassigned): Give error only if a blank
5405         final is not definitely unassigned or if an initialised final is
5406         reassigned.
5407         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5408         assignment expressions. Remove case MODIFY_EXPR, label do_default.
5409         (check_init): Perform initialised-variable-removing-optimisation
5410         only on non-final local variables.
5411
5412 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5413
5414         * jcf-write.c (generate_bytecode_conditional): Handle binops
5415         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5416         and LTGT_EXPR.
5417         (generate_bytecode_insns): Likewise.
5418
5419 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5420
5421         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5422         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5423
5424 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5425
5426         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5427         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5428
5429 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5430
5431         * decl.c (struct binding_level): Add GTY marker. Compile
5432         binding_depth unconditionally.
5433         (current_binding_level, free_binding_level, global_binding_level):
5434         Likewise.
5435         (clear_binding_level): Unconditionally set binding_depth.
5436         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5437
5438 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5439
5440         * lex.c (java_new_lexer): Set 'encoding'.
5441         (java_read_char): Improve error message for unrecognized characters.
5442         * lex.h (struct java_lexer): New field 'encoding'.
5443
5444 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5445
5446         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5447
5448 2004-05-21  Mark Wielaard  <mark@klomp.org>
5449
5450         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5451         extern.
5452
5453 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
5454
5455         * typeck.c: Remove non-printable character 160.
5456
5457 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
5458
5459         * check-init.c: Correct minor typos.
5460
5461 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5462
5463         * Make-lang.in, expr.c, java-gimplify.c: Rename
5464         tree-simple.[ch] to tree-gimple.[ch].
5465
5466 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
5467
5468         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5469
5470 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5471
5472         Merge from tree-ssa-20020619-branch.  See
5473         ChangeLog.tree-ssa for details.
5474
5475         * Make-lang.in, builtins.c, check-init.c, class.c,
5476         constants.c, decl.c, except.c, expr.c, java-except.h,
5477         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5478         lang.c, lang.opt, parse.y, resource.c: Merged.
5479         * java-gimplify.c: New file.
5480
5481 2004-05-10  Andrew Haley  <aph@redhat.com>
5482
5483         * parse.y (create_class): Set TYPE_VFIELD.
5484         * decl.c (java_init_decl_processing): Likewise.
5485
5486         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5487         * class.c (make_method_value): Replace DECL_VINDEX with call to
5488         get_method_index().
5489         (get_dispatch_vector): Likewise.
5490         (layout_class_method): Likewise.
5491         Replace set of DECL_VINDEX with call to set_method_index().
5492         (set_method_index): New function.
5493         (get_method_index): New function.
5494         * java-tree.h (set_method_index): New function decl.
5495         (get_method_index): New function decl.
5496
5497 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
5498
5499         * parse.y (check_pkg_class_access): Add new argument
5500         and use it when cl is NULL to call lookup_cl on it.
5501         (parser_check_super_interface): Do not call lookup_cl.
5502         Pass this_decl to check_pkg_class_access and NULL
5503         instead of lookup_cl.
5504         (parser_check_super): Update for change in
5505         check_pkg_class_access.
5506         (do_resolve_class): Likewise.
5507         (process_imports): Likewise.
5508         (find_in_imports_on_demand): Likewise.
5509         (resolve_qualified_expression_name): Likewise.
5510
5511 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
5512
5513         Fixes PR java/9685, PR java/15073
5514         * parse.y (accessibility_string): New method.
5515         (not_accessible_field_error): Use accessibility_string()
5516         instead of java_accstring_lookup().
5517         (resolve_qualified_expression_name): Check with
5518         check_pkg_class_access() before allowing access using
5519         qualified names.
5520         Fix comment typo.
5521         Use check_pkg_class_access() instead of not_accessible_p()
5522         for unqualified types.
5523         (not_accessible_p): Use DECL_CONTEXT (member) instead of
5524         REFERENCE for package-private access checking.
5525         (patch_method_invocation): Use accessibility_string() instead
5526         of java_accstring_lookup().
5527
5528 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
5529
5530         Fixes PR java/15133
5531         * gjavah.c (struct method_name): Add member is_native.
5532         (overloaded_jni_method_exists_p): Match candidate method only if
5533         it is native.
5534         (print_method_info): Initialise is_native flag from the method's
5535         access flags.
5536
5537 2004-04-30  Roger Sayle  <roger@eyesopen.com>
5538
5539         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5540         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5541
5542 2004-04-22  Roger Sayle  <roger@eyesopen.com>
5543
5544         * resource.c (write_resource_constructor): Guard call to possibly
5545         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5546
5547 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
5548
5549         * class.c (make_class_data): Add new field aux_info.
5550         * decl.c (java_init_decl_processing): Push type and decl for
5551         `aux_info'.
5552
5553 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5554
5555         * expr.c (expand_java_NEW): Don't use size argument for
5556         _Jv_AllocObject calls.
5557         * parse.y (patch_invoke): Likewise.
5558
5559 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5560
5561         * expr.c (build_invokeinterface): Remove unused variables to
5562         fix warnings.
5563
5564 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5565
5566         * class.c (get_interface_method_index): New function. Return dispatch
5567         index for interface method.
5568         (make_method_value): For interface methods, set index field to
5569         iface dispatch index, not DECL_VINDEX.
5570         * expr.c (build_invokeinterface): Use get_interface_method_index.
5571
5572 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5573
5574         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5575
5576 2004-03-31  Andrew Haley  <aph@redhat.com>
5577
5578         PR java/14104
5579         * jcf-io.c (opendir_in_zip): Tidy up error handling.
5580
5581 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5582
5583         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5584         form of GTY markers.
5585
5586 2004-03-25  Marcus Meissner  <meissner@suse.de>
5587
5588         PR java/14689:
5589         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5590
5591 2004-03-23  Tom Tromey  <tromey@redhat.com>
5592
5593         PR java/14315:
5594         * jcf-write.c (make_class_file_name): Don't report if mkdir
5595         failed with EEXIST.
5596
5597 2004-03-23  Tom Tromey  <tromey@redhat.com>
5598
5599         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5600
5601 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
5602
5603         * class.c, gjavah.c, lang.c: Fix comment typos.
5604         * gcj.texi: Fix typos.
5605
5606 2004-03-19  Per Bothner  <per@bothner.com>
5607
5608         * gcj.texi (Code Generation):  Document new flags and assert defaults.
5609
5610         * class.c (assume_compiled_node_struct):  Rename type to
5611         class_flag_node_struct, as it is now also used for enable_assertions.
5612         Rename assume_compiled_node typedef.  Rename excludep field to value.
5613         (find_assume_compiled_node):  Rename function to find_class_flag_node.
5614         Minor optimization - avoid needless strlen.
5615         (add_assume_compiled):  Some tweaking and optimization.
5616         Rename and generalize to add_class_flag takem an extra parameter.
5617         (add_assume_compled):  New just calls add_class_flag.
5618         (add_enable_assert, enable_assertions):  New functions.
5619         (enable_assert_tree):  New static.
5620         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5621         * lang.opt (fenable-assertions, fenable-assertions=,
5622         fdisable-assertions, fdisable-assertions=):  New options.
5623         * lang.c (java_handle_option):  Handle new options.
5624         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
5625         class in an interface - create helper class nested in outer interface.
5626         (build_assertion):  Short-circuit if enable_assertions is false.
5627
5628 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5629
5630         * java-tree.h: Changes throughout to add checking to macros
5631         and numerous whitespace changes.
5632         (VAR_OR_FIELD_CHECK): New macro.
5633         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5634         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5635
5636 2004-03-16  Per Bothner  <per@bothner.com>
5637
5638         * jcf-jump.c (options):  New --print-constants option.
5639         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
5640
5641         * jcf-dump.c (flag_print_constant_pool):  Default to off.
5642         (print_constant_terse_with_index):  New helper function.
5643         (various places):  Check flag_print_constant_pool where missing.
5644         (main):  If verbose set flag_print_constant_pool.
5645         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
5646
5647 2004-03-15  Andrew Haley  <aph@redhat.com>
5648
5649         PR java/14581
5650         * parse.y (java_complete_lhs): Check that final variable has an
5651         initializer.
5652
5653 2004-03-12  Andrew Haley  <aph@redhat.com>
5654
5655         PR java/14551
5656         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5657         conversion.
5658
5659 2004-02-29  Roger Sayle  <roger@eyesopen.com>
5660
5661         * jcf-parse.c (java_parse_file): Handle the case that input_filename
5662         is NULL.
5663
5664 2004-02-27  Per Bothner  <per@bothner.com>
5665
5666         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
5667         suggestion:  Use build_incomplete_class_ref.
5668         This fixes PR java/13508, java/11714.
5669
5670 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
5671
5672         * java/parse.h: Update copyright.
5673
5674 2004-02-26  Andrew Haley  <aph@redhat.com>
5675
5676         PR java/14231:
5677         * parse.y (check_interface_throws_clauses): Check for
5678         !METHOD_INVISIBLE (iface_method).
5679         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5680         well as CLASS_ABSTRACT.
5681
5682 2004-02-25  Per Bothner  <per@bothner.com>
5683
5684         * parse.y (build_assertion):  If we're in an inner class, create the
5685         class$ helper routine in the outer class.
5686
5687 2004-02-19  Richard Henderson  <rth@redhat.com>
5688
5689         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5690
5691 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
5692
5693         * Make-lang.in (java.install-man): Add extra dependencies.
5694
5695 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
5696
5697         * Make-lang.in: Install man pages under the same names
5698         (possibly transformed) as the program they document.
5699
5700 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
5701
5702         * gjavah.c: Include "intl.h".
5703         (error): New function.
5704         (main): Call gcc_init_libintl.
5705         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5706         print_stub_or_jni, process_file, main): Use error rather than
5707         fprintf.
5708         (print_method_info, usage, help, version, main): Mark strings for
5709         translation with _.  Avoid splitting up sentences.  Send
5710         information messages to stdout.
5711         * jcf-dump.c: Include "intl.h".
5712         (main): Call gcc_init_libintl.
5713         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5714         Mark error, usage and version messages for translation with _.
5715         Avoid splitting up sentences.
5716         * jv-scan.c: Include "intl.h".
5717         (fatal_error, warning): Change parameter s to msgid.  Translate
5718         messages.
5719         (main): Call gcc_init_libintl.
5720         (usage, help, version): Mark error, usage and version messages for
5721         translation with _.  Avoid splitting up sentences.
5722         * jvgenmain.c: Include "intl.h".
5723         (main): Call gcc_init_libintl.
5724         (usage, main): Mark error messages for translation with _.
5725         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5726         JVGENMAIN_OBJS): Add intl.o.
5727         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5728         java/jvgenmain.o): Update dependencies.
5729
5730 2004-02-08  Per Bothner  <per@bothner.com>
5731
5732         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
5733         class don't use not_accessible_field_error, which can get confused.
5734
5735 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5736
5737         Make-lang.in (po-generated):  Delete.
5738
5739 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5740
5741         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5742         Depend on target.h.
5743         * decl.c: Include target.h.
5744         (start_java_method): Replace PROMOTE_PROTOTYPES with
5745         targetm.calls.promote_prototypes.
5746         * expr.c: Include target.h.
5747         (pop_arguments): Replace PROMOTE_PROTOTYPES with
5748         targetm.calls.promote_prototypes.
5749         * parse.y: Include target.h.
5750         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5751         with targetm.calls.promote_prototypes.
5752
5753 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5754
5755         * typeck.c: Update copyright.
5756
5757 2004-02-02  Tom Tromey  <tromey@redhat.com>
5758
5759         * decl.c (java_init_decl_processing): Remove duplicate
5760         gnu/gcj/RawData.
5761
5762 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
5763
5764         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5765
5766 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
5767
5768         * expr.c (build_field_ref): Move variable
5769         definition up.
5770
5771 2004-01-28  Andrew Haley  <aph@redhat.com>
5772
5773         * expr.c (build_field_ref): Widen field offset.
5774
5775 2004-01-27  Andrew Haley  <aph@redhat.com>
5776
5777         java/13273
5778         * parse.y (check_interface_throws_clauses): Make sure class_decl
5779         has been loaded.
5780
5781 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
5782
5783         PR java/13733
5784         * parse.y (patch_assignment): Don't modify lhs_type for
5785         reference assignments.
5786
5787 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5788
5789         * Make-lang.in: Replace $(docdir) with doc.
5790         (java.info, java.srcinfo, java.man, java.srcman): New rules.
5791         (java.install-man): Revamp rule.
5792
5793 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5794
5795         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5796         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5797         instead of deferred backquote.
5798
5799 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
5800
5801         * typeck.c (find_method_in_interfaces): Move variable
5802         definition up.
5803
5804 2004-01-16  Andrew Haley  <aph@redhat.com>
5805
5806         PR java/13273:
5807         * typeck.c (shallow_find_method): New.
5808         (find_method_in_superclasses): New.
5809         (find_method_in_interfaces): New.
5810         (lookup_do): Rewrite.
5811         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5812
5813         * jcf-parse.c (read_class): Save and restore output_class.
5814         * decl.c (java_expand_body): Set output_class from fndecl.
5815
5816 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
5817
5818         * class.c (gen_indirect_dispatch_tables): Fix string length
5819         calculations.
5820
5821 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5822
5823         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5824         (java.srcextra): Copy above back to source directory if requested.
5825         (po-generated): Delete reference to $(parsedir).
5826         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5827         Use implicit rule.
5828
5829 2004-01-14  Jan Hubicka  <jh@suse.cz>
5830
5831         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5832         estimation.
5833
5834 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5835
5836         * java-tree.h (java_expand_expr): Change prototype.
5837         * expr.c (java_expand_expr): Add alt_rtl parameter.
5838
5839 2004-01-09  Andrew Haley  <aph@redhat.com>
5840
5841         PR java/12755:
5842         * parse.y (java_fix_constructors):  Set output_class.
5843         (java_reorder_fields): Likewise.
5844         (java_layout_classes): Likewise.
5845         (java_expand_classes): Generate indirect dispatch tables.
5846         (java_expand_classes): Set output_class.
5847         (java_finish_classes): Likewise.
5848         * lang.c (java_init): Turn on always_initialize_class_p if we're
5849         using indirect dis[atch.
5850         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5851         (java_get_callee_fndecl): Use class local atable.
5852         * jcf-parse.c
5853         (always_initialize_class_p): Decl moved to java-tree.h.
5854         (HANDLE_CLASS_INFO): Set output_class.
5855         (read_class): Likewise.
5856         (parse_class_file): Call gen_indirect_dispatch_tables.
5857         (parse_zip_file_entries): Set output_class.
5858         (java_parse_file): Set output_class.  Don't emit symbol tables.
5859         * java-tree.h (output_class): New.
5860         Remove global declarations for otable, atable, and ctable.
5861         (always_initialize_class_p): moved here from decl.c.
5862         (DECL_OWNER): New.
5863         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5864         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5865         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5866         (struct lang_type): Add otable_methods, otable_decl,
5867         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5868         ctable_decl, catch_classes, type_to_runtime_map.
5869         * expr.c (build_field_ref): Make otable, atable, and ctable class
5870         local rather than global.
5871         (build_known_method_ref): Likewise.
5872         (build_invokeinterface): Likewise.
5873         (java_expand_expr): Pass runtime type (rather than actual type) to
5874         expand_start_catch.
5875         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5876         this class.  Look up each class in that map to delete duplicates.
5877         (expand_end_java_handler): Pass runtime type (rather than actual
5878         type) to expand_start_catch.
5879         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5880         (do_nothing): New.
5881         (java_init_decl_processing): Rearrange things.  Remove global
5882         declarations of otable, atable, and ctable.
5883         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5884         (java_expand_body): Set output_class.
5885         * constants.c (build_constant_data_ref): Use output_class, not
5886         current_class.
5887         (alloc_name_constant): Likewise.
5888         * class.c (gen_indirect_dispatch_tables): New.
5889         (build_class_ref): Generate hard reference to superclass, even if
5890         using indirect dispatch.
5891         (build_static_field_ref): Use class local atable.
5892         (make_class_data): Generate hard reference to superclass, even if
5893         using indirect dispatch.
5894         Generate symbolic references to interfaces when using indirect
5895         dispatch.
5896         (make_class_data): Emit otable, atable, and ctable.
5897         Make otable, atable, and ctable class local rather than global.
5898         (emit_catch_table): Make otable, atable, and ctable class local
5899         rather than global.
5900
5901 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5902
5903         * parse.y (catch_clause_parameter): Fix typo.
5904
5905         PR java/13404
5906         * parse.y: (catch_clause_parameter): Return early if $3, aka
5907         formal_parameter, is null.
5908
5909 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5910
5911         * class.c: Remove uses of "register" specifier in
5912         declarations of arguments and local variables.
5913         * decl.c: Likewise.
5914         * expr.c: Likewise.
5915         * gjavah.c: Likewise.
5916         * jcf-dump.c: Likewise.
5917         * jcf-io.c: Likewise.
5918         * jcf-parse.c: Likewise.
5919         * jcf-write.c: Likewise.
5920         * keyword.h: Likewise.
5921         * parse.y: Likewise.
5922         * typeck.c: Likewise.
5923         * verify.c: Likewise.
5924
5925 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5926
5927         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5928         (java.install_common, java.install-man): Adjust for above.
5929         (java.uninstall): Likewise.
5930
5931 2003-12-03  Michael Koch  <konqueror@gmx.de>
5932
5933         * class.c (make_class_data):
5934         Push field value to 'hack_signers' instead of 'signers'.
5935         * decl.c (java_init_decl_processing):
5936         Push field 'hack_signers' instead of 'signers'.
5937
5938 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5939
5940         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5941         including iconv.h.
5942
5943 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5944
5945         PR java/12374:
5946         * parse.y (qualify_ambiguous_name): Remove lots of broken
5947         field access processing - there's no need to do that here,
5948         because we have resolve_field_access.  Remove
5949         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5950         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5951         used.
5952
5953 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5954
5955         Fix PR java/13237
5956         * parse.y (java_complete_lhs): Save location prior to patching
5957         CALL_EXPR.
5958
5959 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5960
5961         PR java/12548
5962         * resource.c (write_resource_constructor): Append
5963         "_resource" to constructor identifier name.
5964
5965 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5966
5967         Fix PR java/13183.
5968         * constants.c (cpool_for_class): New function.
5969         (outgoing_cpool): Remove global variable.
5970         (alloc_name_constant): Use cpool_for_class.
5971         (build_constants_constructor): Likewise.
5972         * decl.c (java_expand_body): Set current_class.
5973         * java-tree.h (outgoing_cpool) Remove declaration.
5974         (init_outgoing_cpool): Likewise.
5975         * jcf-parse.c (init_outgoing_cpool): Remove function.
5976         (parse_class_file): Don't call init_outgoing_cpool.
5977         * parse.y (java_complete_expand_methods): Don't call
5978         init_outgoing_cpool.  Don't save outgoing_cpool.
5979         (java_expand_classes): Don't restore outgoing_cpool.
5980         (java_finish_classes): Likewise.
5981
5982 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5983
5984         * Make-lang.in: (java.install-common) Add
5985         symlink for $(target_noncanonical)-gcjh for
5986         native builds.
5987
5988 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5989
5990         * Make-lang.in (java.extraclean): Delete.
5991
5992 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
5993
5994         * Make-lang.in (check-java): Add.
5995
5996 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
5997
5998         Fix PR java/13024.
5999         * except.c (prepare_eh_table_type): Allocate variable-sized
6000         buffer `buf' with alloca.
6001
6002 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6003
6004         Fix PR java/12857.
6005
6006         decl.c (java_init_decl_processing): Don't initialize
6007         class_not_found_type_node, no_class_def_found_type_node.
6008
6009         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6010         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6011         (class_not_found_type_node, no_class_def_found_type_node):
6012         Don't define.
6013
6014         parse.y (build_dot_class_method_invocation): Add this_class
6015         argument.  Qualify method invocations to a different class.
6016         (create_new_parser_context): Initialize saved_data_ctx to 0.
6017         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6018         (build_dot_class_method): Don't load classes.  Register
6019         incomplete types.
6020         (build_incomplete_class_ref): Special cases for interfaces
6021         and inner classes.  Move build_dot_class_method call to here...
6022         (patch_incomplete_class_ref): ...from here.  Pass current_class
6023         to build_dot_class_method_invocation.
6024         (build_assertion): Pass class_type to
6025         build_dot_class_method_invocation.
6026         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6027
6028 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6029
6030         Fix PR java/12739.
6031         * java-tree.h (BLOCK_EMPTY_P): Define.
6032         * parse.y (java_complete_lhs): Check for empty blocks
6033         in TRY_FINALLY_EXPR case.
6034
6035 2003-11-17  Andrew Haley  <aph@redhat.com>
6036
6037         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6038         (struct lang_decl_var:freed): New variable.
6039         * decl.c (poplevel): Mark local vars that have gone out of scope.
6040         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6041         scope.
6042
6043 2003-11-16  Jason Merrill  <jason@redhat.com>
6044
6045         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6046         and TAGS files that include them for each front end.
6047
6048 2003-11-15  Tom Tromey  <tromey@redhat.com>
6049
6050         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6051
6052 2003-11-12  Jason Merrill  <jason@redhat.com>
6053
6054         PR optimization/12547
6055         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6056         BLOCK_EXPR_BODY directly.
6057
6058 2003-11-12  Andrew Haley  <aph@redhat.com>
6059
6060         PR java/11045
6061         * parse.y (fold_constant_for_init): Check that we really do have a
6062         constant.
6063
6064         PR java/11533
6065         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6066         init_test_decls being inlined.
6067
6068         PR java/12890:
6069         * parse.y (do_resolve_class): Check return value from
6070         breakdown_qualified().
6071
6072 2003-11-11  Tom Tromey  <tromey@redhat.com>
6073
6074         PR java/12915:
6075         * parse.y (merge_string_cste): Handle case where we have a
6076         pointer that happens to be zero, not null_pointer_node.
6077
6078 2003-11-10  Tom Tromey  <tromey@redhat.com>
6079
6080         * jcf-parse.c (classify_zip_file): Correctly compare
6081         filename_length against length of manifest file's name.
6082
6083 2003-11-08  Tom Tromey  <tromey@redhat.com>
6084
6085         PR java/12894:
6086         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6087
6088 2003-11-06  Andrew Haley  <aph@redhat.com>
6089
6090         * expr.c (java_stack_swap): Make sure destination stack slots are
6091         of the correct type.
6092
6093 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6094
6095         * Make-lang.in (dvi): Move targets to $(docobjdir).
6096         (gcj.dvi): Simplify rule and adjust target.
6097         (gcj.info): Simplify rule.
6098         (gcj.pod): New intermediate rule.
6099         (gcjh.pod): Likewise.
6100         (jv-scan.pod): Likewise.
6101         (jcf-dump.pod): Likewise.
6102         (gij.pod): Likewise.
6103         (jv-convert.pod): Likewise.
6104         (rmic.pod): Likewise.
6105         (rmiregistry.pod): Likewise.
6106         (gcj.1): Delete.
6107         (gcjh.1): Delete.
6108         (jv-scan.1): Delete.
6109         (jcf-dump.1): Delete.
6110         (gij.1): Delete.
6111         (jv-convert.1): Delete.
6112         (rmic.1): Delete.
6113         (rmiregistry.1): Delete.
6114
6115 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
6116
6117         Fixes PR java/12866.
6118         * parse.y (resolve_qualified_expression_name): Move test
6119         for outer field access methods from here...
6120         (check_thrown_exceptions) ...to here.
6121
6122 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
6123
6124         * .cvsignore: Delete.
6125
6126 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
6127
6128         * verify.c (verify_jvm_instructions): Don't warn about legal
6129         eh binding regions generated for example by jdk 1.4.1.
6130
6131 2003-10-24  David S. Miller  <davem@redhat.com>
6132
6133         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6134
6135 2003-10-22  Andrew Haley  <aph@redhat.com>
6136
6137         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6138         (java_get_callee_fndecl): New.
6139
6140         * jcf-parse.c (java_parse_file): Call emit_catch_table().
6141
6142         * java-tree.h (ctable_decl): New.
6143         (catch_classes):  New.
6144         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6145
6146         * decl.c (java_init_decl_processing): Add catch_class_type.
6147         Add ctable_decl.
6148         Add catch_classes field.
6149
6150         * class.c (build_indirect_class_ref): Break out from
6151         build_class_ref.
6152         (make_field_value): Check flag_indirect_dispatch.
6153         (make_class_data): Ditto.
6154         Tidy uses of PUSH_FIELD_VALUE.
6155         Add field catch_classes.
6156         (make_catch_class_record): New.
6157
6158         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6159
6160 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6161
6162         * jcf-write.c: Follow spelling conventions.
6163         * parse.y: Likewise.
6164
6165 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6166
6167         * ChangeLog: Fix typos.
6168         * expr.c: Fix comment typos.
6169         * jcf-write.c: Likewise.
6170         * lang.c: Likewise.
6171         * lex.c: Likewise.
6172         * mangle.c: Likewise.
6173         * parse-scan.y: Likewise.
6174         * parse.y: Likewise.
6175
6176 2003-10-22  Tom Tromey  <tromey@redhat.com>
6177
6178         * expr.c (expand_byte_code): Only warn about dead bytecode when
6179         extra_warnings is set.
6180
6181 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
6182
6183         Fix for PR java/12586.
6184         * mangle.c (find_compression_record_match): Don't iterate through
6185         package namespace elements unless they all match compression_table
6186         entries.
6187
6188 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
6189
6190         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6191         (generate-manpages): Likewise.
6192         (java.maintainer-clean): Likewise.
6193         (gcj.info): Likewise.
6194         (gcj.1): Likewise.
6195         (gcjh.1): Likewise.
6196         (jv-scan.1): Likewise.
6197         (jcf-dump.1): Likewise.
6198         (gij.1): Likewise.
6199         (jv-convert.1): Likewise.
6200         (rmic.1): Likewise.
6201         (rmiregistry.1): Likewise.
6202         (java.install-man): Likewise.
6203         (parse-scan.o): Move and define complete compile line.
6204         (parse.o): Likewise.
6205         (jcf-tree-inline.o): Move.
6206
6207 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
6208
6209         * Make-lang.in (info): Update dependencies.
6210         (java.install-info): Remove.
6211         ($(srcdir)/java/gcj.info): Replace with ...
6212         ($(docobjdir)/gcj.info): ... this.
6213
6214 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
6215
6216         * Make-lang.in: Replace uses of $(target_alias) with
6217         $(target_noncanonical).
6218
6219 2003-10-09  Tom Tromey  <tromey@redhat.com>
6220
6221         * decl.c (java_init_decl_processing): Declare signers field.
6222         * class.c (make_class_data): Set signers field.
6223
6224 2003-10-09  Jason Merrill  <jason@redhat.com>
6225
6226         * parse.y (patch_assignment): Use make_node to create a BLOCK.
6227         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6228         POINTER_TYPE.
6229
6230 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
6231
6232         * Make-lang.in (java.info): Replace with ...
6233         (info): ... this.
6234         (java.dvi): Replace with ...
6235         (dvi): ... this.
6236         (java.generated-manpages): Replace with ...
6237
6238 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
6239
6240         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6241
6242 2003-10-01  Andrew Haley  <aph@redhat.com>
6243
6244         * jcf-parse.c (java_parse_file): Write otable and atable.
6245         * java-tree.h (atable_methods): New.
6246         (atable_decl): New.
6247         (atable_syms_decl): New.
6248         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6249         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6250         (symbol_*type): Rename method_symbol* to symbol*type.
6251         (emit_offset_symbol_table): Delete.
6252         (emit_symbol_table): New.
6253         (get_symbol_table_index): New.
6254         (atable_type): New.
6255         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6256         (build_known_method_ref): Likewise.
6257         (get_symbol_table_index): Rename from get_offset_table_index.
6258         Parameterize to allow re-use by differing types of symbol table.
6259         (build_invokevirtual): Pass table to get_offset_table_index.
6260         * decl.c (java_init_decl_processing): Push types and decls for
6261         atable and atable_syyms.
6262         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6263         (make_class_data): Add new fields atable and atable_syms.
6264         (emit_symbol_table): Rename from emit_offset_symbol_table.
6265         Parameterize to allow re-use by different types of symbol table.
6266         (build_symbol_entry): Renamed from build_method_symbols_entry.
6267
6268 2003-09-30  Roger Sayle  <roger@eyesopen.com>
6269
6270         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6271         semantics for SAVE_EXPR, by caching the result in a temporary.
6272
6273 2003-09-28  Richard Henderson  <rth@redhat.com>
6274
6275         * check-init.c (check_init): Save and restore input_location
6276         instead of file and line separately.
6277         * decl.c (java_expand_body): Likewise.
6278         * jcf-write.c (generate_bytecode_insns): Likewise.
6279         * parse.y (safe_layout_class): Likewise.
6280         * jcf-parse.c (read_class, parse_class_file): Likewise.
6281         (java_parse_file): Use %H for warning locator.
6282
6283 2003-09-28  Roger Sayle  <roger@eyesopen.com>
6284
6285         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6286         with void-type branches instead of using a COMPOUND_EXPR.
6287
6288 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
6289
6290         * decl.c (java_optimize_inline, dump_function): Remove.
6291         * java-tree.h (java_optimize_inline): Remove declaration.
6292         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6293         * parse.y (source_end_java_method, java_expand_classes):
6294         Likewise.  Remove dead code.
6295
6296 2003-09-27  Roger Sayle  <roger@eyesopen.com>
6297
6298         * lang.c (java_init_options): Set flag_evaluation_order.
6299         * expr.c (force_evaluation_order): Don't attempt to force
6300         evaluation order of binary operations using save_expr.
6301         * parse.y (java_complete_lhs): No longer need to call
6302         force_evaluation_order when constructing binary operators.
6303
6304 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6305             Bryce McKinlay  <bryce@mckinlay.net.nz>
6306
6307         PR java/1333:
6308         * parse.y (not_accessible_field_error): New function.
6309         (resolve_expression_name): Check field access permissions.
6310         (resolve_qualified_expression_name): Use
6311         not_accessible_field_error.
6312         (resolve_qualified_expression_name): Likewise.
6313
6314 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6315
6316         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6317
6318 2003-09-23  Roger Sayle  <roger@eyesopen.com>
6319
6320         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6321         with equal operands without side-effects.
6322
6323 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
6324
6325         * decl.c (java_init_decl_processing): Don't emit otable decls
6326         if flag_indirect_dispatch is not set.
6327
6328 2003-09-21  Richard Henderson  <rth@redhat.com>
6329
6330         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6331         resource.c: Revert.
6332
6333 2003-09-21  Richard Henderson  <rth@redhat.com>
6334
6335         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6336         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6337
6338 2003-09-20  Richard Henderson  <rth@redhat.com>
6339
6340         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6341
6342 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6343
6344         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6345         * check-init.c (check_init): Likewise.
6346
6347 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6348
6349         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6350
6351 2003-09-16  Andrew Haley  <aph@redhat.com>
6352
6353         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6354
6355 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
6356
6357         Fixes PR java/9577
6358         * mangle.c (find_compression_record_match): Skip
6359         over a "6JArray" (the array template mangled string)
6360         IDENTIFIER_NODE.
6361         (mangle_array_type): Correct minor typo.
6362         (atms): Move definition to the beginning.
6363
6364 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
6365
6366         * class.c (add_miranda_methods): Ensure super-interfaces are laid
6367         out. Fix for PR java/12254.
6368
6369 2003-09-11  Richard Henderson  <rth@redhat.com>
6370
6371         * parse.y (source_end_java_method): Update for new
6372         cgraph_finalize_function argument.
6373
6374 2003-09-09  Richard Henderson  <rth@redhat.com>
6375
6376         * parse.y (source_end_java_method): Update call to
6377         cgraph_finalize_function.
6378
6379 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
6380
6381         * decl.c (java_expand_body): New function.
6382         * expr.c (build_class_init): Set DECL_IGNORED_P.
6383         * java-tree.h (start_complete_expand_method,
6384         java_expand_body): Declare.
6385         * jcf-parse.c (cgraph.h): Include.
6386         (java_parse_file): Handle flag_unit_at_a_time.
6387         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6388         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6389         (java_estimate_num_insns): Use walk_tree_without_duplicates.
6390         (java_start_inlining): New function.
6391         * parse.h (java_finish_classes): Declare.
6392         * parse.y: Include cgraph.h.
6393         (block): Don't special-case empty block production.
6394         (craft_constructor): Set DECL_INLINE.
6395         (source_end_java_method): Handle flag_unit_at_a_time.
6396         Replace inline code with call to java_expand_body.
6397         (start_complete_expand_method): Remove static modifier.
6398         (java_expand_method_bodies): Patch function tree for
6399         class initialization and/or synchronization as needed.
6400         Don't begin RTL expansion yet.
6401         (java_expand_classes): Check flag_unit_at_a_time before
6402         calling finish_class.
6403         (java_finish_classes): New function.
6404         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6405         (patch_assignment): Set DECL_CONTEXT on temporary variable.
6406         (emit_test_initialization): Set DECL_IGNORED_P.
6407
6408 2003-09-03  Roger Sayle  <roger@eyesopen.com>
6409
6410         * builtins.c (enum builtin_type): Delete unused enumeration.
6411         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6412
6413 2003-08-28  Tom Tromey  <tromey@redhat.com>
6414
6415         * gcj.texi (Extensions): Document gcjlib URLs.
6416
6417 2003-08-20  Tom Tromey  <tromey@redhat.com>
6418
6419         * gcj.texi (Extensions): Added xref.
6420         (libgcj Runtime Properties): Document
6421         gnu.gcj.runtime.VMClassLoader.library_control.
6422
6423 2003-08-20  Andrew Haley  <aph@redhat.com>
6424
6425         * except.c (prepare_eh_table_type): Use new encoding for exception
6426         handlers when using -fno-assume-compiled.
6427
6428 2003-08-13  Tom Tromey  <tromey@redhat.com>
6429
6430         * gcj.texi (Invoking gij): Document -X and -?.
6431
6432 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
6433
6434         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6435         GCJH_OBJS, JCFDUMP_OBJS
6436         * win32-host.c: Removed the unnecessary and broken dependency
6437         on jcf.h
6438
6439 2003-08-11  Tom Tromey  <tromey@redhat.com>
6440
6441         * parse.y (java_check_regular_methods): Typo fixes.  Call
6442         check_interface_throws_clauses.  Use
6443         check_concrete_throws_clauses.
6444         (check_interface_throws_clauses): New function.
6445         (check_concrete_throws_clauses): New function.
6446         (hack_is_accessible_p): New function.
6447         (find_most_specific_methods_list): Added FIXME.
6448         * typeck.c (lookup_do): Use `flags' argument to decide what to
6449         do.  Reimplemented.
6450         (lookup_argument_method_generic): New function.
6451         (lookup_argument_method2): Removed.
6452         * jcf.h (ACC_INVISIBLE): New define.
6453         * jcf-write.c (generate_classfile): Skip invisible methods.
6454         * class.c (add_miranda_methods): New function.
6455         (layout_class_methods): Use it.
6456         (get_access_flags_from_decl): Use ACC_INVISIBLE.
6457         * java-tree.h (METHOD_INVISIBLE): New define.
6458         (lang_decl_func) [invisible]: New field.
6459         (lookup_argument_method_generic): Declare.
6460         (SEARCH_INTERFACE): New define.
6461         (SEARCH_SUPER): Likewise.
6462         (SEARCH_ONLY_INTERFACE): Likewise.
6463         (SEARCH_VISIBLE): Likewise.
6464         (lookup_argument_method2): Removed declaration.
6465
6466 2003-08-05  Tom Tromey  <tromey@redhat.com>
6467
6468         Fix for PR java/11600:
6469         * parse.y (java_complete_lhs): See whether we're calling a method
6470         on an array.
6471         (check_thrown_exceptions): Added `is_array_call' argument;
6472         fixed `clone' checking; updated all callers.
6473
6474 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
6475
6476         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6477
6478 2003-08-03  Tom Tromey  <tromey@redhat.com>
6479
6480         * java-tree.h (METHOD_TRANSIENT): Removed.
6481         * decl.c (pushdecl): Removed some dead code.
6482         * class.c (get_access_flags_from_decl): Can't have transient
6483         method.
6484         (add_method_1): Can't have a transient method.
6485
6486 2003-07-28  Andreas Jaeger  <aj@suse.de>
6487
6488         * jvspec.c: Convert to ISO C90 prototypes.
6489
6490 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6491
6492         * decl.c (force_poplevels): Fix warning call.
6493
6494 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6495
6496         * expr.c (expand_java_field_op): Don't use xxx_with_decl
6497         (expand_java_field_op): Likewise.
6498         * class.c (layout_class_method): Likewise
6499         (emit_register_classes): Likewise.
6500         * decl.c (pushdecl): Likewise.
6501         (poplevel): Likewise.
6502         (force_poplevels): Likewise.
6503         (give_name_to_locals): Likewise.
6504         * check-init.c (check_for_initialization): Likewise.
6505
6506 2003-07-24  Jason Merrill  <jason@redhat.com>
6507
6508         * java-tree.h: Move boolean_type_node et al to the back end.
6509
6510 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6511
6512         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6513         casts.
6514
6515 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
6516
6517         * lang.opt: Don't show -MD_ and -MDD_.
6518
6519 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
6520
6521         * lang-options.h: Remove.
6522         * lang.opt: Add help text.
6523
6524 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
6525
6526         * expr.c: Remove the last argument to expand_assignment().
6527
6528 2003-07-09  Jan Hubicka  <jh@suse.cz>
6529
6530         * java-tree.h (DECL_NUM_STMTS): Rename to...
6531         (DECL_ESTIMATED_INSNS): ... this.
6532         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6533         New static functions.
6534         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6535         * parser.y (add_stmt_to_compound): Do not account statements.
6536
6537 2003-07-08  Mark Wielaard  <mark@klomp.org>
6538
6539         * gcj.texi: CNI now expands to Compiled Native Interface.
6540
6541 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6542
6543         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6544
6545 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6546
6547         * expr.c (expand_byte_code): Adjist emit_line_note call.
6548
6549 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
6550
6551         * lang.c (java_handle_option): Don't handle filenames.
6552
6553 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
6554
6555         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6556         DIR_SEPARATOR.
6557         Use FILENAME_CMP.
6558         * jcf-write.c: Don't default-define DIR_SEPARATOR.
6559         * jcf.h: Delete COMPARE_FILENAMES definition.
6560
6561 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
6562
6563         * lang.c (java_init_options): Update prototype.
6564
6565 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
6566
6567         * decl.c (poplevel): Adjust define_label call.
6568
6569 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
6570
6571         * gjavah.c (flag_jni): Make non-static.
6572         * parse-scan.y (ctxp): Make non-static.
6573
6574         * class.c (build_method_symbols_entry)
6575         * expr.c (get_offset_table_index)
6576         * jcf-parse.c (jcf_parse):
6577         Mark the definition static, matching the forward declaration.
6578
6579 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
6580
6581         * lang.c (java_handle_option): Don't check for missing arguments.
6582
6583 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6584
6585         * class.c (push_class): Use a location_t to save place.
6586         (emit_register_classes): Set input_location. Adjust
6587         expand_function_end call.
6588         * resource.c (write_resource_constructor): Likewise.
6589         * decl.c (end_java_method): Adjust expand_function_end call.
6590         * parse.y (source_end_java_method): Likewise.
6591
6592 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
6593
6594         * lang.c (java_handle_option): Likewise.
6595
6596 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
6597
6598         * lang.c (java_handle_option): Special-casing of optional
6599         joined arguments no longer needed.
6600         * lang.opt: Update switches that take optional argument.
6601
6602 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6603
6604         * lang.opt: Declare Java.
6605         * lang.c (java_init_options): Update.
6606
6607 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6608
6609         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6610
6611 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6612
6613         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6614         * lang.c (java_handle_option): -MD and -MMD have an underscore.
6615         * lang.opt: -MD and -MMD have an underscore.
6616
6617 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6618
6619         * class.c (emit_register_classes): Adjust init_function_start
6620         call.
6621         * decl.c (complete_start_java_method): Likewise.
6622         * resource.c (write_resource_constructor): Likewise.
6623
6624 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6625
6626         * Make-lang.in: Update to use options.c and options.h.
6627         * lang.c: Include options.h not j-options.h.
6628         (java_handle_option): Abort on unrecognized option.
6629         (java_init_options): Request Java switches.
6630
6631 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
6632
6633         * Make-lang.in: Handle mostlyclean.
6634
6635 2003-06-11  Tom Tromey  <tromey@redhat.com>
6636
6637         * lang.c (java_handle_option): Update dependency_tracking for
6638         OPT_MF case.
6639
6640         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6641         empty argument.
6642
6643 2003-06-10  Andrew Haley  <aph@redhat.com>
6644
6645         * resource.c (write_resource_constructor): Use expand_expr to
6646         generate the address of the label attached to a resource.
6647         * Make-lang.in (java/resource.o): Add expr.h
6648
6649 2003-06-10  Andrew Haley  <aph@redhat.com>
6650
6651         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6652         (java_decl_ok_for_sibcall): New.
6653
6654 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
6655
6656         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6657         (java/j-options.c, java/j-options.h): New.
6658         * java-tree.h (resource_name, compile_resource_file,
6659         compile_resource_data): Constify.
6660         * jcf-write.c (jcf_write_base_directory): Similarly.
6661         * jcf.h (jcf_write_base_directory): Similarly.
6662         * lang.c: Include j-options.h.
6663         (cl_options_count, cl_options, string_option, java_decode_option,
6664         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6665         process_option_with_no): Remove.
6666         (resource_name): Constify.
6667         (LANG_HOOKS_HANDLE_OPTION): Override.
6668         (java_handle_option): New.
6669         (java_init): Don't call jcf_path_init.
6670         (java_init_options): Call jcf_path_init.
6671         * lang.opt: New.
6672         * resource.c (compile_resource_data, compile_resource_file): Constify.
6673
6674 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
6675
6676         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6677         (struct lang_decl_func): Add last_line field.
6678         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6679         DECL_SOURCE_LINE_LAST): Remove.
6680         * parse.y (missing_return_error, finish_method_declaration,
6681         lookup_cl, start_artificial_method_body, source_end_java_method,
6682         start_complete_expand_method): Adjust.
6683
6684 2003-06-08  Tom Tromey  <tromey@redhat.com>
6685
6686         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6687         fno-assume-compiled.
6688
6689 2003-06-08  Roger Sayle  <roger@eyesopen.com>
6690
6691         * builtins.c (define_builtin_type, builtin_types): Delete.
6692         (define_builtin): Rewritten to take just the built-in code,
6693         the function's name, type and fallback library function name.
6694         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6695         (initialize_builtins): Overhaul to define the GCC builtins
6696         used by gcj manually, providing the Java run-time's
6697         implementations as the fallback library function.
6698
6699 2003-06-08  Anthony Green  <green@redhat.com>
6700
6701         * parse.y (patch_cast): Fix conversions from floating-point to
6702         integral types.
6703
6704 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
6705
6706         * Make-lang.in: Update.
6707         * lang.c: Include opts.h. Define cl_options_count and cl_options.
6708
6709 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
6710
6711         * lang.c (java_init_options): Update.
6712
6713 2003-06-05  Jan Hubicka  <jh@suse.cz>
6714
6715         * Make-lang.in:  Add support for stageprofile and stagefeedback
6716
6717 2003-05-31  Roger Sayle  <roger@eyesopen.com>
6718
6719         * lang.c (java_init_options): Prescribe wrap-around two's
6720         complement arithmetic overflow by setting flag_wrapv.
6721
6722 2003-05-29  Roger Sayle  <roger@eyesopen.com>
6723
6724         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6725         (builtin_record): Add an additional builtin_code field to
6726         record which GCC built-in corresponds to the Java function.
6727         (java_builtins):  Add new entries for atan, atan2, exp, log,
6728         pow and tan.
6729         (max_builtin, min_builtin, abs_builtin): Perform constant
6730         folding on the resulting tree.
6731         (java_build_function_call_expr): Likewise, perform constant
6732         folding on the resulting tree.
6733         (initialize_builtins): The NULL creators are now allowed in
6734         the java_builtins table, which is now terminated by an entry
6735         with builtin_code == END_BUILTINS.
6736         (check_for_builtin): Likewise.  If the matching creator is
6737         NULL, construct the call using java_build_function_call_expr
6738         directly with the decl for the corresponding builtin_code.
6739
6740 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6741
6742         * win32-host.c: Normalize copyright boilerplate.
6743
6744 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6745
6746         * parse.y (print_int_node): Use string concatentation on
6747         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6748         function calls into one.
6749
6750 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
6751
6752         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6753         fatal_io_error with calls to fatal_error; add ": %m" to the end of
6754         all the affected error messages.
6755
6756 2003-05-13  Richard Henderson  <rth@redhat.com>
6757
6758         * class.c (layout_class_method): Set DECL_EXTERNAL.
6759         * decl.c (java_mark_decl_local, java_mark_class_local): New.
6760         * java-tree.h (java_mark_class_local): Declare.
6761         * jcf-parse.c (parse_class_file): Use it.
6762         * parse.y (java_expand_classes): Likewise.
6763
6764 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
6765
6766         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6767         * lex.h: #include input.h.
6768         * jv-scan.c (input_filename): Remove.
6769
6770 2003-05-02  Tom Tromey  <tromey@redhat.com>
6771
6772         PR java/10491:
6773         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6774         (handle_inner_classes): New function.
6775
6776 2003-05-01  Tom Tromey  <tromey@redhat.com>
6777
6778         PR java/10459:
6779         * parse.y (finish_for_loop): Do nothing if update expression is a
6780         EXPR_WFL_NODE wrapping nothing.
6781         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6782
6783 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
6784
6785         * lex.h (input_lineno): Remove declaration.
6786         * parse-scan.y: #include input.h.
6787         (input_filename): Remove declaration.
6788         (input_location): Add definition.
6789         (input_line): Remove definition.
6790
6791 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6792
6793         * lex.h (lineno): Rename to ...
6794         (input_line): ... here
6795         * parse-scan.y (lineno): Rename to ...
6796         (input_line): ... here.
6797         (reset_report): Rename lineno to input_line.
6798         * check-init.c (check_init): Likewise.
6799         * class.c (push_class): Likewise.
6800         * decl.c (complete_start_java_method, end_java_method): Likewise.
6801         * expr.c (expand_byte_code): Likewise.
6802         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6803         * jcf-write.c (generate_bytecode_insns): Likewise.
6804         * lex.c (java_init_lex, java_allocate_new_line,
6805         do_java_lex): Likewise.
6806         * parse.h (YYNOT_TWICE): Likewise.
6807         * parse.y (empty_statement, expression_statement,
6808         java_pop_parser_context, java_parser_context_save_global,
6809         yyerror, register_fields, method_header, safe_layout_class,
6810         find_in_imports_on_demand, create_artificial_method,
6811         source_end_java_method, start_complete_expand_method,
6812         build_thisn_assign, java_complete_lhs,
6813         maybe_absorb_scoping_block): Likewise.
6814
6815 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
6816
6817         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6818         '/' when computing java source filename
6819
6820 2003-04-13  Tom Tromey  <tromey@redhat.com>
6821
6822         * gjavah.c (print_c_decl): Indentation fix.
6823
6824 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
6825
6826         * class.c (make_field_value, make_method_value, get_dispatch_table)
6827         (make_class_data, emit_offset_symbol_table)
6828         * constants.c (build_constants_constructor)
6829         * java-tree.h (START_RECORD_CONSTRUCTOR)
6830         * parse.y (maybe_build_array_element_wfl):
6831         Use build_constructor.
6832
6833 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
6834
6835         PR java/10253:
6836         * parse.y (string_convert_int_cst): Always use at least one digit
6837         in string conversion. Remove ASCII dependence.
6838         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6839
6840 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
6841
6842         * Make-lang.in: added win32-host.c
6843         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6844         resolves to open() on non-Win32 platforms and
6845         Win32-specific jcf_open_exact_case() on Win32
6846         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6847         when trying .java and .class files
6848         * win32-host.c: added to repository. Defines
6849         Win32-specific jcf_open_exact_case()
6850
6851 2003-04-10  Andrew Haley  <aph@redhat.com>
6852
6853         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6854         (maybe_free_localvar): Renamed from localvar_free.
6855         Add new arg, really.
6856         (generate_bytecode_insns): Set new variable, jsrs.
6857         Only free local vars if no jsr insns have been emittted.
6858         Call maybe_free_localvar, not localvar_free.
6859
6860 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6861
6862         * gcj.texi: Remove @ at start of file.
6863
6864 2003-03-25  Tom Tromey  <tromey@redhat.com>
6865
6866         * parse.y (create_interface): Call CHECK_DEPRECATED.
6867
6868 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6869
6870         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6871
6872 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6873
6874         * javaop.h (jfloat, jdouble): Make them structures mirroring
6875         the bit fields of IEEE float and double respectively.
6876         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6877         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6878         (union Word, union DWord): Delete.
6879         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6880
6881         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6882         D_NAN_MASK): Delete.
6883         (jni_print_float, jni_print_double): New.  Generate
6884         hexadecimal floating constants.
6885         (print_field_info): Use jni_print_float/double.
6886
6887         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6888         finite floating point numbers for output; special case
6889         non-finite floats.
6890
6891 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6892
6893         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6894         Replace 0 and 1 with true and false in return statements.
6895
6896 2003-03-19  Tom Tromey  <tromey@redhat.com>
6897
6898         * lex.c (do_java_lex): Renamed from java_lex.
6899         (java_lex): New function.
6900         Include timevar.h.
6901
6902 2003-03-13  Tom Tromey  <tromey@redhat.com>
6903
6904         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6905         type.
6906
6907 2003-03-04  Andrew Haley  <aph@redhat.com>
6908
6909         * gjavah.c (is_first_data_member): New global variable.
6910         (print_c_decl): If it's the first data member, align it as the
6911         superclass.
6912         (process_file): Set is_first_data_member.
6913
6914 2003-03-11  Tom Tromey  <tromey@redhat.com>
6915
6916         * parse.y (resolve_field_access): Initialize class if field is
6917         found in another static field.
6918         * expr.c (build_class_init): Don't optimize out initialization of
6919         implemented interface.
6920
6921 2003-03-11  Andrew Haley  <aph@redhat.com>
6922
6923         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6924         warning.
6925
6926 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6927
6928         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6929         and DIR_SEPARATOR_2 for a target.
6930         Correct minor typos.
6931
6932         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6933         and DIR_SEPARATOR_2 for a target into account.
6934
6935 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6936
6937         * lang.c (java_init): Update prototype, move code to java_post_options.
6938         (java_post_options): Similarly.
6939
6940 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6941
6942         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6943         compare file name components depending on the case-sensitivity
6944         or otherwise of the host file system.
6945
6946         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6947         "strcmp" to compare file name components.
6948         Use IS_DIR_SEPARATOR instead of comparing directly against
6949         DIR_SEPARATOR.
6950         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6951         comparing directly against DIR_SEPARATOR.
6952
6953 2003-03-04  Tom Tromey  <tromey@redhat.com>
6954
6955         * Make-lang.in (java.tags): New target.
6956
6957 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6958
6959         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6960         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6961
6962 2003-03-01  Tom Tromey  <tromey@redhat.com>
6963
6964         * parse.y (jdep_resolve_class): Only check deprecation if we found
6965         a decl.
6966
6967 2003-02-28  Tom Tromey  <tromey@redhat.com>
6968
6969         PR java/9695:
6970         * class.c (maybe_layout_super_class): Always pass a WFL to
6971         do_resolve_class.
6972         * parse.y (do_resolve_class): Updated comment to explain
6973         parameters.
6974
6975 2003-02-26  Tom Tromey  <tromey@redhat.com>
6976
6977         * jcf-write.c (generate_classfile): Check whether class is
6978         deprecated before writing attribute count.
6979
6980 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6981
6982         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6983         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6984
6985 2003-02-23  Tom Tromey  <tromey@redhat.com>
6986
6987         * lang-options.h: Added -Wdeprecated.
6988         * gcj.texi (Warnings): Document -Wdeprecated.
6989         * java-tree.h (flag_deprecated): Declare.
6990         * lang.c (lang_W_options): Added deprecated.
6991         (flag_deprecated): New global.
6992         * chartables.h: Rebuilt.
6993         * gen-table.pl (process_one): Look at whitespace.
6994         (print_tables): Define LETTER_SPACE, LETTER_MASK.
6995         * parse.h (CLEAR_DEPRECATED): New macro.
6996         (CHECK_DEPRECATED_NO_RESET): New macro.
6997         * jcf-parse.c (handle_deprecated): New function.
6998         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
6999         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7000         * parse.y (resolve_type_during_patch): Check deprecation.
7001         (jdep_resolve_class): Likewise.
7002         (process_imports): Likewise.
7003         (resolve_expression_name): Likewise.
7004         (check_deprecation): Strip arrays from decl.  Check
7005         flag_deprecated.
7006         (patch_method_invocation): Also check the particular constructor
7007         for deprecation.
7008         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7009         * jcf-write.c (append_deprecated_attribute): New function.
7010         (generate_classfile): Generate deprecated attribute when
7011         appropriate.
7012         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7013         (java_lex) [case '*']: Simplify logic.
7014         (java_start_char_p): Use LETTER_MASK.
7015         (java_part_char_p): Likewise.
7016         (java_space_char_p): New function.
7017
7018 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7019
7020         Change base class access representation.
7021         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7022         (add_interface_do): Likewise.
7023
7024 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7025
7026         * decl.c (java_init_decl_processing): Change
7027         soft_lookupjnimethod_node to reflect the change in
7028         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7029         * expr.c (build_jni_stub): Calculate and pass the size
7030         on the stack of the arguments to a JNI function. Use
7031         new target macro MODIFY_JNI_METHOD_CALL to allow a
7032         target to modify the call to a JNI method.
7033
7034 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7035
7036         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7037         instead of basename to avoid compiler warnings on Tru64.
7038
7039 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7040
7041         * gcj.texi: Update to GFDL 1.2.
7042
7043 2003-01-31  Andrew Haley  <aph@redhat.com>
7044
7045         * parse.y (java_expand_classes): Scan the whole class list looking
7046         for access methods that haven't yet been expanded.
7047
7048 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7049
7050         Fix for java/4269:
7051
7052         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7053         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7054         * jcf-parse.c: Likewise.
7055
7056 2003-01-31  Mark Wielaard  <mark@klomp.org>
7057
7058         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7059
7060 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7061
7062         * class.c (make_class): Use BINFO_ELTS.
7063         (set_super_info): Likewse.
7064         (add_interface_do): Likewise.
7065
7066 2003-01-30  Tom Tromey  <tromey@redhat.com>
7067
7068         * jcf-parse.c (read_class): Update identifier's class value if it
7069         changed during parsing.
7070
7071 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7072
7073         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7074         Propagate change to all other rules as required.
7075         (java/parse-scan.o): Add explicit dependency on
7076         $(parsedir)/java/parse-scan.c .
7077
7078 2003-01-29  Tom Tromey  <tromey@redhat.com>
7079
7080         * parse.y (patch_assignment): Only transform the rhs of an
7081         assignment when compiling to native.
7082
7083 2003-01-28  Tom Tromey  <tromey@redhat.com>
7084
7085         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7086
7087 2003-01-28  Tom Tromey  <tromey@redhat.com>
7088
7089         * lex.c (java_lex): Don't include UEOF as part of token.
7090         (java_read_unicode): Error if \u sequence prematurely terminated.
7091
7092 2003-01-27  Tom Tromey  <tromey@redhat.com>
7093
7094         * parse.y (java_check_regular_methods): Check for construct after
7095         checking types in throws clause.
7096
7097 2003-01-24  Tom Tromey  <tromey@redhat.com>
7098
7099         * class.c (build_static_field_ref): Only a String or numeric field
7100         can fold to a constant.
7101
7102 2003-01-23  Tom Tromey  <tromey@redhat.com>
7103
7104         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7105         file name in resource buffer.
7106
7107 2003-01-23  Tom Tromey  <tromey@redhat.com>
7108
7109         * expr.c (build_known_method_ref): Use method's context to find
7110         method table index.
7111
7112 2003-01-23  Tom Tromey  <tromey@redhat.com>
7113
7114         * constants.c (set_constant_entry): Allocated cleared memory.
7115
7116 2003-01-22  Tom Tromey  <tromey@redhat.com>
7117
7118         * java-tree.h: Don't use PARAMS.
7119         * resource.c: Add prototypes for all functions.
7120         (write_resource_constructor): Use `const char *' to avoid
7121         warning.
7122
7123 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
7124
7125         * jcf-parse.c (process_zip_dir): Remove unused variable.
7126
7127 2003-01-22  Tom Tromey  <tromey@redhat.com>
7128
7129         * expr.c (build_invokeinterface): Abort if method's context is not
7130         an interface.
7131
7132 2003-01-22  Tom Tromey  <tromey@redhat.com>
7133
7134         * gcj.texi (Input and output files): Mention non-class entries.
7135         * decl.c (java_init_decl_processing): Call
7136         init_resource_processing.
7137         * java-tree.h (compile_resource_data, write_resource_constructor,
7138         compile_resource_file, init_resource_processing): Declare.
7139         * config-lang.in (gtfiles): Added resource.c.
7140         * Make-lang.in (gt-java-resource.h): New target.
7141         (JAVA_OBJS): Added resource.o.
7142         (java/resource.o): New target.
7143         * resource.c: New file.
7144         * class.c (compile_resource_file): Moved to resource.c.
7145         (registerResource_libfunc): Likewise.
7146         (utf8_decl_list): Mark with GTY; now static.
7147         * jcf-parse.c (classify_zip_file): New function.
7148         (parse_zip_file_entries): Use it; compile .properties files.
7149         (process_zip_dir): Use classify_zip_file and compute_class_name.
7150         Don't write class name into zip directory.
7151         (java_parse_file): Call write_resource_constructor.
7152         (compute_class_name): New function.
7153         * jcf-io.c (read_zip_member): Reindented.
7154
7155 2003-01-21  Tom Tromey  <tromey@redhat.com>
7156
7157         * class.c (supers_all_compiled): New function.
7158         (make_class_data): Use it.
7159
7160 2003-01-21  Tom Tromey  <tromey@redhat.com>
7161
7162         * parse.y (method_header): Native method can't be strictfp.
7163         No method can be transient or volatile.
7164
7165 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7166
7167         Make-lang.in (jvspec.o-warn): Add -Wno-error.
7168
7169 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
7170
7171         * check-init.c: Fix comment typos.
7172         * class.c: Likewise.
7173         * constants.c: Likewise.
7174         * decl.c: Likewise.
7175         * except.c: Likewise.
7176         * expr.c: Likewise.
7177         * java-except.h: Likewise.
7178         * java-tree.h: Likewise.
7179         * javaop.h: Likewise.
7180         * jcf-dump.c: Likewise.
7181         * jcf-io.c: Likewise.
7182         * jcf-parse.c: Likewise.
7183         * jcf-write.c: Likewise.
7184         * lang.c: Likewise.
7185         * mangle.c: Likewise.
7186         * typeck.c: Likewise.
7187         * verify.c: Likewise.
7188
7189 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7190
7191         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7192         * jcf-write.c: Include "tm_p.h".
7193
7194 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7195
7196         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7197
7198 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7199
7200         * builtins.c (java_build_function_call_expr): Renamed from
7201         build_function_call_expr.  All callers changed.
7202
7203         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7204         * jcf-parse.c: Include tm_p.h.
7205
7206         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7207         warning.
7208
7209 2003-01-14  Tom Tromey  <tromey@redhat.com>
7210
7211         * class.c (make_class_data): Check that super is compiled before
7212         building class reference to it.
7213
7214 2003-01-14  Andrew Haley  <aph@redhat.com>
7215
7216         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7217         varargs function -- correct.
7218
7219 2003-01-14  Andrew Haley  <aph@redhat.com>
7220
7221         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7222
7223 2003-01-14  Andrew Haley  <aph@redhat.com>
7224
7225         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7226         varargs function -- correct.
7227
7228         * parse.y (patch_assignment): Copy the rhs of an assignment into a
7229         temporary if the RHS is a reference.
7230
7231 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7232
7233         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7234         * keyword.h: Regenerated.
7235
7236         * All Files: Convert to ISO C style function definitions.
7237
7238 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7239
7240         * parse.y (check_pkg_class_access): ANSIfy definition.
7241
7242 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7243
7244         * decl.c, parse-scan.y, parse.y: Don't cast return value of
7245         xmalloc et al.
7246
7247         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7248
7249 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
7250
7251         Merge from pch-branch:
7252
7253         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
7254
7255         * Make-lang.in (java/gjavah.o): Update dependencies.
7256         * gjavah.c: Include ggc.h.
7257
7258         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
7259
7260         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7261         (JCFDUMP_OBJS): Add ggc-none.o.
7262         (java/jcf-dump.o): Depend on GGC_H.
7263         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7264         CPool substructures.
7265         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7266         * jcf-dump.c: Include ggc.h.
7267
7268         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7269
7270         * jcf.h (union cpool_entry): New.
7271         (struct CPool): Use gengtype to mark.  Change field 'data' to be
7272         an array of unions.
7273         (struct JCF): Use gengtype to mark.
7274         (CPOOL_UINT): Update for new cpool_entry type.
7275         (CPOOL_USHORT1): Likewise.
7276         (CPOOL_USHORT2): Likewise.
7277         (CPOOL_FINISH): Use GC to free cpool subfields.
7278         * parse.h (struct parser_ctxt): Mark field current_jcf.
7279         * lex.c (java_init_lex): Use GC to allocate struct JCF.
7280         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7281         (main_jcf): Use gengtype to mark.
7282         (ggc_mark_jcf): Delete.
7283         (get_constant): Update for new cpool_entry type.
7284         (give_name_to_class): Likewise.
7285         (get_class_constant): Likewise.
7286         (init_outgoing_cpool): Use GGC to allocate struct CPool.
7287         (java_parse_file): Use GGC to allocate struct JCF.
7288         (init_jcf_parse): Don't call ggc_add_root.
7289         * jcf-reader.c (jcf_parse_constant_pool): Update for new
7290         cpool_entry type.
7291         * java-tree.h (current_jcf): Use gengtype to mark.
7292         (CPOOL_UTF): Update for new cpool_entry type.
7293         (outgoing_cpool): Use gengtype to mark.
7294         (struct lang_type): GC struct JCF and struct CPool.
7295         * config-lang.in (gtfiles): Add jcf.h.
7296         * constants.c (find_tree_constant): New.
7297         (set_constant_entry): Allocate cpool subfields using GGC.  Update
7298         for new cpool_entry type.
7299         (find_constant1): Update for new cpool_entry type.
7300         (find_constant2): Likewise.
7301         (find_utf8_constant): Use find_tree_constant.
7302         (find_class_or_string_constant): Remove unnecessary cast to jword.
7303         Update for new cpool_entry type.
7304         (count_constant_pool_bytes): Update for new cpool_entry type.
7305         (write_constant_pool): Likewise.
7306         (alloc_name_constant): Use find_tree_constant.
7307         (build_constants_constructor): Update for new cpool_entry type.
7308
7309         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7310
7311         * parse.y (mark_parser_ctxt): Delete.
7312         (goal): Don't use ggc_add_root.
7313         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7314         (java_pop_parser_context): Let GC free parser_ctxt.
7315         (java_parser_context_resume): Likewise.
7316         * parse.h (struct parser_ctxt): Use gengtype to mark.
7317         (ctxp): Likewise.
7318         (ctxp_for_generation): Likewise.
7319         * lex.h (struct java_lc_s): Mark for gengtype.
7320         (java_lexer): Rearrange for gengtype.
7321         * config-lang.in (gtfiles): Add lex.h, parse.h.
7322
7323 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7324
7325         * All Files: Remove PARAMS macro.
7326
7327         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7328         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7329         `__STDC__' macros.
7330
7331         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7332         VA_CLOSE.
7333
7334 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
7335
7336         * Make-lang.in (java.install-common, java.uninstall,
7337         java.install-info, java.install-man): Prepend $(DESTDIR)
7338         to destination paths in all (un)installation commands.
7339         (java.install-common): Rewrite $(LN) command to support
7340         DESTDIR with "ln" as well as with "ln -s".
7341
7342 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
7343
7344         * java-tree.h: Protect against multiple inclusion.
7345
7346 2003-01-07  Tom Tromey  <tromey@redhat.com>
7347
7348         * class.c (add_assume_compiled): Don't adjust parent if we're
7349         already at the root of tree.
7350
7351 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7352
7353         * lang.c (dump_compound_expr): Prototype.
7354
7355 2003-01-03  Tom Tromey  <tromey@redhat.com>
7356
7357         Fix for PR java/8712:
7358         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7359         when simply checking against `null'.
7360
7361 2003-01-03  Tom Tromey  <tromey@redhat.com>
7362
7363         * gcj.texi (Standard Properties): Document http.proxyHost and
7364         http.proxyPort.
7365
7366         * gcj.texi (GNU Classpath Properties): Document new properties.
7367
7368 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7369
7370         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7371         java/lang-options.h, java/mangle.c, java/mangle_name.c,
7372         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7373
7374 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7375
7376         * Make-lang.in, boehm.c, buffer.c,
7377           buffer.h, builtins.c, class.c,
7378           config-lang.in, constants.c,
7379           convert.h, decl.c, except.c,
7380           expr.c, java-except.h,
7381           java-tree.h, javaop.def,
7382           jcf-parse.c, jcf-write.c,
7383           jv-scan.c, jvgenmain.c,
7384           jvspec.c, keyword.gperf,
7385           keyword.h, lang-options.h,
7386           lang-specs.h, lang.c, lex.c,
7387           lex.h, mangle.c, mangle_name.c,
7388           parse-scan.y, parse.h, parse.y,
7389           typeck.c, verify.c, xref.c,
7390           xref.h: Replace "GNU CC" with
7391           "GCC" in the copyright header.
7392
7393         * check-init.c, gjavah.c, javaop.h,
7394           jcf-depend.c, jcf-dump.c, jcf-io.c,
7395           jcf-path.c, jcf-reader.c, jcf.h,
7396           zextract.c, zipfile.h: These files are
7397           "part of GCC". Also say "GCC" not "GNU CC".
7398
7399 2002-12-30  DJ Delorie  <dj@redhat.com>
7400
7401         * Make-lang.in: Protect against texi2pod/pod2man failing.
7402
7403 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
7404
7405         * gcj.texi: Use @copying.
7406
7407 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7408
7409         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7410         print_cxx_classname.
7411         (print_cxx_classname): Add add_scope parameter.
7412         (print_class_decls): Do not emit a semicolon after the extern
7413         "Java" block.
7414         (process_file): Adjust calls to print_cxx_classname.
7415
7416 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7417
7418         * gcj.texi: Include Cover Texts in man page.
7419
7420 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
7421
7422         * class.c (build_static_field_ref): Check FIELD_FINAL.
7423
7424         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7425         instead of current_constant_pool_data_ref.
7426         * java-tree.h (current_constant_pool_data_ref): Undefine.
7427         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7428         * jcf-parse.c (init_outgoing_cpool): Don't initialize
7429         current_constant_pool_data_ref.
7430
7431         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7432         not build_internal_class_name.
7433
7434         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7435         Use it when class ref isn't certain to be compiled.
7436
7437 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7438
7439         * gcj.texi: Include gcc-common.texi.
7440         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7441         $(srcdir)/doc/include/gcc-common.texi.
7442
7443 2002-12-22  Anthony Green  <green@redhat.com>
7444
7445         * gcj.texi (Limitations): Add note about org.xml.sax and
7446         org.w3c.dom.
7447
7448 2002-12-20  Tom Tromey  <tromey@redhat.com>
7449
7450         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7451         where minimum case value is Integer.MIN_VALUE.
7452         Fixes PR java/8955.
7453
7454 2002-12-18  Andrew Haley  <aph@redhat.com>
7455
7456         * parse.y (patch_invoke): Force evaluation order when `check' is
7457         set.  For PR libgcj/8945.
7458
7459 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
7460
7461         * gcj.texi: Change version number to 3.4.
7462
7463 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
7464         Andrew Haley <aph@redhat.com>
7465
7466         * parse.y (source_end_java_method): Remove custom encoding of line
7467         numbers for a function decl before passing it to the back end.
7468
7469 2002-12-03  Andrew Haley  <aph@redhat.com>
7470
7471         * class.c (make_class_data): New field, "chain".
7472         * decl.c (java_init_decl_processing): Likewise.
7473
7474 2002-12-02  Tom Tromey  <tromey@redhat.com>
7475
7476         For PR java/8740:
7477         * parse.y (do_resolve_class): Handle qualified name via
7478         recursion.
7479
7480 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7481
7482         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7483         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7484         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7485         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7486         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7487         Include coretypes.h and tm.h.
7488         * Make-lang.in: Update dependencies.
7489
7490 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7491
7492         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7493
7494 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7495
7496         * jcf-reader.c: Don't expand JCF_readu4 inside the
7497         expansion of JCF_SKIP.
7498
7499 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7500
7501         * jcf-reader.c: Don't expand JCF_readu4 inside the
7502         expansion of JCF_SKIP.
7503
7504 2002-11-22  Tom Tromey  <tromey@redhat.com>
7505
7506         * parse.y (patch_binop): Cast right hand side of shift expression
7507         to `int'.  Fixes PR java/8676.
7508
7509 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
7510             Andrew Haley <aph@redhat.com>
7511
7512         * gcc/java/jcf-write.c (write_classfile): Remove target
7513         class file, if it exists, before renaming the temporary
7514         class file to it.
7515
7516 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7517
7518         * jvspec.c (lang_specific_spec_functions): New.
7519
7520 2002-11-18  Tom Tromey  <tromey@redhat.com>
7521
7522         Fix for PR java/7912:
7523         * expr.c (can_widen_reference_to): Allow cast of array to
7524         Cloneable or Serializable.
7525         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7526         (java_io_serializable_identifier_node): Likewise.
7527         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7528         (valid_ref_assignconv_cast_p): Use new identifier nodes.
7529         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7530         java_io_serializable.
7531         * decl.c (java_init_decl_processing): Initialize
7532         java_lang_cloneable_identifier_node and
7533         java_io_serializable_identifier_node.
7534         (java_lang_cloneable_identifier_node): New global.
7535         (java_io_serializable_identifier_node): Likewise.
7536
7537 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
7538
7539         * buffer.c: Remove unnecessary casts.
7540         * check-init.c: Likewise.
7541         * class.c: Likewise.
7542         * constants.c: Likewise.
7543         * decl.c: Likewise.
7544         * except.c: Likewise.
7545         * gjavah.c: Likewise.
7546         * jcf-io.c: Likewise.
7547         * jcf-parse.c: Likewise.
7548         * jcf-path.c: Likewise.
7549         * jvspec.c: Likewise.
7550         * lang.c: Likewise.
7551         * lex.c: Likewise.
7552         * verify.c: Likewise.
7553
7554 2002-11-06  Tom Tromey  <tromey@redhat.com>
7555
7556         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7557         a JNI header.
7558
7559 2002-11-05  Tom Tromey  <tromey@redhat.com>
7560
7561         Fix for PR java/6388.
7562         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7563         * java-tree.h (enum java_tree_index): New values
7564         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7565         (decimal_int_max, decimal_long_max): New defines.
7566         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
7567         (error_if_numeric_overflow): Rewrote range checking.
7568         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7569         decimal_long_max.
7570
7571 2002-11-02  Tom Tromey  <tromey@redhat.com>
7572
7573         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7574
7575         * class.c (make_method_value): Put class name, not signature, into
7576         `throws' field.  For PR java/8415.
7577
7578 2002-10-24  Tom Tromey  <tromey@redhat.com>
7579
7580         * gcj.texi (Invoking gij): Document --showversion.
7581         (Standard Properties): java.library.path now set.
7582
7583 2002-10-23  Tom Tromey  <tromey@redhat.com>
7584
7585         * gjavah.c (decode_signature_piece): In JNI mode, print
7586         `jobjectArray' when array depth is nonzero.
7587         Fixes PR java/8296.
7588
7589 2002-10-15  Andrew Haley  <aph@redhat.com>
7590
7591         * parse.y (patch_invoke): Call force_evaluation_order on a static
7592         arg list.
7593         (resolve_qualified_expression_name): Call force_evaluation_order
7594         on a arg list that is part of a Qualified Expression Name.
7595
7596         * lang.c (dump_compound_expr): New.
7597         (java_dump_tree): New.
7598
7599 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
7600
7601         * gcj.texi: Added item describing the GCJ runtime property
7602         "gnu.gcj.progname".
7603
7604 2002-10-15  Richard Henderson  <rth@redhat.com>
7605
7606         * jcf-parse.c (get_constant): Fix type warning.
7607
7608 2002-10-15  Andrew Haley  <aph@redhat.com>
7609
7610         * java-tree.h (java_inlining_merge_static_initializers): Declare.
7611         (java_inlining_map_static_initializers): Declare.
7612
7613 2002-10-14  Andrew Haley  <aph@redhat.com>
7614
7615         * tree-inline.c (remap_block): All local class initialization
7616         flags go in the outermost scope.
7617         (expand_call_inline): Call java_inlining_map_static_initializers.
7618         (expand_call_inline): Call java_inlining_merge_static_initializers.
7619         * java/lang.c (merge_init_test_initialization): New.
7620         (java_inlining_merge_static_initializers): New.
7621         (inline_init_test_initialization): New.
7622         (java_inlining_map_static_initializers): New.
7623
7624 2002-10-11  Mark Wielaard  <mark@klomp.org>
7625
7626         * gcj.texi (Compatibility): Add Limitations and Extensions section.
7627
7628 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7629
7630         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7631
7632 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7633
7634         * parse.y (merge_string_cste): Add parentheses around & within |.
7635
7636 2002-10-08  Tom Tromey  <tromey@redhat.com>
7637
7638         * parse.y (variable_declarator_id): Simplify error path for
7639         array declarator error.  For PR java/8003.
7640
7641 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
7642
7643         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7644         bug_report_url.
7645
7646 2002-10-08  Andrew Haley  <aph@redhat.com>
7647
7648         * parse.y (attach_init_test_initialization_flags): Check for
7649         error_mark_node.
7650
7651 2002-10-07  Anthony Green  <green@redhat.com>
7652
7653         * parse.y (merge_string_cste): Fix bug in string concatenation.
7654
7655 2002-10-03  Michael Koch  <konqueror@gmx.de>
7656
7657         * gcj.texi (Standard properties):
7658         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7659
7660 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7661
7662         PR optimization/6627
7663         * lang.c (java_init): If storing the vbit in function
7664         pointers, ensure that force_align_functions_log is atleast
7665         one to aid compatability with g++ vtables.
7666
7667 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
7668
7669         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7670         foul of type-based aliasing.
7671
7672 2002-09-30  Anthony Green  <green@redhat.com>
7673
7674         * gcj.texi (Invoking jv-scan): Fix texinfo.
7675
7676 2002-09-28  Anthony Green  <green@redhat.com>
7677
7678         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7679         (Code Generation): Add -fno-assert documentation.
7680         * jv-scan.c (flag_assert): New global.
7681         (options): Add assert option.
7682         (help): Add --no-assert documentation.
7683         * parse-scan.y (flag_assert): New global.
7684         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7685         (flag_assert): New global.
7686         * java-tree.h (flag_assert): New global.
7687         * lex.c (java_lex): Obey flag_assert.
7688         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7689         calling cc1.
7690
7691 2002-09-26  Andrew Haley  <aph@redhat.com>
7692
7693         * expr.c (build_java_array_length_access): Check for null pointer.
7694         * expr.c (expand_java_arrayload): Likewise.
7695
7696 2002-09-21  Richard Henderson  <rth@redhat.com>
7697
7698         * jcf-parse.c (get_constant): Decode from IEEE no matter
7699         what the target format.
7700
7701 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
7702
7703         * ChangeLog: Follow spelling conventions.
7704         * class.c: Likewise.
7705         * decl.c: Likewise.
7706         * expr.c: Likewise.
7707         * gjavah.c: Likewise.
7708         * java-tree.h: Likewise.
7709         * jcf-dump.c: Likewise.
7710         * jcf-parse.c: Likewise.
7711         * jvspec.c: Likewise.
7712         * lang.c: Likewise.
7713         * mangle.c: Likewise.
7714         * parse.y: Likewise.
7715
7716 2002-09-17  Tom Tromey  <tromey@redhat.com>
7717
7718         * lex.c (java_read_unicode_collapsing_terminators): Handle case
7719         where \r appears at EOF.  Fixes PR java/7950.
7720
7721 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
7722
7723         * jvspec.c (lang_specific_driver): Remove unused variable.
7724
7725 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7726
7727         * java-tree.h (union lang_tree_node): Add chain_next option.
7728
7729 2002-09-16  Richard Henderson  <rth@redhat.com>
7730
7731         * jcf-parse.c (get_constant): Runtime check for IEEE format;
7732         use new real.h interface.
7733         * jcf-write.c (find_constant_index): Use new real.h interface.
7734         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7735
7736 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7737
7738         * lang.c: Follow spelling conventions.
7739
7740 2002-09-11  Per Bothner  <per@bothner.com>
7741
7742         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
7743         constant to the type of the field.
7744         (java_complete_tree):  Remove now-redundant code.
7745
7746         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
7747
7748 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
7749
7750         For PR java/5794:
7751         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7752         return label if a ret instruction for the jsr has been reached.
7753
7754 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
7755
7756         * parse.y (DIR_SEPARATOR): Don't define.
7757         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7758
7759 2002-08-28  Andrew Haley  <aph@redhat.com>
7760
7761         * verify.c (verify_jvm_instructions): Allow exception handler
7762         inside code that is being protected, but generate a warning.
7763         * except.c (link_handler): Initialize `expanded' in new eh_range.
7764         (binding_depth, is_class_level, current_pc): Declare extern.
7765
7766 2002-09-01  Mark Wielaard <mark@klomp.org>
7767
7768         * gcj.texi: Add chapter about system properties.
7769         Fixed some typos.
7770
7771 2002-08-26  Tom Tromey  <tromey@redhat.com>
7772
7773         * parse.y (try_builtin_assignconv): Allow narrowing primitive
7774         conversion if RHS_TYPE is byte, short, or char.
7775
7776 2002-08-22  Tom Tromey  <tromey@redhat.com>
7777
7778         * gcj.texi (Invoking gij): Document -cp and -classpath.
7779
7780 2002-08-21  Tom Tromey  <tromey@redhat.com>
7781
7782         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7783         $(prefix)/share.  For PR libgcj/7633.
7784
7785         For PR java/6005 and PR java/7611:
7786         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7787         (java_can_use_bit_fields_p): New function.
7788
7789 2002-08-16  Tom Tromey  <tromey@redhat.com>
7790
7791         * gcj.texi (Class Initialization): Mention class initialization of
7792         arrays.
7793
7794 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
7795
7796         * Make-lang.in (java-tree-inline.o): New.
7797         (JAVA_OBJS): Add java-tree-inline.o.
7798         * parse.y (source_end_java_method): Call java_optimize_inline.
7799         (java_expand_method_bodies): Save method's tree in
7800         DECL_SAVED_TREE.
7801         (add_stmt_to_compound): Keep track of the number of statments.
7802         * lang.c (java_init): Enable flag_inline_trees.
7803         (java_post_options): If flag_inline_functions is on, enable
7804         flag_inline_trees instread.
7805         (decl_constant_value): New.
7806         (java_tree_inlining_walk_subtrees): New.
7807         * java-tree.h (DECL_NUM_STMTS): New macro.
7808         (java_optimize_inline): Declare.
7809         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7810         Handle a LABEL_EXPR.
7811         * decl.c (build_result_decl): If we already have a DECL_RESULT
7812         don't make another.
7813         (dump_function): New.
7814         (java_optimize_inline): New.
7815         (dump_function): New.
7816
7817 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
7818
7819         For PR java/7483:
7820         * parse.y (build_assertion): Invert return from
7821         desiredAssertionStatus.
7822
7823 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7824
7825         * jcf-write.c (get_access_flags): Return correct access flags for
7826         private and protected inner classes.
7827
7828 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7829
7830         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7831
7832 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7833
7834         * mangle_name.c: Don't include obstack.h twice.
7835         * xref.c: Don't include obstack.h.
7836
7837 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7838
7839         * class.c: (permanent_obstack): Delete declaration.
7840         * constants.c: (permanent_obstack): Delete declaration.
7841         * except.c: (permanent_obstack): Delete declaration.
7842         * expr.c: (permanent_obstack): Delete declaration.
7843         * jcf-parse.c: (permanent_obstack): Delete declaration.
7844         (saveable_obstack): Delete declaration.
7845         * parse.h: (permanent_obstack): Delete declaration.
7846         * typeck.c: (permanent_obstack): Delete declaration.
7847
7848 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7849
7850         * gcj.texi (version-gcc): Increase to 3.3.
7851
7852 2002-07-22  Tom Tromey  <tromey@redhat.com>
7853
7854         * lex.c (java_lex): Check for `e' or `E' after 0.
7855
7856 2002-07-21  Richard Henderson  <rth@redhat.com>
7857
7858         * lang.c (java_unsafe_for_reeval): New.
7859         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7860
7861 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7862
7863         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7864         (jcf_path_init): Use GET_ENVIRONMENT.
7865
7866 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7867             Zack Weinberg <zack@codesourcery.com>
7868
7869         * builtins.c (initialize_builtins): Remove defines that
7870         handled C/C++ specific junk hereby removed from builtins.def.
7871
7872 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7873
7874         * lang.c (java_post_options): Update prototype.
7875
7876 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7877
7878         * builtins.c (initialize_builtins): Ignore the additional
7879         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7880         the builtins.def file.
7881
7882 2002-07-01  Tom Tromey  <tromey@redhat.com>
7883
7884         For PR libgcj/7073:
7885         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7886         specially.
7887
7888 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7889
7890         * java/decl.c (builtin_function): Accept additional parameter.
7891         (java_init_decl_processing): Pass an additional NULL_TREE
7892         argument to builtin_function.
7893
7894 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7895
7896         * gcj.texi: Fixed gcj invocation example so that it compiles.
7897
7898 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7899
7900         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7901         * parse.y (mark_parser_ctxt): Likewise.
7902         (check_modifiers, declare_local_variables): Avoid incorrect
7903         hardcoded constant 10.
7904
7905         * lex.c (java_read_char): Avoid "comparison is always true"
7906         warning.
7907
7908 2002-06-25  Andreas Schwab  <schwab@suse.de>
7909
7910         * expr.c (JSR): Avoid undefined operation on PC.
7911
7912 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7913
7914         * decl.c (clear_binding_level): Const-ify.
7915
7916 2002-06-13  Akim Demaille  <akim@epita.fr>
7917
7918         * parse.y (class_declaration, interface_declaration): Make sure
7919         all their rules have an action, in order to avoid meaningless `$$
7920         = $1' and their type clashes.
7921
7922 2002-06-11  Tom Tromey  <tromey@redhat.com>
7923
7924         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7925         * parse-scan.y (statement_without_trailing_substatement): Added
7926         assert_statement.
7927         (assert_statement): New rule.
7928         * java-tree.h (struct lang_type) [assertions]: New field.
7929         (TYPE_USES_ASSERTIONS): New macro.
7930         (CLASS_USES_ASSERTIONS): Likewise.
7931         (FIELD_SYNTHETIC): New define.
7932         * lex.c (java_lval;): Added ASSERT_TK.
7933         * parse.y (ASSERT_TK): Added.
7934         (statement_without_trailing_substatement): Added assert_statement.
7935         (assert_statement): New rule.
7936         (build_assertion): New function.
7937         (maybe_generate_pre_expand_clinit): Create and initialize
7938         $assertionsDisabled.
7939         (lookup_package_type): Removed decl.
7940         * keyword.h: Rebuilt.
7941         * keyword.gperf (assert): New token.
7942
7943 2002-06-10  Akim Demaille  <akim@epita.fr>
7944
7945         * parse.y (interface_type_list, class_member_declaration)
7946         (unary_expression_not_plus_minus): Remove duplicate %type.
7947         Whitespace changes.
7948
7949 2002-06-09  Tom Tromey  <tromey@redhat.com>
7950
7951         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7952
7953         * parse.y (method_header): Give error message in all cases.
7954         Fixes PR java/6865.
7955
7956 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7957
7958         Don't use RTL inlining. Fix for PR java/6820.
7959         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7960         (flag_really_inline): New.
7961         (java_decode_option): Set flag_really_inline if -finline-functions
7962         is seen.
7963         (java_post_options): New function. Turn off inlining unless
7964         flag_really_inline is set.
7965
7966 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7967
7968         * gjavah.c (throwable_p): Accept argument as either a classname or
7969         signature fragment. Create null-terminated classname string for super
7970         when calling itself recursively.
7971         (decode_signature_piece): Skip first character from class name
7972         signature when calling throwable_p.
7973
7974 2002-06-08  H.J. Lu  (hjl@gnu.org)
7975
7976         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7977
7978 2002-06-04  Tom Tromey  <tromey@redhat.com>
7979
7980         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7981
7982 2002-06-04  Michael Koch  <konqueror@gmx.de>
7983
7984         * gcj.texi (Input Options): Fixed typo.
7985
7986 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
7987
7988         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
7989         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
7990         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
7991         and all now-pointless local variables.  Rename other local
7992         variables to reflect their not being handles.
7993
7994         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
7995         #if JCF_USE_STDIO blocks.
7996
7997         * parse.y: Add missing semicolon at end of rule.
7998
7999 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8000
8001         * check-init.c (attach_initialized_static_class): Delete, unused.
8002         * parse.y: Use htab_t instead of struct hashtable, update
8003         all uses.
8004         * java-tree.h: Include hashtab.h instead of hash.h.
8005         (struct lang_decl_func): Use htab_t, set up for gengtype.
8006         (struct init_test_hash_entry): Delete.
8007         (struct treetreehash_entry): New.
8008         (java_treetreehash_find): New
8009         (java_treetreehash_new): New prototype.
8010         (java_treetreehash_create): New prototype.
8011         (java_mark_tree): Delete prototype.
8012         (java_hash_hash_tree_node): Delete prototype.
8013         (java_hash_compare_tree_node): Delete prototype.
8014         (attach_initialized_static_class): Delete prototype.
8015         * expr.c (build_class_init): Update to use java_treetreehash
8016         functions.
8017         (java_expand_expr): Update to use htab_t.
8018         (emit_init_test_initialization): Likewise.
8019         * decl.c (java_mark_tree): Delete.
8020         * class.c (init_test_hash_newfunc): Delete.
8021         (java_hash_hash_tree_node): Delete.
8022         (java_hash_compare_tree_node): Delete.
8023         (add_method_1): Update to use java_treetreehash functions.
8024         (JAVA_TREEHASHHASH_H): New macro.
8025         (java_treetreehash_hash): New function.
8026         (java_treetreehash_compare): New function.
8027         (java_treetreehash_find): New function.
8028         (java_treetreehash_new): New function.
8029         (java_treetreehash_create): New function.
8030         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8031
8032         * Make-lang.in (java/parse.o): Depend on debug.h.
8033         * java-tree.h (struct lang_identifier): Use gengtype.
8034         (union lang_tree_node): New.
8035         (struct lang_decl_func): Use gengtype.
8036         (struct lang_decl_var): Likewise.
8037         (struct lang_decl): Likewise.
8038         * parse.y: Include debug.h.
8039         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8040
8041         * lang.c (struct language_function): New dummy structure.
8042
8043         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8044         descriminator for DECL_LANG_SPECIFIC.
8045         (struct lang_decl_func): Rename from struct lang_decl.
8046         (enum lang_decl_desc): New.
8047         (struct lang_decl): Make it a union.  Update all the accessor macros.
8048         (struct lang_type): Use gengtype.
8049         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8050         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8051         are now the same size.
8052         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8053         use discriminator to mark DECL_LANG_SPECIFIC.
8054
8055         * Make-lang.in (gt-java-builtins.h): New rule.
8056         (java/builtins.o): Add dependency on gt-<filename>.h.
8057         * builtins.c: Use gengtype for roots.
8058         (union string_or_tree): Use gengtype.
8059         (struct builtin_record): Use gengtype.
8060         * config-lang.in (gtfiles): Add builtins.c.
8061
8062         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8063         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8064         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8065         gt-java-parse.h, gtype-java.h): Add rules to generate.
8066         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8067         (class.o): Add dependency on gt-*.h.
8068         (constants.o): Likewise.
8069         (decl.o): Likewise.
8070         (expr.o): Likewise.
8071         (jcf-parse.o): Likewise.
8072         (jcf-write.o): Likewise.
8073         (lang.o): Likewise.
8074         * config-lang.in (gtfiles): New.
8075         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8076         * constants.c: Replace uses of ggc_add_* with GTY markers.
8077         Include gt-*.h.
8078         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8079         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8080         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8081         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8082         Include gt-*.h.
8083         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8084         Include gt-*.h.
8085         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8086         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8087         gt-*.h.
8088         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8089         Include gtype-java.h.
8090
8091 2002-06-02  Tom Tromey  <tromey@redhat.com>
8092
8093         Fix for PR java/5913:
8094         * parse.y (patch_binop): Call patch_string on op1.
8095
8096 2002-06-02  Tom Tromey  <tromey@redhat.com>
8097
8098         Fix for PR java/1343, PR java/6336:
8099         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8100         formatting.  Changed return type.
8101         (anonymous_class_counter): Moved to top of file.
8102         (maybe_make_nested_class_name): Append number to class name for
8103         function-local classes.
8104
8105 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8106
8107         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8108         * Make-lang.in: Update dependency lists.
8109
8110 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
8111
8112         * gjavah.c (throwable_p): Do not free the name of the class after
8113         passing it to find_class.
8114         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8115         * jcf-io.c (dirent.h): Include it.
8116         (fnmatch.h): Likewise.
8117         (compare_path): New function.
8118         (java_or_class_file): Likewise.
8119         (memoized_dirlist_entry): New type.
8120         (memoized_dirlist_lookup_eq): New function.
8121         (memoized_dirlists): New variable.
8122         (caching_stat): New function.
8123         (memoized_class_lookup_eq): New function.
8124         (memoized_class_lookups): Likewise.
8125         (find_class): Use memoized_class_lookups and caching_stat.
8126         * jcf.h (JCF_USE_SCANDIR): Define.
8127         * parse.y (java_expand_classes): Write the class files in reverse
8128         order.
8129
8130 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8131
8132         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8133
8134 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
8135
8136         * jcf-write.c (write_classfile): Unlink the temporary file if it
8137         cannot be renamed.  Use concat to build up the name of the
8138         temporary file.
8139
8140 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
8141
8142         * jcf-write.c (write_classfile): Write the file to a
8143         temporary file and then rename it.
8144
8145 2002-05-07  Tom Tromey  <tromey@redhat.com>
8146
8147         * gjavah.c (throwable_p): Use xstrdup, not strdup.
8148
8149         Fix for PR java/1200:
8150         * gjavah.c (throwable_p): New function.
8151         (decode_signature_piece): Use it.  A `WeakReference' isn't the
8152         same as a `jweak'.
8153         Include hashtab.h.
8154         (gcjh_streq): New function.
8155
8156 2002-05-07  Andreas Jaeger  <aj@suse.de>
8157
8158         * parse.y (finish_for_loop): Fix if statement.
8159
8160 2002-05-06  Tom Tromey  <tromey@redhat.com>
8161
8162         Fix for PR java/5941:
8163         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8164         loop update expression.
8165         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8166         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8167
8168 2002-05-04  Mark Wielaard  <mark@klomp.org>
8169
8170         For PR java/6519:
8171         * parse.y (build_string_concatenation): Return just op1 only when op2
8172         is null and op1 is a STRING_CST, otherwise always construct a
8173         StringBuffer.
8174
8175 2002-04-27  Tom Tromey  <tromey@redhat.com>
8176
8177         For PR java/6382:
8178         * parse.y (string_convert_int_cst): New function.
8179         (merge_string_cste): Use it.
8180
8181 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8182
8183         * java-tree.h (java_parse_file): Update.
8184         (java_set_yydebug): Remove.
8185         * jcf-parse.c (yydebug): Remove.
8186         (java_set_yydebug): Die.
8187         (java_parse_file): Update.
8188         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8189
8190 2002-04-24  Tom Tromey  <tromey@redhat.com>
8191
8192         For PR java/6425:
8193         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8194         EXPR_WFL_QUALIFICATION of qual_wfl.
8195
8196 2002-04-23  Per Bothner  <per@bothner.com>
8197
8198         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
8199         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
8200         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
8201
8202 2002-04-23  Tom Tromey  <tromey@redhat.com>
8203
8204         For PR java/6314:
8205         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
8206         recognize `-fcompile-resource='.
8207         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
8208         a bit.
8209
8210 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8211
8212         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8213         paths. Fixes PR java/2791.
8214
8215 2002-04-19  Andrew Haley  <aph@redhat.com>
8216
8217         * jcf-write.c (push_long_const): lo, hi: New variables.
8218         Use rshift_double to extract the high part of a 64-bit long.
8219         Use WORD_TO_INT to extract the low part.
8220
8221         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8222         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
8223         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8224
8225 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8226
8227         * typeck.c (incomplete_type_error): Remove.
8228
8229 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8230
8231         * class.c (make_class_data): Set DECL_ALIGN on static class data,
8232         for hash synchronization.
8233         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8234         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8235         class_type_node.
8236
8237 2002-04-16  Mark Wielaard  <mark@klomp.org>
8238
8239         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8240         negative zero.
8241
8242 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8243
8244         Fix for PR java/6294:
8245         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8246         interfaces.
8247
8248 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8249
8250         Fix for PR java/6085:
8251         * parse.y (patch_method_invocation): Always use build_access_to_thisn
8252         to get enclosing "this" argument for inner-class constructor
8253         invocation. Pass correct arguments to build_access_to_thisn.
8254
8255 2002-04-10  Andreas Jaeger  <aj@suse.de>
8256
8257         * gcj.texi (Input Options): Fix extdirs patch.
8258
8259 2002-04-10  Anthony Green  <green@redhat.com>
8260
8261         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8262
8263 2002-04-09  Anthony Green  <green@redhat.com>
8264
8265         * gcj.texi (Input Options): Add --extdirs documentation.
8266         * jcf-dump.c (OPT_extdirs): New macro.
8267         (options): Add extdirs option.
8268         (help): Describe --extdirs.
8269         (main): Handle OPT_extdirs.
8270         * gjavah.c (OPT_extdirs): New macro.
8271         (options): Add extdirs option.
8272         (help): Describe --extdirs.
8273         (main): Handle OPT_extdirs.
8274         * jcf-path.c (jcf_path_init): Add extdirs support.
8275         (jcf_path_extdirs_arg): New function.
8276         (extensions): New variable to hold extensions path entries.
8277         * jvspec.c: Remove -fextdirs= when compiling main().
8278         * lang.c (java_decode_option): Handle -fextdirs=.
8279         * jcf.h (jcf_path_extdirs_arg): Declare new function.
8280         * Make-lang.in: Compile jcf-path with version info for use in
8281         identifying the appropriate libgcj.jar.
8282
8283 2002-04-08  Tom Tromey  <tromey@redhat.com>
8284
8285         For PR libgcj/5303:
8286         * .cvsignore: Added rmic.1 and rmiregistry.1.
8287         * gcj.texi (Top): Link to new nodes.
8288         (Invoking rmic): New node.
8289         (Invoking rmiregistry): Likewise.
8290         * Make-lang.in (java.generated-manpages): Added rmic.1 and
8291         rmiregistry.1.
8292         (java.maintainer-clean): Likewise.
8293         ($(srcdir)/java/rmic.1): New target.
8294         ($(srcdir)/java/rmiregistry.1): Likewise.
8295         (java.install-man): Handle rmic.1 and rmiregistry.1.
8296
8297 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8298
8299         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8300         Add note about handling uncaught exceptions. Add an exception handler
8301         to example.
8302
8303 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8304
8305         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8306         after using it to patch CALL_EXPR.
8307
8308 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8309
8310         * gcj.texi (Invocation): Document CNI invocation API.
8311
8312 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8313
8314         * expr.c (truthvalue_conversion): Rename.  Update.
8315         (expand_compare): Update.
8316         * java-tree.h (java_truthvalue_conversion): New.
8317         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8318
8319 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8320
8321         * java-tree.h (java_mark_addressable): New.
8322         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8323         * typeck.c (mark_addressable): Rename, update.
8324
8325 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8326
8327         * expr.c (build_java_binop): Update.
8328         * java-tree.h (java_signed_type, java_unsigned_type,
8329         java_signed_or_unsigned_type): Update.
8330         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8331         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8332         * parse.y (patch_binop): Update.
8333         * typeck.c (signed_or_unsigned_type, unsigned_type,
8334         signed_type): Update.
8335
8336 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8337
8338         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8339         (java_dummy_print): Remove.
8340         (lang_print_error): Rename.  Exit early if inhibiting output.
8341         (inhibit_error_printing_function): New.
8342         (java_init): Don't set hook.
8343         (lang_init_source): Use new boolean.
8344
8345 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8346
8347         * parse.y (do_resolve_class): Fix infinite recursion.
8348
8349 2002-03-29  Tom Tromey  <tromey@redhat.com>
8350
8351         * parse.y (check_inner_circular_reference): Ignore incomplete
8352         types.
8353
8354 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8355
8356         * Make-lang.in (builtins.o): Update.
8357         * boehm.c (get_boehm_type_descriptor): Update.
8358         * builtins.c: Include langhooks.h.
8359         * decl.c (java_init_decl_processing): Update.
8360         * java-tree.h (java_type_for_mode, java_type_for_size): New.
8361         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8362         Redefine.
8363         * typeck.c (type_for_mode, type_for_size): Update.
8364
8365 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8366
8367         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8368
8369 2002-03-28  Tom Tromey  <tromey@redhat.com>
8370
8371         * except.c (expand_end_java_handler): If the handler type is NULL,
8372         use java.lang.Throwable.  Fixes PR java/5986.
8373
8374 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8375
8376         Fix for PR java/4715:
8377         * jcf-parse.c (parse_source_file_3): New function.
8378         (read_class): Call it.
8379         (java_parse_file): Likewise.
8380
8381 2002-03-28  Jan Hubicka  <jh@suse.cz>
8382
8383         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8384
8385 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8386
8387         * parse.y (resolve_package): Initialize "decl".
8388         (lookup_package_type): Remove unused function.
8389
8390 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8391
8392         Fix for PR java/5993:
8393         * parse.y (resolve_package): Return the decl if resolution was
8394         successful. Don't special case "java.lang" and "java.lang.reflect"
8395         packages. Set type_name to the merged identifier.
8396         (resolved_qualified_expression_name): Print error using "name" if
8397         resolve_package returns NULL_TREE.
8398
8399 2002-03-27  Tom Tromey  <tromey@redhat.com>
8400
8401         * expr.c (expand_invoke): Don't generate null pointer check if
8402         we're calling <init>.
8403
8404 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8405
8406         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8407         fix prototype.
8408         * java-tree.h (java_lang_expand_expr): Similarly.
8409         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8410         (java_init): Don't set hook.
8411
8412 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8413
8414         Fix for PR java/5850:
8415         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8416         context if field was not found in the current scope.
8417         * expr.c (lookup_field): Don't look in enclosing contexts.
8418
8419 2002-03-26  Tom Tromey  <tromey@redhat.com>
8420
8421         Fix for PR java/5942:
8422         * parse.y (init_src_parse): Added sanity check.
8423         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8424         elements, not 11.
8425
8426 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8427
8428         * decl.c (lang_mark_tree): Rename java_mark_tree.
8429         * java-tree.h (java_mark_tree): New.
8430         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8431
8432 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
8433
8434         * lex.c: Change java_perform_atof to take normal parameters
8435         instead of a pointer to a parameter block.  Call it directly
8436         from java_lex.
8437
8438 2002-03-22  Mark Wielaard  <mark@klomp.org>
8439
8440         Fix for PR java/5368:
8441         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8442         when printing error message.
8443
8444 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8445
8446         * decl.c (maybe_build_cleanup): Remove.
8447
8448 2002-03-22  Tom Tromey  <tromey@redhat.com>
8449
8450         Andrew Haley  <aph@cambridge.redhat.com>
8451
8452         * expr.c (build_field_ref): Don't build a check if the field is a
8453         member of `this'.
8454
8455 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
8456
8457         Fix for PR java/6026:
8458         * lex.c (java_lex): Fix parsing of consecutive floats.
8459
8460 2002-03-21  Tom Tromey  <tromey@redhat.com>
8461
8462         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8463         class.
8464
8465 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8466
8467         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8468         insert_block, getdecls, kept_level_p, global_bindings_p): New.
8469
8470 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8471
8472         * gcj.texi: @code{gcj} becomes @command{gcj}.
8473         @code{gcc} becomes @command{gcc}.
8474         GcjRaw changed to gnu.gcc.RawData.
8475
8476 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8477
8478         * decl.c (start_java_method): Use new hook.
8479         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8480         (java_init): Remove old hook.
8481
8482 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8483
8484         * builtins.c (define_builtin): Do nothing if `type' is null.
8485         Fixes PR java/5876.
8486
8487 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8488
8489         * parse.y (parser_check_super_interface): Fix error message
8490         grammar/order.
8491
8492 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8493
8494         * jcf-parse.c (get_constant): Delete unused variables.
8495
8496 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8497
8498         * java-tree.h (java_parse_file): New.
8499         * jcf-parse.c (yyparse): Rename java_parse_file.
8500         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8501
8502 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8503
8504         * parse.y (craft_constructor): Return the constructor decl.
8505         (java_expand_classes): Update comments.
8506         (lookup_method_invoke): Call fix_constructors immediately for
8507         anonymous class. Fixes PR java/5935.
8508
8509 2002-03-15  Anthony Green  <green@redhat.com>
8510
8511         * jcf-parse.c (yyparse): Don't emit class registration
8512         constructor when compiling resource files.
8513
8514 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8515
8516         * lang.c (java_tree_code_type, java_tree_code_length,
8517         tree_code_name): Delete.
8518         (tree_code_type, tree_code_length, tree_code_name): Define.
8519         (java_init): Don't try to copy into the various tree_code
8520         arrays.
8521
8522 2002-03-12  Tom Tromey  <tromey@redhat.com>
8523
8524         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8525         UTF-8, not UCS-2.  Fixes PR java/5923.
8526
8527         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8528         a call_expr wrapped in a convert.  Fixes PR java/5848.
8529
8530 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8531
8532         * jcf-write.c (write_classfile): Improve error strings.
8533
8534 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8535
8536         * lex.c: Adjust comments to GNU standards.
8537
8538 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8539
8540         Fix for PR java/5902:
8541         * lex.c (java_lex): Fix parsing of literals.
8542
8543 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8544
8545         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8546         to prevent it getting evaluated twice in the store checking case.
8547         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8548         examining OBJECT.
8549
8550 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8551
8552         * decl.c (java_init_decl_processing): Make sure class_type_node
8553         alignment is not less than 64 bits if hash synchronization is enabled.
8554
8555 2002-03-08  Per Bothner  <per@bothner.com>
8556
8557         * parse.y (java_complete_lhs):  Check if patch_assignment
8558         returned an error-mark.
8559
8560         * parse.y (try_builtin_assignconv):  Don't special-case zero.
8561
8562 2002-03-08  Per Bothner  <per@bothner.com>
8563
8564         Fix for PR java/5812.
8565         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
8566         here instead of in JSR macro.  Likewise with load_type_state call.
8567         Do the latter on if the return_pc has been verified (the jsr returns).
8568         (JSR):  Now just call build_java_jsr.
8569
8570 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
8571
8572         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8573         (java.install-common): Link native driver to
8574         JAVA_TARGET_INSTALL_NAME.
8575
8576 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
8577
8578         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8579         * builtins.c(sin_builtin): Likewise
8580         * builtins.c(sqrt_builtin): Likewise
8581
8582 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
8583
8584         * java/expr.c, java/jcf-parse.c, java/lex.c:
8585         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8586         REAL_ARITHMETIC blocks unconditional.  Delete some further
8587         #ifdef blocks predicated on REAL_ARITHMETIC.
8588
8589 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8590
8591         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8592         explicit sizeof/sizeof.
8593         * decl.c (java_init_decl_processing): Likewise.
8594         * jcf-parse.c (init_jcf_parse): Likewise.
8595         * parse.y (init_src_parse): Likewise.
8596
8597 2002-03-02  Per Bothner  <per@bothner.com>
8598
8599         Make --CLASSPATH by a synonym for --classpath and -classpath.
8600         Implement --bootclasspath.
8601         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
8602         (classpath_l):  Remove.
8603         (jcf_path_CLASSPATH_arg):  Remove.
8604         (jcf_path_bootclasspath_arg):  New function.
8605         (jcf_path_seal):  Simplify accordingly.
8606
8607         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
8608         (jcf_path_CLASSPATH):  Remove declaration.
8609         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
8610         (lang_specific_driver):  Translate -bootclasspath.
8611         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
8612         * lang.c (decode_lang_options):  Do jcf_path_init first.
8613         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
8614         * gjavah.c:  Also handle --bootclasspath.
8615         Handle --CLASSPATH as a synonum for --classpath.
8616         * jcf-dump.c: Likewise.
8617
8618         "." is not part of system path, but is the default for --classpath.
8619         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
8620         (jcf_path_seal):  Add "." if no CLASSPATH specified.
8621
8622         * gcj.texi:  Document changes.
8623
8624 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8625
8626         * expr.c (build_java_arraystore_check): Fix formatting.
8627
8628 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8629
8630         Fix for PR java/5758, java/5632:
8631         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8632         inner-class separator too.
8633         * parse.y (do_resolve_class): New local `decl_result.'
8634         Progressively build a name for what can have been loaded.
8635
8636 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8637
8638         * expr.c (java_array_data_offset): Removed function.
8639         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8640         (build_java_array_length_access): Obtain "length" value using a
8641         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8642         (build_java_arrayaccess): Correct comment. Access "data" using a
8643         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8644         (build_java_arraystore_check): New function.
8645         (expand_java_arraystore): Use build_java_arraystore_check.
8646         * parse.y (patch_assignment): Simplify code to insert a store check
8647         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8648         * check-init.c (check_init): Update to reflect that an array length
8649         access is now a COMPONENT_REF.
8650         * gcj.texi (Code Generation): Improve documentation of
8651         -fno-bounds-check. Add documentation for -fno-store-check.
8652         * java-tree.h (flag_store_check): Declare.
8653         (build_java_arraystore_check): Declare.
8654         * lang.c (flag_store_check): Initialize to 1.
8655         (lang_f_options): Add store-check option.
8656         * jvspec.c: Don't pass store-check option to jvgenmain.
8657         * lang-options.h: Add help string for -fno-store-check.
8658
8659 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8660
8661         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8662         * java-tree.h (java_dup_lang_specific_decl): New.
8663         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8664
8665 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8666
8667         * builtins.c, decl.c: Delete traditional-mode-related code
8668         copied from the C front end but not used, or used only to
8669         permit the compiler to link.
8670
8671 2002-02-22  Tom Tromey  <tromey@redhat.com>
8672
8673         Fix for PR java/2369:
8674         * jvspec.c (verify_class_name): New function.
8675         (lang_specific_driver): Call it.
8676         (JAVA_START_CHAR_P): New macro.
8677         (JAVA_PART_CHAR_P): Likewise.
8678
8679 2002-02-22  Per Bothner  <per@bothner.com>
8680
8681         * class.c:  Change vtable to be more compatible with g++ v3 abi.
8682         (get_dispatch_table):  Prepend offset-to-top (always 0) and
8683         type_info pointer (currently unimplemented hence NULL) to vtable.
8684         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8685         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
8686         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8687         (build_dtable_decl):  Add declarations for new fields.
8688
8689 2002-02-20  Per Bothner  <per@bothner.com>
8690
8691         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8692         to finit$ (otherwise generate_bytecode_insns drops it). However, we
8693         don't need to set it on the COMPOUND_EXPR - the caller does that.
8694
8695 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8696
8697         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8698         `--CLASSPATH' becomes `--classpath.'
8699         * gjavah.c: Likewise.
8700         * jcf-dump.c: Likewise.
8701         * lang-options.h: Likewise.
8702         * lang.c: Likewise.
8703         * jcf-path.c: Updated comment.
8704         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8705         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8706         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8707         (jcf_path_CLASSPATH_arg): Ditto.
8708         (classpath_u): Updated leading comment.
8709
8710 2002-02-20  Per Bothner  <per@bothner.com>
8711
8712         * builtins.c (check_for_builtin):  New function.
8713         (build_call_or_builtin):  Remove.
8714         * java-tree.h:  Update accordingly.
8715         * expr.c (expand_invoke):  Use build + check_for_builtin instead
8716         of build_call_or_builtin.
8717         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
8718         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8719         flag (which had caused jcf-write to incorrectly emit invokevirtual).
8720
8721 2002-02-17  Tom Tromey  <tromey@redhat.com>
8722
8723         * java-tree.h (TYPE_STRICTFP): New macro.
8724         (struct lang_type) [strictfp]: New field.
8725         (CLASS_STRICTFP): New macro.
8726         (METHOD_STRICTFP): New macro.
8727         (struct lang_decl) [strictfp]: New field.
8728         * parse.y (method_header): Disallow strictfp constructor or
8729         abstract method.
8730         (STRICT_TK): Move before MODIFIER_TK.
8731         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8732         (METHOD_MODIFIERS): Likewise.
8733         (INTERFACE_MODIFIERS): Likewise.
8734         * jcf-write.c (get_access_flags): Likewise.
8735         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8736         (add_method_1): Likewise.
8737         (get_access_flags_from_decl): Likewise.
8738         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
8739         recognize strictfp flag.
8740         * jcf.h (ACC_STRICT): New define.
8741
8742 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
8743
8744         * class.c(build_utf8_ref): Move declaration of decl_size
8745
8746 2002-02-07  Tom Tromey  <tromey@redhat.com>
8747
8748         * gcj.texi (Input Options): --CLASSPATH does not suppress system
8749         path.
8750
8751 2002-02-04  Anthony Green  <green@redhat.com>
8752
8753         * class.c (build_utf8_ref): Put UTF-8 constants into merged
8754         sections if available.
8755
8756 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8757
8758         * parse.y (java_expand_classes): Fix typo in static field loop.
8759
8760 2002-02-02  Richard Henderson  <rth@redhat.com>
8761
8762         * class.c (add_field): Mark static fields external.
8763         (build_class_ref): Remove redundant set.
8764         * parse.y (java_expand_classes): Mark static fields of classes
8765         to be compiled as local.
8766         * jcf-parse.c (parse_class_file): Likewise.
8767
8768 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8769
8770         * gcj.texi (About CNI): New node.
8771
8772 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8773
8774         PR java/5080
8775         * jcf-parse.c : Check for HAVE_LOCALE_H before using
8776         setlocale() with LC_CTYPE as a parameter.
8777         * jv-scan.c: Same.
8778
8779 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
8780
8781         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8782         Follow GNU Coding Standards for --version.
8783
8784 2002-01-28  Tom Tromey  <tromey@redhat.com>
8785
8786         * expr.c (build_jni_stub): Ensure storage for `meth' is
8787         generated.
8788         * parse.y (java_complete_expand_methods): Set
8789         current_function_decl before building JNI stub.
8790
8791 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8792
8793         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8794         BUILT_IN_SQRTF.
8795
8796 2002-01-22  Tom Tromey  <tromey@redhat.com>
8797
8798         * decl.c (java_init_decl_processing): Use add_predefined_file.
8799         Predefine RawData.java.
8800         (predef_filenames): Removed.
8801         (java_init_decl_processing): Don't register predef_filenames.
8802         * jcf-parse.c (add_predefined_file): New function.
8803         (predefined_filename_p): Rewrote.
8804         (predefined_filename_p): No longer static.
8805         * decl.c (java_init_decl_processing): Call initialize_builtins.
8806         * Make-lang.in (JAVA_OBJS): Added builtins.o.
8807         (java/builtins.o): New target.
8808         * builtins.c: New file.
8809         * parse.y (patch_invoke): Use build_call_or_builtin.
8810         * java-tree.h (build_call_or_builtin): Declare.
8811         (initialize_builtins): Declare.
8812         (java_set_exception_lang_code): Removed unused declaration.
8813         (PREDEF_FILENAMES_SIZE): Removed.
8814         (java_tree_index): Added JTI_PREDEF_FILENAMES.
8815         (predef_filenames): New define.
8816         (add_predefined_file): Declare.
8817         (predefined_filename_p): Declare.
8818         * expr.c (expand_invoke): Use build_call_or_builtin.
8819
8820 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8821
8822         * parse.y (patch_switch_statement): Fix format specifier.
8823
8824 2002-01-16  Tom Tromey  <tromey@redhat.com>
8825
8826         More for PR java/5365:
8827         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8828         default.
8829         (process_file): Generate include for
8830         java.lang.UnsupportedOperationExceptions.
8831
8832 2002-01-15  Andreas Jaeger  <aj@suse.de>
8833
8834         * .cvsignore: Add man pages.
8835
8836 2002-01-15  Tom Tromey  <tromey@redhat.com>
8837
8838         Fix for PR java/5365:
8839         * gjavah.c (process_file): Turn class name into a file name.
8840
8841 2002-01-14  Matthias Klose  <doko@debian.org>
8842
8843         * gcj.texi: Fix whitespace and formatting errors in the
8844         synopsis of the man pages. Update copyright.
8845
8846 2002-01-14  Tom Tromey  <tromey@redhat.com>
8847
8848         For PR libgcj/5303:
8849         * Make-lang.in (java.install-man): Handle jv-convert man page.
8850         (java.generated-manpages): Added jv-convert.1.
8851         (java.uninstall): Remove jv-convert.1.
8852         (java.maintainer-clean): Likewise.
8853         ($(srcdir)/java/jv-convert.1): New target.
8854         * gcj.texi (Top): Link to jv-convert node.
8855         (Individual utilities): Likewise.
8856         (Invoking jv-convert): New node.
8857
8858 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8859             Martin Kahlert  <martin.kahlert@infineon.com>
8860
8861         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8862         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8863
8864 2002-01-03  Graham Stott  <grahams@redhat.com>
8865
8866         * class.c (compile_resource_file): Update copyright date.
8867         Constify filename parameter.
8868         (java-tree.h): Update copyright date.
8869         (compile_resource_file): Constify filename parameter.
8870
8871 2002-01-03  Graham Stott  <grahams@redhat.com>
8872
8873         * gcc/jcf-parse.c: Update copyright date.
8874         (yyparse): Constify resource_filename.
8875
8876 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8877
8878         * parse.y (src_parse_roots): Don't needlessly zero init.
8879
8880 2001-12-31  Tom Tromey  <tromey@redhat.com>
8881
8882         * parse.y (dump_java_tree): New function.
8883         (source_end_java_method): Call it.
8884         (end_class_declaration): Likewise.
8885         * lang.c (java_decode_option): Call dump_switch_p.
8886
8887 2001-12-28  Tom Tromey  <tromey@redhat.com>
8888
8889         * gen-table.pl: Don't process characters after \uffff.  Added
8890         comment pointing to input file.
8891
8892 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8893
8894         * gen-table.pl: Const-ify output.  Document the location of a
8895         suitable unicode input file.
8896
8897         * chartables.h: Regenerate.
8898
8899 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8900
8901         * chartables.h: Const-ify.
8902         * gjavah.c (options): Likewise.
8903         * jcf-dump.c (options): Likewise.
8904         * jv-scan.c (options): Likewise.
8905         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8906         * parse.y (binop_lookup): Likewise.
8907
8908 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8909
8910         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8911         the static arrays that are output.
8912         * jvspec.c (jvgenmain_spec): Make static.
8913         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8914         * keyword.h: Regenerate.
8915         * lang.c (string_option, process_option_with_no, lang_f_options,
8916         lang_W_options): Const-ify.
8917         * lex.c (java_lex): Likewise.
8918
8919 2001-12-21  Richard Henderson  <rth@redhat.com>
8920
8921         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8922         (get_boehm_type_descriptor): ... here.  Arrange for the
8923         TREE_TYPE to get set properly.
8924
8925 2001-12-21  Richard Henderson  <rth@redhat.com>
8926
8927         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8928         only if the target requires collect2.
8929
8930         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8931
8932 2001-12-20  Tom Tromey  <tromey@redhat.com>
8933
8934         For PR java/4509:
8935         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8936         CAN_COMPLETE_NORMALLY for the node.
8937         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8938         generate code for second branch if first branch can't complete
8939         normally.
8940         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8941         the loop head if the loop body can't complete normally.
8942
8943 2001-12-20  Tom Tromey  <tromey@redhat.com>
8944
8945         For PR java/4766:
8946         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8947         case where `finally' clause can't complete normally.
8948
8949 2001-12-20  Tom Tromey  <tromey@redhat.com>
8950
8951         Fixes PR java/5057:
8952         * parse.y (analyze_clinit_body): Added this_class parameter.
8953         Check for more cases where we must keep <clinit>.
8954         (maybe_yank_clinit): Cleaned up flow control.
8955
8956 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8957
8958         * decl.c (java_init_decl_processing): Don't initialize
8959         finit_leg_identifier_node.
8960         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8961         (finit_leg_identifier_node): Remove.
8962         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8963
8964 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8965
8966         * mangle.c (mangle_member_name): Don't special-case for
8967         NO_DOLLAR_IN_LABEL.
8968         * mangle_name.c (unicode_mangling_length): Likewise.
8969         (append_unicode_mangled_name): Likewise.
8970         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8971         code.
8972
8973 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8974
8975         * expr.c (build_java_array_length_access): Don't force null pointer
8976         check unless flag_check_references is set.
8977
8978 2001-12-20  Tom Tromey  <tromey@redhat.com>
8979
8980         Fix for PR java/3417:
8981         * parse.y (patch_assignment): Added special processing for
8982         `return'.
8983         (patch_return): Don't convert booleans to integers, and don't
8984         special-case `null'.
8985
8986 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
8987
8988         * config-lang.in (diff_excludes): Remove.
8989
8990 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
8991
8992         * gcj.texi: Update link to GCC manual.
8993
8994 2001-12-17  Tom Tromey  <tromey@redhat.com>
8995
8996         * parse.y (link_nested_class_to_enclosing): Removed useless
8997         statement.
8998
8999 2001-12-16  Tom Tromey  <tromey@redhat.com>
9000
9001         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9002         Fixes PR java/5088.
9003
9004 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9005
9006         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9007         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9008         spelling errors.
9009
9010 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9011
9012         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9013
9014 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9015
9016         * decl.c (java_init_decl_processing): Build otable_type correctly.
9017         otable_decl is an otable_type.
9018
9019 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9020
9021         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9022         otable_type, otable_ptr_type, method_symbol_type,
9023         method_symbols_array_type, method_symbols_array_ptr_type): New
9024         field/global tree definitions.
9025         (flag_indirect_dispatch): New flag.
9026         * decl.c (java_init_decl_processing): Initialize new otable and
9027         otable_syms type nodes and decls. Add new field "index" to
9028         method_type_node.
9029         * class.c (build_method_symbols_entry): New function.
9030         (make_method_value): Set "index" to to method's vtable index for
9031         virtual methods when indirect-dispatch is not used.
9032         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9033         and set vtable_method_count to -1. Set otable and otable_syms field
9034         if indirect-dispatch is used and there was something to put in them.
9035         (build_method_symbols_entry): New function.
9036         (emit_offset_symbol_table): New function.
9037         * expr.c (get_offset_table_index): New function.
9038         (build_invokevirtual): Build array reference to otable at the index
9039         returned by get_offset_table_index, and use the result as the vtable
9040         offset.
9041         (build_invokeinterface): Similar.
9042         * jcf-parse.c (yyparse): If indirect-dispatch, call
9043         emit_offset_symbol_table at the end of compilation, after all classes
9044         have been generated.
9045         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9046         * lang.c (flag_indirect_dispatch): Define.
9047         (lang_f_options): Add indirect-dispatch flag.
9048
9049 2001-12-14  Matthias Klose  <doko@debian.org>
9050
9051         * gcj.texi: Markup for man page generation. Document missing
9052         options printed by <tool> --help.
9053         Terminate description of gij's -ms option with a dot.
9054         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9055         (java.generated-manpages java.install-man, java.uninstall,
9056         java-maintainer-clean) Updated.
9057
9058 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9059
9060         * class.c (get_dispatch_table): Fix java vtable layout
9061         for TARGET_VTABLE_USES_DESCRIPTORS.
9062         * decl.c (java_init_decl_processing): Initialize
9063         alloc_no_finalizer_node, finalize_identifier_node.
9064         * expr.c (class_has_finalize_method): New function.
9065         (expand_java_NEW): Generate calls for finalizer-free allocation.
9066         (build_invokevirtual): Fix java vtable layout for
9067         TARGET_VTABLE_USES_DESCRIPTORS.
9068         * java-tree.h (enum java_tree_index): New entries:
9069         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9070         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9071         (class_has_finalize_method): declare.
9072         (HAS_FINALIZER_P): New macro.
9073         * parse.y (patch_invoke): Generate calls for finalizer-free
9074         allocation.
9075
9076 2001-12-12  Matthias Klose  <doko@debian.org>
9077
9078         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9079         whitespace at end of line.
9080
9081 2001-12-11  Tom Tromey  <tromey@redhat.com>
9082
9083         * lex.c (java_init_lex): Define wfl_to_string as
9084         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9085
9086 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9087
9088         * class.c (make_method_value): Use null_pointer_node to
9089         represent empty exception table.
9090
9091 2001-12-10  Tom Tromey  <tromey@redhat.com>
9092
9093         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9094
9095 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9096
9097         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9098
9099 2001-12-09  Per Bothner  <per@bothner.com>
9100
9101         * check-init.c (current_switch_has_default):  New static field.
9102         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
9103         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
9104         DEFAULT_EXPR seen, simulate a default alternative that copies state.
9105
9106 2001-12-09  Tom Tromey  <tromey@redhat.com>
9107
9108         * check-init.c (check_init): Don't allow pre- or post- increment
9109         or decrement of final variable.
9110         (final_assign_error): Minor error message rewording.
9111
9112 2001-12-08  Tom Tromey  <tromey@redhat.com>
9113
9114         * java-tree.h: Fixed typo.
9115
9116         * gjavah.c (decompile_method): Don't decompile to `return this'
9117         for static methods.
9118
9119         * gjavah.c (cxx_keywords): Re-sorted.
9120         * lex.c (cxx_keywords): Re-sorted.
9121
9122         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9123         else.
9124
9125         * gjavah.c (print_namelet): Clear subnamelets.
9126         (HANDLE_METHOD): Set `method_printed' earlier.
9127
9128 2001-12-07  Tom Tromey  <tromey@redhat.com>
9129
9130         * lang.c (lang_f_options): Added
9131         optimize-static-class-initialization.
9132         (java_decode_option): Removed special case.
9133
9134 2001-12-07  Per Bothner  <per@bothner.com>
9135
9136         * check-init.c (check_init):  Fix typo freeing memory twice.
9137
9138 2001-12-05  Per Bothner  <per@bothner.com>
9139
9140         Restore support for static class initialization optimization.
9141         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9142         * check-init.c (check_int):  At end of BLOCK handle initialization
9143         blocks, which used to be done in java_complete_expand_method but did
9144         not handle the case where check_for_initialization might allocate
9145         more than a word of bits.
9146         * decl.c (lang_make_tree):  The smic field is now a tree.
9147         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
9148         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
9149
9150         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
9151
9152         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9153         Change from a hash table to a list.
9154         (struct_lang_decl):  Change field 'smic' to match.
9155         * class.c (add_method_1):  Initialize
9156         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9157         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
9158         (java_expand_method_bodies): -here, since 'smic' is now a list.
9159         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
9160
9161         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
9162
9163         * class.c (java_hash_compare_tree_node):  Fix casts.
9164
9165 2001-12-04  Per Bothner  <per@bothner.com>
9166
9167         * check-init.c:   Handle definite unassignment to finals in addition
9168         to definite assignment.
9169         (loop_current_locals):  New field.
9170         (num_current_locals, int start_current_locals, num_current_words):
9171         Make static.
9172         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
9173         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9174         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
9175         (get_variable_decl, check_final_reassigned):  New functions.
9176         (check_init, check_bool_init):  Modify as needed for checking finals.
9177         (check_for_initialization):  Take extra parameter and return void.
9178         Do extra start-up logic to check final fields for assignment.
9179         * parse.y (check_static_final_variable_assignment_flag,
9180         reset_static_final_variable_assignment_flag, check_final_assignment,
9181         check_final_variable_local_assignment_flag,
9182         reset_final_variable_indirect_assignment_flag,
9183         reset_final_variable_global_assignment_flag):  Remove functions.
9184         (java_complete_expand_methods, outer_field_access_fix,
9185         patch_assignment): Remove no-longer used logic.
9186         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
9187         * parse.y (register_fields, java_complete_tree):  Update accordingly.
9188
9189         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
9190         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
9191         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
9192
9193         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
9194
9195         * java-tree.h (DECL FINAL):  New bit-field.
9196         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
9197         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
9198         (DECL_INIT_CALLS_THIS):  New macro.
9199         (struct lang_decl):  New bit-field init_calls_this.
9200         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9201         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9202         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
9203         use it for both local variables and final fields.
9204         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
9205         and local_final.
9206         (struct lang_type):  Remove hfv bit-field.
9207         (check_for_initialization):  Change to return void.
9208
9209         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
9210         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
9211         * check-init.c (final_assign_error):  New helper function.
9212         (check_final_reassigned, check_init):  Use it.
9213         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9214
9215         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
9216         bit-fields to unsigned.
9217
9218 2001-12-03  Per Bothner  <per@bothner.com>
9219
9220         * parse.y (patch_binop):  Minor constant folding.
9221
9222         * parse.y (build_current_thisn):  Shorter 'buffer'.
9223
9224 2001-12-03  Per Bothner  <per@bothner.com>
9225
9226         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
9227         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9228         * jcf-write.c (generate_bytecode_insns):  Remove support for
9229         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9230         * check-init.c (check_init):  Likewise.
9231
9232 2001-12-03  Per Bothner  <per@bothner.com>
9233
9234         * verify.c (subroutine_nesting):  New function.
9235         (verify_jvm_instructions):  Use it to fix logic for checking that
9236         we're done with the current subroutine.
9237
9238         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9239         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9240
9241 2001-12-03  Per Bothner  <per@bothner.com>
9242
9243         * jcf.h:  Fix obvious typo in comment.
9244         * typeck.c (build_null_signature):  Add comment.
9245
9246 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9247
9248         * expr.c: Remove leading capital from diagnostic messages, as
9249         per GNU coding standards.
9250         * jcf-io.c: Similarly.
9251         * jcf-parse.c: Similarly.
9252         * jv-scan.c: Similarly.
9253         * jvspec.c: Similarly.
9254         * mangle.c: Similarly.
9255
9256 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
9257             Alexandre Petit-Bianco  <apbianco@redhat.com>
9258
9259         * expr.c (build_java_arrayaccess): Call save_expr on array for
9260         correct evaluation order, modified comment, fixed indentation.
9261         * parse.y: (patch_assignment): Correctly extract the array base
9262         from the tree generate by build_java_arrayaccess, added comments.
9263         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9264         Fixes PR java/3096, PR java/3803, PR java/3965.
9265
9266 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9267
9268         * expr.c (expand_byte_code): Remove trailing periods from messages.
9269         * jcf-parse.c (load_class, jcf_parse): Similarly.
9270         * jcf-write.c (generate_classfile): Similarly.
9271         * lex.c (java_lex): Similarly.
9272
9273 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9274
9275         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9276
9277 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9278
9279         * Make-lang.in (java.generated-manpages): New dummy target.
9280
9281 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9282
9283         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9284         ASM_FINAL_SPEC.
9285         (lang_specific_pre_link): Use set_input to set input_filename.
9286         Append `main' here.
9287         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9288         (main): Fix definition.
9289         Strip `main' from classname.
9290         Fixes PR java/227.
9291
9292 2001-11-18  Roger Sayle <roger@eyesopen.com>
9293
9294         * parse.h (java_expand_switch): Remove old prototype.
9295
9296 2001-11-18  Tom Tromey  <tromey@redhat.com>
9297
9298         Fix for PR java/1401:
9299         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9300         arg0 is null.
9301         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9302         correctly.
9303
9304 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9305
9306         * lang.c (finish_parse): Rename to java_finish.
9307         (LANG_HOOKS_FINISH, java_finish): New.
9308
9309 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9310
9311         * decl.c (init_decl_processing): Rename java_init_decl_processing.
9312         * java-tree.h: New prototype.
9313         * lang.c (java_init): Update prototype.  Combine with old init_parse.
9314
9315 2001-11-13  Tom Tromey  <tromey@redhat.com>
9316
9317         * gjavah.c (method_signature): New global.
9318         (HANDLE_METHOD): Set it.
9319         (decompile_return_statement): New function.
9320         (decompile_method): Use it.
9321         (print_method_info): Removed `synth' argument.
9322
9323 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9324
9325         * java-tree.h (java_set_yydebug): New.
9326         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9327         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9328         (print_lang_decl, print_lang_type, print_lang_identifier,
9329         print_lang_statistics, lang_print_xnode): Remove.
9330
9331 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9332
9333         * jcf-parse.c (init_lex): Remove.
9334         * lang.c (language_string, lang_identify): Remove.
9335         (struct lang_hooks): Constify.
9336         (LANG_HOOKS_NAME): Override.
9337         (init_parse): Update.
9338
9339 2001-11-08  Andreas Franck  <afranck@gmx.de>
9340
9341         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9342         program_transform_name the way suggested by autoconf.
9343         (java.install-common): Also transform auxiliary program names with
9344         program_transform_name.
9345
9346 2001-11-08  Tom Tromey  <tromey@cygnus.com>
9347
9348         * parse.y (trap_overflow_corner_case): New rule.
9349         (unary_expression): Use it.
9350         * lex.c (java_init_lex): Don't set minus_seen.
9351         (yylex): Don't use minus_seen.  Communicate overflow to parser for
9352         it to handle.
9353         (error_if_numeric_overflow): New function.
9354         * parse.h (minus_seen): Removed field.
9355         (JAVA_RADIX10_FLAG): New define.
9356
9357 2001-11-07  Tom Tromey  <tromey@redhat.com>
9358
9359         Patch for PR java/1414:
9360         * parse.y (case_label_list): New global.
9361         (goal): Register case_label_list with GC.
9362         (java_complete_lhs): Save new case on case_label_list.
9363         (patch_switch_statement): Check for duplicate case labels.
9364
9365 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9366
9367         * parse.y (patch_assignment): Removed unused third argument.
9368         (java_complete_lhs): Removed unused third argument to patch_assignment.
9369
9370 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9371
9372         * lang.c: Include langhooks-def.h.
9373         * Make-lang.in: Update.
9374
9375 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9376
9377         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9378
9379 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9380
9381         * mangle.c (find_compression_record_match): Don't match compression
9382         records for package name elements unless they occur at the start of
9383         the name. Fix for PR java/4717.
9384
9385 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9386
9387         * expr.c (expand_java_field_op): Don't special-case references to
9388         java.lang.PRIMTYPE.TYPE.
9389         (build_primtype_type_ref): Removed.
9390         * java-tree.h (build_primtype_type_ref): Remove prototype.
9391         * parse.y (maybe_build_primttype_type_ref): Removed.
9392         (complete_function_arguments): Don't special-case references to
9393         java.lang.PRIMTYPE.TYPE.
9394         (patch_assignment): Likewise.
9395         (array_constructor_check_entry): Likewise.
9396
9397 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9398
9399         * mangle.c (static tree compression_table): Fixed leading comment.
9400         * parse.h (struct parser_ctxt): Fixed field comment.
9401         * parse.y (check_pkg_class_access): New prototype, fixed leading
9402         comment, new parameter used to emit error only if passed as true.
9403         (parse_check_super): Pass extra argument to check_pkg_class_access.
9404         (do_resolve_class): Likewise.
9405         (process_imports): Likewise.
9406         (read_import_dir): Fixed indentation.
9407         (find_in_imports_on_demand): New local class_type_name. Local
9408         node_to_use deleted. while loop changed into for loop. Report
9409         multiple definition only for accessible classes. Improved error
9410         message.
9411         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9412         assigned to parameter list, fixed indentation. while loop changed
9413         into for loop, restore TREE_CHAIN on local `tem' before the next
9414         iteration.
9415
9416 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9417
9418         * lang.c (lang_get_alias_set): Deleted.
9419
9420 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9421
9422         * gjavah.c (jni_print_char): Fix thinko in last change.
9423
9424         * gjavah.c (jni_print_char, decode_signature_piece): Use
9425         safe-ctype macros and/or fold extra calls into fewer ones.
9426         * lex.c (java_read_unicode, java_lex): Likewise.
9427         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9428         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9429         * mangle_name.c (append_unicode_mangled_name,
9430         unicode_mangling_length): Likewise.
9431
9432 2001-10-17  Richard Henderson  <rth@redhat.com>
9433
9434         * Make-lang.in (java/lang.o): Depend on langhooks.h.
9435
9436 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9437
9438         * lang.c (langhooks.h): Included.
9439         (LANG_HOOKS_INIT): Redefined.
9440         (LANG_HOOKS_INIT_OPTIONS): Likewise.
9441         (LANG_HOOKS_DECODE_OPTION): Likewise.
9442         (struct lang_hooks lang_hooks): New initialization.
9443
9444 2001-10-11  Per Bothner  <per@bothner.com>
9445
9446         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
9447         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9448         The former is simpler, and jcf-write.c handles it better.
9449         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
9450         or WITH_CLEANUP_EXPR.
9451         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
9452         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9453
9454         * parse.y (patch_if_else_statement):  If the condition is constant,
9455         optimize away the test.
9456
9457 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9458
9459         * parse.y (patch_cast): Call patch_string on the first operand of
9460         the incoming node, update it if necessary. Fixes PR java/4510.
9461
9462 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9463
9464         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9465         when name qualifier matches a package name.
9466
9467 2001-10-08  Tom Tromey  <tromey@redhat.com>
9468
9469         Fix for PR java/4489:
9470         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9471         force a new label when computing `body_block'.
9472
9473 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9474
9475         * jcf-io.c (format_uint): Const-ify.
9476         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9477         * lex.c (java_get_line_col): Likewise.
9478         * parse.y (build_incdec): Likewise.
9479
9480 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9481
9482         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9483         a NULL enclosing context if appropriate. Fixes PR java/4466.
9484
9485 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9486
9487         * parse.y (patch_assignment): Use lvalue's original TYPE when
9488         building the final COMPOUND_EXPR.
9489         (try_reference_assignconv): Fixed leading comment.
9490
9491 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9492
9493         * parse.y (check_final_variable_indirect_assignment): For
9494         COMPOUND_EXPR, return only if finals were found initialized
9495         properly, if not, keep on checking.
9496         (check_final_variable_global_assignment_flag): New local
9497         error_found, set when appropriate and used to decide whether to
9498         report uninitialized finals. Fixed typo in comment.
9499
9500 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9501
9502         * decl.c (init_decl_processing): Fixed typo in predef_filenames
9503         last three initializations. Fixes PR java/4360.
9504
9505 2001-09-21  Richard Henderson  <rth@redhat.com>
9506
9507         * class.c (get_dispatch_table): Handle function descriptors.
9508         (build_dtable_decl): Likewise.
9509         * expr.c (build_invokevirtual): Likewise.
9510
9511 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9512
9513         * parse.y (patch_method_invocation): Build class initialization
9514         when static finals are used to qualify method invocation.
9515         Fixes PR java/4366.
9516
9517 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
9518
9519         * parse.h: (WFL_STRIP_BRACKET): Re-written using
9520         build_type_name_from_array_name.
9521         (STRING_STRIP_BRACKETS): New macro.
9522         * parse.y (build_type_name_from_array_name): New function.
9523         (array_creation_expression:): Accumulate []s instead of [s.
9524         (cast_expression:): Accumulate []s instead of [s after cast type
9525         name.
9526         (build_array_from_name): Local string deleted, use
9527         build_type_name_from_array_name.
9528         (build_unresolved_array_type): Accumulate []s instead of [s after
9529         type name.
9530         (register_fields): Fixed comment.
9531         (resolve_class): Local name, base deleted, new locals tname and
9532         array_dims. Use build_type_name_from_array_name. Use array_dims to
9533         build array type.
9534         (purify_type_name): Use STRING_STRIP_BRACKETS.
9535
9536 2001-09-18  Andreas Jaeger  <aj@suse.de>
9537
9538         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9539         * jv-scan.c: Likewise.
9540
9541 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9542
9543         * parse.y (patch_method_invocation): Inner class creation context
9544         check not enforced within constructors. Fixes PR java/1873.
9545
9546 2001-09-16  Tom Tromey  <tromey@redhat.com>
9547
9548         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9549         NOTE_PUSH for single-case push.  Fixes PR java/4189.
9550
9551 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9552
9553         * java-tree.h (TYPE_IMPORT_LIST): New macro.
9554         (TYPE_IMPORT_DEMAND_LIST): Likewise.
9555         (struct lang_type): New fields import_list and import_demand_list.
9556         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9557         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9558         (do_resolve_class): New local saved_enclosing_type, initialized,
9559         passed as parameter to find_in_imports and find_in_imports_on_demand.
9560         (find_in_imports): Added paramater enclosing_type, use its
9561         TYPE_IMPORT_LIST when applicable.
9562         (find_in_imports_on_demand): Added parameter enclosing_type, use
9563         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9564         declaration and initialization.
9565         (fold_constant_for_init): Switch/restore current_class to the
9566         appropriate context.
9567
9568 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
9569
9570         * verify.c (verify_jvm_instructions): Fix typo.
9571
9572 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9573
9574         * expr.c (expand_invoke): Const-ification.
9575         * parse.y (patch_method_invocation): Likewise.
9576
9577 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9578
9579         * gjavah.c (cxx_keywords): Const-ification.
9580         * keyword.gperf (java_keyword): Likewise.
9581         * lang.c (java_tree_code_name): Likewise.
9582         * lex.c (cxx_keywords): Likewise.
9583         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9584
9585 2001-09-11  Richard Henderson  <rth@redhat.com>
9586
9587         * parse.h (ctxp_for_generation): Mark extern.
9588
9589 2001-09-10  Richard Henderson  <rth@redhat.com>
9590
9591         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9592
9593 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9594
9595         * typeck.c (java_array_type_length, build_prim_array_type):
9596         Represent empty arrays by NULL index.
9597
9598 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
9599
9600         * java-tree.h (compile_resource_file): Grouped with other prototypes.
9601         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9602
9603 2001-09-06  Anthony Green  <green@redhat.com>
9604
9605         * class.c (O_BINARY): Define if necessary.
9606         (registerResource_libfunc): Declare.
9607         (init_class_processing): Initilize registerResource_libfunc.
9608         (compile_resource_file): New function.
9609         * java-tree.h (resource_name): Declare.
9610         (compile_resource_file): Declare.
9611         * jcf-parse.c (yyparse): Handle compiling java resource files.
9612         * lang.c (java_decode_option): Handle -fcompile-resource option.
9613         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9614         resource files.
9615         * gcj.texi (Code Generation): Add documentation for -R flag.
9616
9617 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
9618
9619         * jcf-write.c (generate_classfile): Issue an error in case of
9620         field/initial value mismatch.
9621         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9622         being initialized and we're generating bytecode.
9623         (java_complete_lhs): In MODIFY_EXPR section: added comments,
9624         set DECL_INITIAL properly when appropriate.
9625         Fixes PR java/4230
9626         Fixes PR java/4204
9627
9628 2001-09-01  Per Bothner  <per@bothner.com>
9629
9630         * parse.y (maybe_yank_clinit):  A field without an initializer is not
9631         relevant.  All initializers except static final and constant require
9632         <clinit>, regardless of flag_emit_class_files.
9633
9634 2001-08-31  Per Bothner  <per@bothner.com>
9635
9636         * class.c (set_constant_value):  When not emitting class files, then a
9637         String ConstantValue is a utf8const_ptr_type.
9638
9639 2001-08-30  Per Bothner  <per@bothner.com>
9640
9641         * jcf-write.c (generate_classfile):  Check that field is primitive
9642         or string before emitting ConstantValue attribute.
9643
9644 2001-08-30  Per Bothner  <per@bothner.com>
9645
9646         * parse.y (resolve_qualified_expression_name):  If creating a
9647         COMPOUND_EXPR, set it's type correctly.
9648
9649 2001-08-30  Per Bothner  <per@bothner.com>
9650
9651         * jcf-io.c (open_class):  Set filename field.
9652
9653         * jcf-parse,c (parse_class_file):  Set current_function_decl
9654         for better error message when Code attribute is missing.
9655
9656         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
9657         better diagnostics, especially for constructors.
9658
9659 2001-08-30  Per Bothner  <per@bothner.com>
9660
9661         * jcf-write.c (generate_classfile):  Don't write ConstantValue
9662         attribute if field is not final, for compatibility with jdk.
9663
9664         * jcf-write.c (generate_classfile):  Convert ConstantValue values
9665         to correct type.  Work-around for front-end bug.
9666         * class.c (set_constant_value):  Error if constant has wrong type.
9667
9668 2001-08-30  Per Bothner  <per@bothner.com>
9669
9670         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
9671         "Double" are printed at verbosity 1.
9672
9673         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
9674
9675         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
9676
9677 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9678
9679         * parse.y (patch_assignment): Don't verify final re-assignment here.
9680         (java_complete_lhs): Verify assignments to finals calling
9681         patch_assignment. Verify re-assignments to finals before calling
9682         patch_assignment.
9683
9684 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
9685
9686         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9687         Fixes PR java/1413
9688
9689 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9690
9691         * lex.c (java_lex): new local found_hex_digits. Set and then used
9692         in test to reject invalid hexadecimal numbers.
9693         * parse.y (java_complete_tree): Prevent unwanted cast with
9694         initialized floating point finals.
9695         (patch_binop): Emit a warning when detecting a division by zero,
9696         mark result not constant, don't simplify non integer division.
9697
9698 2001-08-28  Per Bothner  <per@bothner.com>
9699
9700         * jcf-write.c  (generate_bytecode_insns):  For increments and
9701         decrements just recurse to push constant.  Improvement on Mark's patch.
9702
9703 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
9704
9705         * jcf-write.c (generate_bytecode_insns): Generate an integer to
9706         real conversion for increments and decrements of reals.
9707
9708 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9709
9710         * parse.y (resolve_qualified_expression_name): Handle unresolved
9711         qualified expressions, prevent numerical qualifiers, fixed typo.
9712         Fixes PR java/4141
9713
9714 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9715
9716         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9717         don't report anything but deprecated class when marked so. Handle
9718         VAR_DECL.
9719         (patch_method_invocation): Check deprecation on methods and types.
9720         (patch_binop): code becomes an enum tree_code, added default: to
9721         switch to handle that. Detect division by zero, try to fold and
9722         return before using a subroutine.
9723
9724 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9725
9726         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9727         file smaller than 4 bytes.
9728         * parse.y (check_inner_circular_reference): New function.
9729         (check_circular_reference): Likewise.
9730         (array_initializer:): Accept {,}.
9731         (java_check_circular_reference): Rewritten using
9732         check_circular_reference and check_inner_circular_reference.
9733         (java_complete_expand_method): Unconditionally save and restore
9734         the unpurged exception list.
9735         (build_dot_class_method_invocation): Unmangle signature parameter.
9736
9737 2001-08-21  Tom Tromey  <tromey@redhat.com>
9738
9739         * decl.c (init_decl_processing): Add `throws' field to method
9740         descriptor.
9741         * class.c (make_method_value): Compute `throws' field for method.
9742
9743 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9744
9745         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9746         circularity is detected.
9747         (ctors_unchecked_throws_clause_p): Fixed leading comment.
9748
9749 2001-08-17  Richard Henderson  <rth@redhat.com>
9750
9751         * class.c (emit_register_classes): Add align parameter to
9752         call to assemble_integer.
9753
9754 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
9755
9756         * jcf-parse.c (load_class): New locals saved and class_loaded. If
9757         loading a class_or_name fails, try considering an innerclass name
9758         and load the enclosing context.
9759         * parse.y (resolve_inner_class): New function.
9760         (find_as_inner_class): Added leading comment.
9761         (register_incomplete_type): Keep the current context as enclosing
9762         context for JDEP_FIELD dependencies.
9763         (do_resolve_class): Locals new_class_decl and super initialized to
9764         NULL. Call resolve_inner_class, explore the enclosing context
9765         superclass if necessary.
9766         Fixes PR java/4007
9767
9768 2001-08-16  Tom Tromey  <tromey@redhat.com>
9769
9770         * jcf-dump.c (main): Updated for change to jcf_path_seal.
9771         * gjavah.c (main): Updated for change to jcf_path_seal.
9772         * lang.c (version_flag): New global.
9773         (java_decode_option): Recognize `-version'.
9774         (java_init): Update for change to jcf_path_seal.
9775         * jcf.h (jcf_path_seal): Added `print' argument.
9776         * jcf-path.c (jcf_path_seal): Added `print' argument.
9777
9778 2001-08-13  Zack Weinberg  <zackw@panix.com>
9779
9780         * Make-lang.in (java/decl.o): Update dependencies.
9781         * decl.c: Include libfuncs.h, don't include toplev.h.
9782
9783 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9784
9785         * decl.c (init_decl_processing): exception_type_node,
9786         class_not_found_type_node, and no_class_def_found_type_node
9787         initialized. predef_filenames augmented accordingly.
9788         instinit_identifier_node initialized.
9789         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9790         * java-tree.h (enum java_tree_index): New entries
9791         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9792         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9793         (exception_type_node): New macro.
9794         (class_not_found_type_node): Likewise.
9795         (no_class_def_found_type_node): Likewise.
9796         (instinit_identifier_node): Likewise.
9797         (PREDEF_FILENAMES_SIZE): Adjusted.
9798         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9799         (struct lang_type): Fixed typo in bitfield name.
9800         (DECL_INSTINIT_P): New macro.
9801         (ID_INSTINIT_P): Likewise.
9802         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9803         attribute.
9804         * parse.y (encapsulate_with_try_catch): New function.
9805         (generate_instinit): Likewise.
9806         (build_instinit_invocation): Likewise.
9807         (ctors_unchecked_throws_clause_p): Likewise.
9808         (add_instance_initializer): Deleted.
9809         (build_instance_initializer): Likewise.
9810         (in_instance_initializer): Likewise.
9811         (check_method_redefinition): instinit$ not to be verified.
9812         (java_complete_expand_methods): Generate instinit$, simplified code.
9813         (build_dot_class_method): Eliminated unnecessary locals. Use
9814         encapsulate_with_try_catch, removed unnecessary code.
9815         (fix_constructors): New local iii. Use build_instinit_invocation.
9816         (patch_method_invocation): Added comment.
9817         (maybe_use_access_method): Don't consider instinit$.
9818         (find_applicable_accessible_methods_list): Shorten the search for
9819         instinit$ too.
9820         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9821         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9822         (patch_throw_statement): Likewise. Fixed typo.
9823
9824 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
9825
9826         Revert:
9827         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9828         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9829         ASM_FINAL_SPEC.
9830         (lang_specific_pre_link): Use set_input to set input_filename.
9831         Append `main' here.
9832         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9833         (main): Fix definition.
9834         Strip `main' from classname.
9835         Fixes PR java/227.
9836
9837 2001-08-11  Zack Weinberg  <zackw@panix.com>
9838
9839         * lex.h: Don't include setjmp.h.  Don't define
9840         SET_FLOAT_HANDLER or prototype set_float_handler.
9841
9842 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9843
9844         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9845         `poplevel' in the right order.
9846
9847 2001-08-09  Richard Henderson  <rth@redhat.com>
9848
9849         * Make-lang.in (class.o): Depend on TARGET_H.
9850         * class.c (emit_register_classes): Use target hooks instead of
9851         assemble_constructor and assemble_destructor.
9852
9853 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9854
9855         * check-init.c (flags.h): Include
9856         (check_init): Don't report uninitialized static class
9857         initialization flags, don't free bit index when doing static class
9858         initialization optimization.
9859         (check_for_initialization): Return type changed to `unsigned int.'
9860         (attach_initialized_static_class): New function.
9861         * class.c (add_method_1): Create the initialized static class
9862         table if necessary.
9863         (finish_class): Always emit deferred inline methods.
9864         * decl.c (emit_init_test_initialization): Moved to expr.c
9865         (complete_start_java_method): Don't traverse
9866         DECL_FUNCTION_INIT_TEST_TABLE.
9867         (lang_mark_tree): Mark hash tables in function decls.
9868         * expr.c (emit_init_test_initialization): Moved from decl.c.
9869         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9870         initialization flag, set DECL_CONTEXT and
9871         LOCAL_CLASS_INITIALIZATION_FLAG.
9872         (java_lang_expand_expr): Emit initialization code for static class
9873         initialized flags when entering block, if necessary.
9874         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9875         * java-tree.h (flag_optimize_sci): New global variable declaration.
9876         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9877         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9878         (LOCAL_FINAL_P): Fixed typo in comment.
9879         (FINAL_VARIABLE_P): Likewise.
9880         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9881         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9882         (struct lang_decl): New fields `ict', `smic' and `cif.'
9883         (check_for_initialization): New returned value for global.
9884         (attach_initialized_static_class): New global function.
9885         (STATIC_CLASS_INIT_OPT_P): New macro.
9886         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9887         * lang.c (java_decode_option): Handle
9888         `-fno-optimize-static-class-initialization'
9889         * parse.y (start_complete_expand_method): New function.
9890         (java_expand_method_bodies): Likewise.
9891         (attach_init_test_initialization_flags): Likewise.
9892         (adjust_init_test_initialization): Likewise.
9893         (emit_test_initialization): Likewise.
9894         (java_complete_expand_methods): Nullify abstract and native method
9895         bodies.
9896         (java_complete_expand_method): New locals `fbody', `block_body'
9897         and `exception_copy.' Reorganized: directly return on empty method
9898         bodies, call `start_complete_expand_method', remember definitely
9899         initialized static class in function, don't expand method bodies.
9900         (java_expand_classes): Call `java_expand_method_bodies' before
9901         `finish_class' when compiling to native.
9902         (resolve_expression_name): Use `orig' after building outer class
9903         field access.
9904         (patch_invoke): Remember static method invocations.
9905
9906 2001-08-06  Richard Henderson  <rth@redhat.com>
9907
9908         * class.c (emit_register_classes): Pass a symbol_ref and priority
9909         to assemble_constructor.
9910
9911 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9912
9913         * java-tree.h (all_class_filename): New macro.
9914         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9915         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9916         newly created IDENTIFIER_NODE to `all_class_filename.'
9917
9918 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9919
9920         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9921         Use ggc_add_tree_root to register roots.
9922
9923 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9924
9925         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9926         second operand calling check_init.
9927         * decl.c (complete_start_java_method): Swaped second and third
9928         arguments while creating WITH_CLEANUP_EXPR node.
9929         * jcf-write.c (generate_bytecode_insns): Use second operand
9930         instead of third when handling WITH_CLEANUP_EXPR.
9931         * parse.y (java_complete_lhs): Expand second operand of
9932         WITH_CLEANUP_EXPR nodes.
9933         (patch_synchronized_statement): Swaped second and third arguments
9934         while creating WITH_CLEANUP_EXPR node.
9935
9936 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9937
9938         * parse.y (create_interface): Avoid cyclic inheritance report when
9939         syntax error encountered during class definition.
9940         Fixes PR java/2956
9941
9942 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9943
9944         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9945         ASM_FINAL_SPEC.
9946         (lang_specific_pre_link): Use set_input to set input_filename.
9947         Append `main' here.
9948         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9949         (main): Fix definition.
9950         Strip `main' from classname.
9951         Fixes PR java/227.
9952
9953 2001-07-18  Tom Tromey  <tromey@redhat.com>
9954
9955         For PR java/2812:
9956         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9957         * lex.c (java_new_lexer): Use ICONV_CONST.
9958         (java_read_char): Likewise.
9959         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9960         (jv-scan$(exeext)): Likewise.
9961
9962 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9963
9964         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9965         * parse.y (check_class_interface_creation): Allow `private' if the
9966         enclosing is not an interface.
9967         (create_interface): Interface tagged public if the enclosing
9968         context is an interface.
9969         (create_class): Class tagged public if the enclosing context
9970         is an interface.
9971         Fixes PR java/2959
9972
9973 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9974
9975         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9976         Fixes PR java/2665
9977
9978 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9979
9980         * check-init.c (check_init): Remove references to EXPON_EXPR.
9981
9982 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9983
9984         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9985         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9986         Fixes PR java/3602
9987
9988 2001-07-13  Tom Tromey  <tromey@redhat.com>
9989
9990         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
9991         invocation.
9992
9993 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9994
9995         * parse.y (patch_method_invocation): Don't override primary if one
9996         is already provided, but let this$<n> be built. Fixed comment.
9997
9998 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9999
10000         * parse.y (empty_statement:): Report empty statement error only
10001         when found at class declaration level.
10002         Fixes PR java/3635
10003
10004 2001-07-12  Tom Tromey  <tromey@redhat.com>
10005
10006         * expr.c (expand_load_internal): New function.
10007         (LOAD_INTERNAL): Use it.
10008
10009 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10010
10011         * parse.y (verify_constructor_super): Compare anonymous class ctor
10012         args with `valid_method_invocation_conversion_p.'
10013         Fixes PR java/3285
10014
10015 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10016
10017         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10018         `-fsyntax-only.' Fixes PR java/3248
10019
10020 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10021
10022         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10023
10024 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10025
10026         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10027         current function is static. Fixes PR java/1970
10028
10029 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10030
10031         * parse.y (patch_method_invocation): Add enclosing context to ctor
10032         calls if necessary. Fixes PR java/2953
10033
10034 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10035
10036         * parse.y (resolve_package): Abort if qualified expression member
10037         isn't right.
10038         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10039         Fixes PR java/1391
10040
10041 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10042
10043         * verify.c: Don't use // comments.
10044
10045 2001-07-05  Tom Tromey  <tromey@redhat.com>
10046
10047         * lang.c (flag_assume_compiled): Removed.
10048         * java-tree.h (flag_assume_compiled): Removed.
10049         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10050         -fhash-synchronization, -fuse-divide-subroutine,
10051         -fcheck-references, -femit-class-file, -femit-class-files,
10052         -fassume-compiled.  Updated --encoding information.  Changed
10053         -foutput-class-dir to `-d'.
10054
10055 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10056
10057         * jcf-parse.c (parse_class_file): Add lineno parameter to
10058         debug_start_source_file call.
10059
10060 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10061
10062         * gcj.texi: Use gpl.texi.
10063         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10064         dependencies and use doc/include in search path.
10065
10066 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10067
10068         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10069         `this'.  If so, don't build instance initializers.
10070
10071 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10072
10073         * parse.y (resolve_expression_name): Improved error message for
10074         inner class cases. Fixes PR java/1958
10075
10076 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10077
10078         * lang.c: #include diagnostic.h
10079         (lang_print_error): Add a `diagnostic_context *' parameter.
10080         (java_dummy_print): Likewise.
10081         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10082
10083 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10084
10085         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10086         * jcf.h (typedef struct JCF): New bitfield `finished.'
10087         (JCF_FINISH): Set `finished.'
10088         (JCF_ZERO): Reset `finished.'
10089         Fixes PR java/2633
10090
10091 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10092
10093         * parse.y (class_body_declaration:): Don't install empty instance
10094         initializers.
10095         Fixes PR java/1314
10096
10097 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10098
10099         * class.c (set_super_info): Call `set_class_decl_access_flags.'
10100         (set_class_decl_access_flags): New function.
10101         * java-tree.h (set_class_decl_access_flags): New prototype.
10102         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10103         (parse_class_file): New local `decl_max_locals.' Take wide types
10104         into account to compute DECL_MAX_LOCALS.
10105         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10106         imports on demand.
10107
10108 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
10109
10110         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10111
10112 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10113
10114         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10115         * parse.y (do_resolve_class): Moved comments out to leading comment
10116         section. Removed local `start', New local `_ht' and
10117         `circularity_hash.'  Record `enclosing' in hash table and search
10118         it to detect circularity.  Use `enclosing' as an argument to
10119         `lookup_cl.' Free the hash table when done.
10120
10121 2001-06-19  Tom Tromey  <tromey@redhat.com>
10122
10123         * lex.c (java_read_char): Disallow invalid and overlong
10124         sequences.  Fixes PR java/2319.
10125
10126 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
10127
10128         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10129
10130 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10131
10132         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10133         arguments accordingly.
10134
10135 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10136
10137         * gcj.texi: Move contents to just after title page.
10138
10139 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
10140
10141         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10142         builtin type.
10143         (patch_incomplete_class_ref): Build the class ref, build the class
10144         init if necessary, complete the tree.
10145         Fixes PR java/2605
10146
10147 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10148
10149         * parse.y (lookup_field_wrapper): Test `name' code.
10150         (resolve_qualified_expression_name): Test `qual_wfl' code.
10151         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10152         handle `qual_wfl' by code.
10153         (maybe_build_primttype_type_ref): Test `wfl' code.
10154
10155 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10156
10157         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10158         fdl.texi.
10159         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
10160         the dvi file in the java directory.
10161
10162 2001-05-25  Sam TH  <sam@uchicago.edu>
10163
10164         * gen-table.pl javaop.h jcf.h lex.h,
10165         parse.h: Fix header include guards.
10166
10167 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
10168
10169         * jv-scan.c (version): Update copyright year.
10170
10171 2001-05-21  Per Bothner  <per@bothner.com>
10172
10173         * jcf-parse.c (read_class):  If class is from .class or .zip file
10174         and it's already been read, don't push/pop parser context.
10175
10176 2001-05-18  Per Bothner  <per@bothner.com>
10177
10178         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
10179         command line so the jvgenmain-generated main program comes first.
10180
10181 2001-05-15  Tom Tromey  <tromey@redhat.com>
10182
10183         * class.c (build_utf8_ref): Don't generate identifier based on
10184         utf8const contents.
10185
10186 2001-05-12  Richard Henderson  <rth@redhat.com>
10187
10188         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10189         * expr.c (java_lang_expand_expr): Expand it.
10190         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10191         calling build_exception_object_ref.
10192         * parse.y (catch_clause_parameter): Likewise.
10193         (build_dot_class_method): Likewise.
10194         (try_reference_assignconv): Likewise.
10195         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10196         * jcf-write.c (generate_bytecode_insns): Likewise.
10197
10198 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10199
10200         * parse.y (build_unresolved_array_type): Set
10201         EXPR_WFL_QUALIFICATION on the newly created wfl.
10202         Fixes PR java/2538. Fixes PR java/2535.
10203
10204 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10205
10206         * parse.y (fix_constructors): Removed unnecessary assignment to
10207         local. Moved assignment to `this$<n>', fixed comments and
10208         indentation.
10209         (build_wfl_wrap): Fixed indentation.
10210         Fixes PR java/2598, java/2579 and java/2658.
10211
10212 2001-05-03  Mo DeJong  <mdejong@redhat.com>
10213
10214         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10215         check for byte swap.
10216
10217 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
10218
10219         * expr.c (build_class_init): Move MODIFY_EXPR
10220         outside of COND_EXPR.  Remove variable `call'.
10221
10222 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10223
10224         * decl.c: NULL_PTR -> NULL.
10225         * jcf-write.c: Likewise.
10226
10227 2001-05-01  Tom Tromey  <tromey@redhat.com>
10228
10229         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10230         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10231         * gcj.texi: Updated copyright text.  Include fdl.texi.
10232         (Top): Link to new node.
10233
10234 2001-05-01  Per Bothner  <per@bothner.com>
10235
10236         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
10237
10238 2001-05-01  Per Bothner  <per@bothner.com>
10239
10240         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
10241         import_list contains the name, not the TREE_PURPOSE.
10242
10243 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10244
10245         * jcf-io.c (read_zip_member): Cast to long in comparison with
10246         signed value.
10247
10248         * jvspec.c (lang_specific_driver): Initialize variables.
10249
10250         * mangle.c (find_compression_record_match): Likewise.
10251
10252         * typeck.c (build_null_signature): Provide static prototype.  Mark
10253         parameter with ATTRIBUTE_UNUSED.
10254
10255         * verify.c (verify_jvm_instructions): Initialize variable.
10256
10257 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10258
10259         * parse.y (do_resolve_class): Check for cyclic inheritance during
10260         inner class resolution.
10261
10262 2001-04-27  Per Bothner  <per@bothner.com>
10263
10264         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
10265         while iterating, since that could cause gc to lose stuff.
10266
10267 2001-04-26  Per Bothner  <per@bothner.com>
10268
10269         Fix method search wrt scope of inner classes to match JLS2.
10270         * typeck.c (build_null_signature):  New static function.
10271         (has_method):  New function.  Uses build_null_signature and lookup_do.
10272         * java-tree.h (has_method):  New declaration.
10273         * parse.y (find_applicable_accessible_methods_list):  Do not search
10274         context of inner classes here.
10275         (patch_method_invocation):  Search scope, ie. current and outer clases,
10276         for method matching simple name, to find class.
10277
10278 2001-04-26  Per Bothner  <per@bothner.com>
10279
10280         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10281         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
10282
10283         * constants.c (find_methodref_with_class_index):  New function.
10284         (find_methodref_index):  Use find_methodref_with_class_index.
10285         * java-tree.h (find_methodref_with_class_index):  New declaration.
10286         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
10287         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10288         If context changed from interface to class, don't use invokeinterface.
10289
10290 2001-04-25  Per Bothner  <per@bothner.com>
10291
10292         * verify.c (verify_jvm_instructions):  For field instructions,
10293         check that field index is valid.  For invoke instructions, check that
10294         method index is valid.
10295
10296 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
10297
10298         * config-lang.in (target_libs): Copy from $libgcj_saved.
10299
10300 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10301
10302         * decl.c (init_decl_processing): Add new class "protectionDomain"
10303         field.
10304         * class.c (make_class_data): Set initial value for "protectionDomain".
10305
10306 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10307
10308         * jvspec.c (lang_specific_driver): Fix memory allocation
10309         deficit, by using concat in lieu of xmalloc/sprintf.
10310
10311 2001-04-20  Per Bothner  <per@bothner.com>
10312
10313         Fixes to compile multiple .class files at once.
10314         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
10315         * java-tree.h (CLASS_PARSED_P):  New macro.
10316         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10317         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
10318         (read_class):  Avoid some code duplication.
10319         Don't call JCF_FINISH for a .class file - might be needed later.
10320         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
10321         rather than CLASS_LOADED_P, since latter implies class laid out.
10322         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
10323         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
10324
10325 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10326
10327         * Make-lang.in (java/boehm.o): Depend on toplev.h.
10328
10329         * boehm.c: Include toplev.h.
10330
10331 2001-04-06  Tom Tromey  <tromey@redhat.com>
10332             Alexandre Petit-Bianco  <apbianco@redhat.com>
10333
10334         Fix for PR gcj/1404 and PR gcj/2332:
10335         * parse.y (build_array_from_name): If we use the type_wfl then
10336         accumulate dimensions from the original type as well.
10337         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10338
10339 2001-04-06  Tom Tromey  <tromey@redhat.com>
10340
10341         * parse.y (analyze_clinit_body): Return true if the second operand
10342         of a METHOD_EXPR is nonzero.
10343
10344 2001-04-06  Tom Tromey  <tromey@redhat.com>
10345
10346         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10347         directory.
10348         ($(srcdir)/java/parse.c): Likewise.
10349
10350 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10351
10352         * gcj.texi: Use `which-gcj' instead of `which-g77.'
10353         (version-gcc): Initialized.
10354         (which-gcj): Likewise.
10355
10356 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10357
10358         * java-tree.h (struct lang_decl): New macro
10359         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10360         * parse.y (build_instance_initializer): New function.
10361         (add_instance_initializer): Use it.
10362         (java_fix_constructors): Set `current_class' before fix pass.
10363         (fix_constructors): Just return if already fixed. Move `super()'
10364         invocation ahead. Use `build_instance_initializer.'
10365         Fixes PR java/1315.
10366
10367 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10368
10369         * parse.y (resolve_qualified_expression_name): Pass field's
10370         DECL_CONTEXT to `not_accessible_p.'
10371         (not_accessible_p): Changed parameters order in `inherits_from_p'
10372         invocation.
10373
10374 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
10375
10376         * lang-options.h: Add flag_check_references.
10377
10378 2001-04-04  Per Bothner  <per@bothner.com>
10379
10380         * java-tree.h (CONSTANT_VALUE_P):  New macro.
10381         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
10382         * parse.y (maybe_build_class_init_for_field):  New static function.
10383         (resolve_expression_name, resolve_field_access):  Use
10384         maybe_build_class_init_for_field instead of build_class_init
10385         This does not do the init if the field is compile-time-constant.
10386         (resolve_field_access):  Simplify.
10387
10388         * parse.y (fold_constant_for_init):  Merge test into switch.
10389
10390 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
10391
10392         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10393         on gansidecl.h.
10394         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10395
10396 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
10397
10398         * expr.c (pop_type_0): Save the result of the first
10399         lang_printable_name call in a scratch buffer, so it
10400         won't be clobbered by the second call.
10401
10402 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10403
10404         * parse-scan.y (array_type:): Rewritten.
10405         (type_declaration:): `empty_statement' replaces `SC_TK.'
10406         (class_member_declaration:): `empty statement' added.
10407         (method_body:): Simplified.
10408         (static_initializer:): Likewise.
10409         (primary_no_new_array:): Use `type_literals.'
10410         (type_literals:): New rule.
10411         (dims:): Set and update `bracket_count.'
10412         Fixes PR java/1074. Fixes PR java/2412.
10413
10414 2001-03-28  Hans Boehm  <boehm@acm.org>
10415
10416         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10417         (get_boehm_type_descriptor): Set type on returned value to be a
10418         pointer length integer.
10419
10420 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10421
10422         * expr.c (pop_type_0): Call `concat' rather than building the
10423         string manually.
10424         (pop_type): Add format specifier in call to `error'.
10425
10426         * parse.y (patch_method_invocation): Avoid casting away
10427         const-ness.
10428
10429 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
10430
10431         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10432
10433 2001-03-28  Richard Henderson  <rth@redhat.com>
10434
10435         IA-64 ABI Exception Handling:
10436         * Make-lang.in (except.o): Don't depend on eh-common.h.
10437         * check-init.c (check_init): Handle EXC_PTR_EXPR.
10438         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10439         [soft_exceptioninfo_call_node]: Remove.
10440         [eh_personality_libfunc, lang_eh_runtime_type]: New.
10441         (end_java_method): No emit_handlers.
10442         * except.c (java_set_exception_lang_code): Remove.
10443         (method_init_exceptions): Don't call it.
10444         (prepare_eh_table_type): No CATCH_ALL_TYPE.
10445         (build_exception_object_ref): New.
10446         (expand_end_java_handler): Update for except.h name changes.
10447         (emit_handlers, expand_resume_after_catch): Remove.
10448         * expr.c (java_lang_expand_expr): Update for except.h name changes.
10449         (process_jvm_instruction): Use build_exception_object_ref.
10450         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10451         (soft_exceptioninfo_call_node): Remove.
10452         (build_exception_object_ref): Declare.
10453         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10454         soft_exceptioninfo_call_node.  Move processing ...
10455         [EXC_PTR_EXPR]: ... here.
10456         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10457         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10458         (source_end_java_method): No java_set_exception_lang_code or
10459         emit_handlers.
10460         (build_dot_class_method): Use build_exception_object_ref.
10461         (try_reference_assignconv): Check EXC_PTR_EXPR not
10462         soft_exceptioninfo_call_node.
10463
10464 2001-03-28  Richard Henderson  <rth@redhat.com>
10465
10466         * java-tree.h (throw_node): Define as a single member of
10467         java_global_trees instead of a separate array.
10468         (JTI_THROW_NODE): New.
10469         * decl.c (throw_node): Don't declare.
10470         (init_decl_processing): Init a scalar throw_node.
10471         Don't register it for gc.
10472         * check-init.c (check_init): Reference scalar throw_node.
10473         * expr.c (build_java_athrow): Likewise.
10474         * jcf-write.c (generate_bytecode_insns): Likewise.
10475         * parse.h (BUILD_THROW): Likewise.
10476
10477 2001-03-28  Richard Henderson  <rth@redhat.com>
10478
10479         * decl.c (end_java_method): Do not save and restore
10480         flag_non_call_exceptions.
10481         * parse.y (source_end_java_method): Likewise.
10482         * lang.c (flag_exceptions): Don't declare.
10483         (java_init_options): Set flag_non_call_exceptions.  Set
10484         flag_exceptions here ...
10485         (java_init): ... not here.
10486
10487 2001-03-27  Richard Henderson  <rth@redhat.com>
10488
10489         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10490         exceptions_via_longjmp.
10491
10492         * lang.c (flag_new_exceptions): Don't declare it.
10493         (java_init_options): Or set it.
10494
10495 2001-03-27  Richard Henderson  <rth@redhat.com>
10496
10497         * decl.c (end_java_method): Rename asynchronous_exceptions to
10498         flag_non_call_exceptions.
10499         * parse.y (source_end_java_method): Likewise.
10500
10501 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10502
10503         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10504
10505 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
10506
10507         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10508
10509 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10510
10511         * parse.y (find_as_inner_class): Follow current package
10512         indications not to mistakingly load an unrelated class.
10513
10514 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10515
10516         * constants.c (PUTN): Use memcpy, not bcopy.
10517
10518         * lex.c (java_read_char): Use memmove, not bcopy.
10519
10520         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10521
10522 2001-03-23  Per Bothner  <per@bothner.com>
10523
10524         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
10525         macro for better error pin-pointing.
10526         * java-tree.h:  Fix typo in comment.
10527
10528         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
10529         Don't include jsr/goto in exception range.
10530         Check if start and end of exception range are the same (also TRY_EXPR).
10531         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10532         However, do emit the following goto even if try_block is empty.
10533         Defer freeing exception_decl until after the finalizer, to make
10534         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
10535
10536         * parse.y (java_complete_lhs):  If the try-clause is empty, just
10537         return the finally-clause and vice versa.
10538
10539 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10540
10541         * gcj.texi (Input Options): documented the check for attribute
10542         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10543         * java-tree.h (flag_force_classes_archive_check): Declared extern.
10544         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10545         (jcf_parse): Check for the right classes archive if necessary.
10546         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10547         (jcf_parse_fields): Fixed indentation.
10548         * jcf-write.c (append_gcj_attribute): New function.
10549         (generate_classfile): Compute the attribute count, invoke
10550         `append_gcj_attribute'.
10551         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10552         turned into bit-fields. New bit-field `right_zip.'
10553         (JCF_ZERO): Set `right_zip' to zero.
10554         * lang-options.h (-fforce-classes-archive-check): Added flag.
10555         * lang.c (flag_force_classes_archive_check): New flag.
10556         (lang_f_options): New entry `force-classes-archive-check.'
10557         Fixes PR java/1213.
10558
10559 2001-02-07  Andrew Haley  <aph@redhat.com>
10560
10561         * gcj.texi (Configure-time Options): Add -fcheck-references.
10562         * expr.c (build_java_indirect_ref): New function.
10563         (java_check_reference): New function.
10564         (build_java_array_length_access): Use build_java_indirect_ref to
10565         check for null references.
10566         (build_java_arrayaccess): Likewise.
10567         (build_get_class): Likewise.
10568         (build_field_ref): Likewise.
10569         (invoke_build_dtable): Likewise.
10570         (build_invokeinterface): Likewise.
10571         * lang.c (lang_f_options): Add flag_check_references.
10572         * jvspec.c (jvgenmain_spec): Add flag_check_references.
10573         * java-tree.h (flag_check_references): New variable.
10574         * lang.c (flag_check_references): Likewise.
10575         * parse.y (patch_invoke): Use java_check_reference.
10576         (patch_assignment): Allow for extra nesting in
10577         _Jv_CheckArrayStore.
10578
10579 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
10580
10581         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10582         * lex.c (cxx_keywords): Likewise.
10583
10584 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10585
10586         * parse.y (qualify_ambiguous_name): Broaden `length'
10587         recognition. Help MODIFY_EXPR be resolved as expression names.
10588         Fixes PR java/2066. Fixes PR java/2400.
10589
10590 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
10591
10592         * gjavah.c (process_file): Mark interface definitions with
10593         "__attribute__ ((java_interface))".
10594
10595 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10596
10597         * class.c (layout_class): Fixed push_super_field's second
10598         argument. Fixes PR java/2333.
10599         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10600         too early to lay innerclasses out.
10601
10602 2001-03-20  Tom Tromey  <tromey@redhat.com>
10603             Alexandre Petit-Bianco <apbianco@redhat.com>
10604
10605         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10606         inside an array reference. Insertion of the array store check
10607         rewritten. Fixes PR java/2299.
10608
10609 2001-03-20  Tom Tromey  <tromey@redhat.com>
10610
10611         * lex.c (java_read_unicode): Only accept leading `u's.
10612
10613 2001-03-20  Tom Tromey  <tromey@redhat.com>
10614
10615         * jcf-parse.c (read_class): Initialize `class'.
10616
10617 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10618
10619         * jcf_parse.c (jcf_parse): Eliminate unused variable.
10620
10621 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10622
10623         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10624         (layout_class): Likewise.
10625         (layout_class_method): Likewise.
10626         (emit_register_classes): Likewise.
10627         * decl.c (builtin_function): Likewise.
10628         (give_name_to_locals): Likewise.
10629
10630 2001-03-19  Per Bothner  <per@bothner.com>
10631
10632         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
10633         before trying to load an inner class.
10634
10635         Fixes to process to command-line .class files in two passes.
10636         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
10637         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
10638         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
10639         * class.c (is_compiled_class):  Fix for renamed flag.
10640         * parse.y (maybe_create_class_interface_decl):  Likewise.
10641         * jcf-parse.c (yyparse):  Also set if compiling .class files.
10642         * jcf-parse.c (read_class);  Read current_class.
10643         (jcf_parse):  Make static.
10644         (load_inner_classes):  New function, with code moved from jcf_parse,
10645         because we need to inner classes after the command-line files are read.
10646         (yyparse):  Set finput to NULL when it doesn't need to be closed.
10647         Reduce use of main_jcf (basically only for archive) and
10648         use finput instead of main_jcf->read_state.
10649         Inline jcf_figure_file_type into yyparse.
10650         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10651         Defer load_inner_classes and parse_class_file to a second pass,
10652         after we've correctly mapped command-line .clas fiels to classes.
10653         (jcf_figure_file_type):  Removed.
10654         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
10655         (JCF_ZERO):  Also clear zipd field.
10656         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
10657
10658 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10659
10660         * jcf-parse.c (yyparse): Change ch from char * to char.
10661
10662 2001-03-19  Per Bothner  <per@bothner.com>
10663
10664         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
10665         Add constructed filelist-file at end, following -xjava.  Thus any .o
10666         and library files are not affected by the -xjava.  Also wrap
10667         explicit @FILE with -xjava and -xnone.
10668
10669 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
10670
10671         * class.c (build_static_field_ref): Call make_decl_rtl() after
10672         setting the DECL_EXTERNAL flag.
10673
10674 2001-03-17  Per Bothner  <per@bothner.com>
10675
10676         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
10677
10678         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
10679         when result is is needed (target is STACK_TARGET).
10680
10681         * parse.h (JDEP_SOLV):  Removed.
10682         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
10683
10684         * parse.y (incomplete_class_list): Removed.
10685         (obtain_incomplete_type): Don't use or set incomplete_class_list.
10686         It doesn't work if resolve_class changes the name of an array type
10687         that is on the list and then someone else looks for the modified name.
10688         Also, seems liable to break when compiling multiple source files at
10689         once.  So the simplest is to just remove incomplete_class_list -
10690         it is only a minor space win and it is not even clear it saves time.
10691
10692         * parse.y (resolve_class):  Remove unneeded promote_type.
10693
10694 2001-03-15  Per Bothner  <per@bothner.com>
10695
10696         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
10697         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
10698         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10699         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10700
10701         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
10702         * parse.y (java_expand_classes):  Likewise.
10703
10704         * parse.y (expand_start_java_method):  Was only called once and had a
10705         misleading name, so inline in caller java_complete_expand_method.
10706         (enter_a_block):  Likewise inline in enter_block and remove.
10707
10708         Remove junk from when gcc/java was created (by copying from C/C++).
10709         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
10710         (struct binding_level):  Remove fields keep, keep_if_subblocks,
10711         more_cleanups_ok, have_cleanups (which have never been used).
10712         (pushlevel, poplevel):  Remove related useless code.
10713
10714         * class.c (make_class_data):  The class_dtable_decl (i.e. the
10715         vtable for Class) should be external, except when compiling Class.
10716
10717         * jvspec.c (lang_specific_driver):  Fix -C handling.
10718         Check -save-temps to see if temp @FILE should be deleted.
10719         Follow-up to/fix for February 16 patch.
10720
10721         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
10722         (type_stack_dup):  Remove no-longer neded error check.
10723
10724 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
10725
10726         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10727         to 'for_pointer'. If this type is for a pointer (argument) mangling,
10728         don't surround the element with 'N..E' if the type name is
10729         unqualified.
10730
10731 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10732
10733         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10734         DECL_RTL_SET_P, etc.
10735         (make_method_value): Likewise.
10736         (get_dispatch_table): Likewise.
10737
10738         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10739
10740 2001-03-07  Tom Tromey  <tromey@redhat.com>
10741
10742         * config-lang.in (lang_requires): Define.
10743
10744 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
10745
10746         * typeck.c (convert): Check flag_unsafe_math_optimizations,
10747         not flag_fast_math.
10748
10749 2001-03-05  Per Bothner  <per@bothner.com>
10750
10751         Fix a problem where rest_of_decl_compilation applied to
10752         class_dtable_decl causes problems because it was done too early,
10753         before output file was opened.
10754         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
10755         * class.c (class_dtable_decl):  Add macro - element of class_roots.
10756         (make_class_data):  Define class_dtable_decl.
10757         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
10758
10759 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10760
10761         * java/class.c, java/decl.c, java/java-tree.h: Replace all
10762         uses of 'boolean' with 'bool'.
10763
10764 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10765
10766         * lang-specs.h: Add zero initializer for cpp_spec field to all
10767         array elements.
10768
10769 2001-02-16  Per Bothner  <per@bothner.com>
10770
10771         Handle compiling multiple input files at once, and @FILE syntax.
10772         * gcj.texi:  Updated documentation to match.
10773         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
10774         * jcf-parse.c (parse_source_file):  Split into ...
10775         (parse_source_file_1):  New function - and:
10776         (parse_source_file_2):  New function.
10777         (yyparse):  On -ffilelist-file, open and scan named file.
10778         On first pass over files, only do parse_source_file_1.
10779         A new second pass calls parse_source_file_2 for each file to compile.
10780         (init_jcf_parse):  Call init_src_parse.
10781         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
10782         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
10783         as multiple input file combined in one compilation.
10784         * lang-options.h:  Add -ffilelist-file
10785         * lang.c (flag_filelist_file):  New flag variable.
10786         (lang_f_options):  Handle -ffilelist-file.
10787         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10788         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
10789         gclass_list - use global fields of src_parse_roots instead.
10790         * parse.y (src_parse_roots):  New array.
10791         (incomplete_class_list, gclass_list):  New macros.
10792         (push_parser_context, java_pop_parser_context,
10793         java_parser_context_resume):  Don't fiddle with deleted fields.
10794         (various):  Use incomplete_class gclass_list and global macros
10795         instead of parse_ctxt fields - the lists are global.
10796         (init_src_parse):  New function.
10797
10798 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10799
10800         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10801
10802 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10803
10804         * parse.y (check_inner_class_access): Moved declaration of local
10805         `enclosing_decl_type' to the right location.
10806
10807 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
10808
10809         * parse.y (parser_check_super_interface): Don't call
10810         check_pkg_class_access for an inner interface.
10811         (parser_check_super): Don't call check_pkg_class_access for inner
10812         class.
10813         (do_resolve_class): Simplify enclosing type loop. Don't call
10814         check_pkg_class_access if CL and DECL are not set.
10815         (find_in_imports_on_demand): Set DECL if class_type needed to be
10816         loaded. Don't call check_pkg_class_access for an inner class.
10817         (check_inner_class_access): Rewritten to implement member access
10818         rules as per spec 6.6.1.
10819         (check_pkg_class_access): Handle the empty package correctly.
10820         (in_same_package): New function. Determine if two classes are in the
10821         same package.
10822
10823 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
10824
10825         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10826         method into array types.
10827         * parse.y (patch_method_invocation): Bypass access check on clone call
10828         to array instance.
10829
10830 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10831
10832         * expr.c (build_instanceof): Check for arrays when trying fold to
10833         false.
10834
10835 2001-02-15  Jim Meyering  <meyering@lucent.com>
10836
10837         * Make-lang.in (java.install-common): Depend on `installdirs'.
10838         (java.install-info): Likewise.
10839
10840 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
10841
10842         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10843
10844 2001-02-14  Tom Tromey  <tromey@redhat.com>
10845             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10846
10847         Fix for PR java/1261.
10848         * typeck.c (build_java_array_type): Add public `clone' method to
10849         arrays.
10850         * parse.y (resolve_qualified_expression_name): Use current_class
10851         when checking for inaccessibility.
10852         (patch_method_invocation): Fixed error message when accessibility
10853         denied.  Added `from_super' argument.
10854
10855 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10856
10857         * parse.y (resolve_class): Don't build a fake decl. Use the one
10858         already built.
10859         * typeck.c (build_java_array_type): Build and assign decl to array
10860         type.
10861
10862 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10863
10864         * parse.y (not_accessible_p): Changed leading comment. Added extra
10865         `where' argument. Use it to enforce protected access rules.
10866         (resolve_qualified_expression_name): Added extra argument to
10867         not_accessible_p.
10868         (patch_method_invocation): Use argument `primary' to provide
10869         not_accessible_p with an extra argument.
10870         (lookup_method_invoke): Added extra argument to not_accessible_p.
10871         (search_applicable_method_list): Likewise.
10872
10873 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10874
10875         * parse.y (resolve_qualified_expression_name): Try to resolve as
10876         an inner class access only if `decl' is a TYPE_DECL.
10877
10878 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10879
10880         * decl.c (classdollar_identifier_node): Initialize.
10881         * java-tree.h (enum java_tree_index): New entry
10882         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10883         (classdollar_identifier_node): New macro.
10884         (ID_CLASSDOLLAR_P): Likewise.
10885         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10886         (build_dot_class_method_invocation): Likewise.
10887         (find_applicable_accessible_methods_list): `class$' can't be
10888         inherited.
10889
10890 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10891
10892         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10893
10894 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10895
10896         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10897         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10898         gone.
10899
10900 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10901
10902         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10903         outside of the `__U' sequence too.
10904         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10905         sequence too.
10906
10907 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10908
10909         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10910
10911 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10912
10913         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10914         (JVGENMAIN_OBJS): Likewise.
10915         * java-tree.h (append_gpp_mangled_name): New prototype.
10916         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10917         Removed cast calling `gcc_add_root.'
10918         * jvgenmain.c (mangle_obstack): New global, initialized.
10919         (main): Use it.
10920         (do_mangle_class): Constify local `ptr.'
10921         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10922         append_gpp_mangle_name and update `count' if necessary.
10923         Use `mangle_obstack.'
10924         * mangle.c (append_unicode_mangled_name): Removed.
10925         (append_gpp_mangled_name): Likewise.
10926         (unicode_mangling_length): Likewise.
10927         (mangle_member_name): Return type set to `void.'
10928         (mangle_field_decl): Don't append `U' in escaped names.
10929         (mangle_method_decl): Likewise.
10930         (mangle_member_name): Just use `append_gpp_mangled_name.'
10931         * mangle_name.c: New file.
10932
10933 2001-02-07  Per Bothner  <per@bothner.com>
10934
10935         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10936
10937         * check-init.c (check_init):  Don't call done_alternative after
10938         processing loop code, as a LOOP_EXPR never terminates normally.
10939
10940 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10941
10942         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10943
10944 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10945
10946         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10947         DECLs.
10948
10949 2001-02-06  Tom Tromey  <tromey@redhat.com>
10950
10951         * lex.c (java_new_lexer): Longer error message.
10952
10953 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10954             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10955
10956         * typeck.c (build_prim_array_type): Added leading comment.
10957         (build_java_array_type): Moved locals out of
10958         block. Always create the `data' field, fixed alignment to match
10959         C++.
10960
10961 2001-02-04  Tom Tromey  <tromey@redhat.com>
10962
10963         * expr.c (java_lang_expand_expr): Don't bother recomputing
10964         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10965         Fixes PR java/1866.
10966
10967 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10968
10969         * parse.y (process_imports): Save the original name of the import
10970         for better error report.
10971
10972 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10973
10974         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10975         of macros used when compiling jvspec.c.
10976         * jvspec.c (lang_specific_driver): Link with the shared
10977         libgcc by default.
10978
10979 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10980
10981         * check-init.c (check_init): Call internal_error instead of fatal.
10982         * expr.c (java_lang_expand_expr): Likewise.
10983         * jcf-parse.c (get_constant): Likewise.
10984         * mangle.c (java_mangle_decl): Likewise.
10985         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10986         (operator_string): Likewise.
10987         * check-init.c (check_init): Call abort instead of fatal.
10988         * class.c (build_class_ref): Likewise.
10989         * constants.c (write_constant_pool): Likewise.
10990         * decl.c (start_java_method): Likewise.
10991         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
10992         (java_stack_dup, encode_newarray_type): Likewise.
10993         (build_java_array_length_access): Likewise.
10994         (build_java_check_indexed_type, expand_java_pushc): Likewise.
10995         (build_java_soft_divmod, build_invokeinterface): Likewise.
10996         * java-tree.h (INNER_CLASS_P): Likewise.
10997         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
10998         (give_name_to_class, get_class_constant): Likewise.
10999         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11000         (find_constant_index, generate_bytecode_conditional): Likewise.
11001         (generate_bytecode_insns, perform_relocations): Likewise.
11002         * lex.c (java_unget_unicode, java_lex): Likewise.
11003         * mangle.c (mangle_type, mangle_record_type): Likewise.
11004         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11005         (finish_mangling): Likewise.
11006         * parse.h (MARK_FINAL_PARMS): Likewise.
11007         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11008         (obtain_incomplete_type, java_complete_class): Likewise.
11009         (java_check_regular_methods, java_complete_expand_method): Likewise.
11010         (cut_identifier_in_qualified, check_deprecation): Likewise.
11011         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11012         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11013         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11014         * typeck.c (set_local_type, parse_signature_type): Likewise.
11015         (parse_signature_string, build_java_signature): Likewise;
11016         (set_java_signature): Likewise.
11017         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11018         * class.c (add_method): Call fatal_error instead of fatal.
11019         (build_static_field_ref): Likewise.
11020         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11021         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11022         * lex.c (java_new_new_lexer): Likewise.
11023         * jv-scan.c (main): Likewise.
11024         (fatal_error): Renamed from fatal.
11025         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11026         pfatal_with_name.
11027         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11028         (yyparse): Likewise.
11029         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11030         * lex.c (java_get_line_col): Likewise.
11031         * jcf-parse.c (load_class): Make errors non-fatal.
11032         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11033
11034 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11035
11036         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11037         (error): Remove unused function.
11038         (main): Don't use "__attribute__ alias" on generated class symbol.
11039
11040 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11041
11042         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11043         argument.
11044         * parse.y (finish_method_declaration): Code accounting for WFLed
11045         method DECL_NAMEs deleted.
11046         (check_abstract_method_definitions): Likewise.
11047         (resolve_type_during_patch): Layout resolved type.
11048         * typeck.c (lookup_do): Removed unused local.
11049
11050 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11051
11052         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11053         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11054         integer_negative_one_node.
11055         * expr.c (build_java_binop): Likewise.
11056
11057 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11058
11059         * zextract.c (read_zip_archive): Read file_offset before writing
11060         zipd and consequently clobbering the header contents.
11061
11062 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11063
11064         * Make-lang.in: Remove all dependencies on defaults.h.
11065         * decl.c: Don't include defaults.h.
11066         * expr.c: Likewise.
11067         * parse.y: Likewise.
11068
11069 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11070
11071         * ChangeLog (2001-01-21): Fixed typo.
11072         * class.c (layout_class_method): Code accounting for WFLed
11073         method DECL_NAMEs deleted.
11074         * constant.c (find_methodref_index): Likewise.
11075         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11076         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11077         (struct lang_decl): New field `wfl'.
11078         (java_get_real_method_name): Prototype deleted.
11079         * mangle.c (mangle_method_decl): Code accounting for WFLed
11080         method DECL_NAMEs deleted.
11081         * parse.h (GET_METHOD_NAME): Macro deleted.
11082         * parse.y (reset_method_name): Deleted.
11083         (method_header): Set DECL_FUNCTION_WFL.
11084         (check_abstract_method_header): Code accounting for WFLed method
11085         DECL_NAMEs deleted.
11086         (java_get_real_method_name): Deleted.
11087         (check_method_redefinition): Code accounting for WFLed method
11088         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11089         (java_check_regular_methods): Likewise.
11090         (java_check_abstract_methods): Likewise.
11091         (java_expand_classes): Don't call `reset_method_name.'
11092         (search_applicable_method_list): Use DECL_NAMEs instead of
11093         GET_METHOD_NAME.
11094         * typeck.c (lookup_do): Code accounting for WFLed method
11095         DECL_NAMEs deleted.
11096
11097 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
11098
11099         * lex.c (java_read_char): Check for EOF from getc first.
11100
11101 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11102
11103         * class.c (layout_class): Don't lay the superclass out if it's
11104         already being laid out.
11105         * jcf-parse.c (handle_innerclass_attribute): New function.
11106         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11107         handle_innerclasses_attribute.
11108         (jcf_parse): Don't load an innerclasses if it's already being
11109         laid out.
11110         * jcf-write.c (append_innerclass_attribute_entry): Static
11111         `anonymous_name' and its initialization deleted. `ocii' and `ini'
11112         to be zero for anonymous classes.
11113
11114 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11115
11116         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11117         necessary.
11118         * jcf-parse.c (set_source_filename): Use
11119         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11120
11121 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11122
11123         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11124         gets a unique asm name.
11125
11126 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11127
11128         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11129         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11130         if necessary.
11131         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11132         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11133         * parse.y (lookup_package_type_and_set_next): Deleted.
11134         (resolve_package): Removed unnecessary code.
11135         (find_applicable_accessible_methods_list): `finit$' can't be
11136         inherited.
11137         * verify.c (pop_argument_types): Added missing prototype.
11138
11139 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
11140
11141         * config-lang.in: Disable java by default.
11142
11143 2001-01-23  Tom Tromey  <tromey@redhat.com>
11144
11145         * gcj.texi (Copying): New node.
11146         Added copyright information.
11147
11148 2001-01-21  Per Bothner  <per@bothner.com>
11149
11150         Various fixes to allow compiling a compressed .jar/.zip archive.
11151         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
11152         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
11153         (struct ZipDirectory):  New field zipf points to owning ZipFile.
11154         * jcf.h (struct ZipDirectory):  Add forward declaration.
11155         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
11156         Remove seen_in_zip and zip_offset fields.
11157         (JCF_SEEN_IN_ZIP):  New macro.
11158         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
11159         * jcf-io.c:  Change all ZipFileCache to ZipFile.
11160         (read_zip_member):  New function.
11161         (open_in_zip):  Call read_zip_member.
11162         * jcf-parse.c (find_in_current_zip):  Remove function.
11163         (read_class):  Merge in find_in_current_zip functionality.
11164         Call read_zip_member if needed.
11165         (parse_zip_file_entries):  Use read_zip_member.
11166         (process_zip_dir):  Update for removed and added JCF fields.
11167         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
11168
11169 2001-01-21  Per Bothner  <per@bothner.com>
11170
11171         Minor optimization of static ggc roots.
11172         * jcf-parse.c (parse_roots):  New static field.
11173         (current_field, current_method, current_file_list):  Replace by macros
11174         naming fields of parse_roots.
11175         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
11176         * class.c (class_roots):  New static field.
11177         (registered_class, fields_ident, info_ident, class_list):
11178         New macros naming fields of parse_roots.
11179         (build_static_field_ref):  Don't register roots here.
11180         (layout_class):  Static field list replaced by macro class_list.
11181         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
11182         Initialize fields_ident and info_ident here.
11183
11184 2001-01-21  Per Bothner  <per@bothner.com>
11185
11186         * jcf-parse.c (ggc_mark_jcf):  New function.
11187         (init_jcf_parse):  Register current_jcf as ggc root.
11188
11189 2001-01-21  Per Bothner  <per@bothner.com>
11190
11191         * lang.c (put_decl_node):  Print method's name.
11192
11193 2001-01-21  Per Bothner  <per@bothner.com>
11194
11195         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
11196         (verify_jvm_instructions):  Use it, for better error messages on loads.
11197
11198 2001-01-21  Per Bothner  <per@bothner.com>
11199
11200         * verify.c (merge_type_state):  Still may have to merge even if
11201         LABEL_VERIFIED (label).
11202
11203 2001-01-21  Per Bothner  <per@bothner.com>
11204
11205         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
11206         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11207
11208 2001-01-19  Per Bothner  <per@bothner.com>
11209
11210         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
11211         if expeting an interface type.  Refines Tom's change of 2000-09-12.
11212
11213 2001-01-18  Per Bothner  <per@bothner.com>
11214
11215         * gcj.texi (Input Options): Mention .java files.
11216
11217 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11218
11219         * lang-options.h (-Wunsupported-jdk11): Removed.
11220         * lang.c (flag_not_overriding): Deleted.
11221         (flag_static_local_jdk1_1): Likewise.
11222         (lang_W_options): Removed "unsupported-jdk11" entry.
11223         * parse.y (java_check_methods): Removed dead code.
11224
11225 2001-01-17  Tom Tromey  <tromey@redhat.com>
11226
11227         Changes suggested by Per Bothner:
11228         * gcj.texi (Input Options): Don't mention input files.
11229         (Code Generation): Updated --main information.
11230         (Invoking jcf-dump): Mention that --javap is incomplete.
11231         From Alexandre Petit-Bianco:
11232         (Warnings): Don't mention -Wunsupported-jdk11.
11233         My stuff:
11234         (Compatibility): Mention JDK 1.2-ness of libraries.
11235         (Resources): Mention resources used when writing gcj.
11236
11237 2001-01-17  Tom Tromey  <tromey@redhat.com>
11238
11239         * gcj.texi: New file.
11240         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11241         (java.info): Depend on gcj.info.
11242         (java/gcj.dvi): New target.
11243         (java.dvi): Depend on gcj.dvi.
11244         (java.install-info): Wrote.
11245
11246 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
11247
11248         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11249         having called make_decl_rtl.
11250
11251 2001-01-14  Per Bothner  <per@bothner.com>
11252
11253         Various patches to emit better messages on verification errors.
11254         * expr.c (push_type_0):  Return error indication on stack overflow,
11255         instead of callinfg fatal.
11256         (push_type):  Now just call push_type_0 (nd fatal on overflow).
11257         (pop_type_0):  Return detailed error message (in a char** argument).
11258         (pop_type):  If pop_type_0 fails, print error message.
11259         (pop_argument_types):  Moved to verify.c.
11260         * verify.c (pop_argument_types):  Moved from expr.c.
11261         Return a (possible) error message, rather than void.
11262         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
11263         (verify_jvm_instruction):  Use new macros, improving error messages.
11264         For case OPCODE_astore use object_ptr_type_node.
11265         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
11266         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
11267
11268         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11269         constant, return body without wrapper.  (Improves constant folding.)
11270         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
11271
11272 2001-01-13  Per Bothner  <per@bothner.com>
11273
11274         * expr.c (expand_java_field_op):  Assigning to a final field outside
11275         an initializer does not violate JVM spec, so should be warning, not
11276         error.  (Sun's verifier does not complain - though MicroSoft's does.)
11277
11278 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
11279
11280         * gjavah.c (version), jcf-dump.c (version): Update copyright year
11281         to 2001.
11282
11283 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
11284
11285         * parse.y (resolve_expression_name): Permit instance variables from
11286         enclosing context in super constructor call.
11287         (resolve_qualified_expression_name): Permit enclosing class's qualified
11288         "this" in super constructor call.
11289
11290 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11291
11292         * class.c (build_utf8_ref): Remove last argument in call to
11293         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11294         (build_class_ref): Likewise.
11295         (build_static_field_ref): Likewise.
11296         (get_dispatch_table): Likewise.
11297         (layout_class_method): Likewise.
11298         (emit_register_classes): Likewise.
11299         * constants.c (build_constant_data_ref): Likewise.
11300         * decl.c (builtin_function): Likewise.
11301         (create_primitive_vtable): Likewise.
11302         * expr.c (build_known_method_def): Likewise.
11303         (build_jni_stub): Likewise.
11304         (java_lang_expand_expr): Likewise.
11305
11306 2001-01-10  Tom Tromey  <tromey@redhat.com>
11307
11308         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11309
11310 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11311
11312         * java-tree.h (lang_printable_name_wls): New prototype.
11313         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11314         rather than `current_class' to print type name. Don't prepend type
11315         names when printing constructor names.
11316         (lang_printable_name_wls): New function.
11317         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11318         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11319         * parse.y (patch_method_invocation): Message tuned for constructors.
11320         (not_accessible_p): Grant `private' access from within
11321         enclosing contexts.
11322
11323 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11324
11325         All files with updated copyright when applicable.
11326         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11327         * class.c (mangle_class_field): Function removed.
11328         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11329         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11330         (build_class_ref): Call `java_mangle_class_field' instead of
11331         `mangle_class_field.'
11332         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11333         (layout_class): Call `java_mangle_decl' instead of
11334         `mangle_static_field.'
11335         (cxx_keywords): Initialized static array moved to `lex.c.'
11336         (layout_class_method): Changed leading comment. Simplified to
11337         call `java_mangle_decl.' Local `ptr' moved in for loop body.
11338         * decl.c (lang_mark_tree): Mark field `package_list.'
11339         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11340         (struct lang_type): New field `package_list.'
11341         (unicode_mangling_length): Prototype removed.
11342         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11343         emit_unicode_mangled_name): Likewise.
11344         (cxx_keyword_p): New prototype.
11345         (java_mangle_decl, java_mangle_class_field,
11346         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11347         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11348         `build_expr_wfl.'
11349         * jvgenmain.c (main_method_prefix): Global variable removed.
11350         (main_method_suffix): Likewise.
11351         (do_mangle_classname): New function.
11352         (main): Call it. Format changed to accommodate new mangling scheme.
11353         * lex.c: (utf8_cmp): Conditionally prototyped.
11354         (cxx_keywords): Moved from class.c, conditionally defined.
11355         (utf8_cmp, cxx_keyword_p): Likewise.
11356         * mangle.c (obstack.h, ggc.h): Included.
11357         (mangle_field_decl): New function.
11358         (mangle_method_decl, mangle_type, mangle_pointer_type,
11359         mangle_array_type, mangle_record_type,
11360         find_compression_pointer_match, find_compression_array_match,
11361         find_compression_record_match,
11362         find_compression_array_template_match, set_type_package_list,
11363         entry_match_pointer_p, emit_compression_string, init_mangling,
11364         finish_mangling, compression_table_add, mangle_member_name): Likewise.
11365         (mangle_obstack): New global.
11366         (MANGLE_RAW_STRING): New macro.
11367         (unicode_mangling_length): Turned static.
11368         (append_unicode_mangled_name): Renamed from
11369         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
11370         replaces `obstack', removed from the parameter list.
11371         (append_gpp_mangled_name): Turned static. `mangle_obstack'
11372         replaces parameter `obstack', removed from the parameter list. Call
11373         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11374         (append_gpp_mangled_classtype): Removed.
11375         (compression_table, compression_next): New static variables.
11376         * parse.y (temporary_obstack): Extern declaration removed.
11377
11378 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11379
11380         * parse.y (patch_binop): Compute missing type in error situations.
11381
11382 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11383
11384         * class.c (make_class_data): Push initial value for "arrayclass".
11385         * decl.c (init_decl_processing): Add new class field "arrayclass".
11386
11387 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11388
11389         From patha@softlab.ericsson.se:
11390         * parse.y (switch_label): Use build, not build1, to construct
11391         DEFAULT_EXPR.
11392
11393 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
11394
11395         * lang.c (lang_decode_option): Change -MA to -MP.
11396         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11397         Update to new prototype; do quote targets.
11398         (jcf_dependency_write): Update.
11399
11400 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
11401
11402         Shorten primitive array allocation path:
11403         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11404         to create new primitive arrays.
11405         * expr.c (build_newarray): If generating native code, call
11406         soft_newarray_node with a reference to the primitive TYPE identifier
11407         instead of type_value.
11408
11409 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
11410
11411         Fix for PRs gcj/312 and gcj/253:
11412         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11413         dest if they arn't already.
11414         * class.c (layout_class): Call maybe_layout_super_class on
11415         superinterfaces also, but only if compiling from bytecode.
11416
11417         Fix for PR gcj/373:
11418         * parse.y (create_class): Set ACC_STATIC if class is declared in an
11419         interface.
11420
11421 2000-12-15  Tom Tromey  <tromey@redhat.com>
11422
11423         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11424         set.
11425
11426 2000-12-14  Andrew Haley  <aph@redhat.com>
11427
11428         * boehm.c (mark_reference_fields): Change test to correctly detect
11429         bitmap overflow.
11430
11431 2000-12-15  Andreas Jaeger  <aj@suse.de>
11432
11433         * config-lang.in (lang_dirs): Added.
11434
11435 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11436
11437         * parse.y (end_artificial_method_body): Fixed undefined behavior.
11438         Credits go to rth for finding it.
11439
11440 2000-12-13  Mike Stump  <mrs@wrs.com>
11441
11442         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11443
11444 2000-11-07  Tom Tromey  <tromey@cygnus.com>
11445
11446         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11447         * lex.c (java_ignorable_control_p): Removed.
11448         (java_letter_or_digit_p): Removed.
11449         (java_start_char_p): New function.
11450         (java_read_char): Return `int', not `unicode_t'.  Changed
11451         callers.
11452         (java_read_unicode): Likewise.
11453         (java_read_unicode_collapsing_terminators): Likewise.
11454         (java_get_unicode): Likewise.
11455         (java_new_lexer): Initialize hit_eof.
11456         (java_parse_end_comment): Take `int' argument.
11457         (java_parse_doc_section): Likewise.
11458         (java_parse_escape_sequence): Don't allow backlash-newline.
11459         Return `int'.
11460         * lex.h (JAVA_DIGIT_P): Removed.
11461         (_JAVA_LETTER_OR_DIGIT_P): Removed.
11462         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11463         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11464         (JAVA_PART_CHAR_P): New macro.
11465         (UEOF): Now -1.
11466         (JAVA_CHAR_ERROR): Now -2.
11467         (java_lexer): New field `hit_eof'.
11468         * chartables.h: New file.
11469         * gen-table.pl: new file.
11470
11471 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11472             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11473
11474         * parse.y (java_complete_lhs): Only allow compound assignment of
11475         reference type if type is String.
11476
11477 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11478
11479         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11480         jcf-path.c: Likewise.
11481
11482 2000-12-09  Anthony Green  <green@redhat.com>
11483
11484         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11485         filestart and filename_length as int values.
11486
11487 2000-12-07  Mo DeJong  <mdejong@redhat.com>
11488
11489         * jcf-io.c (find_class): Correct the logic that tests to see if a
11490         .java file is newer than its .class file. The compiler was
11491         incorrectly printing a warning when file mod times were equal.
11492
11493 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
11494
11495         * jvgenmain.c: Use ISPRINT not isascii.
11496
11497 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11498
11499         * parse.y (end_artificial_method_body): Fixed typo.
11500
11501 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11502
11503         * parse.y (patch_method_invocation): Pick the correct enclosing
11504         context when creating inner class instances.
11505         Fixes gcj/332.
11506
11507 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
11508
11509         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11510         Update copyright year to 2000.
11511
11512 2000-11-23  Anthony Green  <green@redhat.com>
11513
11514         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11515         Move current_file_list out of yyparse and make it static.
11516
11517         * expr.c: Declare quick_stack and tree_list_free_list as static
11518         (init_expr_processing): Register quick_stack and
11519         tree_list_free_list roots.
11520
11521 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11522
11523         * parse.y (build_outer_field_access): New local `decl_ctx', use
11524         it. Check for field's context and current class immediate outer
11525         context inheritance.
11526         (outer_field_access_p): Consider fields inherited from the last
11527         enclosing context.
11528         (build_access_to_thisn): Stop at the last enclosing context if
11529         necessary.
11530         Fixes gcj/367.
11531
11532 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11533
11534         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11535
11536 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
11537
11538         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11539         scratch buffer.
11540
11541 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11542
11543         * jv-scan.c (help): Document --complexity.
11544         (options): Added --complexity.
11545         (flag_complexity): New global.
11546         (main): Call `report'.
11547         * parse-scan.y (complexity): New global.
11548         (if_then_statement, if_then_else_statement,
11549         if_then_else_statement_nsi, switch_block_statement_group,
11550         while_expression, do_statement, for_begin, continue_statement,
11551         throw_statement, catch_clause, finally, method_invocation,
11552         conditional_and_expression, conditional_or_expression,
11553         conditional_expression): Update complexity.
11554         (reset_report): Reset complexity.
11555         (report): New function.
11556
11557 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11558
11559         * lex.c (yylex): Added STRICT_TK case.
11560         * parse.y (STRICT_TK): Added.
11561         * parse-scan.y (STRICT_TK): Added.
11562         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11563         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
11564         file.
11565         * keyword.h: Rebuilt.
11566         * keyword.gperf (strictfp): Added.
11567
11568 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11569
11570         * lex.c (yylex): Recognize floating point constants with leading
11571         0.
11572
11573 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11574
11575         * java-tree.h (cyclic_inheritance_report): Constify.
11576         * parse.y (cyclic_inheritance_report): Likewise.
11577
11578 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11579
11580         * parse.y (goal): Remove call to ggc_add_string_root.
11581
11582 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11583
11584         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11585         Create string in scratch buffer, then pass to build_string.
11586
11587 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11588
11589         * parse.y (issue_warning_error_from_context): Add
11590         ATTRIBUTE_PRINTF.
11591
11592 2000-11-11  Anthony Green  <green@redhat.com>
11593
11594         * jcf-parse.c (process_zip_dir): Add finput parameter.
11595         (jcf_figure_file_type): Call process_zip_dir with appropriate
11596         argument.
11597
11598 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11599
11600         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11601         * jcf-parse.c (jcf_figure_file_type): Likewise.
11602
11603 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11604
11605         * parse.y (create_new_parser_context): Use memset () instead of
11606         bzero ().
11607
11608 2000-11-08  Tom Tromey  <tromey@cygnus.com>
11609
11610         * gjavah.c (process_file): Only include gcj/cni.h when generating
11611         CNI stubs.
11612
11613 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11614
11615         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11616         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11617         instead of bzero ().
11618
11619 2000-11-05  Tom Tromey  <tromey@cygnus.com>
11620
11621         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11622         * lex.c (IS_ZERO): New define.
11623         (java_perform_atof): Error on floating point underflow.
11624
11625 2000-11-04  Tom Tromey  <tromey@cygnus.com>
11626
11627         * lex.c (java_parse_escape_sequence): Only read two octal
11628         characters if the first one is greater than 3.  Don't allow
11629         "octal" numbers to include the digits 8 or 9.
11630
11631 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11632
11633         * Make-lang.in (java.distdir): Remove.
11634
11635 2000-11-03  Tom Tromey  <tromey@cygnus.com>
11636
11637         * Make-lang.in (java.dvi): New target.
11638         Partial fix for PR other/567.
11639
11640         * lang-options.h: Mention -Wout-of-date.
11641         * jcf-dump.c (flag_newer): New global.
11642         * gjavah.c (flag_newer): New global.
11643         * jcf-io.c (find_class): Only warn when flag_newer set.
11644         * lang.c (flag_newer): New global.
11645         (struct string_option): New declaration.
11646         (lang_W_options): New global.
11647         (process_option_with_no): New function.
11648         (lang_decode_option): Use it.
11649
11650         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11651         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11652         `$'.
11653
11654         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11655         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11656         * lex.c (java_read_unicode): Removed `term_context' argument.
11657         Recognize any number of `u' in `\u'.
11658         (java_read_unicode_collapsing_terminators): New function.
11659         (java_get_unicode): Use it.
11660         (java_lineterminator): Removed.
11661         (yylex): Produce error if character literal is newline or single
11662         quote.  Return if eof found in middle of `//' comment.  EOF in
11663         `//' comment is only an error if pedantic.
11664         (java_ignorable_control_p): New function.
11665         (java_parse_end_comment): Return if eof found in middle of
11666         comment.
11667         Include flags.h.
11668         * jv-scan.c (pedantic): New global.
11669
11670 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11671
11672         * parse.y (outer_field_access_p): Inherited fields aren't
11673         consider outer fields.
11674         (maybe_build_thisn_access_method): Use
11675         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11676         (resolve_expression_name): Trigger an error if a static field
11677         is being accessed as an outer field.
11678
11679 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11680
11681         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11682         Fixes gcj/365.
11683
11684 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11685
11686         * Make-lang.in: Move all build rules here from Makefile.in,
11687         adapt to new context.  Wrap all rules that change the current
11688         directory in parentheses.  Expunge all references to $(P).
11689         When one command depends on another and they're run all at
11690         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11691         all object-file generation rules.  Delete obsolete variables.
11692
11693         * Makefile.in: Delete.
11694         * config-lang.in: Delete outputs= line.
11695
11696 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11697
11698         * parse.y (patch_method_invocation): NULLify this_arg when already
11699         inserted.
11700         (maybe_use_access_method): Handle call to methods unrelated to the
11701         current class. Fixed comment.
11702         Fixes gcj/361.
11703
11704 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11705
11706         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11707         scope.
11708
11709 2000-10-24  Tom Tromey  <tromey@cygnus.com>
11710
11711         * lex.c (java_new_lexer): Initialize new fields.  Work around
11712         broken iconv() implementations.
11713         (java_read_char): Swap bytes if required.  Use fallback decoder if
11714         required.
11715         (byteswap_init, need_byteswap): New globals.
11716         (java_destroy_lexer): Only close iconv handle if it is in use.
11717         * lex.h (java_lexer): New fields read_anything, byte_swap,
11718         use_fallback.
11719         Made out_buffer unsigned.
11720
11721 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11722
11723         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11724         where an enclosing context can be set on the jdep.
11725         (do_resolve_class): Fixed identation.
11726
11727 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11728
11729         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11730
11731         * jcf-reader.c (peek_attribute, skip_attribute): Only define
11732         when requested.
11733
11734         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11735
11736         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11737
11738 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11739
11740         * jcf-write.c (OP1): Update `last_bc'.
11741         (struct jcf_block): Fixed indentation and typo in comments.  New
11742         field `last_bc'.
11743         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11744         follows `monitorenter'.
11745         * parse.y (patch_synchronized_statement): New local `tmp'. Call
11746         `patch_string'.
11747         Fixes gcj/232.
11748
11749 2000-10-16  Tom Tromey  <tromey@cygnus.com>
11750
11751         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11752         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11753         * lang-options.h: Added -MA, -MT, -MF..
11754         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11755         (DEPEND_TARGET_SET): New macro.
11756         (DEPEND_FILE_ALREADY_SET): Likewise.
11757         (init_parse): Handle new flags.
11758         * jcf.h (jcf_dependency_print_dummies): Declare.
11759         * Make-lang.in (s-java): Added mkdeps.o.
11760         * Makefile.in (BACKEND): Added mkdeps.o.
11761         (../gcjh$(exeext)): Added mkdeps.o.
11762         (../jcf-dump$(exeext)): Added mkdeps.o.
11763         * jcf-depend.c: Include mkdeps.h.
11764         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11765         add_entry): Removed.
11766         (jcf_dependency_reset): Rewrote.
11767         (dependencies): New global.
11768         (jcf_dependency_set_target): Rewrote.
11769         (jcf_dependency_add_target): Likewise.
11770         (jcf_dependency_add_file): Likewise.
11771         (munge): Removed.
11772         (print_ents): Removed.
11773         (jcf_dependency_write): Rewrote.
11774         (print_dummies): New global.
11775         (jcf_dependency_print_dummies): New function
11776         (jcf_dependency_write): Call deps_dummy_targets if required.
11777
11778 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11779
11780         * gjavah.c (add_class_decl): Removed unused variables `tname',
11781         `tlen' and `name_index'.
11782         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11783         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11784         in `wfl_operator' with value.
11785         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11786         (jcf_figure_file_type): Fixed identation.
11787         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11788         * parse.y (analyze_clinit_body): New function.
11789         (static_initializer:): Reset `current_static_block'.
11790         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11791         `wfl_operator' with new value.
11792         (lookup_cl): Use EXPR_WFL_FILENAME.
11793         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11794         analyze_clinit_body.
11795         (build_outer_field_access): Access to this$<n> built from
11796         current_class, not its outer context.
11797         (build_access_to_thisn): Fixed leading comment. Tidied things up.
11798         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11799         (patch_method_invocation): Use `is_static_flag' when already
11800         initialized.
11801         (patch_newarray): Removed assignment in ternary operator.
11802
11803 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11804
11805         * except.c (free_eh_ranges): Don't free `whole_range'.
11806
11807 2000-10-15  Anthony Green  <green@redhat.com>
11808
11809         * decl.c (init_decl_processing): Call init_class_processing before
11810         anything else.
11811
11812 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11813
11814         * check-init.c (check_init): Fixed leading comment. Use
11815         LOCAL_FINAL_P.
11816         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11817         (give_name_to_locals): Likewise.
11818         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11819         fields in lang_decl_var.
11820         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11821         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11822         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11823         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11824         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11825         (LOCAL_FINAL): Rewritten.
11826         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11827         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11828         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11829         `init_final' fields.
11830         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11831         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11832         (TYPE_HAS_FINAL_VARIABLE): New macro.
11833         (struct lang_type): Added `afv' field.
11834         * parse.y (check_static_final_variable_assignment_flag): New function.
11835         (reset_static_final_variable_assignment_flag): Likewise.
11836         (check_final_variable_local_assignment_flag): Likewise.
11837         (reset_final_variable_local_assignment_flag): Likewise.
11838         (check_final_variable_indirect_assignment): Likewise.
11839         (check_final_variable_global_assignment_flag): Likewise.
11840         (add_inner_class_fields): Use LOCAL_FINAL_P.
11841         (register_fields): Handle local finals and final variables.
11842         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11843         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11844         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11845         on local finals.
11846         (java_complete_expand_methods): Loop to set
11847         TYPE_HAS_FINAL_VARIABLE. Call
11848         `reset_final_variable_local_assignment_flag' and
11849         `check_final_variable_local_assignment_flag' accordingly before
11850         and after constructor expansion. Call
11851         `reset_static_final_variable_assignment_flag'
11852         before expanding <clinit> and after call
11853         `check_static_final_variable_assignment_flag' if the
11854         current_class isn't an interface. After all methods have been
11855         expanded, call `check_final_variable_global_assignment_flag' and
11856         `check_static_final_variable_assignment_flag' if the current class
11857         is an interface.
11858         (maybe_yank_clinit): Fixed typo in comment.
11859         (build_outer_field_access_methods): Removed old sanity check. Use
11860         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11861         Don't create access methods for finals.
11862         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11863         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11864         existing DECL_INIT has been processed.
11865         (java_complete_lhs): Likewise.
11866         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11867         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11868         logic.
11869         (patch_assignment): Use LOCAL_FINAL_P.
11870         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11871         DECL_INITIAL is nullified.
11872         Fixes gcj/163.
11873
11874 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11875
11876         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11877
11878         * Makefile.in (parse.c, parse-scan.c): Likewise.
11879
11880 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11881
11882         * class.c (temporary_obstack): Remove.
11883         (make_class): Don't mess with obstascks.
11884         (push_class): Likewise.
11885         (set_super_info): Likewise.
11886         (add_method_1): Likewise.
11887         (add_method): Likewise.
11888         (add_field): Likewise.
11889         (build_utf8_ref): Likewise.
11890         (build_class_ref): Likewise.
11891         (build_static_field_ref): Likewise.
11892         (finish_class): Likewise.
11893         (push_super_field): Likewise.
11894         (layout_class): Likewise.
11895         (layout_class_methods): Likewise.
11896         (init_class_processing): Likewise.
11897         * constants.c (get_tag_node): Likewise.
11898         (build_constant_data_ref): Likewise.
11899         * decl.c (ggc_p): Remove.
11900         (copy_lang_decl): Use ggc_alloc.
11901         (complete_start_java_method): Don't mess with obstacks.
11902         (start_java_method): Likewise.
11903         (end_java_method): Likewise.
11904         * except.c (link_handler): Use xmalloc.
11905         (free_eh_ranges): New function.
11906         (method_init_exceptions): Use it.
11907         (add_handler): Use xmalloc.
11908         (expand_start_java_handler): Don't mess with obstacks.
11909         (prepare_eh_table_type): Likewise.
11910         (expand_end_java_handler): Likewise.
11911         * expr.c (push_value): Likewise.
11912         (create_label_decl): Likewise.
11913         (build_jni_stub): Likewise.
11914         (java_lang_expand_expr): Likewise.
11915         (note_instructions): Use xrealloc.
11916         (java_push_constant_from_pool): Don't mess with obstacks.
11917         (process_jvm_instruction): Likewise.
11918         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11919         declaration.
11920         * jcf-parse.c (get_constant): Don't mess with obstacks.
11921         (read_class): Likewise.
11922         (jcf_parse): Likewise.
11923         * lex.c (expression_obstack): Remove.
11924         (java_lex): Don't use obstack_free.
11925         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11926         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11927         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11928         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11929         * parse.y (gaol): Add more GC roots.
11930         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11931         (lookup_field_wrapper): Likewise.
11932         (obtain_incomplete_type): Don't mess with obstacks.
11933         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11934         macros.
11935         (craft_constructor): Don't mess with obstacks.
11936         (safe_layout_class): Likewise.
11937         (java_complete_class): Likewise.
11938         (source_end_java_method): Likewise.
11939         (build_outer_field_access_methods): Likewise.
11940         (build_outer_method_access_method): Likewise.
11941         (maybe_build_thisn_access_method): Likewise.
11942         (build_dot_class_method_invocation): Likewise.
11943         (java_complete_tree): Likewise.
11944         (java_complete_lhs): Likewise.
11945         (do_merge_string_cste): Likewise.
11946         (patch_string_cst): Likewise.
11947         (array_constructor_check_entry): Likewise.
11948         * typeck.c (build_java_array_type): Likewise.
11949         (parse_signature_string): Likewise.
11950         (build_java_signature): Likewise.
11951
11952 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11953
11954         Fix for PR gcj/356:
11955         * gjavah.c (add_class_decl): Don't special-case inner classes.
11956         (add_namelet): Likewise.
11957
11958 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11959
11960         * java-tree.h: Constify current_encoding.
11961         * lang.c: Constify current_encoding.
11962
11963 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11964
11965         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11966         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11967
11968 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11969
11970         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11971         patch. Fixes gcj/340.
11972
11973 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11974
11975         * lex.c (java_new_lexer): Initialize out_first and out_last
11976         fields.
11977         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11978
11979 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11980
11981         * parse.y (pop_current_osb): New function.
11982         (array_type:): Use `dims:', changed actions
11983         accordingly. Suggested by Anthony Green.
11984         (array_creation_expression:): Used pop_current_osb.
11985         (cast_expression:): Likewise.
11986         (search_applicable_method_list): Fixed indentation.
11987
11988 2000-10-08  Anthony Green  <green@redhat.com>
11989
11990         * parse.y (array_type_literal): Remove production.
11991         (type_literals): Refer to array_type, not array_type_literal.
11992
11993 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11994
11995         Patch contributed by Corey Minyard.
11996         * decl.c (check_local_named_variable): New function.
11997         (tree check_local_unnamed_variable): Likewise.
11998         (find_local_variable): Splitted. Call check_local_{un}named_variable.
11999
12000 2000-10-07  Anthony Green  <green@redhat.com>
12001
12002         * class.c (layout_class): Handle case where superclass can't be
12003         layed out yet.
12004
12005 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12006
12007         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12008         gperf.
12009
12010 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12011
12012         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12013         * jvgenmain.c (class_mangling_prefix): Removed.
12014         (class_mangling_suffix): New global.
12015         (main): Use it.
12016         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12017         `$'.
12018         (print_method_info): Handle overrides for static and final
12019         methods.
12020         (process_file): Generate declaration for class object field.
12021         * class.c (cxx_keywords): New array.
12022         (utf8_cmp): New function.
12023         (cxx_keyword_p): New function.
12024         (layout_class_method): Mangle C++ keywords by appending `$'.
12025         (mangle_field): New function.
12026         (mangle_class_field): Use mangle_field.  Mangle class name as
12027         `class$'.
12028         (mangle_static_field): Use mangle_field.
12029
12030 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12031
12032         * decl.c (find_local_variable): Removed uncessary type check and
12033         fixed range check typo. From Corey Minyard.
12034
12035 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12036
12037         * decl.c (give_name_to_locals): New local `code_offset'. Call
12038         `maybe_adjust_start_pc'.
12039         * expr.c (note_instructions): New function.
12040         (expand_byte_code): Don't collect insn starts here.
12041         (peek_opcode_at_pc): New function.
12042         (maybe_adjust_start_pc): Likewise.
12043         * java-tree.h (maybe_adjust_start_pc): Declare.
12044         (note_instructions): Likewise.
12045         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12046
12047 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12048
12049         * parse.y (field_access:): Fixed indentation.
12050         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12051
12052 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12053
12054         Fix for PR gcj/307:
12055         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12056         JPRIMITIVE_TYPE_P, for arithmetic operators.
12057         (patch_method_invocation): Indentation fix.
12058         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12059         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12060         (do_unary_numeric_promotion): Cleaned up code.
12061         (valid_cast_to_p): Handle boolean correctly.
12062
12063 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12064
12065         * lex.c (java_read_unicode): Reset bs_count when finished with
12066         `\u' sequence.
12067
12068 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12069
12070         Convert to GC.
12071         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12072         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12073         (typeck.o): Depend on ggc.h.
12074         * class.c (add_method_1): Use GC functions for allocation.
12075         (init_class_processing): Register roots.
12076         * decl.c (ggc_p): Set to 1.
12077         (pending_local_decls): Make it static.
12078         (push_jvm_slot): Use GC functions for allocation.
12079         (init_decl_processing): Register roots.
12080         (give_name_to_locals): Use GC functions for allocation.
12081         (lang_mark_tree): New function.
12082         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12083         functions for allocation.
12084         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12085         * lex.c (java_lex): Use build_string, rather than replicating it
12086         inline.
12087         * parse.y (goal): Add more roots.
12088         (mark_parser_ctxt): New function.
12089         * typeck.c: Include ggc.h.
12090
12091 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12092
12093         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12094         contains something else than MODIFY_EXPR.
12095
12096 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
12097
12098         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12099         * Makefile.in (parse.o): Depend on ggc.h.
12100         (class.o): Likewise.
12101         (constants.o): Likewise.
12102         (decl.o): Likewise.
12103         (expr.o): Likewise.
12104         (jcf-parse.o): Likewise.
12105         (jcf-write.o): Likewise.
12106         (mangle.o): Likewise.
12107         * class.c: Include ggc.h.
12108         (build_static_field_ref): Register GC roots.
12109         (layout_class): Likewise.
12110         (init_class_processing): Likewise.
12111         * constants.c: Include ggc.h.
12112         (current_constant_pool_data_ref): Remove.
12113         (tag_nodes): Move it to ...
12114         (get_tag_node): ... here.  Register GC roots.
12115         * decl.c: Include ggc.h.  Remove many global tree definitions.
12116         (throw_node): Define.
12117         (java_global_trees): Likewise.
12118         (predef_filenames): Make the size a constant.
12119         (init_decl_processing): Adjust accordingly.
12120         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
12121         * expr.c: Include ggc.h.
12122         (init_expr_processing): Register GC roots.
12123         (build_invokeinterface): Likewise.
12124         * java-tree.h: Replace extern tree declarations with macros.
12125         (java_global_trees): New variable.
12126         (java_tree_index): New enumeration.
12127         (init_jcf_parse): Declare.
12128         * jcf-parse.c: Include ggc.h.
12129         (current_class): Remove declaration.
12130         (main_class): Likewise.
12131         (all_class_list): Likewise.
12132         (predefined_filename_p): Adjust for constant size of
12133         predef_filenames.
12134         (init_jcf_parse): New function.
12135         * jcf-write.c: Include ggc.h.
12136         (generate_classfile): Register GC roots.
12137         (append_synthetic_attribute): Likewise.
12138         (append_innerclass_attribute_entry): Likewise.
12139         * lang.c: Include ggc.h.
12140         (lang_print_error): Register GC roots.
12141         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12142         with macros.
12143         * parse.y: Include ggc.h.
12144         (wfl_operator): Remove.
12145         (goal): Register GC roots.
12146         (java_pop_parser_context): Adjust for new field names.
12147         (java_parser_context_save_global): Likewse.
12148         (java_parser_context_restore_global): Likewise.
12149         (java_parser_context_suspend): Likewise.
12150         (java_parser_context_resume): Likewise.
12151         (verify_constructor_circularity): Register GC roots.
12152         (lookup_cl): Likewise.
12153         (java_reorder_fields): Likewise.
12154         (build_current_this): Likewise.
12155         (class_in_current_package): Likewise.
12156         (argument_types_convertible): Likewise.
12157         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12158
12159 2000-09-14  Tom Tromey  <tromey@cygnus.com>
12160
12161         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12162
12163 2000-09-13  Tom Tromey  <tromey@cygnus.com>
12164
12165         * jcf-parse.c: Include <locale.h>.
12166         * jv-scan.c: Include <locale.h>.
12167
12168 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12169
12170         * expr.c (pop_type_0): Return `Object' if trying to merge two
12171         interface types.
12172         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12173         interface types; `Object' is always a valid supertype.
12174
12175 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12176
12177         Fix for PR gcj/33:
12178         * jv-scan.c (help): Document --encoding.
12179         (options): Added `encoding' entry.
12180         (OPT_ENCODING): New define.
12181         (main): Handle --encoding.
12182         Include <langinfo.h> if nl_langinfo exists.
12183         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12184         --encoding.
12185         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12186         (parse_source_file): Correctly call java_init_lex.  Added `finput'
12187         argument.  Use nl_langinfo to determine default encoding.
12188         * java-tree.h (current_encoding): Declare.
12189         * parse.y (java_parser_context_restore_global): Don't restore
12190         `finput'.
12191         (java_parser_context_save_global): Don't set `finput' field.
12192         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
12193         if required.
12194         * lang.c (current_encoding): New global.
12195         (lang_decode_option): Recognize `-fencoding='.
12196         (finish_parse): Don't close finput.
12197         * parse.h (struct parser_ctxt): Removed `finput' and
12198         `unget_utf8_value' fields.  Added `lexer' field.
12199         (java_init_lex): Fixed declaration.
12200         * lex.c (java_new_lexer): New function.
12201         (java_destroy_lexer): Likewise.
12202         (java_read_char): Added `lex' argument.  Handle iconv case.
12203         (java_read_unicode): Added `lex' argument.  Count backslashes in
12204         lexer structure.
12205         (java_init_lex): Added `finput' and `encoding' arguments.  Set
12206         `lexer' field in ctxp.
12207         (BAD_UTF8_VALUE): Removed.
12208         (java_lex): Handle seeing UEOF in the middle of a string literal.
12209         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12210         (java_lexer): New structure.
12211         (UNGETC): Removed.
12212         (GETC): Removed.
12213         (DEFAULT_ENCODING): New define.
12214         (java_destroy_lexer): Declare.
12215
12216 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12217
12218         Fix for PR gcj/343:
12219         * lex.c (java_init_lex): Initialize java_io_serializable.
12220         * parse.y (java_io_serializable): New global.
12221         (valid_ref_assignconv_cast_p): An array can be cast to
12222         serializable.
12223
12224 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12225
12226         * decl.c, expr.c: Include defaults.h if not already included.
12227         Don't define the *_TYPE_SIZE macros.
12228
12229 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
12230
12231         * typeck.c (build_java_array_type): Correct first parameter
12232         in ADJUST_FIELD_ALIGN invocation.
12233
12234 2000-09-06  Tom Tromey  <tromey@cygnus.com>
12235
12236         * lang-specs.h: Also recognize `-femit-class-files'.
12237
12238 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12239
12240         * verify.c (merge_types): Load the types to merge if necessary.
12241
12242 2000-09-02  Anthony Green  <green@redhat.com>
12243
12244         * jcf-io.c: Include zlib.h.
12245         (open_in_zip): Read compressed class file archives.
12246         * zipfile.h (ZipDirectory): Add uncompressed_size and
12247         compression_method fields.
12248         * zextract.c (read_zip_archive): Collect file compression info.
12249
12250 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
12251
12252         * parse.y (do_resolve_class): Also explore superclasses of
12253         intermediate enclosing contexts when searching for inner classes.
12254
12255 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12256
12257         * parse.y (variable_declarator_id:): Better error message.
12258         (expression_statement:): Use YYNOT_TWICE.
12259         (cast_expression:): Likewise.
12260         (assignment:): Likewise.
12261
12262 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12263
12264         * parse.y (do_merge_string_cste): New locals. Create new
12265         STRING_CSTs each time, use memcpy. Fixes gcj/311.
12266
12267 2000-08-07  Hans Boehm  <boehm@acm.org>
12268
12269         * boehm.c (mark_reference_fields): Set marking bits for all words in
12270         a multiple-word record.
12271         (get_boehm_type_descriptor): Use the procedure marking descriptor for
12272         java.lang.Class.
12273
12274 2000-08-31  Mike Stump  <mrs@wrs.com>
12275
12276         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12277         jcf-dump$(exeext)): Make parallel safe.
12278
12279 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12280
12281         * jcf-parse.c (set_source_filename): Constify a char *.
12282         * jcf-write.c (append_innerclasses_attribute,
12283         make_class_file_name): Constify a char *.  Don't recycle a
12284         variable for an unrelated purpose.
12285         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12286         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12287
12288 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12289
12290         * expr.c (can_widen_reference_to): Fixed indentation.
12291         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12292         * parse.y: `finit$' replaces `$finit$' in comments.
12293         (try_builtin_assignconv): Fixed leading comment.
12294
12295 2000-08-25  Greg McGary  <greg@mcgary.org>
12296
12297         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12298
12299 2000-08-24  Greg McGary  <greg@mcgary.org>
12300
12301         * lang.c (lang_decode_option): Use ARRAY_SIZE.
12302         * parse.y (BINOP_LOOKUP): Likewise.
12303
12304 2000-08-22  Andrew Haley  <aph@cygnus.com>
12305
12306         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12307         sign extending. Fixes gcj/321.
12308         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12309         combining to make a jlong. Fixes gcj/321.
12310
12311 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12312
12313         * lang-specs.h: Do not process -o or run the assembler if
12314         -fsyntax-only.
12315
12316 2000-08-16  Andrew Haley  <aph@cygnus.com>
12317
12318         * typeck.c (build_java_array_type): Rewrite code to do array
12319         alignment.  Take into account back-end macros when aligning array
12320         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12321         user to set alignment. Fixes gcj/252 and 160.
12322
12323 2000-08-09  Tom Tromey  <tromey@cygnus.com>
12324
12325         * parse.y (check_abstract_method_definitions): Now return `int'.
12326         Check implemented interfaces.  Fixes PR gcj/305.
12327
12328         * parse.y (patch_switch_statement): Disallow `long' in switch
12329         expressions.  Fixes PR gcj/310.
12330
12331 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12332
12333         * decl.c (finit_leg_identifier_node): New global.
12334         (init_decl_processing): Use `finit$' to initialize
12335         finit_identifier_node. Use `$finit$' to initialize
12336         finit_leg_identifier_node.
12337         * expr.c (expand_java_field_op): Use ID_FINIT_P.
12338         * java-tree.h (finit_identifier_node): Changed attached comment.
12339         (finit_leg_identifier_node): New declaration.
12340         (ID_FINIT_P): Take finit_identifier_node and
12341         finit_leg_identifier_node into account. This is a backward
12342         compatibility hack.
12343
12344 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12345
12346         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12347         Jan 6 2000 patch.
12348         (generate_bytecode_insns): Check `nargs' before emitting it.
12349         * verify.c (merge_type_state): Fixed typo.
12350         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12351         generate_bytecode_{conditional,insns}.
12352
12353 2000-08-13  Anthony Green  <green@redhat.com>
12354
12355         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12356         for -pg builds).
12357
12358 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12359
12360         * class.c (maybe_layout_super_class): Fixed indentation.
12361         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12362         (java_check_methods): New function declaration.
12363         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12364         instead of `str_ptr'.
12365         * jcf-write.c (generate_bytecode_insns): Emit number the of args
12366         of a `invokeinterface' at the right time.
12367         * parse.h (WFL_STRIP_BRACKET): New macro.
12368         (SET_TYPE_FOR_RESOLUTION): Use it.
12369         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12370         (check_class_interface_creation): Don't check for cross package
12371         innerclass name clashes.
12372         (method_header): Behave properly if MDECL is `error_mark_node'.
12373         (method_declarator): Return `error_mark_node' if bogus current
12374         class.
12375         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12376         (resolve_and_layout): New local `decl_type', set and used. Call
12377         java_check_methods.
12378         (java_check_methods): New method.
12379         (java_layout_classes): Use it.
12380         (resolve_qualified_expression_name): No EH check necessary in
12381         access$<n>.
12382         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12383         `case' statement.
12384         (patch_assignment): Set DECL_INITIAL on integral final local.
12385
12386 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12387
12388         * java-tree.h (flag_extraneous_semicolon): New extern.
12389         * lang-options.h: (-Wextraneous-semicolon): New option.
12390         * lang.c (flag_redundant): Fixed typo in leading comment.
12391         (flag_extraneous_semicolon): New global.
12392         (lang_decode_option): Set `flag_extraneous_semicolon' when
12393         -Wall. Decode `-Wextraneous-semicolon'.
12394         * parse.y (type_declaration:): Removed `SC_TK' hack, added
12395         `empty_statement' rule.
12396         (class_body_declaration): Likewise.
12397         (method_body:): Accept `;' as a method body.
12398         (static_initializer:): Removed `SC_TK' hack.
12399         (constructor_block_end:): Likewise.
12400         (empty_statement:): Report deprecated empty declaration. Fixes
12401         gcj/295
12402
12403 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12404
12405         * parse.y (build_dot_class_method_invocation): Changed parameter
12406         name to `type'. Build signature from `type' and convert it to a
12407         STRING_CST if it's an array.
12408         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12409         to use `ref_type' directly.
12410
12411 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
12412
12413         * lang-options.h: Added a comma after the last element to avoid
12414         syntax errors when other languages define additional options.
12415
12416 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12417
12418         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12419         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12420         (jc1): Link with $(BACKEND).
12421         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12422
12423 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12424
12425         * jvspec.c: Adjust type of second argument to
12426         lang_specific_driver, and update code as necessary.
12427
12428         * class.c (build_dtable_decl): Initialize dummy.
12429
12430 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12431
12432         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12433         method bodies not to rule out discarding `<clinit>'; don't use
12434         <clinit> to initialize static fields with constant initializers.
12435
12436 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12437
12438         * gjavah.c (print_method_info): Added `synth' parameter. Skip
12439         synthetic methods.
12440         (method_synthetic): New global.
12441         (HANDLE_METHOD): Recognize synthetic method and tell
12442         `print_method_info' about it.
12443         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12444         processing a synthetic method.
12445         * jcf-reader.c (skip_attribute): New function.
12446         ( skip_attribute): Likewise.
12447
12448 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12449
12450         * parse.y (build_outer_field_access): Fixed comments.
12451         (fix_constructors): Emit the initialization of this$<n> before
12452         calling $finit$.
12453         (resolve_qualified_expression_name): Build an access to `decl' if
12454         necessary.
12455
12456 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12457
12458         * parse-scan.y (curent_class): Non longer const.
12459         (inner_qualifier, inner_qualifier_length): Deleted.
12460         (current_class_length): New global.
12461         (bracket_count): Fixed typo in leading comment.
12462         (anonymous_count): New global.
12463         (class_instance_creation_expression:): Handle anonymous classes.
12464         (anonymous_class_creation:): New rule.
12465         (push_class_context): Rewritten.
12466         (pop_class_context): Likewise.
12467         (INNER_QUALIFIER): Macro deleted.
12468         (report_class_declaration): call `push_class_context' when
12469         entering the function. `fprintf' format modified not to use
12470         INNER_QUALIFIER.
12471         (report_class_declaration): Assign `package_name' and
12472         `current_class' to NULL separately.
12473
12474 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12475
12476         * expr.c (build_invokeinterface): Call layout_class_methods on
12477         target interface.
12478
12479 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12480             Anthony Green  <green@cygnus.com>
12481             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12482
12483         * class.c (make_class_data): Create vtable for abstract classes.
12484         (get_dispatch_table): Changed to cope with abstract classes.
12485
12486 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12487
12488         * parse.y (patch_method_invocation): Don't reverse the argument
12489         list when dealing with anonymous class constructors. Fixed typo in
12490         comment.
12491
12492 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12493
12494         * parse.y (build_alias_initializer_parameter_list): Reverse
12495         crafted list when building aliases for anonymous class
12496         constructors.
12497
12498 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12499
12500         * parse.y (jdep_resolve_class): Don't bother checking potential
12501         innerclass access if `decl' is NULL.
12502         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12503         WFL.
12504
12505 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12506
12507         * parse.c: Remove (again.)
12508
12509 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12510
12511         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12512         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12513         outside the `if' statement, alias to innerclass removed, `decl'
12514         used to mark the class complete.
12515
12516 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12517
12518         * parse.y (simple_name:): Fixed typo in error message.
12519
12520 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12521
12522         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12523         or its first operand can be error marks.
12524
12525 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12526
12527         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12528         * parse.y (method_header): Likewise.
12529
12530 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12531
12532         * parse.y (process_imports): Consider that one might be trying to
12533         import an innerclass. Fixes gcj/254
12534
12535 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12536
12537         * parse.y (find_as_inner_class): Handle the case where the
12538         enclosing context of an innerclass has been loaded as bytecode.
12539
12540 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12541
12542         * parse.y (simple_name:): Reject `$' in type names.
12543         (resolve_type_during_patch): Use `type' as a second
12544         argument to resolve_no_layout. Fixes gcj/257.
12545
12546 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
12547
12548         * parse.y (find_most_specific_methods_list): Select the only
12549         non-abstract method even if max has been set.
12550         Fixes gcj/285, gcj/298.
12551
12552 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
12553
12554         * lang-specs.h: Added %(jc1) to java compiler options.
12555
12556 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12557
12558         * .cvsignore: New file.
12559
12560 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12561
12562         * parse.y (not_accessible_p): Access granted to innerclasses
12563         (indirectly) extending the reference type. Fixes gcj/249.
12564
12565 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12566
12567         * parse.y (patch_method_invocation): Fixed comment.
12568         (maybe_use_access_method): Build this$<n>s to the context of the
12569         target method, or a type that extends it. Fixes gcj/242.
12570
12571 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12572
12573         * parse.c: Remove.
12574
12575 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12576
12577         * parse.y (fold_constant_for_init): Avoid bullish conversion.
12578
12579 2000-07-13  Tom Tromey  <tromey@cygnus.com>
12580
12581         * lang-specs.h: Added %{I*}.
12582
12583 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12584
12585         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12586
12587 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12588
12589         * parse-scan.c: Remove.
12590
12591 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12592
12593         * class.c (set_super_info): Handled protected inner classes.
12594         (common_enclosing_context_p): Bail early if arguments aren't both
12595         inner classes.
12596         (get_access_flags_from_decl): Handle private and protected inner
12597         classes.
12598         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12599         (CLASS_PROTECTED): Likewise.
12600         (struct lang_type): New bitfield `poic'.
12601         * parse.y (jdep_resolve_class): Call check_inner_class_access on
12602         inner classes only.
12603         (check_inner_class_access): Renamed arguments, added
12604         comments. Handles protected inner classes (fixes gcj/225)
12605         (not_accessible_p): Fixed comments. Avoid handling inner classes.
12606
12607 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12608
12609         * parse.y (resolve_qualified_expression_name): Verify qualified
12610         access to `this'. Fixes gcj/239.
12611
12612 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12613
12614         * jcf-write.c (generate_classfile): Don't install ConstantValue
12615         for null pointers.
12616
12617 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12618
12619         * parse.y (resolve_qualified_expression_name): Handle inner class
12620         access. Fixes gcj/256.
12621
12622 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12623
12624         * jcf-write.c (generate_classfile): Properly install the
12625         ConstantValue attribute and the initial value constant pool index
12626         on string constants.
12627         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12628         class files.
12629
12630 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12631
12632         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12633         construct.
12634         * parse.y (find_as_inner_class): Fixed typo.
12635         (do_resolve_class): Explore enclosing contexts when searching for
12636         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12637         (check_inner_class_access): Check `decl' which can be null in case
12638         of previous errors.
12639
12640 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12641
12642         * java-tree.h (java_debug_context): Declared `extern'.
12643         (safe_layout_class): Likewise.
12644         * parse.y (resolve_field_access): Field must be `static' in order
12645         to be replaced by its initial value. Added comments.
12646         (find_applicable_accessible_methods_list): Fixed typo.
12647         (find_most_specific_methods_list): Methods found in innerclasses
12648         take over methods founds in the enclosing contexts.
12649         (java_complete_tree): Loosen restrictions on the type of DECLs
12650         that can be replaced by their initialization values.
12651         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12652
12653 2000-07-05  Tom Tromey  <tromey@cygnus.com>
12654
12655         * Make-lang.in (PARSE_DIR): New macro.
12656         (PARSE_RELDIR): Likewise.
12657         (PARSE_C): Likewise.
12658         (PARSE_SCAN_C): Likewise.
12659         ($(PARSE_C)): New target.
12660         ($(PARSE_SCAN_C)): Likewise.
12661         (SET_BISON): New macro.
12662         (BISONFLAGS): Likewise.
12663         (JAVABISONFLAGS): Likewise.
12664
12665 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
12666
12667         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12668         argument on the first pass for CNI as well as JNI.
12669         (print_method_info): Set up method name on the first pass only.
12670
12671 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12672
12673         * parse.y (parser_qualified_classname): Removed parameter
12674         `is_static'.
12675         (create_interface): Removed first passed parameter to
12676         parser_qualified_classname.
12677         (create_class): Likewise. Don't install alias on static
12678         innerclasses. Fixes gcj/275.
12679
12680 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12681
12682         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12683         debugable statement with empty_stmt_node. Fixes gcj/272
12684
12685 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12686
12687         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12688         gcj/271.
12689
12690 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12691
12692         * jcf-write.c (push_long_const): Appropriately cast short negative
12693         constant to jword.
12694
12695 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12696
12697         * parse.y (verify_constructor_super): Use loop variable
12698         `m_arg_type' initialized with `mdecl_arg_type'.
12699
12700 2000-06-29  Tom Tromey  <tromey@cygnus.com>
12701
12702         * parse.y (resolve_field_access): Handle case where `type_found'
12703         is NULL.
12704
12705 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12706
12707         * expr.c (lookup_field): The same field can be found through two
12708         different interface. Don't declare it ambiguous in that case.
12709
12710 2000-06-27  Tom Tromey  <tromey@cygnus.com>
12711
12712         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
12713         follows \r, then unget it at a lower level.
12714
12715 2000-06-26  Tom Tromey  <tromey@cygnus.com>
12716
12717         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12718         java_complete_tree.
12719
12720 2000-06-25  Tom Tromey  <tromey@cygnus.com>
12721
12722         * parse.y (for_statement): Wrap expression in a WFL if it is a
12723         constant.  For PR gcj/268.
12724
12725 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12726
12727         * parse.y (do_resolve_class): Minor optimiztion in the package
12728         list search. Removed unnecessary test and return statement.
12729         (valid_ref_assignconv_cast_p): Order of arguments to
12730         enclosing_context_p fixed.
12731
12732 2000-06-24  Tom Tromey  <tromey@cygnus.com>
12733
12734         * expr.c (lookup_field): Print error and return error_mark_node if
12735         field reference is ambiguous.
12736
12737         * parse.y (check_abstract_method_definitions): Also check if
12738         `other_method' is abstract.
12739
12740 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12741
12742         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12743         classes.
12744         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12745         (struct lang_type): New field `pic'.
12746         (CLASS_PRIVATE): New macro.
12747         * parse.y (check_inner_class_access): New function.
12748         (jdep_resolve_class): Call it.
12749
12750 2000-06-23  Tom Tromey  <tromey@cygnus.com>
12751
12752         * parse.y (patch_incomplete_class_ref): Initialize the returned
12753         class.  For PR gcj/260.
12754
12755 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12756
12757         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12758
12759 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12760
12761         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12762         Java specific checks.
12763         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12764         screened by DECL_P.
12765         * java-tree.def (CASE_EXPR): Marked 'e'.
12766         (DEFAULT_EXPR): Likewise.
12767         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12768         screened by DECL_P.
12769         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12770         Java specific checks.
12771         (generate_bytecode_insns): Test try_block for BLOCK before using
12772         BLOCK_EXPR_BODY.
12773         * parse.y (build_wfl_wrap): Added `location' argument. Set
12774         EXPR_WFL_LINECOL accordingly.
12775         (dim_expr:): Wrap constants with WFLs.
12776         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12777         (resolve_package): Check for `stmt' not being a BLOCK before
12778         building a debuggable statement with it.
12779         (make_qualified_primary): Added extra parameter to build_wfl_wrap
12780         invocation.
12781         (resolve_field_access): Make sure `decl' is a DECL before treating
12782         it as such.
12783         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12784         IDENTIFIER_NODE before treating it as such.
12785         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12786         treating it as such.
12787         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12788         to be applied only on non array types.
12789
12790 2000-06-16  Per Bothner  <per@bothner.com>
12791
12792         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
12793         define in terms of DECL_RESULT, as that fails when --enable-checking.
12794
12795 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12796
12797         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
12798         types the same in comparison.
12799         (CHECK_OP): Add static prototype.
12800
12801 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12802
12803         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12804         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12805         * parse.c: Rebuilt.
12806
12807 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12808
12809         * decl.c (create_primitive_vtable): Prototype.
12810
12811         * jcf-write.c (generate_bytecode_insns): Initialize variable
12812         `saved_context'.
12813
12814         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12815
12816 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12817
12818         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12819         to track searched classes, and do not search the same class more than
12820         once. Call find_applicable_accessible_methods_list on immediate
12821         superclass, instead of search_applicable_method_list on all ancestors.
12822         Fix for PR gcj/238.
12823
12824 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12825
12826         * parse.y (register_fields): Permit static fields in inner classes
12827         if they are final. Fix for PR gcj/255.
12828
12829 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12830
12831         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12832         * parse.y (find_in_imports): Returned type changed to void,
12833         leading comment fixed.
12834         (register_package): New function.
12835         (qualify_and_find): Likewise.
12836         (package_declaration:): Use `register_package'.
12837         (single_type_import_declaration:): Removed local variable
12838         `node'. Added missing `;' for consistency.
12839         (type_import_on_demand_declaration:): Use `chainon' to link new
12840         entries.
12841         (lookup_field_wrapper): Lookup local variables defined in outer
12842         contexts first.
12843         (java_complete_class): Don't reverse the list of imported on demand.
12844         (do_resolve_class): Reorganized. Removed local variable
12845         `original_name'. Call `qualify_and_find' with the current package
12846         name, invoke `find_in_imports_on_demand' right after. Call
12847         `qualify_and_find' with the packages we've seen so far. Fixed
12848         operations numbering in comments.
12849         (java_expand_class): Don't reverse `package_list'.
12850         (find_most_specific_methods_list): New local variables `abstract'
12851         and `candidates'. Use them to pick the right method.
12852
12853 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12854
12855         * parse.y (check_modifiers_consistency): Don't subtract out
12856         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12857
12858 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12859
12860         * Makefile.in (INTLLIBS): New.
12861         (LIBS): Add above.
12862         (DEPLIBS): Ditto.
12863
12864 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12865
12866         * class.c (get_dispatch_table): Build the vtable dummy entry list
12867         element with a null purpose. Fixed leading comment.
12868         (build_dtable_decl): Build an accurate dtable type when appropriate
12869         and use it.
12870
12871 2000-06-02  Richard Henderson  <rth@cygnus.com>
12872
12873         * lang.c (lang_get_alias_set): New.
12874
12875 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12876
12877         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12878         before using it as the accessed field.
12879
12880 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12881
12882         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12883         char_array_vtable, short_array_vtable, int_array_vtable,
12884         long_array_vtable, float_array_vtable, double_array_vtable):
12885         Declare.
12886         * expr.c (get_primitive_array_vtable): New function.
12887         (create_primitive_vtable): New function.
12888         (java_lang_expand_expr): Enable code to statically generate
12889         arrays.
12890         * decl.c (init_decl_processing): Create primitive vtables.
12891         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12892         short_array_vtable, int_array_vtable, long_array_vtable,
12893         float_array_vtable, double_array_vtable): Define.
12894
12895 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12896
12897         * java/parse.y (find_applicable_accessible_methods_list):
12898         Don't add an uninitialized value to the list.
12899
12900 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12901
12902         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12903         when trying to see if field's class should be initialized.  Always
12904         initialize field's declaring class, not qualified class.
12905         For PR gcj/162.
12906
12907         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12908         `wfl_operator', to maybe_build_primttype_type_ref.
12909         Fixes PR gcj/235.
12910
12911 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12912
12913         * parse.y (patch_method_invocation): Don't try to lookup methods
12914         in primitive types.
12915
12916 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12917
12918         * parse.y (resolve_field_access): Call the appropriate <clinit>
12919         before accessing the length of a static array. Craft a decl for
12920         the field while its time. Fixes PR gcj/129.
12921
12922 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12923
12924         * parse.y (resolve_package): Correctly set `*next' (was off by
12925         one.)
12926         (resolve_qualified_expression_name): Fixed comment.
12927
12928 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12929
12930         * jcf-parse.c (jcf_parse_source): Reset current_class and
12931         current_function_decl to NULL before parsing a new file.
12932
12933 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12934
12935         * parse.y (block_end:): If the collected block doesn't feature a
12936         statement, insert an empty statement.
12937
12938 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12939
12940         * parse.y (maybe_yank_clinit): New function.
12941         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12942         end of the list of methods belonging to a class.
12943         (java_complete_expand_method): Check whether <clinit> is really
12944         necessary and expand it accordingly.
12945
12946 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12947
12948         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12949         processed by the method's switch statement.
12950
12951 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12952
12953         * java-tree.h: Added init state enum.
12954         * decl.c (emit_init_test_initialization): Initialize class
12955         initialization check variable by looking at class' state.
12956
12957 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12958
12959         * java-tree.h (build_instanceof): Declare.
12960         (build_get_class): Declare.
12961         * parse.y (patch_binop): Use build_instanceof.
12962         * expr.c (build_instanceof): New function.  If class is final,
12963         don't make a function call.
12964         (expand_java_INSTANCEOF): Use it.
12965         (build_get_class): New function.
12966
12967 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12968
12969         * jcf-write.c (generate_classfile): Scan the source_file for
12970         slashes with the right pointer variable.
12971
12972 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12973
12974         * lang.c (lang_decode_option): Update -Wunused flags by calling
12975         set_Wunused.
12976         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12977
12978 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12979
12980         * check_init.c (check_init): Constify local char *.
12981         * class.c (push_class): Constify local char *.
12982         * java_tree.h: Update prototypes.
12983         * jcf-io.c (open_class): Constify filename parameter and
12984         return value.
12985         (find_class): Remove redundant string copy.  Cast return from
12986         open_class.
12987         * jcf-parse.c (read_class, parse_class_file, yyparse):
12988         Constify local char *.
12989         * jcf-write.c (generate_bytecode_insns, generate_classfile):
12990         Constify local char *.
12991         * jcf.h (JCF): Constify filename and classname.
12992         (JCF_FINISH): Cast args to FREE to char * when appropriate.
12993         * lang.c (init_parse): Constify parameter and return value.
12994         * lex.c (java_get_line_col): Constify filename parameter.
12995         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
12996         * parse.y (java_parser_context_suspend,
12997         issue_warning_error_from_context, safe_layout_class): Constify
12998         local char *.
12999         * parse.c: Regenerate.
13000
13001 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13002
13003         * expr.c (build_jni_stub): Cache the result of
13004         _Jv_LookupJNIMethod.
13005
13006 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13007
13008         * decl.c (predef_filenames_size): Now 7.
13009         (predef_filenames): New seventh entry.
13010
13011 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13012
13013         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13014         Keep track of when we've seen a reference field after a
13015         non-reference field.
13016         (get_boehm_type_descriptor): Handle case where we see
13017         non-reference fields but no trailing reference field.
13018         * decl.c (rawdata_ptr_type_node): Define.
13019         (init_decl_processing): Initialize rawdata_ptr_type_node.
13020         * java-tree.h (rawdata_ptr_type_node): Declare.
13021
13022 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13023
13024         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13025         specifiers in calls to fprintf.
13026
13027 2000-05-03  Andrew Haley  <aph@cygnus.com>
13028
13029         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13030
13031         * javaop.h (WORD_TO_INT): New function.
13032         (IMMEDIATE_s4): Use WORD_TO_INT.
13033         * jcf.h (JPOOL_INT): Ditto.
13034
13035         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13036         separator.
13037
13038 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13039
13040         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13041         on native function.
13042         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13043         JNI methods.
13044         * expr.c (build_jni_stub): New function.
13045         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13046         * parse.c: Rebuilt.
13047         * parse.y (java_complete_expand_methods): Expand a native method
13048         and call build_jni_stub if -fjni given.
13049         * lang-options.h: Document -fjni.
13050         * lang.c (flag_jni): New global.
13051         (lang_f_options): Added `jni' entry.
13052         * java-tree.h (soft_lookupjnimethod_node,
13053         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13054         Declare.
13055         (flag_jni): Declare.
13056         (build_jni_stub): Declare.
13057         (struct lang_decl): Added `native' flag.
13058         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13059         structure.
13060         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13061         soft_jnipopsystemframe_node): New globals.
13062         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13063         argument.
13064
13065         * java-tree.def: Put into `C' mode.
13066
13067 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13068
13069         Fix for PR gcj/2:
13070         * expr.c (expand_invoke): Generate check to see if object pointer
13071         is null in nonvirtual invocation case.
13072         * java-tree.h (soft_nullpointer_node): Declare.
13073         * decl.c (soft_nullpointer_node): New global.
13074         (init_decl_processing): Initialize soft_nullpointer_node.
13075         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13076         or `private' methods.
13077         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13078
13079 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13080
13081         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13082         from <clinit>
13083
13084 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13085
13086         * zextract.c (find_zip_file_start): New function.
13087         (read_zip_archive): Use it.
13088
13089 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13090
13091         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13092
13093 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13094
13095         * class.c (common_enclosing_context_p): New function.
13096         * java-tree.h (common_enclosing_context_p): Added prototype.
13097         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13098         classes sharing an outer context with the current instance.
13099         * parse.y (build_access_to_thisn): Fixed leading comment.
13100         (verify_constructor_super): New local `supper_inner'. Skip
13101         enclosing context argument in the case of inner class constructors.
13102         (patch_method_invocation): Insert proper context as second
13103         parameter to pure inner class constructor super invocations.
13104
13105 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13106
13107         * parse.y (end_class_declaration): Reset the interface number
13108         counter.
13109
13110 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13111
13112         * parse.y (source_start_java_method): Deleted unnecessary code.
13113         (patch_method_invocation): Fixed comment.
13114
13115 2000-04-24  Robert Lipe <robertlipe@usa.net>
13116
13117         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13118
13119 2000-04-23  Tom Tromey  <tromey@cygnus.com>
13120
13121         * boehm.c (mark_reference_fields): Use int_byte_position.
13122
13123 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13124
13125         * boehm.c (mark_reference_fields): Only call byte_position on
13126         non-static fields.
13127
13128 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13129
13130         * boehm.c (mark_reference_fields): Added `last_view_index'
13131         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
13132
13133 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
13134
13135         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13136         * parse.y (check_class_interface_creation): Fixed comments. Select
13137         permitted modifiers for (inner) interfaces. Changed error message
13138         to report rejected modifiers used with local classes.
13139
13140 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13141
13142         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13143         of directly inherited type considered in scope.
13144         * parse.y (do_resolve_class): Search inherited classes for inner
13145         classes.
13146
13147 2000-04-20  Tom Tromey  <tromey@cygnus.com>
13148
13149         * parse.y (not_accessible_p): Use member's class, not current
13150         class, when doing inheritance check for protected reference.
13151         Fixes PR gcj/124.
13152
13153 2000-04-20  Jason Schroeder  <shrode@subnature.com>
13154
13155         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13156
13157 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13158
13159         * parse.y (lookup_field_wrapper): Search for final local aliases.
13160         (resolve_expression_name): Let lookup_field_wrapper search for
13161         final local aliases. Force the value of `name' if one is found.
13162         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13163         an expression name. Fixed comments.
13164
13165 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13166
13167         * parse.y (yyerror): `msg' can be null, don't use it in that case.
13168
13169 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13170
13171         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13172
13173 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13174
13175         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13176
13177 2000-04-18  Tom Tromey  <tromey@cygnus.com>
13178
13179         PR gcj/211:
13180         * gjavah.c (utf8_cmp): Changed return value.
13181         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
13182         result.
13183         (cxx_keywords): New global.
13184         (get_field_name): Handle new result of cxx_keyword_subst.
13185         (print_method_info): Likewise.
13186
13187 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
13188
13189         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13190         with a newline, for CNI.
13191         (print_stub_or_jni): Print a space or newline before method name for
13192         CNI as well as JNI.
13193         (print_cxx_classname): Don't write leading "::" in CNI stub method.
13194         (process_file): Include gcj/cni.h if generating CNI stubs.
13195
13196 2000-04-16  Tom Tromey  <tromey@cygnus.com>
13197
13198         * gjavah.c (decompile_method): Use print_field_name.
13199         Fixes PR gcj/205.
13200
13201 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13202
13203         * parse.y (java_expand_classes): Reverse the package list once.
13204         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13205         reduction.
13206         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13207         the `==' and `!=' operators.
13208
13209 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13210
13211         * jcf-write.c (generate_bytecode_insns): At invocation time,
13212         always relate an interface method to the type of its selector.
13213
13214 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13215
13216         Fix for PR gcj/2:
13217         * expr.c (expand_invoke): Generate check to see if object pointer
13218         is null in nonvirtual invocation case.
13219         * java-tree.h (soft_nullpointer_node): Declare.
13220         * decl.c (soft_nullpointer_node): New global.
13221         (init_decl_processing): Initialize soft_nullpointer_node.
13222         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13223         or `private' methods.
13224         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13225
13226 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13227
13228         Fix for PR gcj/140:
13229         * parse.y (check_final_assignment): Recognize assignments to the
13230         `length' field of an array when generating class files.
13231
13232 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13233
13234         * class.c (decl_hash): Prototype removed.
13235         (decl_compare): Likewise.
13236
13237 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13238
13239         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13240         * parse.y (check_modifiers_consistency): Check for final/volatile
13241         clash.  Fixes PR gcj/164.
13242
13243 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13244
13245         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13246         made global.
13247         (java_hash_compare_tree_node): Renamed from `decl_compare, made
13248         global.
13249         (add_method_1): Use `java_hash_hash_tree_node' and
13250         `java_hash_compare_tree_node'.
13251         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13252         (java_hash_compare_tree_node): Likewise.
13253         * parse.y (find_applicable_accessible_methods_list): Create,
13254         delete and use a hash table to remember already searched interfaces.
13255
13256 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
13257
13258         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13259         with latest entry.
13260
13261 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13262
13263         * boehm.c (mark_reference_fields, set_bit): Prototype.
13264         (set_bit): Un-ANSI-fy definition.
13265
13266         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13267         Prototype.
13268
13269         * decl.c (emit_init_test_initialization): Likewise.
13270
13271         * gjavah.c (jni_print_char): Likewise.
13272
13273         * parse.y (create_new_parser_context): Likewise.
13274
13275 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13276
13277         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13278         patch missing hunk. Fixed indentation.
13279
13280 2000-03-30  Tom Tromey  <tromey@cygnus.com>
13281
13282         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13283         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13284
13285 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13286
13287         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13288         when negative *before* using it as an array index.
13289         * ChangeLog: Fixed typo.
13290
13291 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13292
13293         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13294         to 0 when it reaches -1.
13295
13296 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13297
13298         * jcf-parse.c (get_constant): Properly cast `num' during the
13299         invocation of `add_double'.
13300         * jcf-write.c (push_long_const): Properly cast `lo' before
13301         comparing it to short bounds.
13302         * parse-scan.y (interface_declaration:): Rule re-arrange so that
13303         `interface_body:' is reduced after the current interface is
13304         pushed.
13305
13306 2000-03-26  Tom Tromey  <tromey@cygnus.com>
13307
13308         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13309         Java-specific `-f' option.
13310
13311 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13312
13313         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13314         Adjust order of making types.
13315         Make bitsize_*_node values.
13316
13317 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13318
13319         * class.c (make_field_value): Use byte_position.
13320         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13321         (java_array_data_offset): Likewise.
13322         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13323         bzero call.
13324
13325 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13326
13327         * parse.y (check_abstract_method_definitions): New local
13328         `end_type_reached'. Make sure we also consider `end_type'.
13329         (java_check_abstract_method_definitions): Make sure we eventually
13330         consider `java.lang.Object'.
13331         (maybe_use_access_method): Don't use access method if not in the
13332         context of a pure inner class or if the method's context is right.
13333         (find_applicable_accessible_methods_list): New static flag
13334         `object_done'. Don't search abstract classes as interfaces. Fixed
13335         indentation. Fixed the `java.lang.Object' only search. Search
13336         class interface(s) first, then fully search enclosing contexts.
13337         (find_most_specific_methods_list): Pick the closest candidate when
13338         they're all abstract.
13339
13340 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13341
13342         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13343         properly initialize `finished_label'. Don't emit gotos for empty
13344         try statements.
13345
13346 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13347
13348         * except.c (emit_handlers): Clear catch_clauses_last.
13349
13350 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13351
13352         * parse.y (check_method_types_complete): New function.
13353         (create_class): Reset anonymous class counter only when seeing an
13354         non inner classe.
13355         (java_complete_class): JDEP_METHOD: Don't recompute signature
13356         if incomplete.
13357
13358 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13359
13360         * class.c (build_static_ref): Fixed indentation in comment.
13361         * java-tree.def (TRY_EXPR): Fixed typo in name.
13362         (CLASS_LITERAL): Likewise.
13363         * java-tree.h: (TYPE_DOT_CLASS): New macro.
13364         (struct lang_type): New field `dot_class'.
13365         * jcf-write.c (generate_bytecode_insns): Fixed error message.
13366         (generate_classfile): Method `class$' is synthetic.
13367         * parse.y (build_do_class_method): New function.
13368         (build_dot_class_method_invocation): Likewise.
13369         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13370         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13371         (qualify_ambiguous_name): Likewise.
13372         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13373         (build_try_statement): Fixed leading comment.
13374
13375 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13376
13377         * class.c (make_field_value): Properly handle sizes.
13378         (get_dispatch_vector): Use tree_low_cst and host_integerp.
13379         (layout_class_method): Count using trees.
13380         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13381         * expr.c (java_array_data_offset): Use int_bit_position.
13382         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13383         (build_invokevirtual): Use tree_low_cst and do computations with trees.
13384
13385 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13386
13387         * lang.c (flag_hash_synchronization): New global.
13388         (lang_f_options): Added `hash-synchronization'.
13389         * lang-options.h: Mention -fhash-synchronization.
13390         * java-tree.h (flag_hash_synchronization): Declare.
13391         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13392         hash table synchronization is disabled.
13393         * decl.c (init_decl_processing): Only push `sync_info' value when
13394         hash table synchronization is disabled.
13395         * class.c (make_class_data): Only push `sync_info' field when hash
13396         table synchronization is disabled.  Removed dead code.
13397
13398 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13399
13400         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13401
13402 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13403
13404         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13405         classes.
13406         * parse.y (patch_method_invocation): Handle anonymous classes
13407         creation in static context.
13408
13409 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13410
13411         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13412         * parse.y (resolve_qualified_expression_name): Use it.
13413         (patch_method_invocation): Likewise.
13414
13415 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13416
13417         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13418         depending on the type of dependency which dictates what the
13419         current class is.
13420         (unresolved_type_p): Resolved types limited to the current class.
13421
13422 2000-03-15  Tom Tromey  <tromey@cygnus.com>
13423
13424         * decl.c (init_decl_processing): Set type of `sync_info' to be
13425         pointer to Object.
13426
13427         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13428         Correctly compute bit number for current slot.  Zero `high' and
13429         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
13430         mark_reference_fields.
13431         (mark_reference_fields): New function.
13432
13433 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13434
13435         * parse.y (register_incomplete_type): Fixed initialization of
13436         JDEP_ENCLOSING.
13437
13438 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13439
13440         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13441         static globals.
13442         (push_class_context, pop_class_context): New function.
13443         (class_body:): Call pop_class_context.
13444         (interface_body:): Likewise.
13445         (INNER_QUALIFIER): New macro.
13446         (report_class_declaration): Changed output format and use
13447         INNER_QUALIFIER. Call push_class_context.
13448
13449 2000-02-14  Andrew Haley  <aph@cygnus.com>
13450
13451         * check-init.c (check_init): Add new cases for unary and binary
13452         tree nodes.
13453
13454 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13455
13456         * parse.y (resolve_package): Set `next' once a type name has been
13457         progressively discovered.
13458         (resolve_qualified_expression_name): Propagate resolution only if
13459         there are remaining qualifiers. Take into account `q' might have
13460         been cleared after re-qualification.
13461         * parse.y (patch_method_invocation): New local `resolved'.
13462         Section dealing with qualified expression rewritten to use
13463         resolve_field_access.
13464
13465 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13466
13467         * parse.h (PUSH_CPC): Fixed indentation.
13468         (DEBUG_CPC): New macro.
13469         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13470         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13471         * parse.y (class_body_declaration:): Use
13472         SET_CPC_INSTANCE_INITIALIZER_STMT.
13473         (method_declaration:): Check for null current_function_decl.
13474         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13475         (java_parser_context_pop_initialized_field): Better handling of
13476         empty lists.
13477         (maybe_make_nested_class_name): Mark nested class name as
13478         qualified when necessary.
13479         (end_class_declaration): Don't call java_parse_context_resume when
13480         one or more error occurred.
13481         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13482         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13483         SET_CPC_INITIALIZER_STMT.
13484         (method_header): Check for inner classes declaring static methods.
13485         (resolve_qualified_expression_name): Handle situation where `this'
13486         is implied.
13487
13488 2000-03-13  Hans Boehm <boehm@acm.org>
13489
13490         * typeck.c (build_prim_array_type): Correctly set the high word too.
13491
13492 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13493
13494         * parse.y (java_complete_expand_methods): Leave <clinit> out of
13495         ordinary methods.
13496         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13497         list of methods for interfaces.
13498
13499 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13500
13501         * parse.y (qualify_ambiguous_name): Properly handle expressions
13502         using `null'.
13503
13504 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13505
13506         * parse.y (check_final_assignment): Extended to process
13507         COMPOUND_EXPR.
13508         (patch_assignment): Have check_final_assignment called only once.
13509
13510 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13511
13512         * java-tree.h (IS_INIT_CHECKED): New flag.
13513         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13514         * parse.y (patch_string): Call force_evaluation_order on the
13515         completed string concatenation tree.
13516         * expr.c (force_evaluation_order): Call force_evaluation_order on
13517         function's arguments too.
13518
13519 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13520
13521         * decl.c (emit_init_test_initialization): Mark KEY as unused.
13522         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13523         (build_anewarray): Likewise.
13524         * parse.y (patch_newarray): Likewise.
13525         * parse.c: Regenerated.
13526
13527 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
13528
13529         * decl.c (init_decl_processing): Added new class fields `depth',
13530         `ancestors', and `idt' to class_type_node. Use
13531         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13532         * class.c (make_class_data): Push initial values for new fields.
13533         * java-tree.h: Updated prototype for `build_invokeinterface'.
13534         * expr.c (build_invokeinterface): Changed parameters to accept
13535         `method' tree. Calculate index of `method' in its declaring
13536         interface. Build call to _Jv_LookupInterfaceMethodIdx.
13537         (expand_invoke): Call `build_invokeinterface' with new parameters.
13538         * parse.y (patch_invoke): Call `build_invokeinterface' with new
13539         parameters.
13540
13541 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
13542
13543         * typeck.c (lookup_do): Search superinterfaces first
13544         when looking up an interface method. From Godmar Back
13545         <gback@cs.utah.edu>
13546
13547 2000-03-06  Tom Tromey  <tromey@cygnus.com>
13548
13549         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13550
13551 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13552
13553         * java-tree.h (lookup_argument_method2): Declared.
13554         (safe_layout_class): Prototype moved from parse.h.
13555         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13556         * parse.y (java_check_regular_methods): Local `super_class' gone.
13557         Call lookup_argument_method2 instead of lookup_argument_method.
13558         Perform modifier match for methods found declared in implemented
13559         interfaces. Fixed indentation problem. Overriding/hiding error
13560         report to take place only for methods found in classes.
13561         * typeck.c (lookup_argument_method): Changed leading
13562         comment. Re-written by calling lookup_do.
13563         (lookup_argument_method2): New function.
13564         (lookup_java_method): Re-written by calling lookup_do.
13565         (lookup_do): New function.
13566
13567 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13568
13569         * check-init.c (check_init): Removed dead code. Handle (blank)
13570         final variables.
13571         * parse.y (declare_local_variables): New local `final_p', set it
13572         and use it to initialize LOCAL_FINAL.
13573         (check_final_assignment): Only check FIELD_DECLs.
13574
13575 2000-02-17  Tom Tromey  <tromey@cygnus.com>
13576
13577         * Makefile.in (JAVA_OBJS): Added boehm.o.
13578         (boehm.o): New target.
13579         * Make-lang.in (JAVA_SRCS): Added boehm.c.
13580         * java-tree.h (flag_use_boehm_gc): Declare.
13581         (get_boehm_type_descriptor): Declare.
13582         * lang.c (lang_f_options): Added `use-boehm-gc'.
13583         (flag_use_boehm_gc): New global.
13584         * lang-options.h: Added -fuse-boehm-gc.
13585         * boehm.c: New file.
13586         * class.c (get_dispatch_table): If class uses a Boehm type
13587         descriptor, put it in the vtable.
13588         (make_class_data): Removed dead code.
13589
13590 2000-03-03  Per Bothner  <per@bothner.com>
13591
13592         * decl.c (init_decl_processing):  Initialize sizetype properly.
13593
13594 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13595
13596         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13597         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13598         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13599         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13600         (jcf_parse): New local `current'. Load innerclasses seen in outer
13601         context being processed.
13602         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13603         * jcf-write.c (append_innerclasses_attribute): New function.
13604         (append_innerclasses_attribute_entry): Likewise.
13605         (get_access_flags): Handle static classes. Set anonymous and local
13606         classes to be private.
13607         (generate_classfile): Attribute count adjusted. Call
13608         append_innerclasses_attribute.
13609         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13610         PURE_INNER_CLASS_TYPE_P.
13611         * parse.y (parser_qualified_classname): New parameter `is_static',
13612         produce non qualified name accordingly.
13613         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13614         (create_interface): Added argument to parser_qualified_classname.
13615         (create_class): Added argument to parser_qualified_classname. Setup
13616         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13617         (add_inner_class_fields): Fixed indentation.
13618         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13619         (method_declarator): Fixed typo in comment.
13620         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13621         (build_current_thisn): Likewise.
13622         (patch_method_invocation): Likewise.
13623
13624 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13625
13626         * decl.c (current_function_decl): Move to toplev.c.
13627
13628 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13629
13630         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13631         (DECL_BIT_INDEX): Use underlying representation.
13632         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13633
13634 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13635
13636         * expr.c (build_java_ret): Pass proper type to size_binop.
13637
13638 2000-02-25  Anthony Green  <green@cygnus.com>
13639
13640         * expr.c (build_class_init): Mark the decl to be ignored by
13641         check_init.
13642         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13643         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13644         * class.c (init_test_hash_newfunc): New function.
13645         (decl_hash): New function.
13646         (decl_compare): New function.
13647         * decl.c (emit_init_test_initialization): New function.
13648         (complete_start_java_method): Traverse the init test hashtable,
13649         calling emit_init_test_initialization.
13650         (always_initialize_class_p): Define.
13651         * expr.c (build_class_init): Use initialization tests when
13652         emitting class initialization code.
13653         (always_initialize_class_p): Declare.
13654         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13655         1.
13656         * java-tree.h: Include hash.h.
13657         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13658         (struct lang_decl): Add init_test_table field.
13659         (init_test_hash_entry): Define.
13660
13661 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13662
13663         * gjavah.c (main): Avoid using `argi' to report unimplemented
13664         options.
13665
13666 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13667
13668         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13669         initialize locals to avoid warnings. Local `exception_type' moved
13670         into if statement.
13671
13672 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13673
13674         * parse.y (resolve_expression_name): Use `orig' as a second
13675         argument to resolve_field_access.
13676         (resolve_field_access): Removed unnecessary code when dealing with
13677         static fields.
13678
13679 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13680
13681         * class.c (push_super_field): Don't push the field twice.
13682         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13683         * parse.h (java_reorder_fields): Prototyped.
13684         * parse.y (java_reorder_fields): New function.
13685         (java_layout_class): Simplified not to worry about re-ordering.
13686
13687 2000-02-23  Tom Tromey  <tromey@cygnus.com>
13688
13689         * gjavah.c (print_name): In JNI case, correctly quote string.
13690         (print_method_info): Don't handle overrides in JNI mode.
13691
13692 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13693
13694         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13695         value type set to `boolean_type_node'.
13696
13697 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13698
13699         * jcf-dump.c (main): Test for correct condition after
13700         output file creation.
13701
13702 2000-02-19  Anthony Green  <green@cygnus.com>
13703
13704         * jcf-depend.c (add_entry): Fix test for first list entry.
13705
13706 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13707
13708         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13709         * constants.c (build_constants_constructor): Likewise.
13710
13711 2000-02-19  Anthony Green  <green@cygnus.com>
13712
13713         * jcf-depend.c (add_entry): Add entries to the end of the list.
13714
13715 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
13716
13717         * decl.c (INT_TYPE_SIZE): Define if necessary.
13718         (expand_java_return): Handle the case of a native integer smaller
13719         than a JVM integer.
13720
13721 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13722
13723         * gjavah.c (help): Use GCCBUGURL.
13724         * jv-scan.c (help): Likewise.
13725         * jcf-dump.c (help): Likewise.
13726
13727 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13728
13729         * jcf-write.c (generate_bytecode_insns): Don't generate empty
13730         `finally' clauses.
13731
13732 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13733
13734         * jcf-parse.c (load_class): Call `fatal' if no file containing
13735         the target class are found.
13736
13737 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
13738
13739         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13740         lex.c, lex.h, and PARSE_H to...
13741         (parse.o, parse-scan.o): ...here, respectively.
13742
13743         * lex.c: Split out code that may trigger SIGFPE from yylex()
13744         to its own function.
13745         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13746
13747 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13748
13749         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13750
13751 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13752
13753         * parse.y (outer_field_access_p): Stop in time when outer contexts
13754         are exhausted.
13755         (resolve_qualified_expression_name): Properly qualify *everything*
13756         after a package.type to be resoled as expression names.
13757         (find_applicable_accessible_methods_list): Save/restore `class' to
13758         isolate it from a possible outer context search.
13759
13760 2000-02-15  Tom Tromey  <tromey@cygnus.com>
13761
13762         * gjavah.c (jni_print_char): New function.
13763         (print_full_cxx_name): Use it.
13764         (decode_signature_piece): Likewise.
13765         (print_cxx_classname): Likewise.
13766
13767 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13768
13769         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13770         version.o.
13771         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13772
13773         * gjavah.c: Include version.h.
13774
13775         * jcf-dump.c: Likewise.
13776
13777         * jv-scan.c: Likewise.
13778
13779 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13780
13781         * parse.y (outer_field_access_fix): First parameter now a tree
13782         node. Check for assignment to final. First argument to
13783         build_outer_field_access_fix modified to accommodate prototype.
13784         (build_outer_field_access): Don't check for assignment to final
13785         here.
13786         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13787         possibly returned by outer_field_access_fix. Changed
13788         outer_field_access_fix's first argument.
13789         (check_final_assignment): $finit$'s context is OK.
13790         (patch_unaryop): Use node instead of its line/column value when
13791         calling outer_field_access_fix.
13792
13793 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13794
13795         * parse.y (interface_declaration:): No longer tagged
13796         <node>. Re-installed default action.
13797         (class_member_declaration:): Handle inner interfaces.
13798         (interface_member_declaration): Handle inner interfaces and
13799         classes.
13800         (create_interface): Push error if one seen. Suspend parsing
13801         context when processing an inner interface.
13802         (register_fields): Inner class static field limitations not to
13803         apply to inner interfaces.
13804
13805 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13806
13807         * jcf-parse.c (load_class): Update `java_error_count' when a
13808         class' file can't be found.
13809         (parse.y): Avoid (byte)code generation when errors seen.
13810
13811 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13812
13813         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13814         decodes a valid node.
13815         (patch_binop): Handle TRUNC_DIV_EXPR.
13816
13817 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13818
13819         * parse.y (resolve_package): New local `acc'. Try to progressively
13820         build and guess a package and type name.
13821
13822 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13823
13824         * parse.y (find_applicable_accessible_methods_list): Load and
13825         layout the search class if necessary.
13826         (java_complete_tree): Keep to original type of the folded initial
13827         value.
13828
13829 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13830
13831         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13832         Generate error message if circularity is detected. New static
13833         local `list'.
13834         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
13835         * jcf-write.c (generate_bytecode_insns): Very simply handle
13836         SAVE_EXPR.
13837         * parse.y (java_check_circular_reference): Use
13838         `cyclic_inheritance_report' during report, if necessary.
13839         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13840         walking NEW_ARRAY_INIT twice.
13841
13842 2000-02-09  Tom Tromey  <tromey@cygnus.com>
13843
13844         * parse.y (check_class_interface_creation): Allow inner classes to
13845         be `private' or `protected', check modifiers' consistency. Prevent
13846         block local classes from bearing any modifiers.
13847
13848 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13849
13850         * except.c (check_start_handlers): Re-add prototype lost in last
13851         patch.
13852         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13853
13854 2000-02-09  Andrew Haley  <aph@cygnus.com>
13855
13856         * decl.c (clear_binding_level): Remove excess initializer.
13857         (maybe_poplevels): Remove unused variable.
13858         (force_poplevels): Ditto.
13859         (struct binding_level): Add comment.
13860
13861 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13862
13863         * jcf-write.c (generate_classfile): Don't consider
13864         pre-initialization with reference value (use <clinit> instead.)
13865         * parse.y (java_fix_constructors): No generated constructor for
13866         interfaces.
13867         (build_outer_field_access): Removed debug message.
13868         (outer_field_expanded_access_p): Adapted to bytecode generation.
13869         (build_outer_field_access_method): Use fix_method_argument_names.
13870         (build_outer_method_access_method): Fixed indentation. Added
13871         comment. Handle access method generation for static and also void
13872         methods.
13873         (build_access_to_thisn): Inserted debug message.
13874         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13875         (resolve_qualified_expression_name): Fixed comment.
13876         (not_accessible_p): Adapted to bytecode generation. Added comment.
13877         (patch_method_invocation): Added comment.
13878         (maybe_use_access_method): Fixed leading comment. Handle static
13879         methods.
13880         (java_complete_lhs): Don't shortcut handling of initialized upon
13881         declaration String type static fields when generating bytecode.
13882         (patch_unaryop): Handle outer field access when generating
13883         bytecode.
13884
13885 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13886
13887         * java-tree.h (FIELD_THISN): New macro.
13888         * jcf-write.c (append_synthetic_attribute): New function.
13889         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13890         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13891         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13892         this$<n> fields.
13893         (build_outer_field_access): Turned on access functions usage and
13894         generation when compiling to bytecode.
13895         (maybe_use_access_method): Likewise.
13896
13897 2000-01-25  Andrew Haley  <aph@cygnus.com>
13898
13899         * java-except.h (struct eh_range): Add `expanded' field.
13900         (maybe_start_try): Add end_pc arg.
13901         (maybe_end_try): Ditto.
13902         * java-tree.h (force_poplevels): new function.
13903         * expr.c (expand_byte_code): Don't call maybe_start_try or
13904         maybe_end_try.
13905         * except.c (add_handler): Reset expanded.
13906         (expand_start_java_handler): Set expanded.
13907         (check_start_handlers): Don't expand a start handler that's
13908         already been expanded.
13909         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13910         ends after end_pc.
13911         (expand_end_java_handler): call force_poplevels.
13912         (force_poplevels): new function.
13913         * decl.c (binding_level): Add start_pc of binding level.
13914         (maybe_pushlevels): Call maybe_start_try when pushing binding
13915         levels.
13916         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13917         (LARGEST_PC): Define.
13918         (clear_binding_level): Use LARGEST_PC.
13919
13920         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13921         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13922         (binding_depth, is_class_level, current_pc): new variables.
13923         (struct binding_level): ditto.
13924         (indent): new function.
13925         (push_jvm_slot): add debugging info.
13926         (maybe_pushlevels): ditto.
13927         (maybe_poplevels): ditto.
13928         (pushlevel): ditto.
13929         (poplevel): ditto.
13930         (start_java_method): ditto.
13931         (give_name_to_locals): comment only.
13932         * except.c (binding_depth, is_class_level, current_pc):
13933         new variables.
13934         (expand_start_java_handler): add debugging info.
13935         (expand_end_java_handler): ditto.
13936
13937 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13938
13939         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13940         (print_name_for_stub_or_jni, process_file): Constify a char*.
13941
13942 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13943
13944         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13945
13946 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13947
13948         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13949         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13950         defined to be 1.
13951
13952 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13953
13954         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13955         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13956         (struct lang_type): New field `ii_block'.
13957         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13958         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13959         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13960         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13961         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13962         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13963         macros.
13964         * parse.y (add_instance_initializer): New function.
13965         (in_instance_initializer): New static global.
13966         (class_body_declaration:): Link instance initializer block.
13967         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13968         (array_creation_expression:): Remove unused local.
13969         (java_parser_context_push_initialized_field): Fixed leading
13970         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13971         CPC_INSTANCE_INITIALIZER_LIST.
13972         (java_parser_context_pop_initialized_field): Likewise.
13973         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13974         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13975         CPC_INITIALIZER_STMT.
13976         (fix_constructors): New local `class_type'. Use it. Call
13977         add_instance_initializer.
13978         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13979         (patch_return): Forbid return in instance initializers.
13980         (patch_throw_statement): Enforce exception handling in the context
13981         of instance initializers.
13982
13983 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13984
13985         * Make-lang.in (java.mostlyclean): Remove executables in
13986         `mostlyclean'.
13987
13988 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13989
13990         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
13991         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
13992         (java_float_finite): Convert to use union Word from javaop.h.
13993         (java_double_finite): Convert to use union DWord from javaop.h.
13994
13995 2000-02-02  Tom Tromey  <tromey@cygnus.com>
13996
13997         * gjavah.c (options): Added `jni' entry.
13998         (help): Document -jni.
13999         (flag_jni): New global.
14000         (process_file): Handle JNI output.  Don't print text from
14001         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14002         suffix if it actually exists.
14003         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14004         correct output file name with `--jni'.
14005         (print_include): Mangle header name differently in JNI case.
14006         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14007         method list.
14008         (print_method_info): Handle JNI case.  Put signature info into
14009         method name.  Handle case when STREAM is NULL.
14010         (print_name_for_stub_or_jni): New function.
14011         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14012         (print_cxx_classname): Handle JNI.
14013         (print_full_cxx_name): Likewise.
14014         (decode_signature_piece): Likewise.
14015         (overloaded_jni_method_exists_p): New function.
14016         (struct method_name): Added `signature' and `sig_length' fields.
14017         (HANDLE_END_FIELD): Do nothing in JNI mode.
14018
14019 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14020
14021         * jv-scan.c: Include version.c, <getopt.h>.
14022         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14023         (options): New array.
14024         (usage): New function.
14025         (version): New function.
14026         (main): Use getopt_long to parse command line.
14027         * jcf-dump.c: Include version.c, <getopt.h>.
14028         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14029         OPT_JAVAP): New macros.
14030         (options): New array.
14031         (usage): Return `void'.  Changed message.
14032         (help): New function.
14033         (version): New function.
14034         (main): Use getopt_long_only to parse command line.
14035         * gjavah.c: Include <getopt.h>.
14036         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14037         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14038         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14039         (options): New array.
14040         (java_no_argument): Removed.
14041         (help): Updated with missing options.
14042         (main): Use getopt_long_only to parse command line.
14043         (usage): Changed message.
14044
14045 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14046
14047         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14048         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14049         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14050         * parse.y (array_creation_expression:): Handle anonymous arrays.
14051         (build_array_from_name): Don't set `ret_name' if null.
14052         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14053         (qualify_ambiguous_name): Likewise.
14054         (java_complete_expand_class): Likewise.
14055
14056 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14057
14058         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14059         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14060         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14061         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14062         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14063         AIPL_FUNCTION_COMPLETED_INVOCATION.
14064         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14065         AIPL_FUNCTION_INVOCATION_READY.
14066         (AIPL_FUNCTION_DECLARATION): New enum entry.
14067         * parse.y (reorder_static_initialized): New function.
14068         (java_parser_context_pop_initialized_field): Use it.
14069         (add_inner_class_fields): Use
14070         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14071         augmented. Install marker after last alias initializer, if any.
14072         (generate_finit): Fixed typo. Don't try to retain only the used
14073         fields.
14074         (method_header): Compute and set DECL_FUNCTION_NAP.
14075         (method_declarator): Fixed comment. Insert alias initializer in
14076         parameter list.
14077         (build_alias_initializer_parameter_list): Fixed leading
14078         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14079         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14080         (java_complete_expand_class): Code to retain only used aliases
14081         removed.
14082         (java_complete_expand_methods): New local `first_decl'. Generate
14083         $finit$ first, then expand the constructors, regular methods and
14084         <clinit>.
14085         (java_complete_expand_method): Don't report error on missing
14086         return statement if previously detected bogus.
14087         (fix_constructors): Don't patch constructor parameters list.
14088         (patch_method_invocation): Use new AIPL enum values. Reverse
14089         alias initializer list for anonymous classes.
14090
14091 2000-01-30  Anthony Green  <green@redhat.com>
14092
14093         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14094         determine how many stack slots to pop.
14095
14096 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14097
14098         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14099         error handling/recovery.
14100         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14101
14102 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14103
14104         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14105         FIELD_LOCAL_ALIAS_USED): New macros.
14106         (DECL_FUNCTION_NAP): New macro.
14107         (struct lang_decl): New field `nap'.
14108         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14109         (struct lang_type): New fields `finit_stmt_list' and
14110         `clinit_stmt_list'.
14111         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14112         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14113         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14114         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14115         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14116         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14117         (BUILD_THROW): Macro line separator re-indented.
14118         * parse.y (end_class_declaration): New function.
14119         (maybe_generate_pre_expand_clinit): New name for
14120         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14121         pre-expand static fields.
14122         (maybe_generate_clinit): Function deleted.
14123         (check_for_static_method_reference): Prototype's parameter list
14124         indented.
14125         (generate_finit): New name for maybe_generate_finit. Changed
14126         leading comment. Function rewritten to use
14127         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14128         (build_alias_initializer_parameter_list): New function.
14129         (java_parser_context_pop_initialized_field): Likewise.
14130         (add_inner_class_fields): Likewise.
14131         (type_declaration:): Call end_class_declaration.
14132         (class_member_declaration:): Likewise.
14133         (formal_parameter_list:): Fixed typos.
14134         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14135         element. Improved error handling.
14136         (block_statement:): Call end_class_declaration.
14137         (anonymous_class_creation:): Likewise.
14138         (create_anonymous_class): Fixed comments.
14139         (create_class): Call add_inner_class_fields.
14140         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14141         (method_header): Use MARK_FINAL_PARMS.
14142         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14143         (method_declarator): Propagate final argument flag.
14144         (craft_constructor): New local `artificial'. Call
14145         build_alias_initializer_parameter_list. Use
14146         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14147         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14148         necessary.
14149         (complete_expand_class): Get rid of unused outer context local
14150         alias fields.
14151         (java_complete_expand_methods): Fixed leading
14152         comment. Generate/pre-expand <clinit> first. Changed method
14153         expansion order to regular, $finit$, constructors, <clinit>.
14154         (java_complete_expand_method): Set current_function_decl.
14155         (fix_constructors): Fix constructor parameter list to account for
14156         outer context local alias initializers.
14157         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14158         (resolve_expression_name): Lookup outer context local aliases. New
14159         local `access', use it.
14160         (patch_method_invocation): Patch inner class ctor invocation with
14161         outer context local aliases initialization values. $finit$
14162         invocation patching now includes things generated with
14163         build_alias_initializer_parameter_list.
14164         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14165         (build_super_invocation): Likewise.
14166         (patch_assignment): Changed comment.
14167
14168 2000-01-27  Andrew Haley  <aph@cygnus.com>
14169
14170         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14171         (emit_if): Ditto.
14172         (emit_jsr): Ditto.
14173
14174 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14175
14176         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14177         concatenation.
14178         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14179
14180         * parse.y (register_fields): Don't pass a format specifier to
14181         OBSOLETE_MODIFIER_WARNING.
14182         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14183         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14184         specifier.
14185         (check_modifiers): Change function into a macro.
14186         (check_class_interface_creation): Pass a literal format string.
14187
14188 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14189
14190         * buffer.h: PROTO -> PARAMS.
14191         * check-init.c: Likewise.
14192         * class.c: Likewise.
14193         * constants.c: Likewise.
14194         * convert.h: Likewise.
14195         * decl.c: Likewise.
14196         * except.c: Likewise.
14197         * expr.c: Likewise.
14198         * gjavah.c: Likewise.
14199         * java-except.h: Likewise.
14200         * java-tree.h: Likewise.
14201         * jcf-depend.c: Likewise.
14202         * jcf-dump.c: Likewise.
14203         * jcf-parse.c: Likewise.
14204         * jcf-path.c: Likewise.
14205         * jcf-reader.c: Likewise.
14206         * jcf-write.c: Likewise.
14207         * jcf.h: Likewise.
14208         * jv-scan.c: Likewise.
14209         * jvgenmain.c: Likewise.
14210         * jvspec.c: Likewise.
14211         * lang.c: Likewise.
14212         * lex.c: Likewise.
14213         * lex.h: Likewise.
14214         * parse-scan.y: Likewise.
14215         * parse.h: Likewise.
14216         * parse.y: Likewise.
14217         * typeck.c: Likewise.
14218         * verify.c: Likewise.
14219         * xref.c: Likewise.
14220         * xref.h: Likewise.
14221         * zextract.c: Likewise.
14222         * zipfile.h: Likewise.
14223
14224 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14225
14226         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14227         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14228         * constants.c (build_constant_data_ref): Check for cached
14229         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14230         in TYPE_CPOOL_DATE_REF.
14231         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14232         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14233         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14234         (LOCAL_FINAL): New macro.
14235         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14236         constant pool -- don't try to reuse.
14237         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14238         TYPE_LANG_SPECIFIC.
14239         (find_in_current_zip): Use TYPE_JCF.
14240         * parse.h (java_check_final): Prototype removed.
14241         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14242         (maybe_create_class_interface_decl,
14243         check_class_interface_creation): Likewise.
14244         (java_expand_finals): Function removed.
14245         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14246         (block_statement:): Fixed comment.
14247         (anonymous_class_creation:): Likewise.
14248         (check_class_interface_creation): Reversed Jan 12, 2000 extra
14249         argument patch.
14250         (check_class_interface_creation): Loosened error report on (inner)
14251         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14252         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14253         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14254         argument patch.
14255         (create_interface): Likewise.
14256         (anonymous_class_counter): New static global.
14257         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14258         patch. Fixed comments.
14259         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14260         anonymous_class_counter when declaring a toplevel class.
14261         (craft_constructor): Fixed constructor name when handling
14262         anonymous classes. Anonymous class constructors to feature hidden
14263         this$<n> parameter.
14264         (java_fix_constructors): Added comment.
14265         (java_check_final): Function removed.
14266         (java_complete_expand_methods): Fixed comment. Don't generate
14267         class data, save its outgoing constant pool instead.
14268         (verify_constructor_super): Skip anonymous class constructor
14269         hidden this$<n> parameter.
14270         (java_expand_classes): New local `saved_ctxp'. Removed call to
14271         java_expand_finals and java_check_final. Expand anonymous class
14272         constructors. Generate class data.
14273         (build_super_invocation): Skip anonymous class hidden this$<n>
14274         parameter.
14275         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14276         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14277         (set_java_signature): Likewise.
14278
14279 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14280
14281         * gjavah.c: Delete ACC_VISIBILITY define.
14282         * jcf.h: Add ACC_VISIBILITY define.
14283         * parse.y: final: rule tagged <value>.
14284         (java_check_regular_methods): Use ACC_VISIBILITY define for
14285         default package access check.
14286         (local_variable_declaration_statement): Use final: rule.
14287
14288 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14289
14290         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14291         (final:): New rule.
14292
14293 2000-01-17  Tom Tromey  <tromey@cygnus.com>
14294
14295         * gjavah.c (print_field_info): Allow non-static final fields.
14296
14297 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14298
14299         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14300         * parse.y (patch_anonymous_class): New function.
14301         (create_anonymous_class): Register incomplete type when the
14302         class/interface to extends/implement isn't known yet.
14303         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14304         (verify_constructor_super): Tuned error message.
14305
14306 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14307
14308         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14309         (ANONYMOUS_CLASS_P): New macro.
14310         (TYPE_SIGNATURE, TYPE_JCF): New macros.
14311         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14312         * parse.y (create_class): Added leading argument.
14313         (maybe_create_class_interface_decl,
14314         check_class_interface_creation): Likewise.
14315         (craft_constructor): New function.
14316         (verify_constructor_super): Added argument in prototype.
14317         (class_declaration:): Inserted leading argument.
14318         (for_begin:): Use FOR_LOOP_P.
14319         (anonymous_class_creation): Create WFL of the anonymous class to
14320         instantiate. Call build_new_invocation. Added comments.
14321         (check_class_interface_creation): Handle parameter `anonymous' in
14322         verbose mode class creation announce.
14323         (link_nested_class_to_enclosing): Exclude anonymous classes.
14324         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14325         anonymous class, even though they appear to have an enclosing
14326         context.
14327         (create_interface): Pass extra argument to
14328         check_class_interface_creation.
14329         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14330         (create_class): Call check_class_interface_creation and
14331         maybe_create_class_interface_decl with extra new argument. Don't
14332         add private this$<n> to anonymous classes.
14333         (method_declarator): Insert hidden this$<n> to anonymous class
14334         constructors.
14335         (java_fix_constructors): Deleted code creating default
14336         constructor. Call craft_constructor instead.
14337         (java_check_regular_methods): Set `saw_constructor' to 1 for
14338         anonymous classes.
14339         (fix_constructors): Pass extra argument to verify_constructor_super.
14340         (verify_constructor_super): New local `sdecl', use it. Search for
14341         matching constructor (possibly featuring arguments) in super
14342         class.
14343         (lookup_method_invoke): Craft constructor according to arguments
14344         list when dealing with anonymous class constructors.
14345         (build_super_invocation): Pass arguments to anonymous class super
14346         constructors.
14347         (search_loop): Use FOR_LOOP_P.
14348         (labeled_block_contains_loop_p): Likewise.
14349
14350 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14351
14352         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14353         (enclosing_context_p): New function.
14354         (get_access_flags_from_decl): Handle CLASS_STATIC.
14355         (maybe_layout_super_class): Extra first argument passed to
14356         do_resolve_class.
14357         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14358         ID_INIT_P.
14359         * decl.c (access0_identifier_node): New global.
14360         (init_decl_processing): access0_identifier_node initialized.
14361         (pushdecl): Set DECL_CONTEXT only on non type decls.
14362         * expr.c (lookup_field): Lookup inner class fields in enclosing
14363         contexts.
14364         (expand_invoke): Use ID_INIT_P.
14365         (expand_java_field_op): Use DECL_CLINIT_P.
14366         * java-tree.def (CLASS_LITERAL): New tree code.
14367         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14368         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14369         (struct lang_decl): New field `inner_access'.
14370         (enclosing_context_p): Prototyped.
14371         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14372         ID_CLINIT_P): New macros.
14373         (CLASS_STATIC): New macro.
14374         (CLASS_ACCESS0_GENERATED_P): New macro.
14375         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14376         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14377         INNER_CLASS_P): New macros.
14378         (DECL_INNER_CLASS_LIST): New macro.
14379         * jcf-parse.c (yyparse): Avoid the use of ANSI string
14380         concatenation.
14381         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14382         the shift value to int. Fixed typo in comment.
14383         * lex.c (inst_id, wpv_id): Initialize.
14384         * mangle.c (unicode_mangling_length): Take `$' into account.
14385         * parse.h (DRECOVER, RECOVER): Terminate properly.
14386         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14387         (typedef struct _jdep): New field `enclosing'.
14388         (JDEP_ENCLOSING): New macro.
14389         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14390         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14391         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14392         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14393         GET_ENCLOSING_CPC_CONTEXT): New macros.
14394         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14395         (do_resolve_class): Added extra argument in prototype.
14396         * parse.y (resolve_class): Added extra argument in prototype.
14397         (maybe_create_class_interface_decl): Likewise.
14398         (maybe_use_access_method, build_wfl_wrap): New functions.
14399         (java_complete_expand_classes, java_complete_expand_class):
14400         Likewise.
14401         (java_parser_context_push_initialized_field,
14402         java_parser_context_suspend, java_parser_context_resume):
14403         Likewise.
14404         (maybe_make_nested_class_name, make_nested_class_name,
14405         set_nested_class_simple_name_value,
14406         link_nested_class_to_enclosing, find_as_inner_class,
14407         find_as_inner_class_do, check_inner_class_redefinition,
14408         build_thisn_assign, build_current_thisn, build_access_to_thisn,
14409         maybe_build_thisn_access_method, build_outer_field_access,
14410         build_outer_field_access_methods, build_outer_field_access_expr,
14411         build_outer_method_access_method, build_new_access_id,
14412         build_outer_field_access_method, outer_field_access_p,
14413         outer_field_expanded_access_p, outer_field_access_fix,
14414         build_incomplete_class_ref, patch_incomplete_class_ref,
14415         create_anonymous_class): Likewise.
14416         (inst_id, wpv_id): New static global variables.
14417         (synchronized:): New rule, tagged <node>.
14418         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14419         rules.
14420         (anonymous_class_creation:): New rule, tagged <node>.
14421         (NEW_TK): Tagged <node>.
14422         (type_literals, array_type_literal): New rules, tagged <node>.
14423         (class_declaration:): Removed action when reducing by class_body:
14424         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14425         using GET_CPC in sub-rules.
14426         (class_member_declaration): Handle inner classes.
14427         (method_declaration): When reducing method_header:, reset
14428         current_function_decl when appropriate.
14429         (method_declarator:): Set the number of formal parameter to 0 for
14430         method declared without arguments.
14431         (constructor_declarator:): Likewise.
14432         (static_initializer:): List of elements kept in a list.
14433         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14434         use of the keyword `static' for type declarations.
14435         (block_statement:): Handle inner class declarations.
14436         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14437         type qualified `this'.
14438         (class_instance_creation_expression): Use anonymous_class_creation:
14439         to handle inner class instances creation. Handle qualified `new'.
14440         (something_dot_new): Added appropriate actions.
14441         (create_new_parser_context): New function.
14442         (java_push_parser_context, java_parser_context_save_global,
14443         java_parser_context_suspend): Use create_new_parser_context.
14444         (check_modifiers): Changed leading comment.
14445         (check_class_interface_creation): Handle interclasses.
14446         (add_superinterfaces): Fixed comment.
14447         (create_interface): Build qualified name from the raw_name instead
14448         of its matching WFL. Push the initialized fields list. raw_name added
14449         as an extra argument to maybe_create_class_interface_decl.
14450         (create_class): Build qualified name from the raw_name instead of
14451         its matching WFL. Removed assignment to current_parsed_class_un.
14452         Call PUSH_ERROR before returning an error. Suspend the current
14453         parser context when processing an inner class. Push the
14454         initialized fields list. raw_name added as an extra argument to
14455         maybe_create_class_interface_decl. Add the private this$<n>
14456         field.
14457         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14458         (register_fields): Get the class type from GET_CPC and handle
14459         previous errors.  Added code to handle the creation of static
14460         fields in inner classes. Initialized fields initialization
14461         statements kept in a list of lists.
14462         (maybe_generate_finit): Initialized fields initialization
14463         statements kept in a list of lists. Use GET_CPC.
14464         (maybe_generate_clinit): Likewise.
14465         (method_header): Use GET_CPC and GET_CPC_UN.
14466         (parser_qualified_classname): Handle inner classes.
14467         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14468         (java_fix_constructors): Hide pointer to enclosing context
14469         instance in constructor list when dealing with inner classes.
14470         (jdep_resolve_class): Call resolve_class with extra first argument
14471         JDEP_ENCLOSING.
14472         (resolve_class): Add enclosing context as a first extra argument
14473         to do_resolve_class.
14474         (do_resolve_class): Call find_as_inner_class. Handle WFLs
14475         properly.
14476         (resolve_no_layout): Extra argument added to resolve_class
14477         invocation.
14478         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14479         (java_get_real_method_name): Use GET_CPC_UN.
14480         (check_abstract_method_definitions): Use DECL_CLINIT_P.
14481         (java_check_abstract_methods): Handle static method declared in
14482         inner classes by an error.
14483         (java_check_regular_methods): Use DECL_CLINIT_P.
14484         (source_start_java_method): Also set DECL_MAX_LOCALS.
14485         (create_artificial_method): Call java_parser_context_save_global
14486         and java_parser_context_restore_global instead of saving/restoring
14487         the context by hand.
14488         (expand_start_java_method): Improved verbose mode message.
14489         (java_complete_expand_methods): Fixed leading comment. Use
14490         DECL_CLINIT_P.
14491         (fix_constructors): Added assignment to this$<n> if necessary.
14492         (java_expand_classes): Call java_complete_expand_classes instead
14493         of java_complete_expand_methods.
14494         (make_qualified_primary): Simplified.
14495         (merge_qualified_name): Optimized for missing left or right parts.
14496         (resolve_expression_name): Handle access to outer class fields from
14497         interclasses.
14498         (resolve_qualified_expression_name): New macro
14499         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14500         classes. Report error on non appropriate qualification of
14501         `new'. Handle qualified `this'.
14502         (not_accessible_p): Allow access to outer class private fields from
14503         inner classes.
14504         (patch_method_invocation): Handle method invocations through
14505         access methods and inner class constructor invocations.
14506         (find_applicable_accessible_methods_list): Search enclosing
14507         contexts of an inner class.
14508         (search_applicable_methods_list): Fixed typo.
14509         (argument_types_convertible): Handle inner class constructors'
14510         hidden outer context reference argument.
14511         (qualify_ambiguous_name): Handle qualified `this'.
14512         (java_complete_lhs): Handle use of field accessed through
14513         artificial access methods in various cases of assignments. Handle
14514         CLASS_LITERAL node.
14515         (check_final_assignment): Use DECL_CLINIT_P.
14516         (valid_ref_assignconv_cast_p): Handle the destination being an
14517         enclosing context of the source.
14518         (patch_unaryop): Handle use of field accessed through artificial
14519         access methods.
14520         (patch_return): Use DECL_CLINIT_P.
14521         (patch_throw_statement): Use DECL_CLINIT_P.
14522         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14523         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14524         ID_INIT_P.
14525
14526 2000-01-16  Anthony Green  <green@cygnus.com>
14527
14528         * parse.y (build_string_concatenation): Only use
14529         StringBuffer(String) shortcut if String arg is constant.
14530
14531 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14532
14533         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14534         the shift value to int. Fixed typo in comment.
14535
14536 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
14537
14538         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14539         * jcf-write.c: Likewise.
14540         * parse.y: Likewise.
14541         * parse.c: Regenerate.
14542
14543 2000-01-09  Anthony Green  <green@cygnus.com>
14544
14545         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14546         bytecodes in the correct order.
14547
14548 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14549
14550         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14551
14552 2000-01-06  Anthony Green  <green@cygnus.com>
14553
14554         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14555         before building constant array decl.
14556
14557 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14558
14559         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14560         method invocation and typo in conditional expression.
14561         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14562         the appropriate NOTE_POP.
14563         * parse.y (patch_binop): Shift value mask to feature the right
14564         type.
14565
14566 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14567
14568         * class.c (assume_compiled, assume_compiled_node): Add static
14569         prototype.
14570         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14571
14572         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14573
14574         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14575
14576         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14577         to `__modifier' to avoid stringifying it.
14578
14579         * parse.y (verify_constructor_circularity): Don't call a variadic
14580         function with a non-literal format string.
14581         (java_check_abstract_methods): Move unreachable code inside
14582         `continue' statement.
14583         (lookup_method_invoke): Call xstrdup, not strdup.
14584
14585         * expr.c (expand_java_field_op): Avoid the use of ANSI string
14586         concatenation.
14587
14588         * jcf-parse.c (yyparse): Likewise.
14589
14590         * jv-scan.c (main): Likewise.
14591
14592 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14593
14594         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14595         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14596         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14597         concatenation.
14598
14599         * parse.y (synchronized, variable_redefinition_error,
14600         check_class_interface_creation, create_interface, create_class,
14601         method_header, finish_method_declaration,
14602         check_modifiers_consistency, method_declarator,
14603         complete_class_report_errors, check_abstract_method_definitions,
14604         java_check_regular_methods, check_throws_clauses,
14605         java_check_abstract_methods, read_import_dir,
14606         check_pkg_class_access, declare_local_variables, fix_constructors,
14607         cut_identifier_in_qualified, resolve_expression_name,
14608         resolve_qualified_expression_name, patch_method_invocation,
14609         java_complete_lhs, patch_assignment, try_builtin_assignconv,
14610         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14611         patch_exit_expr, patch_exit_expr, patch_switch_statement,
14612         patch_try_statement, patch_synchronized_statement,
14613         patch_throw_statement, check_thrown_exceptions,
14614         patch_conditional_expr): Likewise.
14615
14616 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14617
14618         * Makefile.in (LIBDEPS): Added gcc's errors.o
14619         (../jcf-dump$(exeext):): Link with gcc's errors.o
14620         (../gcjh$(exeext):): Likewise.
14621         * expr.c (expand_java_NEW): Layout the entire target type instead of
14622         laying out its methods only.
14623         (lookup_field): Layout the class after having loaded it.
14624         * java-tree.h (java_debug_context): Declared.
14625         * jcf-io.c (toplev.h): Included.
14626         (find_class): Removed assignment to jcf's outofsynch
14627         field. Force source file to be read if newer than its matching
14628         class file. Tweaked debug messages.
14629         * jcf-parse.c (jcf_out_of_synch): Deleted.
14630         (read_class): Call to jcf_out_of_synch removed.
14631         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14632         (jcf_out_of_synch): Prototype deleted.
14633         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14634         `deprecated' and `class_err': integer turned into bit-fields.
14635         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14636         * parse.y (package_list): New global.
14637         (package_declaration:): Record newly parsed package name.
14638         (extra_ctxp_pushed_p): Static global deleted.
14639         (java_parser_context_save_global): Create buffer context for the
14640         purpose of saving globals, if necessary.
14641         (java_parser_context_restore_global): Pop context pushed for the
14642         purpose of saving globals, if necessary.
14643         (java_debug_context_do): New prototype and function.
14644         (java_debug_context): Likewise.
14645         (do_resolve_class): Use already parsed package names to qualify
14646         and lookup class candidate.
14647         (java_pre_expand_clinit): Removed unnecessary local variable.
14648
14649 1999-12-17  Tom Tromey  <tromey@cygnus.com>
14650
14651         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
14652         fixes PR gcj/119.
14653         (process_file): Use `\n\' at end of each line in string.
14654
14655 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14656
14657         * expr.c (expand_invoke): Layout the loaded class before
14658         attempting to use it.
14659         (expand_java_field_op): Allow final field assignments to take
14660         place in $finit$.
14661         * typeck.c (convert): Return error_mark_node if expr is null.
14662
14663 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14664
14665         * class.c (class_depth): Return -1 if the class doesn't load
14666         properly.
14667         * expr.c (can_widen_reference_to): Check for errors during depth
14668         computation and return 0 accordingly.
14669         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14670         create default constructors and add an other error check.
14671         * parse.h (java_fix_constructors): Prototyped.
14672         * parse.y (java_pre_expand_clinit): Likewise.
14673         (build_super_invocation): Re-prototyped to feature one argument.
14674         (java_check_circular_reference): Directly use `current'.
14675         (java_fix_constructors): New function.
14676         (java_check_regular_methods): Don't create default constructors
14677         here, but abort if none were found.
14678         (java_complete_expand_methods): Pre-process <clinit> calling
14679         java_pre_expand_clinit.
14680         (java_pre_expand_clinit): New function.
14681         (fix_constructors): build_super_invocation invoked with the
14682         current method declaration as an argument.
14683         (build_super_invocation): Use the context of the processed method
14684         decl argument instead of current_class.
14685         * typeck.c (lookup_java_method): Take WFLs in method names into
14686         account.
14687
14688 1999-12-14  Per Bothner  <per@bothner.com>
14689
14690         * class.c (make_class_data): flag_keep_inline_functions to keep
14691         private methods in the method array.
14692
14693 1999-12-15  Anthony Green  <green@cygnus.com>
14694
14695         * check-init.c (check_init): Take into account both types of
14696         `throw's when checking for uninitialized variables.
14697
14698 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14699
14700         * parse.y (java_complete_lhs): Force conversion of array
14701         dimensions to int_type_node, that's what runtime's ABI expects.
14702
14703 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14704
14705         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14706         operand of a WFL, until the Java front-end gets fixed with regard
14707         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14708
14709 1999-12-10  Andrew Haley  <aph@cygnus.com>
14710
14711         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14712         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14713         expr.c (build_java_athrow): Add support for sjlj-exceptions.
14714         java-tree.h: Ditto.
14715         jcf-write.c: Ditto.
14716
14717 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14718
14719         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14720         before calling expand_eh_region_start and expand_start_all_catch.
14721         * except.c (expand_start_java_handler): Switch to permanent
14722         obstack before calling expand_eh_region_start.
14723         (expand_end_java_handler): Switch to permanent obstack before
14724         calling expand_start_all_catch.
14725
14726 1999-12-5  Anthony Green  <green@cygnus.com>
14727
14728         * decl.c (init_decl_processing): Mark throw_node as a noreturn
14729         function with side effects.
14730         (init_decl_processing): Mark all memory allocating DECLs with
14731         DECL_IS_MALLOC.
14732
14733 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14734
14735         * except.c (expand_end_java_handler): Call
14736         expand_resume_after_catch and end_catch_handler.
14737
14738 1999-11-30  Anthony Green  <green@cygnus.com>
14739
14740         * verify.c (verify_jvm_instructions): Create new return label
14741         chain if non existent (don't rely on the verified state of the jsr
14742         target.)
14743
14744 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14745
14746         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14747         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14748
14749         * parse.y (patch_assignment): Removed bogus final class test on
14750         lhs when checking on whether to emit an ArrayStoreException runtime
14751         check.
14752         * expr.c (expand_java_arraystore): Likewise.
14753
14754 1999-11-28 Anthony Green <green@cygnus.com>
14755
14756         * decl.c (find_local_variable): Reuse single slot decls when
14757           appropriate.
14758
14759 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14760
14761         * jcf-parse.c (saw_java_source): Global variable removed.
14762         (read_class): Don't use `saw_java_source'. Added extra braces.
14763         (yyparse): Code setting `saw_java_source' removed.
14764
14765 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
14766
14767         * except.c (emit_handlers): Zero catch_clauses after emitting them.
14768
14769 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14770
14771         * verify.c (merge_type_state): Non verified subroutines being
14772         considered more than once to trigger passive type merge.
14773
14774 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14775
14776         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14777         in case of error. Error message tuned.
14778
14779 1999-11-21  Anthony Green  <green@cygnus.com>
14780
14781         * constants.c (find_methodref_index): Unwrap method names before
14782         inserting them in the constant pool.
14783
14784         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14785
14786         * class.c (assume_compiled_node): New typedef.
14787         (assume_compiled_tree): New static data.
14788         (find_assume_compiled_node): New function.
14789         (add_assume_compiled): New function.
14790         (assume_compiled): New function.
14791         * class.c (make_class_data): Use assume_compiled.
14792         (is_compiled_class): Use assume_compiled.
14793
14794         * java-tree.h (add_assume_compiled): Declare.
14795
14796         * lang.c (lang_decode_option): Parse new options.
14797
14798 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14799
14800         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14801         int_type_node: that's what `_Jv_AllocObject' expects.
14802
14803 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14804
14805         * parse.y (lookup_method_invoke): Use lang_printable_name to
14806         reliably build the type name during error report. Fixes PR gcj/97.
14807
14808 1999-11-09  Tom Tromey  <tromey@cygnus.com>
14809
14810         * jcf-path.c: Include <sys/stat.h>.
14811         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
14812         (DIR_UP): New macro.
14813
14814 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14815
14816         * parse.y (source_end_java_method): Resume permanent allocation,
14817         reversing Apr 27 1998 patch.
14818         (patch_string_cst): Pop obstacks after having pushed the permanent
14819         ones.
14820
14821 1999-11-05  Tom Tromey  <tromey@cygnus.com>
14822
14823         * class.c (finish_class): Emit inlined methods if any native
14824         methods exist in the class.  Fixes PR gcj/85.
14825
14826 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14827
14828         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14829         (qualify_ambiguous_name): Likewise.
14830
14831 1999-11-03  Godmar Back <gback@cs.utah.edu>
14832
14833         * typeck.c: (lookup_java_method):  search all inherited
14834         interfaces when looking up interface method.
14835
14836 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14837
14838         * parse.y (method_header:): Issue error message for rule `type
14839         error'.
14840         (synchronized:): Error report when not using synchronized.
14841
14842 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14843
14844         * parse.y (resolve_qualified_expression_name): Prevent `this' from
14845         being used before the superclass constructor has been called.
14846         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14847         instead of `CALL_THIS_CONSTRUCTOR_P'.
14848
14849 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14850
14851         * check-init.c: Fix typo in comment.
14852
14853 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14854
14855         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14856         and final method.
14857
14858 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14859
14860         * parse.y (expression_statement:): Call function to report
14861         improper invocation of a constructor.
14862         (parse_ctor_invocation_error): New function.
14863
14864 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14865
14866         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14867         remember_end_note.
14868
14869 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14870
14871         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14872         in generated `main'.
14873
14874 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14875
14876         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14877         (qualify_ambiguous_name): Likewise.
14878
14879 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14880
14881         * parse.y (java_complete_tree): fold_constant_for_init to work on
14882         permanent_obstack.
14883         (java_complete_lhs): Likewise.
14884         (array_constructor_check_entry): Complete an initializer element
14885         on permanent_obstack.
14886
14887 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14888
14889         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14890         From Mike Moreton <mike@pillim.demon.co.uk>.
14891
14892 1999-10-15  Greg McGary  <gkm@gnu.org>
14893
14894         * java-tree.h (flag_bounds_check): Remove extern decl.
14895         * lang.c (flag_bounds_check): Remove global variable.
14896         (lang_f_options): Remove "bounds-check" entry.
14897         (lang_init_options): Default flag_bounds_check to "on".
14898
14899 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14900
14901         * jvgenmain.c (usage): New function.
14902         (main): Use it.  Also, handle `-D' options.
14903         * jvspec.c (lang_specific_driver): Recognize -D.
14904         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14905
14906         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14907
14908 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14909
14910         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14911         variadic function with a non-literal format string.
14912
14913         * parse-scan.y (report_main_declaration): Likewise.
14914
14915         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14916
14917         * parse.y (read_import_dir, patch_assignment, patch_binop,
14918         patch_array_ref): Likewise.
14919
14920         * typeck.c (build_java_array_type): Likewise.
14921
14922         * verify.c (verify_jvm_instructions): Likewise.
14923
14924 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14925
14926         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14927
14928 1999-10-07  Anthony Green  <green@cygnus.com>
14929
14930         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14931         where CHECK_PUT may fail for valid reasons.
14932
14933         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14934         UNSAFE_PUTN): New macros.
14935
14936 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14937
14938         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14939         well.  Fixes Java PR gcj/59.
14940         * parse-scan.y (yyerror): Report errors.
14941
14942 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14943
14944         * decl.c (insert_block): Remove unconditional `abort'.
14945
14946 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14947
14948         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14949         FUNCTION_CODE now of type int.  All callers changed.
14950         Set the builtin's DECL_BUILT_IN_CLASS.
14951
14952 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14953
14954         * jvspec.c (lang_specific_driver): Don't read spec file if
14955         -fsyntax-only given.
14956
14957 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14958
14959         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14960
14961         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14962         (WORDS_TO_LONG): Likewise.
14963         (WORDS_TO_DOUBLE): Likewise.
14964
14965 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14966
14967         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14968         (RELOCATION_VALUE_1): Likewise.
14969         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14970         push_in_const, push_long_const): Prototyped.
14971         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14972         (push_constant2): Likewise.
14973         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14974         (find_constant_wide): Cast find_constant2's integer arguments to
14975         `jword'.
14976         (find_constant_index): Cast find_constant2's and find_constant2's
14977         integer arguments to `jword'.
14978         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14979         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14980         (emit_if): Use RELOCATION_VALUE_1.
14981         (emit_goto): Likewise.
14982         (emit_jsr): Likewise.
14983         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14984         argument to push_long_const to HOST_WIDE_INT.
14985
14986 1999-09-15  Andreas Schwab  <schwab@suse.de>
14987
14988         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
14989
14990 1999-09-20  Nick Clifton  <nickc@cygnus.com>
14991
14992         * lang.c (lang_decode_option): Extend comment.
14993
14994 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14995
14996         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
14997         instead of fndecl.
14998
14999 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15000
15001         * gjavah.c (get_field_name, print_method_info, print_include,
15002         add_namelet): Use xmalloc, not malloc.
15003
15004         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15005         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15006         NULL pointer.
15007
15008         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15009
15010         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15011
15012         * jcf-path.c (add_entry): Likewise.
15013
15014         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15015
15016         * jv-scan.c (xmalloc): Remove definition.
15017
15018         * jvgenmain.c (xmalloc): Likewise.
15019
15020         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15021
15022         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15023
15024         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15025         concat, not xmalloc/sprintf.
15026         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15027         (xstrdup): Remove definition.
15028
15029         * parse.y (duplicate_declaration_error_p,
15030         constructor_circularity_msg, verify_constructor_circularity,
15031         check_abstract_method_definitions, java_check_regular_methods,
15032         java_check_abstract_methods, patch_method_invocation,
15033         check_for_static_method_reference, patch_assignment, patch_binop,
15034         patch_cast, array_constructor_check_entry, patch_return,
15035         patch_conditional_expr): Use xstrdup, not strdup.
15036
15037         * zextract.c (ALLOC): Use xmalloc, not malloc.
15038
15039 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15040
15041         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15042
15043         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15044         (do_spec, lang_specific_pre_link, lang_specific_driver,
15045         input_filename, input_filename_length): Don't declare.
15046         (main_class_name, jvgenmain_spec, lang_specific_driver):
15047         Constify a char*.
15048         (lang_specific_driver): All calls to the function pointer
15049         parameter now explicitly call `fatal'.
15050
15051 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15052
15053         * parse.y (find_applicable_accessible_methods_list): Search
15054         abstract classes as interfaces.
15055
15056 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15057
15058         * class.c (finish_class): We're now outside a valid method
15059         declaration. Tell the rest of gcc so.
15060
15061 1999-09-08  Bruce Korb  autogen@linuxbox.com
15062
15063         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15064
15065 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15066
15067         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15068         java-array.h.
15069         (decode_signature_piece): Don't emit "::" in JArray<>.
15070         (print_namelet): Only print trailing `;' when printing a class.
15071
15072 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15073
15074         * java-tree.h: Delete declarations for all tree nodes now moved to
15075         global_trees.
15076         * decl.c: Delete their definitions.
15077
15078 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15079
15080         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15081         * Makefile.in (OBJS): Add ggc-callbacks.o.
15082         (OBJDEPS): Likewise.
15083
15084 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15085
15086         * parse.y (strip_out_static_field_access_decl): Return operand if
15087         it satisfies JDECL_P.
15088
15089 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15090
15091         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15092         Handle nested arrays, like `[[I'.
15093
15094 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15095
15096         * class.c (finish_class): Remove unused parameter, all callers
15097         changed.
15098
15099         * expr.c (build_java_athrow): Change return type to void.
15100         (java_lang_expand_expr): Make sure each case in switch returns a
15101         value.
15102
15103         * java-tree.h (finish_class): Fix prototype to take void args.
15104
15105         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15106         (main): Issue return from main, not exit.
15107
15108         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15109
15110         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15111
15112         * jv-scan.c (main): Issue return from main, not exit.
15113
15114         * parse.y (check_abstract_method_definitions,
15115         java_check_abstract_method_definitions): Add static prototypes.
15116         (java_complete_expand_methods): Fix call to `finish_class'.
15117
15118         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15119         and `prevpc'.
15120
15121 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15122
15123         * lang.c (language_string): Constify.
15124
15125 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15126
15127         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15128         Remove hacks for stuff which comes from libiberty.
15129
15130         * Make-lang.in: Likewise.
15131
15132 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
15133
15134         * Makefile.in (xref.o): Depend on xref.c explicitly.
15135
15136 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15137
15138         * java-tree.h (lang_printable_name): Constify a char*.
15139
15140         * lang.c (lang_printable_name): Likewise.
15141
15142 1999-08-27  Jeffrey A Law  (law@cygnus.com)
15143
15144         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15145         comments in C code.
15146
15147 1999-08-26  Tom Tromey  <tromey@cygnus.com>
15148
15149         * gjavah.c (print_cxx_classname): Print "::" before qualified
15150         name.
15151
15152 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15153
15154         * parse.y (lookup_cl): Changed leading comment. Now does its best
15155         to set the column number.
15156         (qualify_ambiguous_name): Take WFL wrappers into account.
15157
15158 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
15159
15160         * verify.c (verify_jvm_instructions): Don't check instruction
15161         validity beyond end of method.
15162
15163 1999-08-25  Tom Tromey  <tromey@cygnus.com>
15164
15165         * jvspec.c (lang_specific_driver): Correctly handle --help again.
15166
15167 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15168
15169         * gjavah.c (print_name, print_base_classname, utf8_cmp,
15170         cxx_keyword_subst, generate_access, name_is_method_p,
15171         get_field_name, print_field_name, super_class_name, print_include,
15172         decode_signature_piece, print_class_decls, usage, help,
15173         java_no_argument, version, add_namelet, print_namelet): Add static
15174         prototype.
15175         (print_base_classname, utf8_cmp, cxx_keyword_subst,
15176         name_is_method_p): Constify a char*.
15177         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
15178         Provide a final else clause in an if-else-if.
15179         (print_field_info): Add missing final arg in function call to
15180         `print_field_name'.
15181         (print_method_info, decompile_method, decode_signature_piece,
15182         print_c_decl, print_full_cxx_name, print_stub,
15183         print_mangled_classname, super_class_name, print_include,
15184         add_namelet, add_class_decl, print_class_decls, process_file,
15185         help): Constify a char*.
15186
15187         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15188         push_int_const, find_constant_wide, find_constant_index,
15189         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15190         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15191         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15192         emit_if, emit_goto, emit_jsr, call_cleanups,
15193         make_class_file_name): Add static prototypes.
15194         (generate_bytecode_return, generate_bytecode_insns): Pass a
15195         NULL_PTR, not a NULL_TREE.
15196
15197         * jv-scan.c: Include "jcf.h".
15198         (main): Declare using DEFUN macro.
15199
15200         * jvspec.c (find_spec_file, lang_specific_pre_link,
15201         lang_specific_driver): Add prototypes.
15202         (find_spec_file): Constify a char*.
15203
15204         * keyword.gperf (hash, java_keyword): Add prototypes.
15205
15206         * lang.c (lang_print_error): Add static prototype.
15207         (lang_init): Prefer memcpy over bcopy to avoid casts.
15208
15209         * lex.c (yylex): Add static prototype.
15210
15211         * parse-scan.y: Include "lex.c" earlier.
15212
15213         * parse.h: Remove redundant declaration for `yylex'.
15214
15215         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15216         labeled_block_contains_loop_p): Add static prototypes.
15217         (not_accessible_p): Make static to match prototype.
15218
15219         * verify.c (start_pc_cmp): Don't needlessly cast away const.
15220
15221 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15222
15223         * parse.y (check_method_redefinition): Changed leading comment.
15224         (check_abstract_method_definitions): New function.
15225         (java_check_abstract_method_definitions): New function.
15226         (java_check_regular_methods): Call it.
15227         (verify_constructor_super): Fixed indentation.
15228         (lookup_method_invoke): Likewise.
15229
15230 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15231
15232         * parse.y (method_header): Return a null pointer if the current
15233         class node is null.
15234         (finish_method_declaration): Return if the current function decl
15235         is null.
15236         (source_start_java_method): Likewise.
15237         (java_method_add_stmt): Likewise.
15238
15239 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15240
15241         * class.c (emit_register_class): Removed unnecessary call to
15242         start_sequence.
15243         * parse.y (labeled_block_contains_loop_p): Removed unused local
15244         variable.
15245
15246 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15247
15248         * parse.y (java_refold): Added prototype.
15249
15250 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15251
15252         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15253         (java_stabilize_reference): Removed unnecessary `else'.
15254         (java_complete_lhs): Set flag to remember boolean. Call
15255         java_refold. Added comments.
15256         (java_decl_equiv): New function.
15257         (binop_compound_p): Likewise.
15258         (java_refold): Likewise.
15259         (patch_unaryop): Striped static field access assigned to decl and
15260         op. Changed promotion scheme for ++/-- operators.
15261         (search_loop): New function.
15262         (labeled_block_contains_loop_p): Likewise.
15263         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15264         comment.
15265         (patch_bc_statement): Call search_loop. Fixed comment.
15266
15267 1999-08-14  Anthony Green  <green@cygnus.com>
15268
15269         * expr.c (java_lang_expand_expr): Mark static array data as
15270         referenced.
15271
15272 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
15273
15274         * jvgenmain.c (main): NUL-terminate name_obstack.
15275
15276 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15277
15278         * check-init.c (check_bool2_init, done_alternative): Add static
15279         prototypes.
15280
15281         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15282         (add_method, build_utf8_ref, build_class_ref,
15283         append_gpp_mangled_type, layout_class_method): Constify a char*.
15284
15285         * decl.c (push_promoted_type, make_binding_level): Add static
15286         prototypes.
15287         (push_promoted_type, pushdecl): Constify a char*.
15288
15289         * except.c (find_handler_in_range, link_handler,
15290         check_start_handlers): Add static prototypes.
15291
15292         * expr.c (process_jvm_instruction): Constify a char*.
15293
15294         * gjavah.c (main): Constify a char*.
15295
15296         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15297         Constify a char*.
15298
15299         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15300         static prototypes.
15301         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15302         munge, print_ents): Constify a char*.
15303
15304         * jcf-dump.c (disassemble_method): Constify a char*.
15305         (print_constant_pool, print_exception_table): Add static prototypes.
15306         (print_constant, print_exception_table, main, disassemble_method):
15307         Constify a char*.
15308
15309         * jcf-io.c (find_classfile, find_class): Likewise.
15310
15311         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15312         (set_source_filename, predefined_filename_p): Add static prototypes.
15313         (set_source_filename, get_constant, get_class_constant,
15314         find_in_current_zip): Constify a char*.
15315
15316         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15317         static prototypes.
15318         (add_entry, add_path, jcf_path_classpath_arg,
15319         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15320
15321         * jcf-reader.c (get_attribute, jcf_parse_preamble,
15322         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15323         jcf_parse_one_method, jcf_parse_methods,
15324         jcf_parse_final_attributes): Add static prototypes.
15325         (get_attribute): Constify a char*.
15326
15327         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15328         jcf_dependency_add_target, jcf_path_classpath_arg,
15329         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15330
15331         * jv-scan.c (main): Constify a char*.
15332         (gcc_obstack_init): Add prototype arguments.
15333
15334         * jvgenmain.c (gcc_obstack_init): Likewise.
15335         (main): Constify a char*.
15336
15337         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15338         static prototypes.
15339         (put_decl_string, lang_print_error): Constify a char*.
15340         (lang_init): Remove redundant extern prototype.
15341
15342         * mangle.c (emit_unicode_mangled_name): Constify a char*.
15343
15344         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15345         Add static prototypes.
15346         (get_type_from_signature): Constify a char*.
15347
15348         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15349         Add static prototypes.
15350         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15351         (verify_jvm_instructions): Constify a char*.
15352
15353         * xref.c (xref_flag_value): Likewise.
15354
15355         * xref.h (xref_flag_value): Likewise.
15356
15357         * zextract.c (makeword, makelong): Add static prototypes.
15358         (makeword, makelong): Constify a uch*.
15359
15360 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15361
15362         * lang.c (java_dummy_print): Constify a char*.
15363         (lang_print_error): Likewise.
15364         (lang_init): Remove redundant prototype for `print_error_function'.
15365         (lang_init_source): Likewise.
15366         (lang_identify): Constify a char*.
15367
15368 1999-08-09  Tom Tromey  <tromey@cygnus.com>
15369
15370         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15371         (WORDS_TO_LONG): Likewise.
15372         (WORDS_TO_DOUBLE): Likewise.
15373
15374 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15375
15376         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15377
15378         * expr.c (java_stack_pop, java_array_data_offset,
15379         build_java_throw_out_of_bounds_exception, case_identity,
15380         build_java_check_indexed_type): Add static prototypes.
15381         (linenumber_table, expand_invoke, expand_java_field_op,
15382         build_primtype_type_ref, expand_byte_code): Constify a char*.
15383
15384         * java-tree.h (build_primtype_type_ref, linenumber_table):
15385         Constify a char*.
15386         (java_lang_expand_expr): Add prototype.
15387
15388         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
15389         `java_lang_expand_expr'.
15390
15391         * lex.c (java_lex_error): Constify a char*.
15392         (java_get_unicode, java_read_char, java_allocate_new_line,
15393         java_unget_unicode, java_sneak_unicode): Prototype.
15394
15395         * parse-scan.y (current_class, package_name, method_declarator,
15396         report_class_declaration, yyerror): Constify a char*.
15397
15398         * parse.h (java_report_errors): Prototype.
15399         (yyerror): Constify a char*.
15400
15401         * parse.y (classitf_redefinition_error, check_modifiers,
15402         parse_jdk1_1_error, lookup_package_type,
15403         lookup_package_type_and_set_next, get_printable_method_name,
15404         purify_type_name): Constify a char*.
15405         (build_super_invocation, maybe_generate_finit,
15406         verify_constructor_super, parser_add_interface,
15407         add_superinterfaces, jdep_resolve_class, note_possible_classname,
15408         java_complete_expand_methods, java_expand_finals,
15409         cut_identifier_in_qualified, java_stabilize_reference,
15410         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15411         merge_string_cste): Prototype.
15412         (single_type_import_declaration, yyerror,
15413         variable_redefinition_error, build_array_from_name,
15414         build_unresolved_array_type, check_class_interface_creation,
15415         resolve_class, complete_class_report_errors,
15416         note_possible_classname, read_import_dir,
15417         find_in_imports_on_demand, resolve_package, fix_constructors,
15418         check_deprecation, lookup_method_invoke,
15419         maybe_build_primttype_type_ref, array_constructor_check_entry):
15420         Constify a char*.
15421         (java_complete_expand_methods, java_expand_finals): Make static.
15422         (convert_narrow): Remove static prototype.
15423
15424 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
15425
15426         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15427
15428 1999-08-02  Richard Henderson  <rth@cygnus.com>
15429
15430         * decl.c: Include defaults.h instead of expr.h.
15431         * parse.y: Likewise.
15432
15433 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
15434
15435         * java/decl.c (start_java_method): Change all uses of
15436         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15437         Ensure expr.h is included.
15438         * java/expr.c (pop_arguments): Ditto.
15439         * java/parse.y (expand_start_java_method): Ditto.
15440
15441 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15442
15443         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15444
15445 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
15446
15447         * decl.c: Include "function.h".
15448         * except.c: Likewise.
15449         * parse.y: Likewise.
15450         * Makefile.in: Update dependencies.
15451
15452 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15453
15454         * expr.c (build_java_soft_divmod): Provide a default case in switch.
15455         (java_lang_expand_expr): Mark parameters `target', `tmode' and
15456         `modifier' with ATTRIBUTE_UNUSED.
15457
15458         * gjavah.c (process_file): Add braces around ambiguous `else'.
15459
15460         * jcf-dump.c (print_access_flags, localvar_free): Change return
15461         type to void.
15462
15463         * parse.y (java_complete_expand_method): Initialize variable
15464         `exception_copy'.
15465         (resolve_qualified_expression_name): Likewise for `field_decl'.
15466         (patch_method_invocation): Likewise for `class_to_search'.
15467         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15468         (patch_assignment): Likewise for `lhs_type'.
15469
15470         * verify.c (verify_jvm_instructions): Remove unused variable
15471         `caller'.
15472
15473 1999-07-25  Richard Henderson  <rth@cygnus.com>
15474
15475         * decl.c (va_list_type_node): New.
15476
15477 1999-07-25  Anthony Green  <green@cygnus.com>
15478
15479         * gjavah.c (print_stub): New function.
15480         (METHOD_IS_NATIVE): New macro.
15481         (print_mangled_classname): Make static.
15482         (HANDLE_END_FIELD): Don't emit fields during stub generation.
15483         (process_file): Perform stub generation.
15484         (HANDLE_METHOD): Don't emit class decls during stub
15485         generation.
15486         (HANDLE_END_METHOD): Take into account stub generation.
15487         (print_method_info): Handle stub generation.
15488         (print_stub): New function.
15489         (print_cxx_classname): Make signature consistant with others.
15490         (help): Describe -stubs option.
15491         (main): Create stub file.
15492         (version): Use version.c.
15493         (print_full_cxx_name): New function.
15494         (print_c_decl): Use print_full_cxx_name.
15495
15496 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15497
15498         * check-init.c (check_init): Handle MAX_EXPR.
15499
15500 1999-07-15  Andrew Haley  <aph@cygnus.com>
15501
15502         * lang.c (flag_use_divide_subroutine): New variable.
15503         * typeck.c: (convert_ieee_real_to_integer): Bounds check
15504         fp-to-integer conversion.
15505         (convert): Call convert_ieee_real_to_integer when flag_fast_math
15506         is not set.
15507
15508         * expr.c (build_java_soft_divmod): New function.
15509         (build_java_binop): Call build_java_soft_divmod if
15510         flag_use_divide_subroutine is set.
15511         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15512         soft_lrem_node: new builtin functions.
15513         (init_decl_processing) Initialize the new builtins.
15514         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15515         soft_lrem_node: new builtin functions.
15516         (build_java_soft_divmod): New function.
15517         * parse.y: Call build_java_soft_divmod if
15518         flag_use_divide_subroutine is set.
15519         * parse.c: Rebuilt.
15520
15521         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15522         a --specs= arg) even if not linking.
15523         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15524         -fuse-divide-subroutine
15525
15526 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15527
15528         * parse.y (resolve_and_layout): Check methods only once.
15529         (resolve_qualified_expression_name): Verify thrown exceptions
15530         compatibility.
15531         (check_thrown_exceptions): Reject exceptions thrown in
15532         initializer. Error message tuned.
15533
15534 1999-07-14  Andrew Haley  <aph@cygnus.com>
15535
15536         * expr.c (expand_expr): Do not return the last statement in a
15537         block as the block's value.
15538
15539 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15540
15541         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15542         CALL_EXPR, to avoid order of evaluation changes.
15543
15544 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15545
15546         * parse.y (qualify_ambiguous_name): Do not use
15547         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15548
15549 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15550
15551         * check-init.c (check_init): Handle MAX_EXPR.
15552         * expr.c (force_evaluation_order): Force method call arguments to
15553         be evaluated in left-to-right order.
15554         * parse.y (qualify_ambiguous_name): Loop again to qualify
15555         NEW_ARRAY_EXPR properly.
15556
15557 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15558
15559         * parse.y (patch_invoke): Resolve unresolved invoked method
15560         returned type.
15561         (qualify_ambiguous_name): STRING_CST to qualify expression for
15562         type name resolution.
15563
15564 1999-06-24  Andrew Haley  <aph@cygnus.com>
15565
15566         * class.c (finish_class): Whenever a deferred method is
15567         output, rescan the list of methods to see if a new candidate for
15568         output can be found.
15569
15570 1999-06-28  Tom Tromey  <tromey@cygnus.com>
15571
15572         * jvspec.c (lang_specific_driver): Recognize --help.
15573
15574 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15575
15576         * parse.y (resolve_package): Fixed bogus return statement.
15577         (patch_method_invocation): Resolve method invocation beginning with
15578         a package name qualifier.
15579
15580 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15581
15582         * Make-lang.in (java.stage1): Depend on stage1-start.
15583         (java.stage2): Likewise for stage2-start.
15584         (java.stage3): Likewise for stage3-start.
15585         (java.stage4): Likewise for stage4-start.
15586
15587 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15588
15589         * parse.y (java_complete_lhs): When doing cross referencing, don't
15590         try to keep file location on a WFL expanded as a CALL_EXPR.
15591
15592 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15593
15594         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15595         compiling to class file a void method with an empty method body.
15596         As a side effect, the bytecode backend will generate the
15597         appropriate `return' instruction.
15598
15599 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15600
15601         * parse.y (lookup_package_type_and_set_next): New function prototype.
15602         (resolve_package): Search current and imported packages.
15603         (lookup_package_type_and_set_next): New function.
15604
15605 1999-06-22  Andrew Haley  <aph@cygnus.com>
15606
15607         * verify.c (verify_jvm_instructions): Check for pending blocks
15608         before invalid PC test and opcode switch, not after.
15609
15610 1999-06-21  Andrew Haley  <aph@cygnus.com>
15611
15612         * except.c (find_handler_in_range): The upper limit for exception
15613         ranges is exclusive, not inclusive: (start <= pc < end).
15614         (link_handler): find child pointer which points to outer by
15615         searching sibling list: previous code incorrectly assumed that
15616         outer->outer->first_child must point to outer.
15617         * verify.c (verify_jvm_instructions): FIXME added to code for
15618         `athrow'.
15619         (verify_jvm_instructions): Do not assume that the last block
15620         processed in a subroutine is a block which ends with a `ret'
15621         instruction.  With some control flows it is possible that the last
15622         block ends with an `athrow'.
15623
15624 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15625
15626         * parse.y (qualify_ambiguous_name): Reorganized the post
15627         evaluation of non WFL leading expression nodes.
15628
15629 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15630
15631         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15632         CONVERT_EXPR.
15633
15634 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15635
15636         * parse.y (qualify_ambiguous_name): Handle qualified expression
15637         beginning with a STRING_CST.
15638
15639 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15640
15641         * parse.y (register_fields): Set DECL_INITIAL on both
15642         pre-initialized static and public fields.
15643         (resolve_field_access): Static field access expressions to always
15644         use pointer types.
15645         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15646         qualification. CONVERT_EXPR to be resolved as an expression name.
15647         (java_complete_lhs): Identify and access qualified final
15648         initialized field in switch statement case expression.
15649         (fold_constant_for_init): Pre-initialized field decl constant to
15650         be folded.
15651
15652 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15653
15654         * parse.y (note_possible_classname): Mark returned node with
15655         QUALIFIED_P only if the original class name contained a '/'.
15656
15657 1999-06-05  Anthony Green  <green@cygnus.com>
15658
15659         * Make-lang.in (gcjh): More parallel build fixes.
15660
15661 1999-06-03  Mike Stump  <mrs@wrs.com>
15662
15663         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15664
15665 1999-06-02  Anthony Green  <green@cygnus.com>
15666
15667         * except.c (link_handler): Chain exception handlers in order.
15668
15669 1999-06-02  Anthony Green  <green@cygnus.com>
15670
15671         * expr.c (expand_byte_code): Fill unreachable bytecode regions
15672         with nops and process as usual in order to always set correct EH
15673         ranges.  Emit detailed warnings about unreachable bytecodes.
15674
15675 1999-06-02  Anthony Green  <green@cygnus.com>
15676
15677         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15678         constant.
15679
15680 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15681
15682         * parse.y (lookup_field_wrapper): Unified returned value to NULL
15683           or the searched field decl.
15684
15685 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15686
15687         * parse.y (fold_constant_for_init): Convert numerical constant
15688         values to the type of the assigned field.
15689
15690 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15691
15692         * expr.c (lookup_field): Relaxed the test on class loading error
15693         detection.
15694         * parse.y (fold_constant_for_init): Enabeled old code.
15695
15696 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15697
15698         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15699         decide the validity of the cast of a java.lang.Cloneable reference
15700         to an array.
15701         (patch_conditional_expr): Fixed first argument passed to
15702         binary_numeric_promotion.
15703
15704 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15705
15706         * parse.y (qualify_ambiguous_name): Take into account that a
15707         CONVERT_EXPR might specify a type as a WFL.
15708
15709 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15710
15711         * parse.y (patch_assignment): Save the rhs before using it as an
15712         argument to _Jv_CheckArrayStore.
15713
15714 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15715
15716         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15717
15718 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15719
15720         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15721         floating point literal only when the exponent indicator has been
15722         parsed.
15723
15724 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15725
15726         * parse.y (formal_parameter:): Construct argument tree list
15727         element even if a yet unsupported final parameter was encountered.
15728
15729 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15730
15731         * parse.y (finish_method_declaration): Issue errors for native or
15732         abstract methods declared with a method body, as well as for non
15733         native or non abstract methods with no method body.
15734
15735 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15736
15737         * class.c (build_utf8_ref): Initialize variable `field'.
15738
15739         * decl.c (init_decl_processing): Initialize variable `field'.
15740
15741         * expr.c (build_known_method_ref): Mark parameters `method_type',
15742         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15743         (process_jvm_instruction): Likewise for parameter `length'.
15744
15745         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15746         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15747         ATTRIBUTE_UNUSED.
15748
15749         * parse.y (maybe_generate_clinit): Remove unused variable
15750         `has_non_primitive_fields'.
15751         (find_in_imports_on_demand): Initialize variables `node_to_use'
15752         and `cl'.
15753         (patch_binop): Likewise for variable `prom_type'.
15754         (patch_unaryop): Likewise for variable `prom_type'.
15755
15756         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15757
15758         * xref.c (xref_table): Add missing initializer.
15759
15760 1999-05-14  Tom Tromey  <tromey@cygnus.com>
15761
15762         * java-except.h (struct eh_range): Removed unused `next' member.
15763         * verify.c (verify_jvm_instructions): Call check_nested_ranges
15764         after adding all exception handlers.  Sort exception ranges in
15765         order of start PC.
15766         (struct pc_index): New structure.
15767         (start_pc_cmp): New function.
15768         * except.c (add_handler): Return `void'.  Don't call link_handler;
15769         instead construct an ordinary linked list and do range
15770         coalescing.
15771         (check_nested_ranges): New function.
15772         (link_handler): Changed interface to allow merging of eh_ranges.
15773         Split overlapping ranges.  Return `void'.
15774
15775 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15776
15777         * parse.y (constructor_block_end:): New rule, tagged <node>.
15778         (constructor_body:): Use `constructor_block_end' instead of
15779         `block_end'.
15780
15781 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15782
15783         * parse.y (statement_nsi:): Pop `for' statement block.
15784         (java_complete_lhs): Labeled blocks containing no statement are
15785         marked as completing normally.
15786
15787 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15788
15789         * xref.c (xref_set_current_fp): New function, defined.
15790         * xref.h (xref_set_current_fp): New function, prototyped.
15791
15792 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15793
15794         * check-init.c (check_init): Take into account that
15795         LABELED_BLOCK_STMT can be empty.
15796
15797 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15798
15799         * parse.y (java_check_regular_methods): Warning check on not
15800         overriding methods with default access in other packages does not
15801         apply to `<clinit>'.
15802         (java_complete_lhs): If block body is an empty_stmt_node, replace
15803         it by NULL_TREE. This prevents gcc from generating an irrelevant
15804         warning.
15805
15806 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15807
15808         * check-init.c (check_init): Removed code accepting to see things
15809         falling through default:, when doing xrefs.
15810         * java-tree.h (do_not_fold): New global variable, declared.
15811         * parse.y (do_not_fold): New global variable, defined.
15812         (java_complete_expand_method): Set `do_not_fold' to the value of
15813         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15814         and reinstall them after them have been purged; do not check for
15815         initializations; do not issue missing return errors.
15816         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15817         when doing xrefs.
15818         (patch_binop): Skip the fold part when doing xrefs.
15819         (build_string_concatenation): Skip the concatenation part when
15820         doing xrefs.
15821         (patch_synchronized_statement): Do not generate a try-finally when
15822         doing xrefs.
15823         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15824         and keep the location where the throw was seen.
15825         * typeck.c (convert): When `do_not_fold' is set, do not attempt
15826         any treatment on the converted node an simply return a NOP_EXPR of
15827         the targeted type.
15828         * xref.c (xref_get_data): New function, defined.
15829         * xref.h (xref_get_data): New function, declared.
15830         (XREF_GET_DATA): Use xref_get_data.
15831
15832 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15833
15834         * gjavah.c (print_include): Cast the result of `strlen' to int
15835         when comparing against a signed value.
15836         (add_namelet): Likewise.
15837
15838 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15839
15840         * expr.c (expand_invoke): Mark parameter `nargs' with
15841         ATTRIBUTE_UNUSED.
15842         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15843
15844         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15845         ATTRIBUTE_UNUSED.
15846
15847         * jcf-reader.c (get_attribute): Cast a value to long
15848         when comparing against a signed expression.  Likewise.
15849
15850         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15851         HOST_BITS_PER_CHAR.
15852
15853 1999-05-11  Andrew Haley  <aph@cygnus.com>
15854
15855         * parse.y (source_end_java_method): If the current method contains
15856         any exception handlers, force asynchronous_exceptions: this is
15857         necessary because signal handlers in libjava may throw exceptions.
15858         * decl.c (end_java_method): Ditto.
15859
15860 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15861
15862         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15863         flags.
15864         * jvspec.c (THREAD_NAME): Removed.
15865         (GC_NAME): Likewise.
15866         (MATHLIB): Likewise.
15867         (WITHLIBC): Likewise.
15868         (GCLIB): Likewise.
15869         (THREADLIB): Likewise.
15870         (MATH_LIBRARY): Likewise.
15871         (lang_specific_driver): Don't add `-l' options to command line.
15872         Instead, add a single --specs option.  Recognize `-L' options and
15873         use them to search for spec file.
15874         (find_spec_file): New function.
15875         (SPEC_FILE): New define.
15876
15877 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15878
15879         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15880         cpplib-enabled build.
15881
15882 1999-05-05  Per Bothner  <bothner@cygnus.com>
15883
15884         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15885         temporarily zero it while calling rest_of_decl_compilation.
15886
15887         * java-tree.h (string_ptr_type_node):  Add declaration.
15888         * decl.c:  Define and initialize string_ptr_type_node.
15889         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15890
15891         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15892         * parse.y (for_statement):  Now unconditionally exit_block.
15893         (finish_labeled_statement):  No longer exit_block if for-loop.
15894         (patch_loop_statement):  Check harder if the loop is already labeled.
15895
15896         * parse.y (patch_initialized_static_field):  Removed function.
15897         (maybe_generate_clinit):  Removed special handling for interfaces.
15898         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15899         on <clinit> to determine if it can be removed.
15900         (java_complete_expand_method):  Remove special handling for <clinit>.
15901         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15902         optimize if we get back empty_stmt_node.
15903         For MODIFY_EXPR, re-do checking of static initializers.
15904         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15905         For VAR_DECL, pass correct context.
15906
15907         * verify.c (verify_jvm_instructions):  Better error messages.
15908
15909 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15910
15911         * parse-scan.y (interface_declaration): Call
15912         report_class_declaration for interfaces.
15913
15914 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15915
15916         * Makefile.in: Remove -v from bison command lines.
15917
15918 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15919
15920         * check-init.c (check_init): Exclude a case of error when doing
15921         xrefs.
15922         * class.c (layout_class_method): Don't generate the error message
15923         twice when compiling from source.
15924         * lang-options.h: Added `-Wredundant-modifers' and
15925         `-Wunusupported-jdk11' flags and help text.
15926         * lang.c (lang_decode_option): Added support for
15927         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15928         flag_static_local_jdk11 and flag_redundant set accordingly.
15929         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15930         * parse.h (EXPR_WFL_ADD_COL): New macro.
15931         (DECL_END_SOURCE_LINE): Likewise.
15932         (DECL_INHERITED_SOURCE_LINE): Likewise.
15933         * parse.y (static_ref_err): New function, prototyped.
15934         (CCB_TK): Now tagged <operator>.
15935         (class_body:): Remember the location of the closing '}' of a class
15936         definition when doing xrefs.
15937         (block:): Likewise.
15938         (block_end:): Likewise.
15939         (create_class): Remember the location of the inherited class
15940         identifier when doing xrefs.
15941         (register_fields): Added test on first operand of `init' before
15942         testing it TREE_CODE.
15943         (method_header): Store the location of the class identifier in the
15944         class decl when doing xrefs.
15945         (finish_method_declaration): Don't combine first/last method line
15946         when doing xref.
15947         (java_check_regular_methods): Warning check on not overriding
15948         methods with default access on other packages move before check on
15949         static methods. Initialization of `aflags' also moved up.
15950         (resolve_expression_name): Call static_ref_err to report the error.
15951         (static_ref_err): New function, implemented.
15952         (resolve_field_access): Returned simplified static field access
15953         when doing xrefs.
15954         (resolve_qualified_expression_name): Check for illegal use of
15955         static fields in a non static context. Call static_ref_err to
15956         report error in various places.
15957         (java_complete_tree): Do not fold initialized static fields when
15958         doing xrefs.
15959         (java_complete_lhs): Likewise.
15960
15961 1999-04-29  Anthony Green  <green@cygnus.com>
15962
15963         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15964         create internal labels.
15965         (lookup_label): Ditto.
15966
15967 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15968
15969         * class.c (layout_class_method): Generate <clinit>'s rtl for
15970         interfaces.
15971         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15972         for interfaces' <clinit>.
15973         * expr.c (lookup_field): Search for fields in interfaces.
15974         (expand_invoke): Fixed indentation.
15975         (expand_java_field_op): Likewise. Use IS_CLINIT.
15976         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15977         (IS_CLINIT): New macro.
15978         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15979         interface was parsed.
15980         (maybe_generate_clinit): Don't generate if the current class is an
15981         interface with only fields of primitive types.
15982         (reset_method_name): Use IS_CLINIT.
15983         (java_complete_expand_method): Expand <clinit> when it exists for
15984         interfaces. Use IS_CLINIT.
15985         (resolve_expression_name): Use DECL_CONTEXT instead of
15986         current_class to build static field references.
15987         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
15988         ARRAY_REF when doing xreferencing.
15989         (check_final_assignment): Fixed typo in leading comment. Use
15990         IS_CLINIT.
15991         (patch_array_ref): Don't fully expand array references when
15992         xreferencing.
15993         (patch_return): Use IS_CLINIT.
15994         (patch_throw_statement): Likewise.
15995
15996 1999-04-22  Tom Tromey  <tromey@cygnus.com>
15997
15998         * Make-lang.in (JAVA_SRCS): Added check-init.c.
15999
16000 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16001
16002         * decl.c (predef_filenames, predef_filenames_size): New globals
16003         (init_decl_processing): predef_filenames and predef_filenames_size
16004         initialized.
16005         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16006         extern.
16007         * jcf-parse.c (predefined_filename_p): New function.
16008         (yyparse): Check that files on the command line are specified only
16009         once and issue a warning otherwise.
16010         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16011         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16012         avoid a gcc warning with -W -Wall turned on.
16013         (java_expand_classes): Abort if errors were encountered.
16014         (java_complete_lhs): If the cross reference flag is set, wrap
16015         field DECL node around a WFL when resolving expression name.
16016
16017 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16018
16019         * lang.c (lang_decode_option): Fixed returned value when parsing
16020         `-fxref=...' and `-Wall'.
16021         * parse.y (source_end_java_method): Do not generate code when
16022         flag_emit_xref is set.
16023         (resolve_expression_name): Do not build static field access when
16024         flag_emit_xref is set.
16025         (resolve_field_access): No special treatment on `length' when
16026         flag_emit_xref is set. Do not build qualified static field access
16027         when flag_emit_xref is set.
16028         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16029         when flag_emit_xref is set.
16030         (patch_assignment): Do not generate array store runtime check when
16031         flag_emit_xref is set.
16032         * xref.c (xref_flag_value): Fixed function declaration
16033         indentation.
16034         (xset_set_data): New function.
16035         * xref.h (xref_set_data): Added prototype for new function.
16036         (typedef struct xref_flag_table): New field data.
16037         (XREF_GET_DATA): New macro.
16038
16039 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16040
16041         * xref.h (enum): Removed trailing comma.
16042
16043         * parse.y (resolve_qualified_expression_name): Added missing
16044         `break'.
16045
16046 1999-04-15  Anthony Green  <green@cygnus.com>
16047
16048         * gjavah.c: New prototypes for java_float_finite and
16049         java_double_finite.
16050
16051 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16052
16053         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16054         references.
16055
16056 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16057
16058         * Makefile.in (TREE_H): Add tree-check.h.
16059         (RTL_H): Add genrtl.h.
16060
16061 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16062
16063         * parse.y (patch_assignment): Added ArrayStoreException runtime
16064         check.
16065
16066 1999-04-06  Per Bothner  <bothner@cygnus.com>
16067
16068         * expr.c (pop_type_0):  New function.
16069         (pop_type):  Use pop_type_0.
16070         * java-tree.h (pop_type_0):  New declaration.
16071         * verify.c (verify_jvm_instructions):  Check return instructions.
16072
16073         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16074         class files.
16075
16076 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16077
16078         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16079
16080         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16081         (main_jcf): Don't define.
16082         (process_file): Don't set `main_jcf'.
16083
16084         * java-tree.h (main_jcf): Don't declare.
16085
16086         * jcf-parse.c (main_jcf): Add static definition.
16087
16088         * lang.c (main_jcf): Don't define.
16089
16090 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16091
16092         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16093
16094         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16095
16096         * jcf-depend.c: Include "config.h", not <config.h>.
16097
16098         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16099         `bcopy' to PTR.
16100
16101         * jcf-path.c: Include "config.h", not <config.h>.
16102
16103         * lex.c: Don't include various system header files.
16104         (java_init_lex): Cast the argument of `bzero' to PTR
16105
16106         * parse-scan.y (java_push_parser_context): Likewise.
16107
16108         * parse.y (java_push_parser_context): Likewise.
16109         (patch_bc_statement): Match format specifier to variable argument.
16110
16111         * xref.c: Don't include <stdio.h>.
16112
16113 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16114
16115         * parse.y (struct parser_ctxt *ctxp): Now global.
16116         (declare_local_variables): Use WFL compound value for the
16117         declaration source line value, when doing cross-referencing.
16118
16119 1999-03-31  Tom Tromey  <tromey@cygnus.com>
16120
16121         * gjavah.c (print_field_info): Allow constants of other types.
16122         (print_include): Generate include when new name is proper prefix
16123         of already printed name.
16124         (add_namelet): Likewise.
16125         (cxx_keyword_subst): New function.
16126         (print_method_info): Use it.
16127         (print_field_name): New function.
16128         (get_field_name): New function.
16129         (print_field_info): Use get_field_name and print_field_name.
16130
16131 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16132
16133         * Makefile.in (keyword.h): Generate using gperf language 'C', not
16134         'KR-C', so gperf uses the `const' keyword on strings.
16135
16136         * keyword.gperf (java_keyword): Const-ify a char*.
16137
16138 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16139
16140         * parse.y (patch_bc_statement): Fixed identation and a bogus
16141         `printf' format.
16142
16143 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16144
16145         * parse.y (patch_assignment): Allow static variables in other
16146         classes to be assigned.
16147
16148 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16149
16150         * class.c (maybe_add_interface): Remove unused variable
16151         `interface_binfo'.
16152         (make_class_data): Use = for assignment, not ==.  Likewise.
16153         (emit_register_classes): Remove unused variable `decl'.
16154
16155         * lex.c: Fix comment so as not to contain an embedded `/*'.
16156
16157         * verify.c (verify_jvm_instructions): Remove unused variable
16158         `self_type'.
16159
16160 1999-03-27  Per Bothner  <bothner@cygnus.com>
16161
16162         * parse.y (complete_loop_body):  Rename to finish_loop_body.
16163         (complete_labeled_statement):  Rename to finish_labeled_statement.
16164         (complete_for_loop):  Rename to finish_for_loop.
16165         (complete_method_declaration):  Rename to finish_method_declaration.
16166
16167         * java-tree.h (continue_identifier_node):  New global node.
16168         * decl.c:  Define and initialize continue_identifier_node.
16169         * parse.y (generate_labeled_block):  Remove - no longer needed.
16170         (build_loop_body):  Use continue_identifier_node for continue block.
16171         (finish_labeled_statement):  Also do pop_labeled_block actions.
16172         (java_complete_lhs):  POP_LOOP even if error.
16173         (build_labeled_block):  Special handling for continue_identifier_node.
16174         (patch_loop_statement):  Re-organize.
16175         (patch_bc_statement):  Re-write.
16176
16177 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16178
16179         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16180         using a WFL compound value.
16181         * parse.y (xref.h): Include.
16182         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16183         WFL compound value.
16184         (register_fields): Set WFL compound value to lineno if doing
16185         xrefs.
16186         (java_complete_expand_method): Call expand_xref if flag_emit_xref
16187         is set.
16188         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16189         * xref.h (expand_xref): Prototype renamed from xref_generate.
16190
16191 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16192
16193         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16194         (GET_CURRENT_BLOCK): New macro.
16195         * parse.y (current_static_block): New global variable.
16196         (method_body:): Define action.
16197         (complete_method_declaration): Set current_function_decl to NULL
16198         when work on the current method is done.
16199         (declare_local_variables): Use GET_CURRENT_BLOCK.
16200         (java_method_add_stmt): Likewise.
16201         (java_complete_expand_method): Disable the use of `this' when
16202         expanding <clinit>.
16203         (enter_a_block): If no current method exist, use
16204         current_static_block to link static initializer blocks.
16205         (exit_block): Rewritten to use current_static_block when no current
16206         method decl exists.
16207         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16208         (patch_return): Forbid the use of `return' in static initializers.
16209         (patch_throw_statement): Fixed indentation. Issue specific error
16210         for uncaught thrown checked exception in static initializer
16211         blocks. Removed FIXME.
16212
16213 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
16214
16215         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16216         Link gcj from gcc.o.
16217
16218 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16219
16220         * parse.y (find_applicable_accessible_methods_list): When dealing
16221         with interface: ensure that a given interface or java.lang.Object
16222         are searched only once.
16223
16224 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16225
16226         * gjavah.c (print_c_decl): Remove unused argument `flags'.
16227
16228         * jcf-dump.c (print_access_flags): Add braces around if-else.
16229
16230         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16231         COMBINE_INPUTS.
16232
16233         * lex.c (build_wfl_node): Add static prototype.
16234
16235         * lex.h (build_wfl_node): Remove static prototype.
16236
16237         * parse.y: Include lex.c early enough to declare everything needed.
16238         Ensure calls to `build_wfl_node' pass the proper arguments.
16239         (create_class): Remove unused variable `super_decl'.
16240         (get_printable_method_name): Initialize variable `name'.
16241
16242 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16243
16244         * Changelog: Fixed 1999-03-22 typos.
16245         * lang.c (lang_decode_option): Fixed typo in error string in the
16246         XARG section.
16247
16248 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16249
16250         * Makefile.in (JAVA_OBJS): Added entry xref.o.
16251         (xref.o): New rule.
16252         * java-tree.h (flag_emit_xref): Declared extern.
16253         * lang.c (xref.h): Included.
16254         (flag_emit_xref): New global variable.
16255         (lang_decode_option): Added support for -fxref.
16256         * xref.c: Created.
16257         * xref.h: Likewise.
16258
16259 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
16260
16261         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16262         linked with.
16263
16264 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16265
16266         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16267         $(srcdir)/../system.h and $(JAVA_TREE_H).
16268         (jcf-io.o): Depend on $(JAVA_TREE_H).
16269         (mangle.o): Likewise.
16270
16271         * check-init.c (check_cond_init): Add static prototype.
16272
16273         * class.c (build_java_method_type, hashUtf8String,
16274         make_field_value, get_dispatch_vector, get_dispatch_table,
16275         append_gpp_mangled_type, mangle_static_field): Likewise.
16276         (strLengthUtf8): Hide unused definition.
16277         (hashUtf8String): Const-ify.
16278         (make_field_value): Un-ANSI-fy.
16279
16280         * constants.c: Move inclusion of jcf.h above java-tree.h.
16281         (set_constant_entry, find_class_or_string_constant,
16282         find_name_and_type_constant, get_tag_node,
16283         build_constant_data_ref): Add static prototype.
16284
16285         * decl.c (push_jvm_slot, builtin_function,
16286         lookup_name_current_level): Likewise.
16287         (builtin_function): Const-ify.
16288
16289         * except.c (expand_start_java_handler, expand_end_java_handler):
16290         Add static prototype.
16291
16292         * expr.c (flush_quick_stack, push_value, pop_value,
16293         java_stack_swap, java_stack_dup, build_java_athrow,
16294         build_java_jsr, build_java_ret, expand_java_multianewarray,
16295         expand_java_arraystore, expand_java_arrayload,
16296         expand_java_array_length, build_java_monitor, expand_java_pushc,
16297         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16298         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16299         expand_compare, expand_test, expand_cond, expand_java_goto,
16300         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16301         expand_java_field_op, java_push_constant_from_pool): Likewise.
16302
16303         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16304         (build_java_arraynull_check): Mark parameters `node' and `type'
16305         with ATTRIBUTE_UNUSED.
16306         (note_label): Likewise for parameter `current_pc'.
16307         (expand_java_call, expand_java_ret): Hide unused definition.
16308
16309         * java-tree.h (make_class, build_constants_constructor,
16310         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16311         init_outgoing_cpool, register_class, emit_register_classes,
16312         java_layout_seen_class_methods): Prototype.
16313         (unicode_mangling_length): Const-ify.
16314         (append_gpp_mangled_name, append_gpp_mangled_classtype,
16315         emit_unicode_mangled_name, format_int, format_uint,
16316         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16317         jcf_print_utf8_replace, open_class): Prototype.
16318
16319         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
16320         <stdio.h>.  Include tree.h/java-tree.h.
16321         (utf8_equal_string usage, process_class): Add static prototype.
16322         (open_class): Don't prototype this here.
16323         (utf8_equal_string): Match arguments to format specifiers.
16324         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16325         TABLE_SWITCH, disassemble_method): Likewise.
16326
16327         * jcf-io.c: Include tree.h/java-tree.h.
16328         (open_class, find_classfile, jcf_print_utf8,
16329         jcf_print_utf8_replace): Const-ify.
16330
16331         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16332         parse_class_file): Add static prototype.
16333         (find_in_current_zip): Match definition to existing static
16334         prototype.
16335
16336         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16337         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16338         finish_jcf_block, define_jcf_label, get_jcf_label_here,
16339         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16340         write_chunks, adjust_typed_op, generate_bytecode_conditional,
16341         generate_bytecode_return, perform_relocations, init_jcf_state,
16342         init_jcf_method, release_jcf_state, generate_classfile):
16343         Add static prototype.
16344         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16345         (make_class_file_name): Const-ify.
16346
16347         * jcf.h (find_classfile): Const-ify.
16348
16349         * jv-scan.c (reset_report): Remove prototype.
16350
16351         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16352         (error): Rewrite to allow varargs.
16353
16354         * lang.c (lang_f_options): Const-ify.
16355
16356         * lex.c (java_parse_escape_sequence): Add static prototype.
16357         (java_allocate_new_line): Match definition to existing static
16358         prototype.
16359
16360         * mangle.c Include tree.h/java-tree.h.
16361         (unicode_mangling_length, emit_unicode_mangled_name,
16362         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16363
16364         * parse.h (jdep_code): Remove trailing comma in enumeration.
16365         (java_get_line_col): Move prototype outside of !JC1_LITE test.
16366         (reset_report): Add prototype.
16367
16368         * verify.c (push_pending_label, merge_types): Add static
16369         prototypes.
16370
16371         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16372
16373 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16374
16375         * parse.y (find_applicable_accessible_methods_list): Extend the
16376         search to superinterfaces when relevant.
16377         (search_applicable_methods_list): New function.
16378
16379 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16380
16381         * class.c (unmangle_classname): Implemented stricter testing
16382         before setting the QUALIFIED_P flag on an identifier.
16383
16384 1999-03-16  Per Bothner  <bothner@cygnus.com>
16385
16386         * parse.y (java_complete_lhs):  Call force_evaluation_order
16387         after patch_newarray.
16388         (patch_binop):  Don't call fold if there are side effects.
16389
16390 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16391
16392         * parse.y (java_stabilize_reference): Use save_expr instead of
16393         building a SAVE_EXPR node.
16394         (java_complete_lhs): Patch the resulting string of the `+='
16395         operator (if necessary) and complete the RHS after having built
16396         the cast.
16397
16398 1999-03-15  Per Bothner  <bothner@cygnus.com>
16399
16400         * class.c (make_class):  Don't set CLASS_P here (because
16401         this function is also called by build_java_array_type).
16402         (push_class):  Set CLASS_P here instead.
16403         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
16404
16405         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
16406         context.  If the context is class, perfer "super" over "synchronized".
16407         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
16408
16409         * parse.y (create_class):  Don't call parser_check_super here;
16410         it is not robust.  Always wait until later.
16411
16412         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
16413         match what JDK 1.2 does), but don't set ACC_PUBLIC.
16414
16415 1999-03-13  Per Bothner  <bothner@cygnus.com>
16416
16417         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
16418         * lex.h (UNGETC):  Change misleading macro.
16419
16420 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16421
16422         * parse.y (java_stabilize_reference): Return NODE when patching a
16423         COMPOUND_EXPR.
16424         (java_complete_lhs): Put parenthesis around truth values.
16425
16426 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16427
16428         * class.c (layout_class_method): Don't make rtl for interface
16429         methods.
16430         * parse.h (GET_TYPE_NAME): New macro.
16431         * parse.y (if_then_statement:): Fixed indentation.
16432         (if_then_else_statement:): Likewise.
16433         (for_statement:): Fixed spacing.
16434         (try_statement:): Fixed indentation.
16435         (create_interface): Don't force interfaces to be abstract.
16436         (method_header): Abstract methods are OK in interfaces.
16437         (declare_local_variables): Fixed typo in comment.
16438         (java_complete_expand_method): Fixed indentation.
16439         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16440         non accessible fields.
16441         (java_stabilize_reference): New function.
16442         (java_complete_lhs): Fixed indentation. Use
16443         java_stabilize_reference in compound assignment. Insert the
16444         cast. If not processing `+' fix string constants before processing
16445         binop.
16446
16447 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16448
16449         * constants.c (find_class_or_string_constant): Cast variable `j'
16450         to a `jword' when comparing against one.
16451
16452         * expr.c (java_lang_expand_expr): Remove unused variables
16453         `has_finally_p' and `op0'.
16454
16455         * gjavah.c (print_field_info): Cast a value to jint when comparing
16456         against one.  Likewise for a jlong.
16457         (add_namelet): Likewise cast a `sizeof' to an int when comparing
16458         against a signed quantity.
16459
16460         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16461         (print_signature): Don't needlessly dereference variable `str'
16462
16463         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16464         `max_locals' with ATTRIBUTE_UNUSED.
16465         (jcf_parse_class): Likewise for variable `index'.
16466
16467         * parse.h (reverse_jdep_list): Remove static prototype.
16468
16469         * parse.y (build_jump_to_finally): Remove prototype and definition.
16470         (reverse_jdep_list): Add static prototype.
16471
16472         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16473         `assignment' and `expr_decl'.
16474
16475         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16476
16477 1999-03-12  Andrew Haley  <aph@cygnus.com>
16478
16479         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16480         we'll need a directory separator and a null character.
16481
16482 1999-03-10  Per Bothner  <bothner@cygnus.com>
16483
16484         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
16485
16486 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16487
16488         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16489         interfaces.
16490
16491 1999-03-05  Per Bothner  <bothner@cygnus.com>
16492
16493         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
16494
16495         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
16496
16497         * class.c (layout_class_method):  A static method in a base class
16498         is never overridden, so treat it like it doesn't exist.
16499         However, do complain about private non-static method overriding
16500         public static method.
16501
16502         * parse.y:  Don't set unused INITIALIZED_P flag.
16503         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
16504
16505         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
16506         (build_array_from_name):  Re-order &index[string] to &string[index].
16507
16508         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
16509         error_mark (it might catch more errors, but it is more likely to lose).
16510
16511 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16512
16513         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16514         (parse-scan.o): Depend on toplev.h.
16515
16516         * class.c (make_method_value): Add prototype.  Make it static.
16517         Remove unused second argument, caller changed.
16518
16519         * expr.c (java_lang_expand_expr): Remove unused variable
16520         `return_label'.
16521
16522         * java-tree.h: Don't prototype find_in_current_zip.
16523         Add prototypes for verify_constant_pool, start_java_method,
16524         end_java_method, give_name_to_locals, expand_byte_code,
16525         open_in_zip, set_constant_value, find_constant1, find_constant2,
16526         find_utf8_constant, find_string_constant, find_class_constant,
16527         find_fieldref_index, find_methodref_index, write_constant_pool,
16528         count_constant_pool_bytes and encode_newarray_type.
16529
16530         * jcf-dump.c: Remove unused variable `LONG_temp'.
16531
16532         * jcf-parse.c: Include parse.h.
16533         (jcf_parse_source): Remove unused parameter, all callers changed.
16534         (jcf_figure_file_type): Add static prototype.
16535         (find_in_current_zip): Likewise.  Also remove unused parameter,
16536         all callers changed.
16537         (read_class): Initialize variable `saved_pos'.
16538
16539         * jcf-reader.c (jcf_parse_preamble): Mark variables
16540         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16541
16542         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16543         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16544         (java_parse_doc_section): Initialize variable `seen_star'.
16545         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16546         (java_lex_error): Mark parameters `msg' and `forward' with
16547         ATTRIBUTE_UNUSED.
16548         (java_get_line_col): Mark parameters `filename' and `line' with
16549         ATTRIBUTE_UNUSED.
16550
16551         * parse-scan.y: Include toplev.h.
16552         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16553
16554         * parse.h: use `struct JCF', not plain `JCF'.
16555         (java_parser_context_save_global, java_expand_classes
16556         java_parser_context_restore_global, java_parse): Add prototypes.
16557
16558         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16559         `node'.
16560
16561 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
16562
16563         *  check-init.c (check_init):  COPYN takes word count, not bit count.
16564
16565 1999-02-26  Per Bothner  <bothner@cygnus.com>
16566
16567         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
16568         explicit build_decl.  (Avoids crash in reload when optimizing.)
16569
16570 1999-02-25  Per Bothner  <bothner@cygnus.com>
16571
16572         * decl.c (complete_start_java_method):  Handle synchronized method
16573         even when compiling from bytecode.
16574
16575 1999-02-26  Tom Tromey  <tromey@cygnus.com>
16576
16577         * gjavah.c (add_class_decl): Only generate `#include' if outer
16578         class is not the name of the class we are processing.  Correctly
16579         append `.h' in #include.
16580         (process_file): Clean up newlines around generated `#include's.
16581         (decode_signature_piece): Correctly handle inner classes.
16582         (struct include): New structure.
16583         (all_includes): New global.
16584         (print_include): New function.
16585         (add_class_decl): Use it.
16586         (process_file): Likewise.
16587         (add_class_decl): Generate include for java-array.h if array
16588         seen.
16589         (process_file): Don't generate java-array.h include.
16590
16591         * gjavah.c (add_namelet): Check for standard package names here.
16592         (add_class_decl): Don't check for standard package names here.
16593
16594 1999-02-25  Tom Tromey  <tromey@cygnus.com>
16595
16596         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16597         When reading a zip file, only use strncmp if both strings are
16598         bigger than the buffer length.  Initialize `k' when looping
16599         through zip file.
16600
16601 1999-02-24  Tom Tromey  <tromey@cygnus.com>
16602
16603         * gjavah.c (struct namelet): New structure.
16604         (add_namelet): New function.
16605         (print_namelet): New function.
16606         (print_class_decls): Use add_namelet and print_namelet to generate
16607         namespaces and not classes.
16608         (method_printed): New global.
16609         (HANDLE_END_METHOD): Examine method_printed.
16610         (print_method_info): Set method_printed when required.  Print
16611         error if function to be ignored is marked virtual.  Handle $finit$
16612         method.
16613         (METHOD_IS_FINAL): New macro.
16614         (print_field_info): Use it.
16615         (HANDLE_METHOD): Clear method_printed.
16616         (method_pass): New global.
16617         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16618         (process_file): Do two passes over both fields and methods.
16619         (HANDLE_METHOD): Examine method_pass.
16620         (root): New global.
16621         (add_class_decl): New function.
16622         (print_class_decls): Don't scan over entire constant pool.
16623
16624 1999-02-23  Tom Tromey  <tromey@cygnus.com>
16625
16626         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16627         disable linking in that case.
16628
16629 1999-02-20  Tom Tromey  <tromey@cygnus.com>
16630
16631         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16632         not 0x1f.
16633
16634 1999-02-21  Per Bothner  <bothner@cygnus.com>
16635
16636         * decl.c (build_result_decl), java-tree.h:  New method.
16637         (complete_start_java_method):  Handle synchronized methods.
16638         Don't build DECL_RESULT here.  (Ordering dependency problem.)
16639         (start_java_method):  Call build_result_decl here instead  ...
16640         * parse.y (java_complete_expand_method):  ... and here.
16641         (expand_start_java_method): Don't call complete_start_java_method here.
16642         (java_complete_expand_method):  Call it here instead.
16643         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
16644         * java-tree.h:  ... here.
16645
16646         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
16647         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
16648         for ARRAY_REF - it doesn't work when array bounds are checked.
16649         (patch_array_ref):  Handle it here instead.
16650
16651         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
16652
16653 1999-02-19  Per Bothner  <bothner@cygnus.com>
16654
16655         Force left-to-right evaluation of binary operations etc.
16656         * expr.c (force_evaluation_order), java-tree.h:  New function.
16657         * parse.y (java_complete_lhs):  Pass binary operations, procedure
16658         calls, and ARRAY_REFs to force_evaluation_order.
16659         (various):  Set TREE_SIDE_EFFECTS more carefully.
16660
16661         Tolerate random (non-UTF8) encoding in comments without complaining.
16662         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
16663         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
16664
16665         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
16666         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
16667
16668         * parse.y (java_complete_lhs):  Ignore an empty statement in a
16669         COMPOUND_EXPR.  Don't complain about empty statement after return.
16670
16671 1999-02-19  Per Bothner  <bothner@cygnus.com>
16672
16673         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
16674         in TREE_LIST - just chain the POINTER_TYPEs together.
16675         (resolve_class):  If type already resolved, return decl.
16676         After resolving, update TREE_TYPE(class_type), and name (if array).
16677         * parse.h (do_resolve_class), parse.y:  Make non-static.
16678         * class.c (maybe_layout_super_class):  Take this_class argument.
16679         Do do_resolve_class if necessary.
16680         (layout_class, layout_class_methods): Adjust calls appropriately.
16681         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16682         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
16683         * typeck.c (build_java_array_type):  Don't call layout_class.
16684
16685 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16686
16687         * parse.y (check_pkg_class_access): Allow private class access
16688         within the same package.
16689         (strip_out_static_field_access_decl): New function.
16690         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16691         operator argument before testing its nature.
16692
16693 1999-02-03  Per Bothner  <bothner@cygnus.com>
16694
16695         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
16696         (TRY_EXPR):  Simplify - it no longer has a finally clause.
16697         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
16698         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16699         * expr.c (java_lang_expand_expr):  Likewise.
16700         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
16701         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
16702         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
16703         (build_try_statement):  Remove finally parameter and handling.
16704         (build_try_finally_statement):  New function.
16705         (patch_try_statement):   No longer need to support finally clause.
16706         (try_statement):  Update grammar action rules.
16707         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
16708         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16709
16710 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
16711
16712         * jcf-parse.c (get_constant): Add braces around computation of 'd'
16713         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
16714
16715 1999-02-17  Andrew Haley  <aph@cygnus.com>
16716
16717         * class.c (build_utf8_ref): Back out broken patch which was
16718         intended to to output signatures using '.' as a separator.
16719
16720         * class.c (make_class_data): Output signatures using '.' as a
16721         separator, rather than '/'.
16722         (mangled_classname): Likewise.
16723         (make_field_value): Likewise.
16724         (make_method_value): Likewise.
16725         * constants.c (alloc_class_constant): Likewise.
16726         * expr.c (build_invokeinterface): Likewise.
16727
16728 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16729
16730         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16731         of an ancient workaround.
16732
16733 1999-02-10  Jeffrey A Law  (law@cygnus.com)
16734
16735         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
16736         here anymore.
16737
16738 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16739
16740         * lex.c (yylex): Encode \0 as UTF8.
16741
16742 1999-02-10  Tom Tromey  <tromey@cygnus.com>
16743
16744         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16745         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16746         (libgcj_zip): Renamed.
16747         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16748         LIBJAVA_ZIP_FILE.
16749         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16750
16751         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16752         (GC_NAME): Renamed -lgc to -lgcjgc.
16753
16754 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16755
16756         * lex.c (java_lang_cloneable): Initialize.
16757         * parse.y (java_lang_cloneable): New static variable.
16758         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16759         doing one more qualification round.
16760         (valid_ref_assignconv_cast_p): Reject null source or
16761         destination. Allow an array to be cast into java.lang.Cloneable.
16762         (patch_cast): Swapped two first arguments to first call to
16763         valid_ref_assignconv_cast_p.
16764
16765 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16766
16767         * parse.h: DECL_P renamed JDECL_P.
16768         * parse.y: DECL_P replaced by JDECL_P.
16769         (build_array_from_name): Always use pointer's type.
16770         (patch_bc_statement): Extra code to search continue target in a
16771         for loop. Fixed comments. Continue target is current loop when
16772         unlabeled.
16773
16774 1999-02-05  Andrew Haley  <aph@cygnus.com>
16775
16776         * class.c (make_class_data): The superclass of an interface should
16777         be null, not class Object.
16778
16779         * lex.c (java_lex): Sign extend hex literals.
16780
16781 1999-02-04  Andrew Haley  <aph@cygnus.com>
16782
16783         * class.c (build_utf8_ref): Output signatures using '.' as a
16784         separator, rather than '/'.
16785         (make_class_data): Likewise.
16786
16787 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
16788
16789         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16790         mkstemp.o.  Get them from libiberty now.
16791
16792 1999-02-02  Jeffrey A Law  (law@cygnus.com)
16793
16794         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16795
16796 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16797
16798         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16799         from libiberty.h
16800
16801 1999-02-02  Per Bothner  <bothner@cygnus.com>
16802
16803         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16804         * jcf-write.c (generate_bytecode_return):  New function.
16805         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
16806
16807         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
16808         generate special [fd]const_[01] instructions.
16809
16810         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
16811
16812         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
16813         handling OPCODE_lookupswitch or OPCODE_tableswitch.
16814
16815 1999-02-01  Per Bothner  <bothner@cygnus.com>
16816
16817         * parse.y (patch_method_invocation):  Handle calling static methods,
16818         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16819
16820         * parse.y (java_complete_lhs):  Don't complain about unreachable
16821         exit condition in a do-while statement.
16822
16823 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16824
16825         * lex.c (java_read_char): Fixed utf8 decoding.
16826         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16827         range.
16828         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16829         comments. Local variable `all_primitive' is gone. Broadened
16830         acceptance of `0' to floating point targets. `long' can now be
16831         widened to `double' or `float'.
16832         (valid_method_invocation_conversion_p): Added leading
16833         comment. Fixed tabulation.
16834         (build_string_concatenation): Optimize out left or right empty
16835         string constants.
16836
16837 1999-01-28  Per Bothner  <bothner@cygnus.com>
16838
16839         * jcf-write.c (localvar_alloc):  Only emit entry for
16840         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16841         (generate_bytecode_insns):  Only call put_linenumber if
16842         debug_info_level > DINFO_LEVEL_NONE.
16843         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
16844         is specified, add -g1 (for compatibility wih javac).
16845
16846 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16847
16848         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16849         gjavah.o, check-init.o, jv-scan.o
16850
16851 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16852
16853         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16854
16855         * gjavah.c: Include config.h and system.h.
16856
16857         * javaop.h (inline): Don't define, its handled by system.h.
16858         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16859         from `inline' to `static inline'.
16860
16861         * jcf.h (inline): Don't define, its handled by system.h.
16862
16863         * lex.c (inline): Likewise.
16864
16865 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16866
16867         * lang-specs.h: Map -Qn to -fno-ident.
16868
16869 1999-01-29  Richard Henderson  <rth@cygnus.com>
16870
16871         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16872
16873 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16874
16875         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16876         then cast it to Object before calling `append' method.
16877
16878 1999-01-28  Per Bothner  <bothner@cygnus.com>
16879
16880         * check-init.c (check_bool2_init, check_bool_init, check_init):
16881         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16882         * jcf-write.c (generate_bytecode_insns):  Likewise.
16883
16884 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16885
16886         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16887         * parse.y (patch_cast): Allow a boolean to be cast into a
16888         boolean.
16889
16890 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16891
16892         * parse.y: (class_declaration:): Fixed indentation.
16893         (class_member_declaration:): Extra `;' after field declaration now
16894         accepted.
16895         (interface_declaration:): Removed debug messages in error reports.
16896         (patch_binop): Nodes created and returned inherit the orignal
16897         node's COMPOUND_ASSIGN_P flag value.
16898         (patch_cast): Fix cast from char to floating point.
16899
16900 1999-01-25  Andrew Haley  <aph@cygnus.com>
16901
16902         * except.c, java-except.h (expand_resume_after_catch): new
16903         function.
16904         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16905         to branch back to main flow of control after a catch block.
16906
16907 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16908
16909         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16910         $(srcdir)/../system.h.
16911         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16912         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16913         (jcf-write.o): Likewise.
16914         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16915         (mangle.o): Depend on $(srcdir)/../toplev.h.
16916         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16917         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16918
16919         * class.c: Include output.h and parse.h.
16920         (mangled_classname): Add the `const' keyword to a char*.
16921         (find_named_method): Hide unused function definition.
16922         (build_utf8_ref): Change type of variable `c' to unsigned char.
16923         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16924         (build_class_ref): Add the `const' keyword to a char*.
16925         (layout_class_method): Remove unused variable `buf'.
16926
16927         * decl.c (find_local_variable): Remove unused variable `rtl'.
16928         (pushdecl): Likewise for variables `different_binding_level' and
16929         `oldglobal'.
16930         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16931         (maybe_build_cleanup): Likewise for parameter `decl'.
16932
16933         * except.c (expand_start_java_handler): Mark parameter `range'
16934         with ATTRIBUTE_UNUSED.
16935
16936         * expr.c: Include except.h.
16937         (pop_type): Remove unused variable `i'.
16938         (pop_value): Likewise for variables `n_words' and `i'.
16939         (expand_java_arrayload): Likewise for variable `convert'.
16940         (java_lang_expand_expr): Likewise for variables `op0', `type',
16941         `mode', `unsignedp', `node' and `elements'.
16942         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16943         `eh_ranges'.
16944         (process_jvm_instruction): Add a `const' qualifier to a char*.
16945
16946         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16947         (temp_directory): Likewise.
16948         (print_c_decl): Likewise.
16949         (print_method_info): Likewise.
16950         (decode_signature_piece): Likewise.
16951         (print_mangled_classname): Likewise.
16952
16953         * java-except.h: Provide prototypes for maybe_start_try,
16954         maybe_end_try and add_handler.
16955
16956         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16957         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16958         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16959         init_expr_processing, push_super_field, init_class_processing,
16960         can_widen_reference_to, class_depth, verify_jvm_instructions,
16961         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16962         set_local_type, merge_type_state, push_type, load_type_state,
16963         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16964         emit_unicode_mangled_name): Add prototypes.
16965
16966         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16967         (print_signature_type): Use ISDIGIT, not isdigit.
16968         (print_signature): Remove unused variable `j'.
16969
16970         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16971         int when comparing against one.
16972
16973         * jcf-parse.c: Include toplev.h.
16974
16975         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16976         (localvar_free): Remove unused variable `i'.
16977         (generate_bytecode_conditional): Likewise for variable `kind'.
16978
16979         * jv-scan.c: Include config.h and system.h.  Remove redundant
16980         OS header and gansidecl.h includes.
16981         (warning): Add the `const' keyword to a char*.  Also add
16982         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16983         __STDC__, when determining whether to use ANSI-isms.
16984         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16985         (xmalloc): Don't redundantly prototype here.
16986         (main): Remove unused parameter `envp'.  Also fix the arguments
16987         passed to function `fatal' to match the format specifier.
16988
16989         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
16990
16991         * mangle.c: Include toplev.h.
16992         (emit_unicode_mangled_name): Declare parameter `len'.
16993
16994         * parse.y (parse_warning_context): Add the `const' keyword to a
16995         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
16996         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
16997         (issue_warning_error_from_context): Add the `const' keyword to
16998         a char*.
16999         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17000         not `__STDC__' for whether to use ANSI-isms.
17001
17002         * typeck.c (incomplete_type_error): Mark parameters `value' and
17003         `type' with ATTRIBUTE_UNUSED.
17004         (parse_signature_type): Use ISDIGIT, not isdigit.
17005
17006         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17007         (verify_jvm_instructions): Likewise.  Remove unused variables
17008         `field_name' and `default_val'.
17009
17010         * zextract.c: Include config.h and system.h.  Remove redundant
17011         OS header includes.
17012
17013         * zipfile.h: Prototype `read_zip_archive'.
17014
17015 1999-01-21  Andrew Haley  <aph@cygnus.com>
17016
17017         * typeck.c (convert): Allow conversions to void type: some
17018         optimizations in gcc do this.
17019
17020 1999-01-21  Andrew Haley  <aph@cygnus.com>
17021
17022         * typeck.c (convert_ieee_real_to_integer): New function.
17023         (convert): When not using fast-math and using hardware fp, convert
17024         an IEEE NaN to zero.
17025
17026 1999-01-18  Andrew Haley  <aph@cygnus.com>
17027
17028         * parse.y (patch_binop): Do a type conversion from signed to
17029         unsigned and then back to signed when a ">>>" is found.
17030
17031 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17032
17033         * java-tree.h: (check_for_initialization): Added prototype.
17034         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17035         * parse.y (do_resolve_class): Removed unused locals.
17036         (read_import_dir): Likewise.
17037         (resolve_qualified_expression_name): Array creation
17038         expressions are valid primary expressions.
17039         (qualify_ambiguous_name): Likewise.
17040         (patch_synchronized_statement): Removed unused local.
17041
17042 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17043
17044         * Makefile.in (zextract.o): Add dependencies.
17045
17046         * Makefile.in: Do not put ^Ls at the start of a line.
17047
17048 1999-01-15  Per Bothner  <bothner@cygnus.com>
17049
17050         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17051         sub-type the result of the call that gets the exception value.
17052
17053         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17054         don't call finish_class.
17055
17056         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17057         clear found before continuing.
17058
17059         * verify.c (verify_jvm_instructions):  On an array load, allow
17060         and handle top of stack to be TYPE_NULL.
17061
17062         * gjavah.c (generate_access):  Translate Java package private or
17063         protected access to C++ public, but with a comment.
17064
17065 1999-01-13  Andrew Haley  <aph@cygnus.com>
17066
17067         * expr.c (generate_name): Name prefix changed to avoid clashes
17068         with assembler temp labels.
17069
17070         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17071         MODIFY_EXPR.  Without this, code for the assignment may not be
17072         generated at all and the synchronized statement will read an
17073         uninitialized variable.
17074
17075 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17076
17077         * class.c (maybe_layout_super_class): Fixed returned value.
17078         * lex.c: Added 1999 to the copyright.
17079         (java_init_lex): Initialize java_lang_imported.
17080         * lex.h: Added 1999 to the copyright.
17081         * parse.h: Added 1999 to the copyright.
17082         (REGISTER_IMPORT): Fixed typo in trailing macro.
17083         (CURRENT_OSB): New macro.
17084         (struct parser_ctxt): New fields osb_depth, osb_limit.
17085         * parse.y (java_lang_id): New global variable.
17086         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17087         (array_creation_expression:): Use CURRENT_OSB.
17088         (dims:): Uses a stack to keep track of array dimensions.
17089         (cast_expression:): Use CURRENT_OSB.
17090         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17091         conditions.
17092         (register_fields): Fixed typos in comment.
17093         (check_method_redefinition): Fixed comment indentation.
17094         (java_check_regular_methods): Set saved found wfl to NULL after
17095         having reinstalled it in the previously found DECL_NAME.
17096
17097 1999-01-10  Richard Henderson  <rth@cygnus.com>
17098
17099         * gjavah.c (java_float_finite): Use a union to do type punning.
17100         (java_double_finite): Likewise.
17101
17102 1999-01-09  Per Bothner  <bothner@cygnus.com>
17103
17104         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
17105         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17106         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
17107         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
17108         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17109         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
17110
17111 1999-01-08  Per Bothner  <bothner@cygnus.com>
17112
17113         * check-init.c (check_init):  If compiling to native, we don't
17114         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
17115
17116 1999-01-08  Tom Tromey  <tromey@cygnus.com>
17117
17118         * parse-scan.y (variable_declarator_id): Set or increment
17119         bracket_count.
17120         (bracket_count): New global.
17121         (formal_parameter): Handle case where bracket pairs trail variable
17122         declarator id.
17123
17124 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
17125
17126         * jcf-parse.c (yyparse): variable len changed from a char to an
17127         int to prevent overflow.
17128
17129 1999-01-06  Per Bothner  <bothner@cygnus.com>
17130
17131         * java-tree.h:  Declare read_class.
17132         * jcf-parse.c (read_class):  New function.
17133         (load_class):  Now just call read_class.
17134
17135         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
17136         * jcf-parse.c (parse_source_file):  Declare save_error_count,
17137         which is needed by java_parse_abort_on_error macro,
17138         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
17139
17140         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
17141         constructor, if initializing a static field.
17142         (patch_new_array_init):  Set TREE_CONSTANT if it is.
17143         * expr.c (java_lang_expand_expr):  For a static array constructor
17144         of primitive elements, allocate the array itself statically.
17145         Disabled until we can set the vtable field statically.
17146
17147         * check-init.c:  New file.  Checks for definite assignment.
17148         * Makefile.in (JAVA_OBJS):  Add check-init.o.
17149         * parse.y (java_complete_expand_method): Call check_for_initialization.
17150         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
17151
17152 1999-01-06  Graham <grahams@rcp.co.uk>
17153
17154         * parse.y : include system.h instead of including
17155         standard headers directly with the exception of <dirent.h>.
17156
17157 1999-01-06  Per Bothner  <bothner@cygnus.com>
17158
17159         * lex.h:  Moved static function declarations to lex.c,
17160         to shut up some -Wall warnings.
17161         * lex.c:  Static function declarations moved here.
17162         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
17163
17164 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17165
17166         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17167
17168 1998-12-22  Per Bothner  <bothner@cygnus.com>
17169
17170         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
17171         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
17172
17173         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
17174         (localvar_alloc):  Change return type to void,
17175         (emit_unop):  Remove unused variable size.
17176
17177         * jcf-write.c (struct jcf_block):  Add new union.
17178         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
17179         (call_cleanups):  New functions.
17180         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
17181         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
17182         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17183         * lang.c (lang_init):  Call using_eh_for_cleanups.
17184         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
17185         completing operands to patch_synchronized_statement.
17186         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17187         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17188         WITH_CLEANUP_EXPR instead of TRY_EXPR.
17189
17190 1998-12-20  John F. Carr  <jfc@mit.edu>
17191
17192         * Make-lang.in: Comment out control-Ls; they upset some makes.
17193
17194 1998-12-18  Tom Tromey  <tromey@cygnus.com>
17195
17196         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17197         consistently.
17198
17199 1998-12-17  Tom Tromey  <tromey@cygnus.com>
17200
17201         * parse.y (DIR_SEPARATOR): New define.
17202         (check_class_interface_creation): Use it.
17203
17204         * parse-scan.y (report_main_declaration): Recognize
17205         `java.lang.String' in argument to main.
17206
17207 1998-12-16  Per Bothner  <bothner@cygnus.com>
17208
17209         * parse.y (create_interface):  Remove bogus test.
17210
17211 1998-12-16  Per Bothner  <bothner@cygnus.com>
17212
17213         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
17214         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
17215
17216 1998-12-16  Tom Tromey  <tromey@cygnus.com>
17217
17218         * parse-scan.y (qualified_name): Use correct sprintf format.
17219
17220 1998-12-15  Tom Tromey  <tromey@cygnus.com>
17221
17222         * gjavah.c (print_field_info): Changed how most negative number is
17223         printed.
17224
17225 1998-12-14  Per Bothner  <bothner@cygnus.com>
17226
17227         * parse.y (fold_constant_for_init):  New function.
17228         (resolve_expression_name):  Don't replace static final
17229         constant-initialized fields by its value.
17230         (java_complete_lhs):  New.  Same as java_complete_tree, except does
17231         not replace static final constant-initialized fields by their values.
17232         (register_fields):  If there is an initializer, set DECL_INITIAL and
17233         MODIFY_EXPR_FROM_INITIALIZATION_P.
17234         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
17235         Only call patch_initialized_static_field if
17236         MODIFY_EXPR_FROM_INITIALIZATION_P.
17237         (patch_initialized_static_field):  If not valid constant, clear
17238         DECL_INITIAL.
17239
17240         * parse.y (lookup_field_wrapper):  Fix thinko.
17241
17242         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
17243         set and restore global lineno.
17244
17245 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17246
17247         * gjavah.c (print_field_info): If value to print is the smallest
17248         value of its size, then print as hex to avoid later warnings from
17249         C++ compiler.
17250
17251 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17252
17253         * gjavah.c (decompile_method): Decompile `return null'.
17254         (process_file): Generate `#pragma interface'.
17255         (method_declared): New global.
17256         (print_method_info): Set it.
17257         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17258         (print_method_info): Handle abstract methods.
17259
17260 1998-12-13  Per Bothner  <bothner@cygnus.com>
17261
17262         * parse.y (patch_method_invocation):  If class_decl is null
17263         (e.g. an array type), use original type.
17264
17265         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
17266         errors about uncaught exception from clone (of array, specifically).
17267
17268 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17269
17270         * gjavah.c (decompile_method): Handle all types of `return'
17271         opcode.  Decompile `return this' and `return'.
17272         (method_access): New global.
17273         (print_method_info): Set it.
17274         (decompile_method): Don't decompile a synchronized method.
17275
17276 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17277
17278         * jcf-reader.c (jcf_parse_one_method): Recognize
17279         HANDLE_END_METHOD.
17280         * gjavah.c (HANDLE_END_METHOD): New macro.
17281         (HANDLE_CODE_ATTRIBUTE): New macro.
17282         (decompile_method): New function.
17283         (print_method_info): Don't print `;\n' at end of function decl.
17284         Include java-opcodes.h.
17285         (decompiled): New global.
17286
17287 1998-12-12  Per Bothner  <bothner@cygnus.com>
17288
17289         * class.c (build_class_ref):  Handle PRIMTYPE.class if
17290         flag_emit_class_files.
17291         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
17292         if flag_emit_class_files.
17293         * parse.y (java_complete_tree):  Pre-liminary support for
17294         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17295
17296         * parse.y (patch_synchronized_statement):   Don't call monitorexit
17297         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
17298
17299         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
17300
17301         * zipfile.h (opendir_in_zip):  New declaration.
17302         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
17303         (opendir_in_zip):  New function, using code from open_in_zip.
17304         (open_in_zip):  Call opendir_in_zip.
17305         (find_class):  Remove no-longer-used do_class_file parameter,
17306         but add source_ok parameter.  Change logic so if we find a .java file,
17307         we don't look for .class in later classpath emtries.
17308         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
17309         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
17310         * gjavah.c: Update call to find_class.
17311         * jcf-dump.c:  Likewise.
17312
17313         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
17314         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
17315         nothing if body is empty_stmt_node.
17316         Various little fixes so SP gets correctly adjusted.
17317         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17318         For CALL_EXPR, test if static first.
17319         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
17320         such as the ones we create for Object and Class.
17321         Set and restore current_function_decl.
17322         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17323         (note_possible_classname):  New function.
17324         (read_import_entry):  Removed.  Merged with read_import_dir.
17325         (read_import_dir):  Don't call find_class - that only gives us
17326         the first classpath entry having the needed package.
17327         Use the struct buffer data structure from buffer.h.
17328         (read_import_dir, find_in_imports_on_demand):  The remembered
17329         class names now use '.' (not '/') as package separator.
17330
17331         * parse.y (java_complete_expand_methods):  Call write_classfile
17332         here, and not in java_expand_classes (which only gets first class).
17333
17334 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17335
17336         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
17337         (register_fields):  If a static fields has an initializer, just
17338         chain it on ctxp->static_initialized, and handle later.
17339         (java_complete_expand_methods):  Force <clinit> first.
17340         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
17341         - it's already been completed.
17342         (patch_initialized_static_field):  New function.
17343         (java_complete_field):  Call it.
17344
17345 1998-12-12  Per Bothner  <bothner@cygnus.com>
17346
17347         * expr.c (encode_newarray_type, build_new_array):  New functions.
17348         * java-tree.h:  Declare build_new_array.
17349         * jcf-write.c (patch_newarray):  Use build_new_array.
17350
17351         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
17352         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
17353
17354         * parse.y (patch_new_array_init):  Re-organize.
17355         Now is passed the actual array (pointer) type of the value.
17356         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17357         (patch_array_constructor):  Removed - merged into patch_new_array_init.
17358         (java_complete_tree):  Update patch_new_array_init.
17359
17360         * jcf-write.c (find_constant_index):  New function.
17361         (generate_bytecode_insns):  Use find_constant_index.
17362         (generate_classfile):  Use find_constant_index for ConstantValue.
17363
17364 1998-12-11  Tom Tromey  <tromey@cygnus.com>
17365
17366         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17367         * decl.c (init_decl_processing): Renamed dtable -> vtable.
17368         * class.c (make_class_data): Renamed dtable -> vtable, and
17369         dtable_method_count -> vtable_method_count.
17370
17371 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17372
17373         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17374         global variables, initialized.
17375         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17376         Declared new global variables.
17377         * lex.c (java_lex): Return long_zero_node, float_zero_node,
17378         double_zero_node, integer_zero_node upon direct matching.
17379         * parse.y (purify_type_name): Added function prototype.
17380         (duplicate_declaration_error_p): Consider new_type as potentially
17381         being a incomplete type. Use purify_type_name on type string.
17382         (method_header): saved_type: unused variable removed. Don't figure
17383         return type if method name is invalid.
17384         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17385         processed by patch_unaryop.
17386         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17387         increment/decrement node into its original type after binary
17388         numeric promotion on its operands.
17389
17390 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17391
17392         * parse.y (array_initializer:): Array init operand is NULL_TREE
17393         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17394         now an error. Fixed indentation problems.
17395         (patch_string): Handle error_mark_node as an argument.
17396         (patch_new_array_init): Fixed indentation problems.
17397         (array_constructor_check_entry): Removed check on null wfl_value.
17398         Return an error if wfl_value's walk returns an error.
17399
17400 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17401
17402         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17403         * lex.c (java_lex): Remember column position before advancing one
17404         token. Retain location information on OCB_TK.
17405         * lex.h (typedef struct java_lc): Added new field.
17406         * parse.h (GET_SKIP_TYPE): New macro.
17407         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17408         * parse.y (build_new_array_init, patch_new_array_init,
17409         patch_array_constructor, maybe_build_array_element_wfl,
17410         array_constructor_check_entry): New function prototypes.
17411         (switch_block:): Tagged <node>.
17412         (OCB_TK): Tagged <operator>.
17413         (array_initializer:): Installed actions.
17414         (variable_initializer): Build location information on element if
17415         necessary.
17416         (switch_statement:): Fixed indentation typo.
17417         (switch_block:): Redefined default action.
17418         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17419         (patch_assignment): Removed duplicate code.
17420         (maybe_build_array_element_wfl, build_new_array_init,
17421         patch_new_array_init, patch_array_constructor,
17422         array_constructor_check_entry): New functions.
17423
17424 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17425
17426         * parse.y (array_initializer): Tagged <node>.
17427         (variable_initializer:): Use default rule.
17428         (array_initializer:): Defined actions.
17429         (variable_initializers:): Likewise.
17430         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17431         non-static field accesses.
17432         (patch_invoke): Fixed indentation typo.
17433         (java_complete_tree): Likewise.
17434         (build_labeled_block): Changed leading comment. Generate an error
17435         in case of duplicate loop labels.
17436         (patch_conditional_expr): Patch results of string concatenation
17437         operations.
17438
17439 1998-12-06  Per Bothner  <bothner@cygnus.com>
17440
17441         * constants.c (find_methodref_index):  When the class is an interface,
17442         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17443
17444         * decl.c (finit_identifier_node):  Use "$finit$", rather than
17445         "<finit>" (which Sun's verifier rejects).
17446         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
17447         (generate_field_initialization_code):  Removed.
17448         (fix_constructors)  Don't add call to $finit$ here (wrong order).
17449         (patch_method_invocation):  Add $finit$ call here.
17450
17451         * java-tree.h (CALL_USING_SUPER):  New macro.
17452         * parse.y (patch_invoke):  Remove im local variable.
17453         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
17454         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
17455         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
17456
17457         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
17458
17459         * parse.y (java_complete_tree):  Don't complain about unreachable
17460         statement if it is empty_stmt_node.
17461
17462         * jcf-write.c (find_constant_wide):  New function.
17463         (push_long_const):  Use find_constant_wide.
17464
17465         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
17466         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
17467         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17468         Emit invokeinterface when calling an interface method.
17469         Emit invokespecial also when calling super or private methods.
17470
17471         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
17472
17473 1998-12-06  Per Bothner  <bothner@cygnus.com>
17474
17475         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
17476
17477 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17478
17479         * java-tree.h (java_layout_seen_class_methods): New function
17480         prototype.
17481         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17482         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17483         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17484         * parse.y (method_declarator:): Defined action.
17485         (issue_warning_error_from_context): input_filename saved, set to
17486         the appropriate value and restored after java_error is called.
17487         (build_unresolved_array_type): Fixed comment.
17488         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17489         (method_header): Deal with return type the same way type are
17490         handled for fields and method's parameters and local variables
17491         types are handled.
17492         (check_method_redefinition): Removed extra CR.
17493         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17494         (java_layout_seen_class_methods): New function.
17495         (java_layout_classes): Call java_layout_seen_class_methods.
17496
17497 1998-12-03  Per Bothner  <bothner@cygnus.com>
17498
17499         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
17500
17501 1998-12-03  Per Bothner  <bothner@cygnus.com>
17502
17503         * jcf-dump.c (main):  Fix error message.
17504         * jcf-path.c (add_entry):  Style fix.
17505
17506 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17507
17508         * class.c (layout_class_method): Call build_java_argument_signature
17509         on constructors too.
17510         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17511         (patch_method_invocation): Define a primary when resolving an
17512         expression name. Augmented comment on code checking illegal `this'
17513         usage. Loosened it test by accepting NEW_CLASS_EXPR.
17514
17515 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17516
17517         * class.c (layout_class_method): Don't report error on non-static
17518         overriding static if the method is private.
17519         * java-tree.h (finish_class): Prototype added.
17520         * lex.c (java_get_line_col): Handle col argument -2 value.
17521         * parse.h: All static method declarations moved to parse.y.
17522         * parse.y: Now contains all static method declarations previously
17523         found in parse.h.
17524         (find_expr_with_wfl, missing_return_error,
17525         unreachable_stmt_error): New functions.
17526         (java_get_real_method_name): Identify constructors bearing class
17527         names in source code compiled classes only.
17528         (java_complete_expand_methods): Call missing_return_error.
17529         (invocation_mode): Private methods invoked as static methods.
17530         (java_complete_tree): Call unreachable_stmt_error.
17531
17532 1998-12-01  Tom Tromey  <tromey@cygnus.com>
17533
17534         * Makefile.in (+target): Removed.
17535         (+xmake_file): Likewise.
17536         (+tmake_file): Likewise.
17537         (.NOEXPORT): Removed duplicate.
17538
17539 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17540
17541         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17542
17543         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
17544
17545         * jvgenmain.c: Remove the xmalloc prototype, we get it from
17546         libiberty.h.  Provide an xmalloc definition.
17547
17548         * jvspec.c: Remove the xmalloc prototype.
17549
17550         * parse-scan.y: Include config.h and system.h.  Don't include
17551         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
17552         Provide an xstrdup definition.
17553
17554 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
17555
17556         * jcf-path.c (add_entry): Recognize ".jar" too.
17557         * lang-specs.h: Likewise.
17558
17559 1998-11-26  Per Bothner  <bothner@cygnus.com>
17560
17561         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
17562         soft_monitorenter_node, soft_monitorexit_node, throw_node.
17563
17564         * jcf-write.c (generate_bytecode_insns):
17565         Handle pre/post-increment/decrement of long.
17566
17567         * jcf-write.c (generate_bytecode_insns):
17568         Handle missing exception handler (finally for synchronized).
17569
17570 1998-11-25  Per Bothner  <bothner@cygnus.com>
17571
17572         * java-tree.h (end_params_node):  Declare global.
17573         * decl.c (end_params_node):  New global.
17574         (init_decl_processing, start_java_method):  Use end_params_node for
17575         end of list of parameter types.  Follows correct gcc conventions.
17576         * expr.c (pop_argument_types, pop_arguments):  Likewise.
17577         * lang.c (put_decl_node):  Likewise.
17578         * typeck.c (various places):  Likewise.
17579         * class.y (various places):  Likewise.
17580         * parse.y (various places):  Likewise.
17581
17582         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
17583         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
17584
17585         * class.c:  Add #include flags.h, remove no-longer needed declaration.
17586
17587         * class.c (layout_class_method):  Remove commented-out code, re-format.
17588         Don't add vtable entry (or index) for private methods.
17589         * expr.c (expand_invoke):  A private method is implicitly final.
17590         * class.c (make_class_data):  If inlining or optimizing,
17591         skip private methods.
17592
17593         * class.c (finish_class):  New function.  Calls existing methods,
17594         but alls emits deferred inline functions.
17595         * jcf-parse.c (parse_class_file):  Call finish_class.
17596         * parse.y (java_complete_expand_methods):  Likewise.
17597
17598         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
17599
17600         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
17601
17602 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
17603
17604         * jcf-write.c (generate_bytecode_conditional): Fix typo.
17605
17606 1998-11-24  Per Bothner  <bothner@cygnus.com>
17607
17608         * (generate_classfile): Always write class access flag with
17609         ACC_SUPER set.
17610
17611 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17612
17613         * class.c (maybe_layout_super_class): New function.
17614         (layout_class): Reorganized. Loop on class methods dispatched into
17615         a new function. Call maybe_layout_super_class.
17616         (layout_class_methods, layout_class_method): New functions.
17617         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17618         class.
17619         (expand_invoke): Likewise.
17620         * java-tree.h (all_class_list): New global variable declared.
17621         (layout_class_methods, layout_class_method): New function
17622         prototypes.
17623         (LAYOUT_SEEN_CLASS_METHODS): New macro.
17624         * jcf-parse.c (all_class_list): New global variable.
17625         (load_class): Extended what class_or_name can be. Use parser
17626         context mechanism to save globals before calling jcf_parse.
17627         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17628         is set on the file name.
17629         (jcf_parse): Layout class methods when Object is loaded, otherwise
17630         record class in all_class_list for delayed method layout.
17631         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17632         * lang.c (put_decl_node): Decode <init> into the decl context
17633         class name.
17634         * lex.c (java_allocate_new_line): Use xmalloc.
17635         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17636         pointers, not TREE_LIST elements.
17637         (struct parser_ctxt): Fixed comment indentations, added comments
17638         and reordered some fields.
17639         (java_check_methods): Function prototype removed.
17640         * parse.y (java_push_parser_context): Use xmalloc.
17641         (java_parser_context_restore_global): Pop extra pushed ctxp only
17642         when there's nothing next.
17643         (maybe_create_class_interface_decl): Fixed comment, add new
17644         created class decl to all_class_list.
17645         (method_header): Use GET_REAL_TYPE on argument's types.
17646         (method_declarator): Use GET_REAL_TYPE, change type to the real
17647         type in TREE_LIST dependency node. Build argument list with the
17648         real type.
17649         (create_jdep_list): Use xmalloc. Removed allocation error message.
17650         (obtain_incomplete_type): Fixed leading comment. Broadened
17651         incoming argument meaning.
17652         (register_incomplete_type): Use xmalloc. Removed allocation error
17653         message.
17654         (safe_layout_class): Fixed leading comment.
17655         (jdep_resolve_class): Reversed if statement condition and switch
17656         if and else bodies.
17657         (resolve_and_layout): Fixed leading comment. Broadened incoming
17658         argument meaning.
17659         (complete_class_report_errors): New local variable name, for
17660         clarity. purify_type_name used for all error cases.
17661         (java_get_real_method_name): Stricter check on constructors.
17662         (java_check_regular_methods): Reverse methods list only if not
17663         already laid out. Layout artificial constructor.
17664         (java_check_methods): Deleted.
17665         (source_start_java_method): Obtain incomplete type for patchable
17666         method arguments.
17667         (java_layout_classes): Fixed leading comment. Use
17668         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17669         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17670         before returning. Fixed comments.
17671         (java_expand_classes): Check for errors up front.
17672         (patch_method_invocation): Class to search is resolved and laid
17673         out.
17674
17675 1998-11-24  Per Bothner  <bothner@cygnus.com>
17676
17677         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
17678
17679         * javaop.h (int8):  Removed - not used.
17680         (jbyte):  Redefine portably with correct signedness.
17681
17682         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
17683
17684         * jcf-write.c (generate_bytecode_insns):  Fix typo
17685         OPCODE_getstatic to OPCODE_getfield.
17686
17687         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
17688         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
17689         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17690
17691 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17692
17693         * jcf-parse.c (jcf_parse_source): Function returned type is
17694         void. Added prototype.
17695         (jcf_parse): Function returned type is void.
17696         (yyparse): Remove call to fclose on the last parsed file.
17697
17698         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17699
17700 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17701
17702         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17703         (layout_class): Cope with methods featuring WFL in decl names.
17704         * decl.c (unqualified_object_id_node): New global variable,
17705         initialized.
17706         (build_decl_no_layout): Removed.
17707         * expr.c (build_primtype_type_ref): Handle Double.
17708         (java_lang_expand_expr): Fixed indentations.
17709         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17710         (flag_wall, flag_redundant, flag_not_overriding,
17711         flag_static_local_jdk1_1, unqualified_object_id_node): Global
17712         variable declarations.
17713         (build_decl_no_layout): Removed prototype.
17714         (java_get_real_method_name): Added prototype.
17715         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17716         (java_parse_abort_on_error): Macro now just returns.
17717         * jcf-parse.c (jcf_parse_source): Check fclose returned
17718         value. Call emit_register_classes if java_report_errors returns
17719         zero.
17720         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17721         flag_static_local_jdk1_1): New integer flags.
17722         (lang_decode_option): New flags set here.
17723         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17724         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17725         the flag_redundant variable.
17726         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17727         when parsing java.lang.Object class.
17728         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17729         NULL_TREE to build.
17730         (resolve_qualified_expression_name): Fixed indentation.
17731         (patch_array_ref): Changed prototype.
17732         (not_initialized_as_it_should_p): Prototype removed.
17733         (java_report_errors): Added function prototype.
17734         * parse.y (formal_parameter:): Changed error message for not yet
17735         supported final parameters.
17736         (class_type_list:): Set both PURPOSE and VALUE of created
17737         TREE_LIST to be class_type.
17738         (primary_no_new_array:): Handle class literals on primitive types.
17739         (parse_warning_context): Reinstalled correct force_error and
17740         do_warning flags setups.
17741         (java_report_errors): Changed prototype. Return java_error_count
17742         value.
17743         (variable_redefinition_error): Consider treating variable type as
17744         a fake pointer.
17745         (create_interface): Warn about redundant abstract modifier if
17746         flag_redundant is set. Changed error message.
17747         (lookup_field_wrapper): Save/restore globals before/after looking
17748         up field.
17749         (duplicate_declaration_error_p): Consider treating declaration
17750         type as a fake pointer.
17751         (register_fields): Extract real type from dependency node. Check
17752         for duplicate field declaration after type adjustment. Use
17753         DECL_INITIAL to store static final initialized values.
17754         (method_header): Extract real function type from dependency node.
17755         (check_abstract_method_header): Use GET_METHOD_NAME.
17756         (obtain_incomplete_type): Layout fake pointer type.
17757         (safe_layout_class): Don't try to check for methods before layout.
17758         (java_complete_class): Don't check for correct throws clause
17759         elements inheritance here.
17760         (resolve_and_layout): Broadened name parameter meaning.
17761         (reset_method_name): Use GET_METHOD_NAME.
17762         (java_get_real_method_name): New function.
17763         (java_check_regular_methods): Don't check methods in
17764         java.lang.Object.  Verify lineage of throws clause elements. Use
17765         flag_no_overriding in warning report.
17766         (check_throws_clauses): Don't check if class was from
17767         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17768         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17769         (declare_local_variables): Use flag_static_local_jdk1_1 to report
17770         warning on unsupported final local variables. Use build_decl
17771         instead of build_decl_no_layout. Get real local variable type from
17772         dependency node.
17773         (source_start_java_method): Get real parameter type from
17774         dependency node. Call build_decl instead of build_decl_no_layout.
17775         (java_layout_classes): Reverse tree and layout type and class as
17776         required. Mark class as loaded when done.
17777         (resolve_field_access): Fixed indentation. Restricted condition
17778         leading to static field access code generation. Set field_type
17779         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17780         (resolve_qualified_expression_name): Initialize type_found to
17781         null. Handle static field resolved during qualification. Fixed
17782         layout on non primitive field decl types.
17783         (not_accessible_p): Fixed typo in comment.
17784         (patch_method_invocation): Resolve and layout class to search from
17785         type.
17786         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17787         layout non primitive type, if necessary. Make method node only to
17788         report errors.
17789         (find_applicable_accessible_methods_list): Consider WFL'ed method
17790         decl names. Fixed indentation.
17791         (argument_types_convertible): Resolve and layout target type if
17792         necessary.
17793         (java_complete_tree): Fixed indentation problems. Rewrote
17794         CALL_EXPR thrown exceptions check. Re-installed further processing
17795         of the assignment in certain cases.
17796         (patch_assignment): Call maybe_build_primttype_type_ref to perform
17797         inlining on class literals.
17798         (valid_builtin_assignconv_identity_widening_p): Cope with constant
17799         0 literal.
17800         (valid_method_invocation_conversion_p): Likewise.
17801         (patch_string): Temporary disable forbidden use of `this' in
17802         explicit constructor invocations when doing string concatenation
17803         within their scope.
17804         (patch_unaryop): Added comment. Reinstalled code to disable
17805         further check on assignment operation with cast expression RHS.
17806         (patch_switch_statement): Fixed indentation.
17807         (build_try_statement): Call build_decl instead of
17808         build_decl_no_layout.
17809         (patch_synchronized_statement): Likewise.
17810         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17811         IS_UNCHECKED_EXPRESSION_P.
17812         (check_thrown_exceptions_do): Changed leading comment. Resolve and
17813         layout argument exception type.
17814         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17815         of IS_UNCHECKED_EXPRESSION_P.
17816
17817 1998-11-18  Anthony Green  <green@cygnus.com>
17818
17819         * jcf-parse.c (yyparse): Open class file in binary mode.
17820
17821 1998-11-15  Per Bothner  <bothner@cygnus.com>
17822
17823         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
17824
17825         * jcf-write.c (perform_relocations):  Move check out one loop.
17826
17827 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
17828
17829         * Make-lang.in: Fix reference to srcdir.
17830         * jv-scan.c: Add missing xmalloc prototype.
17831         * jvgenmain.c: Ditto.
17832
17833 1998-11-15  Per Bothner  <bothner@cygnus.com>
17834
17835         * decl.c (error_mark_node), java-tree.h:  New global.
17836         * parse.y:  Use empty_stmt_node instead of size_zero_node.
17837         (build_if_else_statement):  If missing else, use empty_stmt_node.
17838
17839         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
17840         (java_complete_expand_method):  Complain if return is missing.
17841         (java_check_regular_methods):  Comment out incorrect error check.
17842         (not_accessible_p):  Fix incorrect handling of protected methods.
17843         (patch_method_invocation):  Pass correct context to not_accessible_p.
17844         (find_applicable_accessible_methods_list):  Likewise.
17845         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17846         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17847         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17848         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17849
17850         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17851         (push_int_const):  Remove reundant NOTE_PUSH.
17852         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17853         (- case SWITCH_EXPR):  Fix code generation bug.
17854         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17855         (generate_classfile):  More robust for abstract methods.
17856
17857 1998-11-15  Anthony Green  <green@cygnus.com>
17858
17859         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17860         * Make-lang.in: Ditto.
17861
17862         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17863         * jvgenmain: Ditto.
17864
17865 1998-11-15  Per Bothner  <bothner@cygnus.com>
17866
17867         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17868
17869         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17870
17871 1998-11-14  Per Bothner  <bothner@cygnus.com>
17872
17873         Allow uses of interface types to verify.  This is not really
17874         type-safe, but it matches what Sun does, and is OK as long as
17875         there are appropriate run-time checks.
17876         * verify.c (merge_types):  If merging two interface types,
17877         just set the result to java.lang.Object.
17878         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17879
17880 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17881
17882         * gjavah.c (main): Handle --output-class-directory argument.
17883         * jvspec.c (lang_specific_driver): Translate `-d' into
17884         -foutput-class-dir.
17885         * jcf.h (jcf_write_base_directory): Declare.
17886         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17887         * lang-options.h: Mention -foutput-class-dir.
17888         * jcf-write.c (jcf_write_base_directory): New global.
17889         (make_class_file_name): Put generated .class file into `-d'
17890         directory, or into source directory if -d not given.  Function now
17891         static.
17892         (write_classfile): Free class file name.  Handle case where class
17893         file name is NULL.
17894         (DIR_SEPARATOR): New macro.
17895         Include <sys/stat.h>
17896
17897         * Makefile.in (prefix): New macro.
17898
17899 1998-11-12  Per Bothner  <bothner@cygnus.com>
17900
17901         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17902         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17903         here (done in patch_invoke instead).
17904         (case_identity):  Moved here from parse.y.
17905
17906         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17907         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17908         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17909         so they can be efficiently scanned without recursion.
17910         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17911         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17912         in BLOCK iteratively, rather than recursively.
17913
17914         * parse.y (do_unary_numeric_promotion):  New function.
17915         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17916
17917         * parse.y (patch_newarray):  Various fixes.
17918
17919         Re-do handling of switch statements (for proper block scoping).
17920         * parse.y:  Add just a single block for the enture switch block,
17921         but don't create any "case blocks".
17922         (group_of_labels):  Rmeoved unneeded non-terminal.
17923         CASE_EXPR and DEFAULT_EXPR are added to current block.
17924         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17925         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17926         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17927         * parse.y (wfl_operator, print_int_node): Make non-static.
17928         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17929         as part of recursive scan of block.
17930         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17931         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17932
17933         * parse.y:  Make various production be non-typed (void).
17934         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17935         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17936         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17937
17938         * jcf-write.c (struct jcf_handler):  New type.
17939         (struct jcf_switch_state):  New type.
17940         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17941         (alloc_handler, emit_unop, emit_reloc):  New functions.
17942         (adjust_typed_op):  Add extra parameter ("max type" offset).
17943         (emit_switch_reloc, emit_case-reloc):  New function.
17944         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17945         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17946         exception handling, method calls, object/array creation, and more.
17947
17948         * class.c:  Remove some unused variables.
17949         * constants.c (find_string_constant):  New function.
17950         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17951         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17952         if flag_emit_class_files.
17953
17954 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17955
17956         * jcf-io.c (find_class): Added explanatory comment.
17957
17958         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17959         trailing slash to `.zip' entries.
17960
17961         * jvspec.c (lang_specific_driver): Correctly handle case where
17962         GC_NAME not defined.
17963
17964 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17965
17966         * jvspec.c (GC_NAME): New define.
17967         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17968         if required.
17969         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17970
17971 1998-11-11  Per Bothner  <bothner@cygnus.com>
17972
17973         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17974
17975 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17976
17977         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17978
17979 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17980
17981         * class.c (is_compiled_class): Call safe_layout_class for class
17982         compiled from source.
17983         * conver.h (convert_to_integer, convert_to_real,
17984         convert_to_pointer): Added prototypes.
17985         * decl.c (init_decl_processing): Non longer push the decls of
17986         `methodtable', `constants', `Class', `Field', `dispatchTable'
17987         `jexception' and `Method'.
17988         * expr.c (build_invokeinterface): New function.
17989         (expand_invoke): static variable CLASS_IDENT now in
17990         build_invokeinterface. Use build_invokeinterface.
17991         (expand_java_field_op): Moved code to inline
17992         java.lang.PRIMTYPE.TYPE into a function.
17993         (build_primtype_type_ref): New function.
17994         * java-tree.def (INSTANCEOF_EXPR): New tree code.
17995         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
17996         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
17997         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
17998         (DECL_LOCAL_STATIC_VALUE): New macro.
17999         (build_invokeinterface, build_primtype_type_ref): New function
18000         prototypes.
18001         (java_parse_abort_on_error): Macro rewritten.
18002         * jcf-parse.c (current_method): Add comment to declaration.
18003         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18004         Function prototypes fixed.
18005         (jcf_parse_source): push/pop parser context. save/restore global.
18006         (parse_source_file): Fixed leading comment. Now take a
18007         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18008         classes and pop the parser context anymore.
18009         (yyparse): Push parser context, save globals, parse the source
18010         file, restore globals and pop the parser context when processing a
18011         source file.
18012         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18013         * lex.c (java_parse_doc_section): New function.
18014         (java_lex): Call java_parse_doc_section when appropriate. Build an
18015         operator around INSTANCEOF_TK.
18016         * lex.h (java_lineterminator, java_sprint_unicode,
18017         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18018         Prototypes rewritten.
18019         (java_parse_escape_sequence, java_letter_or_digit_p,
18020         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18021         java_read_unicode, java_store_unicode, java_read_char,
18022         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18023         Added function prototypes.
18024         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18025         define.
18026         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18027         New macros
18028         (struct parser_ctxt): New fields: deprecated,
18029         current_parsed_class_un, gclass_list.
18030         (fix_method_argument_names, issue_warning_error_from_context,
18031         resolve_package, lookup_package_type): New function prototypes.
18032         (resolve_expression_name): Fixed function prototype.
18033         (find_applicable_accessible_methods_list): Fixed indentation, added
18034         extra argument in prototype.
18035         (check_final_assignment, build_null_of_type, check_deprecation,
18036         check_method_redefinition, reset_method_name,
18037         java_check_regular_methods, java_check_abstract_methods,
18038         maybe_build_primttype_type_ref): New function prototype.
18039         * parse.y (conver.h): Include.
18040         (INSTANCEOF_TK): Tagged <operator>.
18041         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18042         (relational_expression:): Build binop for instanceof.
18043         (java_push_parser_context): Remember ctxp->gclass_list across
18044         contexts.
18045         (java_pop_parser_context): Simply return if no context
18046         exists. Remember gclass_list across contexts.
18047         (issue_warning_error_from_context): New function.
18048         (parse_error_context): Don't setup ctxp->elc here. Call
18049         issue_warning_error_from_context instead.
18050         (parse_warning_context): Likewise.
18051         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18052         setup. Link new class/interface to ctxp->gclass_list.
18053         (add_superinterfaces): Register interface as incomplete if not
18054         loaded.
18055         (create_class): Remember class unqualified name in
18056         ctxp->current_parsed_class_un. Check class deprecation.
18057         (register_fields): Check field deprecation. Remember static final
18058         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18059         processing INIT.
18060         (method_header): New local variable ORIG_ARG. Use unqualified
18061         current class name for check on constructor errors. Promote return
18062         type if of record type. Argument list fix moved in
18063         fix_method_argument_names, called here. Check method deprecation.
18064         (fix_method_argument_names): New function.
18065         (method_declarator): Promote record typed arguments.
18066         (safe_layout_class): Check class methods before layout.
18067         (java_complete_class): Compute field layout when patched.
18068         (do_resolve_class): Try to load class after having it renamed
18069         after the package name.
18070         (get_printable_method_name): Use DECL_CONTEXT.
18071         (reset_method_name): New function.
18072         (check_method_redefinition): Use reset_method_name.
18073         (java_check_regular_methods): New local variable
18074         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18075         names for error report. Check for compile-time error when method
18076         found has default (package) access.
18077         (java_check_abstract_methods): Now takes an interface DECL node as
18078         an argument. Also reinstall real name on unchecked
18079         overriding/hiding methods for error report.
18080         (java_check_methods): Fixed leading comment. Get classes to verify
18081         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18082         CLASS_METHOD_CHECKED_P on class verification.
18083         (lookup_java_method2): Get real method name if necessary.
18084         (find_in_imports): Don't check package class access here.
18085         (resolve_package, lookup_package_type): New functions.
18086         (java_layout_classes): Fixed leading comment. Take classes to be
18087         laid out from ctxp->gclass_list.
18088         (java_complete_expand_methods): Don't expand native and abstract
18089         methods.
18090         (java_expand_classes): New function.
18091         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18092         values of static final field of primitive types.
18093         (resolve_field_access): Handles static final field of promotive
18094         type.
18095         (resolve_qualified_expression_name): Handle STRING_CST as
18096         primaries and package name resolution. Check deprecation on found
18097         decls. Set where_found and type_found on non static field resolved
18098         during qualification. Layout non primitive field decl types.
18099         (check_deprecation): New function.
18100         (maybe_access_field): Simplified.
18101         (patch_method_invocation_stmt): Local variable CLASS_TYPE
18102         removed. Reverse method's argument when primary is a type. Don't
18103         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18104         instead. Include abstract class in the list of class searchable
18105         for constructors. Use DECL_CONTEXT of found method for access
18106         checks. Check method deprecation.
18107         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18108         converting arguments. Handle INVOKE_INTERFACE.
18109         (lookup_method_invoke): Search constructor using existing
18110         infrastructure (don't rely on lookup_java_constructor anymore).
18111         (find_applicable_accessible_methods_list): Extra argument flag
18112         LC. Now include constructor in the search.
18113         (qualify_ambiguous_name): Conditional expression are primaries.
18114         (not_initialized_as_it_should_p): static final are always
18115         initialized.
18116         (java_complete_tree): Pass extra NULL argument to
18117         resolve_expression_name. Stricter test to carry on patching
18118         assignments. New case for INSTANCEOF_EXPR.
18119         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18120         (check_final_assignment, maybe_build_primttype_type_ref): New
18121         functions.
18122         (patch_assignment): Detect resolved static finals and carry normal
18123         assignment error check on them. Inline PRIMTYPE.TYPE read access.
18124         (try_builtin_assignconv): Access constant 0 on all primitive
18125         types.
18126         (valid_builtin_assignconv_identity_widening_p): Accept identical
18127         types. Accept all promoted type on int type.
18128         (valid_ref_assignconv_cast_p): Accept a null pointer to be
18129         assigned to a reference.
18130         (valid_method_invocation_conversion_p): Accept to check null
18131         pointers.
18132         (build_binop): Merge declaration and initialization of local
18133         variable BINOP.
18134         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18135         numeric types. Improved validity test for qualify operators on
18136         references.
18137         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18138         and PREINCREMENT_EXPR. Also detect resolved static finals of a
18139         primitive type and issue the appropriate error message.
18140         (resolve_type_during_patch): Mark class loaded when resolved.
18141         (patch_cast): Allow null to be cased to reference types.
18142         (build_null_of_type): New function.
18143         (patch_array_ref): Handle array on references correctly.
18144         (patch_return): Removed unused local variable MODIFY. Force
18145         boolean to be returned as integers. Allows null to be returned by
18146         a function returning a reference.
18147         * typeck.c (convert_to_integer, convert_to_real,
18148         convert_to_pointer): Prototypes moved to convert.h
18149         (lookup_argument_method): Use method real name, if necessary.
18150
18151 1998-10-30  Tom Tromey  <tromey@cygnus.com>
18152
18153         * class.c (build_class_ref): Changed name of primitive classes to
18154         start with `_Jv_'.
18155
18156         * class.c (make_class_data): Renamed fields: nmethods to
18157         method_count, method_count to dtable_method_count.  Always set
18158         `state' field to 0.
18159         * decl.c (init_decl_processing): Likewise.
18160
18161 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18162
18163         * class.c (layout_class): Don't mangle <finit>, produce
18164         __finit<class> instead. Don't verify artificial methods.
18165         * decl.c (finit_identifier_node): New declared global.
18166         (init_decl_processing): finit_identifier_node initialized.
18167         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18168         * java-tree.h (finit_identifier_node): Declared as extern.
18169         (struct lang_decl): New field called_constructor.
18170         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18171         (CLASS_HAS_FINIT_P): New macro.
18172         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18173         explicit constructor invocation.
18174         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18175         CALL_SUPER_CONSTRUCTOR_P): New macros.
18176         (write_classfile): Added prototype.
18177         * jcf-parse.c (jcf_parse_source): Parse and remember for
18178         generation if the file was seen on the command line.
18179         (parse_source_file): Don't write the class file here.
18180         (yyparse): Loop on files rewritten. Set current_jcf.
18181         (parse_zip_file_entries): Parse class file only if it was found.
18182         * lang.c (init_parse): Don't open command line provided filename
18183         here.
18184         (lang_parse): Don't set main_jcf anymore.
18185         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18186         (JCONSTRUCTOR_CHECK): New macro.
18187         (JBSC_TYPE_P): New macro.
18188         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18189         (COMPLETE_CHECK_OP_2): New macro.
18190         (struct parse_ctxt): New field explicit_constructor_p.
18191         (check_class_interface_creation): Fixed prototype indentation.
18192         (patch_method_invocation_stmt): Prototype reflects added argument.
18193         (patch_invoke): Likewise.
18194         (complete_method_declaration, build_super_invocation,
18195         verify_constructor_circularity,
18196         build_this_super_qualified_invocation, get_printable_method_name,
18197         patch_conditional_expr, maybe_generate_finit, fix_constructors,
18198         verify_constructor_super, create_artificial_method,
18199         start_artificial_method_body, end_artificial_method_body,
18200         generate_field_initialization_code): New function prototypes.
18201         * parse.y: Fixed leading comment
18202         (constructor_header:, constructor_body:, block_end:): Rules tagged
18203         <node>.
18204         (type_declaration:): Call maybe_generate_finit.
18205         (method_declaration:): Action for method_body: placed in new
18206         function complete_method_declaration, called here.
18207         (constructor_declaration:): Defined actions. Removed leading
18208         FIXME.
18209         (constructor_header:): New rule with action.
18210         (constructor_body:): Rule rewritten using block_begin: and
18211         block_end:. Defined actions.
18212         (constructor_declarator:, explicit_constructor_invocation:):
18213         Defined actions.
18214         (block:): Use new rules block_begin: block_end:.
18215         (block_begin:, block_end:): New rules and actions.
18216         (block_statements:): Fixed error message for explicit
18217         constructors.
18218         (method_invocation:): Call build_this_super_qualified_invocation
18219         if primary is `this' or `super' was seen.
18220         (conditional_expression:): Action defined.
18221         (extra_ctxp_pushed_p): New static global flag.
18222         (java_parser_context_save_global): Create parser context if
18223         necessary. Use extra_ctxp_pushed_p to remember it.
18224         (java_parser_context_restore_global): Pop extra parser context if
18225         one exists.
18226         (build_array_from_name): Array on primitive types are marked
18227         loaded.
18228         (register_fields): Restore new name in field initializer
18229         expression if type was altered. Non static fields initialized upon
18230         declaration marked initialized.
18231         (maybe_generate_finit): New function.
18232         (maybe_generate_clinit): Use create_artificial_method,
18233         start_artificial_method_body, end_artificial_method_body. Generate
18234         debug info for enclosed initialization statements.
18235         (method_header): Fixed leading comment. Check constructor
18236         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18237         accordingly.
18238         (complete_method_declaration, constructor_circularity_msg,
18239         verify_constructor_circularity): New functions.
18240         (get_printable_method_name): New function.
18241         (check_method_redefinition): Don't rename <finit> methods. Fix
18242         declared constructor names. Error message for
18243         constructors modified.
18244         (java_check_regular_methods): Local variable seen_constructor
18245         renamed saw_constructor. Skip verification on constructors. Create
18246         default constructor with create_artificial_method.
18247         (java_check_methods): Removed unnecessary empty line.
18248         (create_artificial_method, start_artificial_method_body,
18249         end_artificial_method_body): New functions.
18250         (java_layout_classes): Changed leading comment. Reverse fields
18251         list if necessary. Always layout java.lang.Object if being
18252         defined.
18253         (java_complete_expand_methods): Verify constructor circularity.
18254         (java_complete_expand_method): Call fix_constructor on
18255         constructors.  Local variable no_ac_found removed. Restore
18256         bindings if method body expansion failed.
18257         (fix_constructors, verify_constructor_super,
18258         generate_field_initialization_code): New function.
18259         (java_expand_classes): Fixed leading comment. Write class file
18260         here.
18261         (resolve_expression_name): Check for illegal instance variable
18262         usage within the argument scope of an explicit constructor
18263         invocation.
18264         (resolve_qualified_expression_name): Pass extra from_super flag
18265         when invoking patch_method_invocation_stmt. New case for
18266         conditional expression when used as a primary. Check for error
18267         when acquiring super.
18268         (patch_method_invocation_stmt): Added extra argument super. New
18269         local variable is_static_flag. Set class_to_search according to
18270         the nature of the constructor invocation. Don't add `this'
18271         argument when expanding NEW_CLASS_EXPR. Check for illegal method
18272         invocation within the argument scope of explicit constructor
18273         invocation. Set is_static according to is_static_flag. Provide
18274         extra `super' argument to patch_invoke invocation.
18275         (patch_invoke): New argument from_super. Loop on arguments
18276         indentation fixed. Pass from_super to invocation_mode. New switch
18277         case INVOKE_SUPER. Fixed error message in switch default case.
18278         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18279         value.
18280         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18281         (lookup_method_invoke): Fixed prototypes in candidates list. Error
18282         message takes constructors into account.
18283         (find_applicable_accessible_methods_list): Fixed indentation.
18284         (qualify_ambiguous_name): Take explicit constructor invocation
18285         into account. Deal with a conditional expression as a primary to
18286         a method call.
18287         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18288         case. Added extra argument to patch_method_invocation_stmt.
18289         Register calls made to explicit constructor `this'. Don't call
18290         save_expr in ARRAY_REF case when emitting class files. Check for
18291         illegal use of this when expanding explicit constructor invocation
18292         arguments.
18293         (complete_function_arguments): Set and reset parser context
18294         explicit_constructor_p field value when appropriate.
18295         (build_super_invocation, build_this_super_qualified_invocation):
18296         New functions.
18297         (patch_assignment): Fixed typo.
18298         (patch_unaryop): Check on final fields occurs only when a decl
18299         exits.
18300         (patch_return): Take constructors into account.
18301         (patch_conditional_expr): New function.
18302         * typeck.c (build_java_signature): Removed unnecessary empty line.
18303
18304 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18305
18306         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18307
18308 1998-10-28  Tom Tromey  <tromey@cygnus.com>
18309
18310         * decl.c (init_decl_processing): Renamed fields.
18311         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18312         interface_len, msize fields.
18313
18314         * class.c (make_class_data): Removed subclass_head and
18315         subclass_next fields.
18316         * decl.c (init_decl_processing): Removed subclass_head and
18317         subclass_next fields.
18318
18319 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18320
18321         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18322         * mangle.c (emit_unicode_mangled_name): Similarly.
18323
18324 1998-10-26  Nick Clifton  <nickc@cygnus.com>
18325
18326         * jcf-parse.c (get_constant): Place braces around code to compute
18327         'd' when REAL_ARITHMETIC is not defined.
18328
18329 1998-10-25  H.J. Lu  (hjl@gnu.org)
18330
18331         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18332         dependency.
18333
18334 1998-10-23  Tom Tromey  <tromey@cygnus.com>
18335
18336         * lang-specs.h: `.zip' files are input to jc1.
18337
18338 1998-10-22  Per Bothner  <bothner@cygnus.com>
18339
18340         * jvspecs.c:  Add (but don't enable) support for combining multiple
18341         .class and .java input filenames to a single jc1 invocation.
18342         Add support for -C flag (copile to .class files).
18343         Translate -classpath and -CLASSPATH arguments.
18344         * lang-specs.h:  Don't set %2 spec.
18345
18346 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18347
18348         * jcf-path.c (add_entry): Don't add trailing separator if entry is
18349         a .zip file.
18350         (add_path): Don't add trailing separator to non-empty path
18351         elements.
18352
18353         * lang.c (lang_decode_option): Check for -fclasspath and
18354         -fCLASSPATH before examining other `-f' options.
18355
18356         * java-tree.h (finalize_identifier_node): Don't declare.
18357         * class.c (make_class_data): Don't push "final" field.
18358         * decl.c (init_decl_processing): Don't push "final" field.
18359         (finalize_identifier_node): Removed.
18360         (init_decl_processing): Don't set finalize_identifier_node.
18361
18362         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18363
18364 1998-10-11  Anthony Green  <green@cygnus.com>
18365
18366         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18367         (JV_SCAN_SOURCES): New macro.
18368         (JCF_DUMP_SOURCES): Likewise.
18369         (jcf-dump$(exeext)): New target.
18370         (jv-scan$(exeext)): New target.
18371
18372 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18373
18374         * Makefile.in (LEX): Removed.
18375         (LEXFLAGS): Likewise.
18376         (SET_BISON): New macro.
18377         (BISON): Removed.
18378         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
18379         spurious diffs in parse.c.
18380         ($(PARSE_SCAN_C)): Likewise.
18381         (PARSE_DIR): New macro.
18382         (PARSE_C): Use it.
18383         (PARSE_SCAN_C): Likewise.
18384         (PARSE_RELDIR): New macro.
18385
18386         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18387
18388         * jcf-io.c (find_class): Use saw_java_source to determine when to
18389         look for `.java' file.
18390         * jcf-parse.c (saw_java_source): New global.
18391         (yyparse): Set it if `.java' file seen.
18392
18393         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18394         (GCJH_SOURCES): Likewise.
18395         * Makefile.in (datadir): New macro.
18396         (libjava_zip): Likewise.
18397         (JAVA_OBJS): Added jcf-path.o.
18398         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18399         (../gcjh$(exeext)): Likewise.
18400         (jcf-path.o): New target.
18401         * java-tree.h (fix_classpath): Removed decl.
18402         * jcf-parse.c (fix_classpath): Removed.
18403         (load_class): Don't call fix_classpath.
18404         * parse.y (read_import_dir): Don't call fix_classpath.
18405         * lex.h: Don't mention classpath.
18406         * lex.c (java_init_lex): Don't initialize classpath.
18407         * jcf-io.c (classpath): Removed global.
18408         (find_class): Use jcf_path iteration functions.  Correctly search
18409         class path for .java file.
18410         (open_in_zip): New argument `is_system'.
18411         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
18412         classpath-related options.
18413         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18414         and -I.
18415         (lang_init): Call jcf_path_init.
18416         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18417         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
18418         Correctly put braces around second string in each entry.
18419         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
18420         classpath-related options.
18421         (help): Updated for new options.
18422         * jcf.h: Declare functions from jcf-path.c.  Don't mention
18423         `classpath' global.
18424         * jcf-path.c: New file.
18425
18426         * jcf-depend.c: Include jcf.h.
18427
18428         * jcf-write.c (localvar_alloc): Returns `void'.
18429         (localvar_free): Removed unused variable.
18430
18431         * lang.c (OBJECT_SUFFIX): Define if not already defined.
18432         (init_parse): Use OBJECT_SUFFIX, not ".o".
18433
18434 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18435
18436         * class.c (emit_register_classes): Renamed from
18437         emit_register_class.
18438         * java-tree.h (emit_register_classes): Prototype renamed from
18439         emit_register_class.
18440         * jcf-parse.c (yyparse): Call emit_register_classes once before
18441         returning.
18442         * parse.y (java_expand_classes): No longer register classes.
18443
18444 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18445
18446         * class.c (is_compiled_class): New local variable
18447         seen_in_zip. Identify classes found in currently compiled source
18448         file(s).
18449         * decl.c (complete_start_java_method): Fixed typo.
18450         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18451         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18452         (CLASS_P): Moved around.
18453         (java_parse_abort_on_error): Macro moved from jcf-parse.c
18454         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18455         java-tree.h
18456         (jcf_parse_source): Changed leading comment. Removed unnecessary
18457         fclose and CLASS_FROM_SOURCE_P marking.
18458         (parse_source_file): New local variables remember_for_generation
18459         and filename. Mark parsed file name identifier node. Removed block
18460         executed when parse_only was null. Set remember_for_generation.
18461         Use it as an argument to java_pop_parser_context.
18462         (yyparse): New local variables several_files, list, next node and
18463         current_file_list. Split ampersand separated file names into
18464         current_file_list. Iterate through the list and parse accordingly.
18465         * parse.h (java_pop_parser_context): New function prototype.
18466         * parse.y (ctxp_for_generation): New static global variable.
18467         (java_pop_parser_context): New argument generate. Link popped ctxp
18468         to ctxp_for_generation list accordingly.
18469         (java_complete_expand_methods): Fixed indentation.
18470         (java_expand_classes): New function.
18471
18472 1998-10-17  Per Bothner  <bothner@cygnus.com>
18473
18474         * Makefile.in:  Link with libiberty.a instead of memmove.o.
18475
18476 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18477
18478         * lex.c (setjmp.h): No longer included.
18479         * lex.h (setjmp.h): Included.
18480         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18481         (duplicate_declaration_error_p): Renamed from
18482         duplicate_declaration_error.
18483         (build_array_from_name): New function prototype.
18484         * parse.y (setjmp.h): No longer included.
18485         (variable_declarator_id): Define action.
18486         (build_array_from_name): New function.
18487         (duplicate_declaration_error_p): Renamed from
18488         duplicate_declaration_error.  Fixed leading comment.
18489         (register_fields): Main `for' loop reorganized. Uses
18490         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18491         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18492         build_array_from_name.
18493         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18494         types.
18495         (read_import_dir): Don't try to skip `.' and `..'.
18496         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18497         build_array_from_name. Main `for' loop reorganized.
18498         (resolve_qualified_expression_name): When building access to a
18499         field, use the type where the field was found, not its own type.
18500         (maybe_access_field): Use field DECL_CONTEXT if the type where the
18501         field was found is null.
18502         (qualify_ambiguous_name): Sweep through all successive array
18503         dimensions.
18504
18505 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18506
18507         * java-tree.h (pop_labeled_block, lang_printable_name,
18508         maybe_add_interface, set_super_info, get_access_flags_from_decl,
18509         interface_of_p, inherits_from_p, fix_classpath,
18510         complete_start_java_method, emit_handlers, init_outgoing_cpool,
18511         make_class_data, register_class, alloc_name_constant): New
18512         function prototypes.
18513         * lang.c (lang_decode_option): Set argc argument unused. Fixed
18514         indentation. Added cast to remove warning.
18515         (lang_printable_name): Set v argument unused.
18516         (lang_print_error): Added argument to lang_printable_name call.
18517         (java_dummy_print, print_lang_decl, print_lang_type,
18518         print_lang_identifier, lang_print_xnode): All argument marked
18519         unused.
18520         * lex.c (java_unget_unicode): Removed unnecessary argument.
18521         (java_allocate_new_line): Unused local variable is gone.
18522         (java_read_char): Added parenthesis in expressions to remove
18523         warnings.  Added final return statement.
18524         (java_read_unicode): Added parenthesis in expression to remove
18525         warning.
18526         (java_parse_end_comment): Fixed java_unget_unicode invocation.
18527         (java_parse_escape_sequence): Likewise.
18528         (java_lex): Unused local variables are gone. Fixed
18529         java_unget_unicode invocation.
18530         * lex.h (set_float_handler): Prototype added when JC1_LITE not
18531         defined.
18532         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18533         lang_printable_name invocation in macro.
18534         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18535         Likewise.
18536         (duplicate_declaration_error): Suppressed unused argument in
18537         prototype.
18538         (identical_subpath_p): Function declaration is gone.
18539         (patch_invoke): Suppressed unused argument in prototype.
18540         (patch_cast, build_labeled_block, check_thrown_exceptions):
18541         Likewise.
18542         * parse.y (setjmp.h): Included
18543         (toplev.h): Likewise.
18544         (field_declaration:): Suppressed unused local
18545         (label_decl:): Fixed build_labeled_block invocation.
18546         (java_pop_parser_context): Put extra parenthesis around assignment
18547         in if.
18548         (yyerror): Suppressed unused local variables.
18549         (variable_redefinition_error): Fixed lang_printable_name
18550         invocation.
18551         (create_interface): Suppressed unused local variables.
18552         (create_class): Likewise.
18553         (duplicate_declaration_error): Suppressed unused argument. Fixed
18554         lang_printable_name invocation.
18555         (register_fields): Suppressed unused local variable. Fixed
18556         duplicate_declaration_error invocation.
18557         (method_header): Suppressed unused local variable.
18558         (method_declarator, parser_check_super): Likewise.
18559         (java_complete_class): Suppressed unused local variable. Fixed
18560         fatal error message.
18561         (complete_class_report_errors): Added default: in switch.
18562         (java_check_regular_methods): Fixed lang_printable_name
18563         invocations.
18564         (check_throws_clauses): Likewise.
18565         (java_check_abstract_methods): Suppressed unused local
18566         variable. Fixed lang_printable_name invocation.
18567         (read_import_entry): Added supplemental return statement.
18568         (read_import_dir): Suppressed unused local variables.
18569         (check_pkg_class_access, declare_local_variables): Likewise.
18570         (source_start_java_method): Suppressed unused extern variable
18571         declarations
18572         (expand_start_java_method): Suppressed unused extern and local
18573         variable declarations.
18574         (java_complete_expand_methods): Likewise.
18575         (java_complete_expand_method): Suppressed unused local variables.
18576         (make_qualified_name): Likewise.
18577         (resolve_qualified_expression_name): Added default: in
18578         switch. Fixed lang_printable_name invocation.
18579         (class_instance_creation_expression): Added parenthesis around
18580         expressions.
18581         (patch_method_invocation_stmt): Fixed lang_printable_name and
18582         patch_invoke invocations.
18583         (check_for_static_method_reference): Fixed lang_printable_name
18584         invocation.
18585         (patch_invoke): Suppressed unused arguments and local variables.
18586         (lookup_method_invoke): Suppressed unused local variables.
18587         (qualify_ambiguous_name): Added default: in switch.
18588         (identical_subpath_p): Function removed.
18589         (patch_assignment): Suppressed unused local variables. Suppressed
18590         unnecessary if statement. Fixed lang_printable_name invocations.
18591         (try_builtin_assignconv): Fixed lang_printable_name invocations.
18592         (valid_ref_assignconv_cast_p): Parenthesis around
18593         expression. Suppressed unused local variables.
18594         (build_binop): Suppressed unused local variables. fixed
18595         lang_printable_name invocations.
18596         (string_constant_concatenation): Suppressed unused local
18597         variables.
18598         (patch_unaryop): Fixed lang_printable_name invocation.
18599         (patch_cast): Suppressed unnecessary argument. Fixed
18600         lang_printable_name invocation.
18601         (patch_array_ref): Fixed lang_printable_name invocation.
18602         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18603         (build_labeled_block): Suppressed unused argument.
18604         (generate_labeled_block): Fixed build_labeled_block invocation.
18605         (build_loop_body): Suppressed unused local variables.
18606         (patch_loop_statement): Likewise.
18607         (patch_exit): Fixed lang_printable_name invocation.
18608         (patch_switch_statement): Likewise.
18609         (case_identity): First argument marked unused.
18610         (patch_try_statement): Fixed lang_printable_name invocations.
18611         (patch_synchronized_statement, patch_throw_statement): Likewise.
18612         (check_thrown_exceptions): Fixed check_thrown_exceptions and
18613         lang_printable_name invocations.
18614         (check_thrown_exceptions_do): Suppressed unused argument.
18615
18616 1998-10-14  Tom Tromey  <tromey@cygnus.com>
18617
18618         * jcf-write.c (write_classfile): Add output class file as target.
18619         * lang-options.h: Added -MD, -MMD, -M, and -MM.
18620         * jcf.h: Added declarations for dependency-tracking functions.
18621         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18622         * lang.c (lang_decode_option): Recognize -MD and -MMD.
18623         (finish_parse): Call jcf_dependency_write.
18624         (dependency_tracking): New global.
18625         (DEPEND_SET_FILE): New define.
18626         (DEPEND_ENABLE): New define.
18627         (init_parse): Enable dependency tracking if required.
18628         Include "flags.h".
18629         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18630         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18631         (../gcjh$(exeext)): Likewise.
18632         (jcf-depend.o): New target.
18633         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18634         (GCJH_SOURCES): Likewise.
18635         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
18636         dep_name argument.
18637         (find_classfile): Added dep_name argument.
18638         (find_class): Compute name of dependency.
18639         (open_in_zip): Call jcf_dependency_add_file.
18640         * gjavah.c (output_file): No longer global.
18641         (usage): Don't mention "gjavah".
18642         (help): Likewise.
18643         (java_no_argument): Likewise.
18644         (version): Likewise.
18645         (main): Recognize and handle -M family of options.
18646         (print_mangled_classname): Return is void.
18647         (process_file): Handle case where output is suppressed.
18648         (HANDLE_END_FIELD): Likewise.
18649         (HANDLE_METHOD): Likewise.
18650         * jcf-depend.c: New file.
18651
18652 1998-10-13  Jeffrey A Law  (law@cygnus.com)
18653
18654         * java-tree.def: Add missing newline at EOF.
18655
18656 1998-10-13  Tom Tromey  <tromey@cygnus.com>
18657
18658         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18659         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
18660         function.
18661         Include <config.h> and "system.h".
18662         (disassemble_method): Undefine RET to avoid clash with
18663         config/i386/i386.h.
18664
18665 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18666
18667         * decl.c (runtime_exception_type_node, error_exception_type_node):
18668         New global variables.
18669         (init_decl_processing): Initialized.
18670         * expr.c (java_lang_expand_expr): Set caught exception type to
18671         null if catch handler argument doesn't exit.
18672         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18673         tree codes.
18674         * java-tree.h (runtime_exception_type_node,
18675         error_exception_type_node): Global variables declared.
18676         (DECL_FUNCTION_THROWS): New macro.
18677         (DECL_FUNCTION_BODY): Modified comment.
18678         (DECL_SPECIFIC_COUNT): Likewise.
18679         (struct lang_decl): New field throws_list.
18680         (IS_UNCHECKED_EXPRESSION_P): New macro.
18681         * lex.c (java_lex): Generate location information for THROW_TK.
18682         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18683         EXCEPTIONS_P): New macros.
18684         (enum jdep_code): New value JDEP_EXCEPTION.
18685         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18686         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18687         PATCH_METHOD_RETURN_ERROR): New macros.
18688         (patch_method_invocation_stmt): Added new argument to prototype.
18689         (patch_synchronized_statement, patch_throw_statement,
18690         check_thrown_exceptions, check_thrown_exceptions_do,
18691         purge_unchecked_exceptions, check_throws_clauses): New function
18692         prototypes.
18693         * parse.y Fixed typo in keyword section.
18694         (throw:): Rule tagged <node>.
18695         (THROW_TK): Keyword tagged <operator>.
18696         (method_header:): Last argument to call to method_header passed
18697         from throws: rule.
18698         (throws:, class_type_list:, throw_statement:,
18699         synchronized_statement:, synchronized:): Defined actions.
18700         (method_header): New local variable current. Register exceptions
18701         from throws clause.
18702         (java_complete_tree): Complete and verify exceptions from throws
18703         clause.
18704         (complete_class_report_errors): Error message on exceptions not
18705         found
18706         (java_check_regular_methods): Fixed typo. Shortcut on private
18707         overriding methods. Changed error message on method
18708         redefinition. Check for throws clause compatibility.
18709         (check_throws_clauses): New function.
18710         (java_check_abstract_methods): Use DECL_NAME for wfl or current
18711         method. Changed error message on method redefinition.
18712         (currently_caught_type_list): New static variable.
18713         (java_complete_expand_methods): Purge unchecked exceptions from
18714         throws clause list. Call PUSH_EXCEPTIONS before walk and
18715         POP_EXCEPTIONS after.
18716         (resolve_qualified_expression_name): Pass new argument as NULL to
18717         patch_method_invocation_stmt.
18718         (patch_method_invocation_stmt): New argument ref_decl. Invoke
18719         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18720         argument list when appropriate. Use new argument if non null to
18721         store selected method decl.
18722         (patch_invoke): Convert if necessary args of builtin types before
18723         forming CALL_EXPR. Argument list no longer reversed here.
18724         (invocation_mode): Treat final methods as static methods.
18725         (java_complete_tree): New cases for THROW_EXPR: and
18726         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18727         function call.
18728         (complete_function_arguments): No more RECORD_TYPE
18729         conversion. Function parameter nodes no longer saved.
18730         (valid_ref_assignconv_cast_p): Avoid handling null type.
18731         (patch_binop): Fixed null constant reference handling.
18732         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18733         BUILD_THROW macros.
18734         (patch_try_statement): Fixed comments. Record caught types in
18735         list, push the list, expand try block and pop the list.
18736         (patch_synchronized_statement, patch_throw_statement,
18737         check_thrown_exceptions, check_thrown_exceptions_do,
18738         purge_unchecked_exceptions): New functions.
18739         * typeck.c (lookup_argument_method): Allow WFL in place of method
18740         DECL_NAME during method definition check
18741
18742 1998-10-09  Tom Tromey  <tromey@cygnus.com>
18743
18744         * gjavah.c (decode_signature_piece): New function.
18745         (print_c_decl): Use it.  Added `name_override' argument.
18746         (print_method_info): Use name_override argument to print_c_decl.
18747         (seen_fields): Removed.
18748         (print_field_info): Don't update seen_fields.
18749         (struct method_name): New structure.
18750         (method_name_list): New global.
18751         (print_method_info): Add new method to list of methods.
18752         (name_is_method_p): New function.
18753         (print_field_info): If field name has same name as method, then
18754         change field name.
18755         (process_file): Parse methods before fields.
18756         (field_pass): New global.
18757         (HANDLE_END_FIELD): Take field_pass into account.
18758
18759 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18760
18761         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18762         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18763
18764 1998-10-03  Anthony Green  <green@cygnus.com>
18765
18766         * jvspec.c: Fix bug in jvgenmain_spec patch.
18767
18768 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18769
18770         * Makefile.in (lang.o:): Install dependency on java-tree.def.
18771         * decl.c (soft_exceptioninfo_call_node): New global variable.
18772         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18773         takes extra integer argument. soft_exceptioninfo_call_node
18774         initialized.
18775         * except.c (java_set_exception_lang_code): New function
18776         (method_init_exceptions): Called here.
18777         (prepare_eh_table_type): New function.
18778         (expand_end_java_handler): Called here.
18779         * expr.c (build_java_throw_out_of_bounds_exception): Now features
18780         one argument. Modified generation of call to
18781         soft_badarrayindex_node to use new argument.
18782         (build_java_arrayaccess): Pass faulty index value to
18783         build_java_throw_out_of_bounds_exception.
18784         (generate_name): New function.
18785         (java_lang_expand_expr): New local variables node, current,
18786         has_finally_p. Expand TRY_EXPR node.
18787         (process_jvm_instruction): Replace top of the stack with thrown
18788         object reference when entering exception handler.
18789         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18790         specific tree codes.
18791         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18792         global.
18793         (DECL_SPECIFIC_COUNT): New macro.
18794         (prepare_eh_table_type, java_set_exception_lang_code,
18795         generate_name): New function declarations.
18796         (match_java_method): Declaration deleted.
18797         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18798         macros.
18799         * lex.c (TRY_TK, CATCH_TK): Generate location information.
18800         * parse.h (redefinition_error, refine_accessible_methods_list,
18801         can_cast_to_p): Function declaration removed.
18802         (classitf_redefinition_error, variable_redefinition_error,
18803         parse_jdk1_1_error, find_applicable_accessible_methods_list,
18804         find_most_specific_methods_list, argument_types_convertible,
18805         enter_a_block, valid_builtin_assignconv_identity_widening_p,
18806         valid_cast_to_p, valid_method_invocation_conversion_p,
18807         try_reference_assignconv, add_stmt_to_compound,
18808         build_jump_to_finally, build_tree_list, patch_try_statement,
18809         java_get_catch_block): New function declarations.
18810         * parse.y (string_buffer_type): Global variable deleted.
18811         (group_of_labels, catches, catch_clause, catch_clause_parameter,
18812         finally): Rules tagged <node>.
18813         (TRY_TK, CATCH_TK): Token tagged <operator>.
18814         (class_body_declaration:, class_member_declaration:,
18815         formal_parameter:, explicit_constructor_invocation:,
18816         interface_member_declaration:, constant_declaration:,
18817         primary_no_new_array:, class_instance_creation_expression:,
18818         array_creation_expression:): Issue error on unsuported JDK1.1
18819         features.
18820         (try_statement:, catches:, finally:): Define actions.
18821         (catch_clause_parameter): New rule.
18822         (catch_clause:): Use new rule catch_clause_parameter.
18823         (parse_jdk1_1_error): New function.
18824         (redefinition_error): Renamed classitf_redefinition_error.
18825         (variable_redefinition_error): New function.
18826         (check_class_interface_creation): Call
18827         classitf_redefinition_error.
18828         (java_complete_tree): Added error message on JDEP_TYPE: case.
18829         (complete_class_report_errors): Fixed indentation.
18830         (declare_local_variables): Call variable_redefinition_error.
18831         (source_end_java_method): Call java_set_exception_lang_code and
18832         emit_handlers where appropriate.
18833         (java_method_add_stmt): Call add_stmt_to_block.
18834         (add_stmt_to_block): New function.
18835         (lookup_method_invoke): Fixed outside comment. new local variable
18836         candicates.  Call find_applicable_accessible_methods_list and
18837         find_most_specific_methods_list when searching for a
18838         method. Modified error report to list possible candidates when
18839         applicable.
18840         (find_applicable_accessible_methods_list,
18841         find_most_specific_methods_list, argument_types_convertible): New
18842         function.
18843         (refine_accessible_methods_list): Function deleted.
18844         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18845         expr (if applicable) before calling patch_array_ref.
18846         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18847         (enter_block): Fixed comment.
18848         (enter_a_block): New function.
18849         (patch_assignment): Reorganized. Call try_reference_assignconv for
18850         references. Call valid_cast_to_p instead of can_cast_to_p.
18851         (try_reference_assignconv,
18852         valid_builtin_assignconv_identity_widening_p): New functions.
18853         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18854         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18855         functions.
18856         (build_string_concatenation): Don't resolve StringBuffer.
18857         (patch_cast): Fixed inverted arguments.
18858         (patch_array_ref): Code to save array expr deleted. Call
18859         valid_cast_to_p instead of can_cast_to_p.
18860         (generate_labeled_block): Call generate_name.
18861         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18862         patch_try_statement): New functions.
18863         * typeck.c (match_java_method): Function deleted.
18864
18865 1998-10-02  Anthony Green  <green@cygnus.com>
18866
18867         * jvspec.c: jvgenmain_spec uses different temporary file names.
18868
18869 1998-10-02  Anthony Green  <green@cygnus.com>
18870
18871         * jvspec.c (lang_specific_driver): Fail if user specifies
18872         --main= when not linking.
18873
18874 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18875
18876         * class.c (make_class_data): Push value for `thread' field.
18877         * decl.c (init_decl_processing): Added `thread' field to class.
18878
18879         * class.c (add_field): Always make static fields externally
18880         visible.
18881
18882 1998-09-26  Anthony Green  <green@cygnus.com>
18883
18884         * expr.c (build_java_athrow,
18885         build_java_throw_out_of_bounds_exception, expand_invoke,
18886         build_newarray, expand_java_multianewarray, build_java_monitor):
18887         Update comments to reflect _Jv_* function names.
18888
18889 1998-09-25  Per Bothner  <bothner@cygnus.com>
18890
18891         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18892         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18893         * parse.y (expand_start_java_method):  Likewise.
18894
18895 1998-09-24  Per Bothner  <bothner@cygnus.com>
18896
18897         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18898
18899         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18900         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18901         * expr.c:  Remove no-longer-needed calls to promote_type.
18902         * decl.c (give_name_to_locals):  Liekwise.
18903         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18904         * parse.y:  Add/remove promote_type calls as appropriate.
18905         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18906         (parse_signature_string):  Likewise.
18907         (build_java_array_type):  Fix for now signature convenions.
18908
18909         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18910
18911 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18912
18913         * class.c (init_class_processing): libjava function renamed to
18914         _Jv_RegisterClass.
18915
18916 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18917
18918         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18919         * java-tree.def: Fixed DEFTREECODE third argument.
18920         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18921         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18922         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18923         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18924         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18925         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18926         * lang.c (java_tree_code_type, java_tree_code_length,
18927         java_tree_code_name): New arrays.
18928         (lang_init): Append Java tree node definitions to Gcc ones.
18929         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18930         defined.
18931         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18932         wfl_to_string.
18933         (java_lex): Allow declaration of empty string constants. Retain
18934         location information on CASE_TK and DEFAULT_TK.
18935         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18936         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18937         Modified to be more robust.
18938         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18939         (build_new_invocation, try_builtin_assignconv,
18940         patch_switch_statement, string_constant_concatenation,
18941         build_string_concatenation, patch_string_cst, patch_string,
18942         java_expand_switch): New function declarations.
18943         * parse.y: Rules related to switch and EH tagged <node>.
18944         (label_id): Set to NULL_TREE
18945         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18946         tree nodes.
18947         (this_or_super:): Fixed indentation.
18948         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18949         statement_expression:): Removed call to RULE on all sub-rules.
18950         (switch_expression:, switch_labels:): New rules.
18951         (switch_statement:, switch_block:, switch_block_statement_groups:,
18952         switch_block_statement_group:, switch_labels:, switch_label:):
18953         Defined actions.
18954         (throw_statement:, synchronized_statement:, try_statement:):
18955         Defined temporary actions.
18956         (class_instance_creation_expression:): Call
18957         build_new_invocation. Fixed indentation.
18958         (field_access): Fixed indentation.
18959         (method_invocation): Likewise.
18960         (make_qualified_primary): Use THIS_EXPR.
18961         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18962         resolving from SUPER, set *type_found.
18963         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18964         (java_complete_tree): Removed unused local variable `location'. Case
18965         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18966         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18967         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18968         STRING_CST: case. default: checks for patchable strings.
18969         (complete_function_arguments): Transform string constant or
18970         crafted StringBuffer if necessary.
18971         (build_method_invocation): Fixed comments.
18972         (build_new_invocation): New function.
18973         (patch_assignment): Call try_builtin_assignconv to figure a valid
18974         assignment conversion between builtin types.
18975         (try_builtin_assignconv): New function.
18976         (build_binop): Use URSHIFT_EXPR directly to call build.
18977         (operator_string): Use UNARY_PLUS_EXPR.
18978         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18979         operator.
18980         (do_merge_string_cste, merge_string_cste,
18981         string_constant_concatenation, build_string_concatenation,
18982         patch_string, patch_string_cst): New function.
18983         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18984         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18985         (build_newarray_node): Use NEW_ARRAY_EXPR.
18986         (build_this): Use THIS_EXPR.
18987         (build_return): Enable debug information on return statement.
18988         (build_if_else_statement): Likewise.
18989         (complete_labeled_statement): Fixed related comment.
18990         (build_loop_body): Fixed comment.
18991         (build_bc_statement): Enable debug information on break/continue
18992         statements.
18993         (patch_bc_statement): Fixed typos. Handle SWITCH statement
18994         context.
18995         (patch_switch_statement, case_identity, java_expand_switch): New
18996         functions.
18997
18998 1998-09-21  Per Bothner  <bothner@cygnus.com>
18999
19000         * buffer.h (BUFFER_INIT):  New macro.
19001         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19002         Pass (struct jcf_partial *state) to most functions.
19003         (jcf_block, jcf_relocation):  New types.
19004         Support labels, branches, conditionals, loops.
19005
19006 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19007
19008         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19009
19010 1998-09-21  Per Bothner  <bothner@cygnus.com>
19011
19012         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19013         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19014         not integer_type_node (INT_TYPE_SIZ bits).
19015
19016         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19017
19018         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19019         * jcf-dump.c (print_exception_table):  New function.
19020         (disassemble_method):  Better handling of wide instructions.
19021         Make more robust for bad input.
19022
19023 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19024
19025         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19026         FreeBSD.
19027
19028 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19029
19030         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19031
19032 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19033
19034         * Makefile.in ($(PARSE_H)): Removed target.
19035
19036 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19037
19038         * Makefile.in (JAVA_OBJS): Add memmove.o
19039         (memmove.o): New target & rules.
19040
19041 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19042
19043         * expr.c (expand_invoke): Don't generate a call to the class init
19044         code.
19045
19046 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19047
19048         * Makefile.in: Add many missing dependencies.
19049         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19050         as appropriate.
19051         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19052         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19053
19054 1998-09-11  Per Bothner  <bothner@cygnus.com>
19055
19056         * decl.c (complete_start_java_method):  If method is static (and
19057         not private) call _Jv_InitClass.
19058         * expr.c (expand_invoke):  Don't call build_class_init.
19059
19060         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19061
19062 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19063
19064         * Make-lang.in (GCJ): Define before using.
19065
19066 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19067
19068         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19069         losing due to namespace pollution in GNU getopt.h
19070
19071 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19072
19073         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19074         (java.all.cross): Likewise.
19075         (java.rest.encap): Likewise.
19076
19077 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19078
19079         * gjavah.c (print_class_decls): Fix thinko in arglist
19080         * jcv-io.c (find_classfile): Similarly.
19081
19082 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19083
19084         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19085
19086 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19087
19088         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19089         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19090         * Makefile.in (PARSE_C): New macro.
19091         (PARSE_H): Likewise.
19092         (PARSE_SCAN_C): Likewise.
19093         ($(PARSE_C)): Target renamed from parse.c.
19094         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19095         (clean): Remove parse-scan.c as well.
19096         (parse.o): Depend on $(PARSE_C).
19097
19098 1998-09-05  Anthony Green  <green@cygnus.com>
19099
19100         * README, license.terms: Removed.
19101
19102         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19103         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19104         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19105         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19106         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19107         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19108         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19109         and Java trademark attribution.
19110
19111 1998-09-04  Tom Tromey  <tromey@cygnus.com>
19112
19113         * Makefile.in: Use gcjh, not gjavah.
19114         * config-lang.in (stagestuff): Use gcjh, not gjavah.
19115         * Make-lang.in: Changed gjavah to gcjh everywhere.
19116
19117 1998-09-03  Per Bothner  <bothner@cygnus.com>
19118
19119         * gjavah.c:  Support new -prepend -add -append flags.
19120         (print_method_info):  Method is not virtual if class is final.
19121
19122 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19123
19124         * jv-scan.c: Fixed copyright assignment.
19125         * keyword.gperf: Likewise.
19126         * keyword.h: Likewise.
19127         * lex.c: Fixed copyright assignment.
19128         (java_lex): Push unicode back when parsing '<'.
19129         * lex.h: Fixed copyright assignment.
19130         * parse-scan.y: Likewise.
19131         * parse.h: Fixed copyright assignment.
19132         (build_debugable_stmt, complete_for_loop): New function prototypes.
19133         * parse.y: Fixed copyright assignment.
19134         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19135         size_zero_node when completing a loop with no exit condition.
19136         (for_statement_nsi:): Define action.
19137         (for_init:, for_update:): Return size_zero_node when empty.
19138         (declare_local_variables): Call build_debugable_stmt.
19139         (build_debugable_stmt): New function.
19140         (build_loop_body): Build debugable statement around loop
19141         condition part.
19142         (complete_loop_body): Take into account the debugable statement
19143         around the EXIT_EXPR.
19144         (complete_loop_body): New function.
19145         (patch_exit_expr): Fixed condition inversion.
19146
19147 1998-09-02  Tom Tromey  <tromey@cygnus.com>
19148
19149         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19150         name of thread define.
19151         * jvspec.c (THREAD_NAME): New macro.
19152         (GCLIB): Likewise.
19153         (THREADLIB): Likewise.
19154         (lang_specific_driver): Recognize attempt to link with thread
19155         library or gc library.  Recognize -ljava on command line so it
19156         isn't linked against more than once.
19157
19158 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19159
19160         * parse-scan.y (report_main_declaration): Name of the class
19161         containing `main' can be a qualified name.
19162
19163 1998-08-31  Tom Tromey  <tromey@cygnus.com>
19164
19165         * config-lang.in: Changed gjavac to gjc everywhere.
19166         * Make-lang.in: Changed gjavac to gjc everywhere.
19167
19168 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19169
19170         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19171         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19172         and install the files.
19173         * Makefile.in (JAVA_OBJS_LITE): New variable.
19174         (compiler:): Now include jv-scan as a dependency.
19175         (../jv-scan$(exeext), parse-scan.c): New targets.
19176         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19177         * config-lang.in (compilers): Removed gcj, gjavah from the list.
19178         * jcf-parse.c (parse_source_file): Call java_layout_classes and
19179         check for errors even if parse_only.
19180         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19181         defined.
19182         (yylex): New function. Uses java_lex body.
19183         (java_lex): Removed commented out statement. Remove local variable
19184         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19185         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19186         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19187         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19188         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19189         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19190         where appropriate.
19191         (java_lex_error): Empty if JC1_LITE is defined.
19192         (java_get_line_col): Return 0 if JC1_LITE is defined.
19193         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19194         SET_MODIFIER_CTX): Moved into the section containing the macros
19195         conditionally defined by JC1_LITE.
19196         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19197         argument if JC1_LITE is defined.
19198         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19199         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19200         is defined.
19201         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19202         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19203         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19204         to different values according to JC1_LITE.
19205         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19206         declared if JC1_LITE set.
19207         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19208         defined if JC1_LITE not set.
19209         (struct parser_ctx): Reorganized and skip the jc1 front end part
19210         if JC1_LITE set.
19211         (java_layout_classes): New function definition.
19212         (java_push_parser_context, java_init_lex, yyparse, yylex,
19213         yyerror): Prototype always declared. All other static function
19214         prototypes declared only if JC1_LITE is not set.
19215         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19216         declared in parse.h.
19217         (java_layout_classes): New function.
19218         (java_complete_expand_methods): No longer layout the class here.
19219         * parse-scan.y: New file.
19220         * jv-scan.c: New file.
19221
19222 1998-08-25  Tom Tromey  <tromey@cygnus.com>
19223
19224         * gjavah.c (main): Handle -friend option.
19225         (friend_specs): New global.
19226         (generate_access): Handle friend_specs.
19227         (process_file): Likewise.
19228         (MAX_FRIENDS): New macro.
19229         (friend_count): New global.
19230         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
19231         Changed all callers.
19232
19233 1998-08-24  Per Bothner  <bothner@cygnus.com>
19234
19235         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
19236         (main):  Handle processing all the entries of a named .zip archive.
19237         * jcf-io.c (jcf_trim_old_input):  New function.
19238         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
19239
19240 1998-08-24  Per Bothner  <bothner@cygnus.com>
19241
19242         * lang.c (flag_assume_compiled):  Make default be on.
19243
19244 1998-08-21  Per Bothner  <bothner@cygnus.com>
19245
19246         * jcf-dump.c:  Add bunches of flags to control output more.
19247         (process_class):  New function;  support printing more than one class.
19248         (main): Support new --print-main and --javap flags.
19249         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
19250         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
19251
19252 1998-08-20  Per Bothner  <bothner@cygnus.com>
19253
19254         Change mangling of dispatch table to match C++ vtable (w/thunks).
19255         * class.c (build_dtable_decl), java-tree.h:  New function.
19256         (make_class_data):  Call it.
19257         * decl.c (init_decl_processing):  Likewise.
19258
19259 1998-08-19  Warren Levy  <warrenl@cygnus.com>
19260
19261         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19262         soft_anewarray; adjust args passed.
19263         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19264         match _Jv_NewObjectArray.
19265
19266 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19267
19268         * decl.c (push_labeled_block, pop_labeled_block): New functions.
19269         * expr.c (loopup_label): Call create_label_decl.
19270         (create_label_decl): New function.
19271         (java_lang_expand_expr): Call expand_start_bindings with argument
19272         set to zero.
19273         * java-tree.h Added space after PROTO in function declarations
19274         when necessary.
19275         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19276         (create_label_decl, push_labeled_block): New function
19277         declarations.
19278         * lex.c (label_id): Initialize.
19279         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19280         switch.
19281         * parse.h Added space after PROTO in function declarations when
19282         necessary.
19283         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19284         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19285         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19286         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19287         macros.
19288         (struct parser_ctxt): New fields current_loop,
19289         current_labeled_block.
19290         (build_if_else_statement, patch_if_else_statement,
19291         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19292         generate_labeled_block, complete_labeled_statement,
19293         build_bc_statement, patch_bc_statement, patch_loop_statement,
19294         build_new_loop, build_loop_body, complete_loop_body): New function
19295         declarations.
19296         * parse.y (java_warning_count): New global variable.
19297         (label_id): New static variable.
19298         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19299         (block:): Return size_zero_node when block is empty.
19300         (empty_statement:): Return size_zero_node.
19301         (statement:): Implement supplemental action when for_statement: is
19302         reduced.
19303         (label_decl:): New rule.
19304         (labeled_statement:): Rewritten using label_decl. Actions
19305         implemented.
19306         (labeled_statement_nsi:): Likewise.
19307         (if_then_statement): Actions implemented.
19308         (while_expression): New rule.
19309         (while_statement:): Rewritten using while_expression. Actions
19310         implemented.
19311         (while_statement_nsi:): Likewise.
19312         (do_statement_begin:): New rule.
19313         (do_statement:): Rewritten using do_statement_begin. Actions
19314         implemented.
19315         (for_statement:): Rewritten using for_begin. Actions implemented.
19316         (for_statement_nsi:): Likewise.
19317         (for_header:, for_begin:): New rules.
19318         (for_init:): Actions implemented.
19319         (statement_expression_list:, break_statement:,
19320         continue_statement:): Likewise.
19321         (yyerror): Count number of issued warning(s).
19322         (java_report_errors): Report error(s) and/or warning(s).
19323         (java_complete_class): Use build_java_argument_signature to
19324         recompute completed method signature.
19325         (java_check_regular_methods): New locals method_wfl and aflags.
19326         Use method_wfl instead of lookup_cl during error reports. Fixed
19327         indentation and modified some error messages. Use
19328         lang_printable_name in method instead of the DECL_NAME. New code
19329         to issue warnings on methods not overriding corresponding methods
19330         private to a different package.
19331         (java_method_add_stmt): Call add_stmt_to_compound.
19332         (add_stmt_to_compound): New function.
19333         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19334         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19335         (build_if_else_statement, patch_if_else_statement,
19336         build_labeled_block, generate_labeled_block,
19337         complete_labeled_statement, build_new_loop, build_loop_body,
19338         complete_loop_body, patch_loop_statement, build_bc_statement,
19339         patch_bc_statement, patch_exit_expr): New functions.
19340         * typeck.c (build_java_signature): Build argument signature before
19341         enclosing it in between parenthesis.
19342
19343 1998-08-17  Warren Levy  <warrenl@cygnus.com>
19344
19345         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19346         (JAVA_OBJS): Added reminder comment
19347
19348 1998-08-13  Nick Clifton  <nickc@cygnus.com>
19349
19350         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19351         be interpreted as a long long.
19352
19353 1998-08-13  Warren Levy  <warrenl@cygnus.com>
19354
19355         * decl.c (init_decl_processing): Use _Jv_InitClass, not
19356         soft_initialise_class.  Use _Jv_NewMultiArray, not
19357         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
19358         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
19359         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
19360         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19361
19362 1998-08-12  Per Bothner  <bothner@cygnus.com>
19363
19364         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19365         length_identifier_node):  New global tree node constants.
19366         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
19367         Replace uses by super_identifier_node etc.
19368         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
19369
19370         * parse.y (resolve_field_access):  Don't special-case ".length" if
19371         flag_emit_class_files.
19372         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
19373         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
19374         and ARRAY.length.
19375
19376 1998-08-11  Per Bothner  <bothner@cygnus.com>
19377
19378         * decl.c (init_decl_processing): Remove unused method_type_node fields.
19379         * class.c (make_method_value):  Remove init for removed fields.
19380
19381         * class.c (layout_class):  Use build_java_argument_signature.
19382         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
19383
19384         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
19385         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
19386         (build_java_signature):  Don't use push_java_argument_signature.
19387
19388         * typeck.c (lookup_argument_method):  New function.
19389         * parse.y (java_check_regular_methods):  Use lookup_argument_method
19390         instead of lookup_java_method2 followed by lookup_java_method.
19391
19392         * parse.y (check_method_redefinition):  Minor optimization.
19393
19394         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
19395         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19396
19397 1998-08-10  Tom Tromey  <tromey@cygnus.com>
19398
19399         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19400         c-pragma.o.
19401
19402         * gjavah.c (java_float_finite): Use K&R-style definition.
19403         (java_double_finite): Likewise.
19404         (generate_access): Now returns void.  Changed all callers.
19405         (last_access_generated): Removed.
19406         (process_file): Only make a single pass over the .class file.
19407
19408 1998-07-29  Per Bothner  <bothner@cygnus.com>
19409
19410         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
19411         for compatibility for G++ (with -fvtable-thunks).
19412         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
19413
19414         * gjavah.c (process_file):  Use public inheritance for super-class.
19415
19416 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19417
19418         * lex.c (java_init_lex): Initialize ctxp->package.
19419         * parse.h (struct parser_ctxt): package and package_len replaced
19420         by tree package, an identifier node. Field method_decl_list is
19421         gone. Fixed comments.
19422         (lookup_field_wrapper, merge_qualified_name, not_accessible,
19423         class_in_current_package): New function prototypes.
19424         * parse.y (array_type:): Set class loaded flag on primitive type
19425         arrays.
19426         (package_declaration:): Assign ctxp->package to the
19427         identifier node.
19428         (method_invocation:): Handle invocation of method qualified by
19429         `super'.
19430         (single_type_import_declaration:): Removed ambiguity check.
19431         (java_pop_parser_context): New local variable `next'. Reset and
19432         set IMPORT_CLASSFILE_NAME flags on current and previous import
19433         list.
19434         (java_accstring_lookup): Use new local macro COPY_RETURN.
19435         (lookup_field_wrapper): New function.
19436         (parser_qualified_classname): Use merge_qualified_name.
19437         (parser_check_super_interface): Broaden error message.
19438         (do_resolve_class): Check for qualified class name in the current
19439         compilation unit if appropriate.
19440         (process_imports): Check for already defined classes.
19441         (check_pkg_class_access): Got rid of call to
19442         get_access_flags_from_decl.
19443         (java_complete_expand_methods): Call safe_layout_class based on
19444         the current class size.
19445         (make_qualified_primary): Build a WFL qualification on primary if
19446         none exists.
19447         (merge_qualified_name): New function.
19448         (make_qualified_name): Use merge_qualified_name.
19449         (resolve_expression_name): Use safe_lookup_field.
19450         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19451         (resolve_qualified_expression_name): Likewise. Check on resolved
19452         element accessibility.
19453         (not_accessible_p, class_in_current_package): New functions.
19454         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19455         (patch_method_invocation_stmt): Merged common pieces. Check
19456         accessibility of invoked method.
19457         (check_for_static_method_reference): Add returned type in error
19458         message.
19459         (invocation_mode): Get rid of bogus check on PRIVATE methods.
19460         (refine_accessible_methods_list): Merged two conditions in test.
19461         (java_complete_class): Sanity check on stabilize_ref gone.
19462         * zextract.c (read_zip_archive): Cast lseek second argument to long.
19463
19464 1998-07-28  Per Bothner  <bothner@cygnus.com>
19465
19466         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
19467
19468 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19469
19470         * gjavah.c (F_NAN): Removed.
19471         (F_NAN_MASK): New macro.
19472         (F_POSITIVE_INFINITY): Removed.
19473         (F_NEGATIVE_INFINITY): Likewise.
19474         (java_float_finite): Rewrote.
19475         (D_NAN_MASK): Renamed.
19476         (java_double_finite): Rewrote.
19477         (D_POSITIVE_INFINITY): Removed.
19478         (D_NEGATIVE_INFINITY): Likewise.
19479
19480         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19481         If verbose, print underlying representation of value in hex.
19482
19483 1998-07-24  Per Bothner  <bothner@cygnus.com>
19484
19485         * buffer.h, buffer.c:  New files.
19486         * Makefile.in (JAVA_OBJS):  Add buffer.o.
19487
19488         Support locals variables and writing their debug entries to .class.
19489         * jcf-write.c:  Simplify some by user new buffer type.
19490         (vode_buffer_grow):  Removed.
19491         (struct localvar_info):  New type.
19492         (localsvars, localvartable):  New buffers.
19493         (localvar_alloc, localvar_free):  New functions.
19494         (generate_bytecode_insns):  Handle local variables.
19495         (generate_classfile):  Write LocalVariableTable attribute.
19496
19497 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19498
19499         * jcf-io.c (open_in_zip): Check the zipfile magic number.
19500         * zipfile.h (ZIPMAGIC): New macro.
19501
19502 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19503
19504         * Makefile.in (gjavah.o): Updated dependencies.
19505         (jcf-dump.o): Likewise.
19506         (all.indirect): Use ../gjavah.
19507         (../gjavah$(exeext)): Likewise.
19508         (clean): Don't remove gjavah.
19509         (clean): Remove parse.c, not java/parse.c.
19510         * Make-lang.in (java): Added gjavah.
19511         (gjavah$(exeext)): New target.
19512         (GJAVAH_SOURCES): New macro.
19513         (java.all.build): Added gjavah.
19514         (java.all.cross): Likewise.
19515         (java.rest.encap): Likewise.
19516         * config-lang.in (compilers, stagestuff): Added gjavah.
19517
19518 1998-07-23  Tom Tromey  <tromey@cygnus.com>
19519
19520         * gjavah.c (java_float_finite): New function.
19521         (java_double_finite): Likewise.
19522         (F_POSITIVE_INFINITY): New macro.
19523         (F_NEGATIVE_INFINITY): Likewise.
19524         (F_NAN): Likewise.
19525         (D_POSITIVE_INFINITY): Likewise.
19526         (D_NEGATIVE_INFINITY): Likewise.
19527         (D_NAN): Likewise.
19528         (print_field_info): Use java_float_finite and java_double_finite.
19529
19530 1998-07-23  Per Bothner  <bothner@cygnus.com>
19531
19532         * parse.y (method_header):  Name "this" implicit argument.
19533
19534 1998-07-22  Per Bothner  <bothner@cygnus.com>
19535
19536         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
19537         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
19538         (put_linenumber):  New function.
19539         (generate_bytecode_insns, generate_classfile):  Write line numbers.
19540
19541 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19542
19543         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19544         (lookup_name, build_known_method_ref, build_class_init,
19545         build_invokevirtual, invoke_build_dtable, match_java_method,
19546         build_field_ref, pushdecl_force_head, build_java_binop,
19547         binary_numeric_promotion, build_decl_no_layout,
19548         build_java_arrayaccess, build_newarray, build_anewarray,
19549         build_java_array_length_access, build_java_arraynull_check): New
19550         extern function prototypes.
19551         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19552         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19553         java-tree.h.
19554         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19555         to NULL
19556         * jcf.h (jcf_out_of_synch): New extern function prototype.
19557         * parse.h: Static/global function implemented in parse.y
19558         prototyped and declarations moved at the end of the file.
19559         (DECL_P): Check that the argument isn't null.
19560         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19561         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19562         (QUAL_DECL_TYPE): New macro.
19563         (PARAMS): Macro definition removed.
19564         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19565         (return_statement:): Call build_return.
19566         (field_access:): Call make_qualified_primary in sub rule.
19567         (method_invocation:): Build method invocation and call
19568         make_qualified_primary when processing primaries.
19569         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19570         get_type_from_signature.
19571         (java_check_regular_method): Extra integer 0 argument when calling
19572         lookup_java_method2.
19573         (lookup_java_interface_method2): Extra method DECL argument when
19574         calling lookup_java_interface_method2.
19575         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19576         COMPOUND_EXPR node.
19577         (java_complete_expand_method): Layout current class iff not
19578         already done. Don't process interface's methods.
19579         (java_complete_expand_method): Use super class only if it
19580         exists. Use current class otherwise.
19581         (make_qualified_primary): New function.
19582         (resolve_expression_name): Process qualified expression or
19583         expression from primary the same way.
19584         (resolve_expression_name): Two last arguments to
19585         resolve_field_access are now NULL_TREEs.
19586         (resolve_field_access): New variable is_static. Local field must
19587         be DECLs. is_static computed on field DECLs only. Append code in
19588         where_found to the field access if necessary. Use QUAL_DECL_TYPE
19589         to initialize field_type.
19590         (resolve_qualified_expression_name): New local variable,
19591         previous_call_static and is_static. Handle primaries with function
19592         calls, casts, array references and `this'. `super' now handled as
19593         `(super_class)this'. Use is_static to clarify boolean expressions.
19594         Added code to handle case where a proper handle is required to
19595         access a field. Use QUAL_DECL_TYPE where applicable.
19596         (maybe_access_field): New function.
19597         (patch_method_invocation_stmt): New arguments primary, where,
19598         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19599         deleted. Use `where' as a type to search from if specified. Check
19600         for static method reference where forbidden. Append primary or
19601         current_this to the argument list if not calling constructor nor
19602         static methods.
19603         (check_for_static_method_reference): New function.
19604         (patch_invoke): Layout the class on which new is done if
19605         necessary.
19606         (lookup_method_invoke): Changed format to report errors on
19607         methods.
19608         (qualify_ambiguous_name): New local variable this_found. Now
19609         handle things from primaries. Method call are considered
19610         expression names.
19611         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19612         changed into NULLs.
19613         (not_initialized_as_it_should_p): Comply with the new DECL_P.
19614         (java_complete_tree): New case fo RETURN_EXPR. Process function
19615         call arguments in separate function.
19616         (complete_function_arguments): New function.
19617         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19618         anymore.
19619         (patch_assignment): Take the return function slot into account as
19620         a RHS. Distinguish assignment from a return.
19621         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19622         when checking methods in interfaces.
19623         (resolve_type_during_patch): NULL argument to unresolve_type_p
19624         instead of NULL_TREE.
19625         (patch_newarray): Fixed typo in comment.
19626         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19627         (build_return, patch_return): New functions.
19628         * typeck.c (lookup_java_constructor): Fixed typo in comment.
19629
19630 1998-07-21  Per Bothner  <bothner@cygnus.com>
19631
19632         * constants.c (find_name_and_type_constant, find_fieldref_index,
19633         find_methodref_index):  New methods.
19634         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
19635         just return given method.  Also, rename to build_known_method_ref.
19636         (expand_invoke):  Rename call to build_invoke_non_interface.
19637         * java-tree.h, parse.h:  Update prototype.
19638         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
19639         (such as expand_expr_stmt) if flag_emit_class_files.
19640         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19641         STACK_TARGET, IGNORE_TARGET):  New macros.
19642         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
19643         (generate_bytecode_insn):  New function to generate method's bytecode.
19644         (generate_classfile):  Node generate Code attribute for a method.
19645         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19646         push_long_const, field_op, adjust_typed_op, maybe_wide):
19647         New functions used by generate_bytecode_insn.
19648
19649         * typeck.c (signature_include_return):  Remove variable.
19650         (push_java_argument_signature, build_java_argument_signature):  New.
19651         (build_java_signature):  Use push_java_argument_signature.
19652         * parse.y:  Use build_java_argument_signature instead of fiddling
19653         with signature_include_return.
19654
19655 1998-07-17  Tom Tromey  <tromey@cygnus.com>
19656
19657         * gjavah.c (print_c_decl): Always generate JArray<>* for array
19658         types.
19659
19660         * Makefile.in (all.indirect): Added gjavah$(exeext).
19661         (gjavah$(exeext)): Added $(exeext).
19662         (clean): Likewise.
19663
19664 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19665
19666         * class.c (layout_class): Call to java_layout_parsed_class replace
19667         by safe_layout_class.
19668         * expr.c (build_java_array_length_access): Removed static storage
19669         class in the function definition.
19670         (build_java_arraynull_check): Likewise.
19671         Also fixed typos in two comments.
19672         * lex.c (java_init_lex): Initialize static global kw_length.
19673         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19674         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19675         java_lex_error.
19676         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19677         * parse.h (resolve_no_layout): New static function declaration.
19678         (get_identifier_in_static): Declaration removed.
19679         (java_layout_parsed_class): Function name declaration changed to
19680         safe_layout_class.
19681         (build_newarray_node, patch_newarray, resolve_type_during_patch,
19682         not_initialized_as_it_should_p, build_this): New static function
19683         declarations.
19684         (pushdecl_force_head, build_java_binop, int_fits_type_p,
19685         binary_numeric_promotion, stabilize_reference,
19686         build_decl_no_layout, build_java_arrayaccess): Extern function
19687         declarations moved into their own section.
19688         (build_newarray, build_anewarray, build_java_array_length_access,
19689         build_java_arraynull_check): New extern function declarations.
19690         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19691         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19692         fake tree codes.
19693         (CALL_CONSTRUCTOR_P): New macro.
19694         * parse.y (kw_length): New static global tree node.
19695         (return_statement): Tagged <node>.
19696         (RETURN_TK): Tagged <operator>.
19697         (variable_declarator_id:): Build variable declaration with an
19698         empty initialization value if a syntax error was found in the
19699         initialization part of the variable declaration.
19700         (statement_without_trailing_substatement:): return_statement: now
19701         uses the default rule.
19702         (return_statement:): Temporarily fixed to return NULL_TREE.
19703         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19704         (class_instance_creation_expression:): Class creation rules now
19705         call build_method_invocation upon reduction.
19706         (array_creation_expression:): Rules call build_newarray_node upon
19707         reduction.
19708         (dim_exprs:): Build a list of dimension expressions.
19709         (dim_expr:): Store location of the OSB_TK in the dimension
19710         expression node.
19711         (method_invocation:): Added a new error rule.
19712         (build_unresolved_array_type): WFL argument may also be an array
19713         on a primitive type. Name of the argument changed to reflect this.
19714         (method_declarator): Insert argument type at the beginning of the
19715         argument type list and later reverse the list.
19716         (unresolved_type_p): Argument 'returned' may be optionally
19717         NULL_TREE.
19718         (java_layout_class_from_source): Function renamed
19719         safe_layout_class.
19720         (resolve_and_layout): Now call resolve_no_layout and
19721         safe_layout_class.
19722         (resolve_no_layout): New function.
19723         (purify_type_name): New function.
19724         (complete_class_report_errors): Call purify_type_name during error
19725         report on a type not found.
19726         (process_imports): error_found local variable doesn't need to be
19727         initialized to zero.
19728         (declare_local_variables): New local type_wfl. Fixed typo in error
19729         message. type_wfl assigned to unresolved type and used to register
19730         incomplete type. Build a WFL around the variable initialization
19731         statement so that debug info can be generated on it.
19732         (source_start_java_method): Reverse argument list after they've
19733         been processed.
19734         (current_this): New static global variable.
19735         (java_complete_expand_methods): Set current_this when appropriate.
19736         (resolve_expression_name): Build correct static and non static
19737         field access bearing a simple name.
19738         (resolve_field_access): Resolve the length field of arrays. Handle
19739         f.m() cases.
19740         (patch_method_invocation_stmt): Set the type of the method
19741         invocation to error_mark_node. This value is later overridden by a
19742         valid type, if any. Don't handle qualified constructor invocation
19743         as qualified method invocation. Call lookup_method_invoke with its
19744         new flag. It's no longer necessary to access the selected method
19745         as the value of a tree list. Handle constructor invocation.
19746         (patch_invoke): Reverse argument list when invoking non interface
19747         methods. Insert call to new as the first argument of the
19748         constructor.
19749         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19750         defined within a final class. Return INVOKE_STATIC if the invoked
19751         method is a constructor.
19752         (lookup_method_invoke): New lc argument is a flag to indicate a
19753         constructor lookup. Now handle constructor lookup. Choose the most
19754         specific method in case several were matching the invocation
19755         requirements. Return a method decl instead of a tree list featuring
19756         one single method decl element.
19757         (refine_accessible_methods_list): New lc flag argument to
19758         indicate that a constructor is being looked up.
19759         (not_initialized_as_it_should_p): New function.
19760         (java_complete_tree): Now process fake tree codes
19761         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19762         save_expr on resolved function call arguments. Case on
19763         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19764         (patch_assignment): LHS can be a field access expression. When
19765         dealing with reference, lhs_type is the promoted type of the
19766         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19767         applicable.
19768         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19769         (patch_binop): Use not_initialized_as_it_should_p where
19770         applicable.
19771         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19772         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19773         where applicable.
19774         (resolve_type_during_patch): New function.
19775         (patch_cast): Call resolve_type_during_patch to resolve type and
19776         report error accordingly.
19777         (patch_array_ref): Use not_initialized_as_it_should_p where
19778         applicable. Array base expression is saved before being
19779         used. Promote the type of an array elements if it contains non
19780         builtin types.
19781         (build_newarray_node, patch_newarray, build_this): New functions.
19782
19783 1998-07-16  Tom Tromey  <tromey@cygnus.com>
19784
19785         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19786         increment it in `for' statement.
19787         (print_field_info): If number is inf or nan, don't print it.
19788         (print_method_info): If method name is `delete', just ignore it.
19789         (print_c_decl): Special-case jstringArray.
19790
19791         * gjavah.c (help): New function.
19792         (no_argument): New function.
19793         (usage): Changed text.
19794         (main): Rewrote argument handling.  Now handles -v, --help,
19795         --version.
19796         (version): New function.
19797         (found_error): New global.
19798         (main): Return found_error.
19799         (generate_access): Set found_error.
19800         (print_c_decl): Likewise.
19801
19802 1998-07-15  Tom Tromey  <tromey@cygnus.com>
19803
19804         * gjavah.c (print_c_decl): Don't print "," when examining field.
19805         Skip type name when looking at "[L" types.
19806         (process_file): Now static.
19807         (generate_access): Now returns int.
19808         (last_access_generated): New global.
19809         (process_file): Clear last_access_generated; make multiple passes
19810         over the class.
19811         (print_field_info): Just return if generate_access returns true.
19812         (print_method_info): Likewise.  Also, allow <init> functions to
19813         pass through.
19814         (print_c_decl): Added is_init argument.  Print constructors
19815         properly.
19816         (print_cxx_classname): Use UTF8_GET to extract characters from
19817         string.
19818         (print_base_classname): New function.
19819         (print_class_decls): New function.
19820         (process_file): Use it.
19821         (utf8_cmp): New function.
19822
19823 1998-07-13  Nick Clifton  <nickc@cygnus.com>
19824
19825         * lang-options.h: Format changed to match changes in gcc/toplev.c
19826         to implement a --help option.
19827
19828 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
19829
19830         * decl.c (init_decl_processing): Revert change to dtable_type.
19831
19832 1998-07-09  Per Bothner  <bothner@cygnus.com>
19833
19834         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19835
19836 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
19837
19838         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19839
19840         * lang.c (lang_init): Default flag_exceptions to 1, without
19841         checking to see if it's 2 first.
19842
19843 1998-07-08  Jeffrey A Law  (law@cygnus.com)
19844
19845         * constants.c: Include "system.h".
19846         * decl.c: Likewise.
19847         * lang.c (flag_new_exceptions): Get via extern now.
19848         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19849
19850 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19851
19852         * lex.c (java_lex): Return 0 when we see an invalid character in
19853         the input.
19854
19855         * lex.c (java_read_char): Specify extra argument when calling
19856         java_lex_error.
19857         (java_read_unicode, java_parse_end_comment,
19858         java_parse_escape_sequence): Likewise,
19859         (java_lex): Specify extra argument when calling
19860         java_lex_error. Test that IDs are beginning with a legal character
19861         for IDs. Handle invalid characters with an error message and a
19862         call to java_lex_error.
19863         (java_lex_error): Adjust column position by new argument
19864         `forward'. Issue an error even if in the middle of reporting an
19865         other error.
19866
19867 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19868
19869         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19870         we don't explicitly put a null pointer when we're copying it.
19871
19872 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19873
19874         * gjavah.c (print_cxx_classname): New function.
19875         (super_class_name): Likewise.
19876         (print_super_fields): Removed.
19877         (in_super): Removed.
19878         (print_field_info): Never generate #defines.
19879         (print_c_decl): Changed generated types to match JNI.  No longer
19880         print class name before method name.
19881         (print_method_info): Print "static" before static methods.
19882         Print "virtual" before non-final methods.
19883         (usage): Use exit(1), not exit(-1).
19884         (main): Likewise.
19885         (print_field_info): Use %.17g to print a double.
19886         (last_access): New globals.
19887         (process_file): Initialize last_access.
19888         (usage): Now static.
19889         (ACC_VISIBILITY): New define.
19890         (generate_access): New function.
19891         (print_field_info): Call it.
19892         (print_method_info): Likewise.  Also, generate information for all
19893         methods, not just native methods.  Return void.
19894         (print_c_decl): Return void.
19895         (print_field_info): Return void.
19896
19897 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19898
19899         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19900         processing the jc1 grammar file. Prefix bison functions and
19901         variables with java_.
19902         (parse.c): Dependencies on parse.h and lex.h
19903         * expr.c (build_java_arrayaccess): Function now global.
19904         * java-tree.h: Comment reorganized to carry on previous
19905         classification effort.
19906         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19907         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19908         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19909         java_parse (new prefix java_ generated by bison).
19910         (java_layout_parsed_class, java_register_parsed_class): Function
19911         call removed.
19912         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19913         * lex.c (static tree wfl_op): Variable deleted.
19914         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19915         ctxp fields to NULL_TREE.
19916         (java_lex): No longer create WFL for operators. Filename caching
19917         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19918         created as STRING_CST and later expanded. Removed extra argument
19919         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19920         and SUPER.
19921         (build_wfl_node): Removed code in comments.
19922         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19923         store token and location data in the current bison token.
19924         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19925         static/extern function declaration at the beginning of the file.
19926         (struct qualification): Data structure definition deleted.
19927         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19928         (qualify_ambiguous_name): Function declaration modified. Function
19929         now returns nothing.
19930         (build_array_ref, patch_array_ref, make_qualified_name,
19931         resolve_qualified_expression_name, maybe_generate_clinit,
19932         resolve_field_access): New static function declarations.
19933         (build_java_arrayaccess): New extern function declaration.
19934         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19935         (CALL_EXPR_PRIMARY): Macro deleted.
19936         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19937         (struct parser_ctxt): Field initialized_final
19938         removed. non_static_initialized, static_initialized: New fields.
19939         * parse.y (static tree kw_super, static tree kw_this): New global
19940         static.
19941         (%union): tree wfl field of operator member replaced by int
19942         location. WFLs are non longer created for operators.
19943         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19944         (qualified_name:): Now calls make_qualified_name to build the
19945         identifier.
19946         (type_declaration:): Consider generating <clinit> when class
19947         parsing completed.
19948         (variable_declarator:): Directly build an assignment node when the
19949         variable is initialized when declared.
19950         (this_or_super:): Build a WFL and set current location when THIS
19951         or SUPER are parsed.
19952         (expression_statement:): Wrap statement around a WFL.
19953         (primary_no_new_array:): Fixed typo. Changed value returned by
19954         THIS_TK because of its new type (temporary).
19955         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19956         (field_access:): Build qualified name with SUPER.
19957         (method_invocation:): Fixed returned value because of SUPER's new
19958         type.
19959         (array_access:): Use OSB_TK location information.
19960         (post_increment_expression:, post_decrement_expression:,
19961         unary_expression:, pre_increment_expression:,
19962         pre_decrement_expression:, unary_expression_not_plus_minus:,
19963         cast_expression:, multiplicative_expression:,
19964         additive_expression:, shift_expression:, relational_expression:,
19965         equality_expression:, and_expression:, exclusive_or_expression:,
19966         inclusive_or_expression:, conditional_and_expression:,
19967         conditional_or_expression:, assignment:): Use new location/token
19968         information available on operators.
19969         (create_class): Set super_decl_type to NULL_TREE when processing
19970         java.lang.Object.
19971         (register_fields): Field initialization is now a MODIFY_EXPR
19972         node. Chain initialization code to the matching lists (according
19973         to the field declaration modifiers).
19974         (maybe_generate_clinit): New function.
19975         (method_header): Don't set method's DECL_NAME to a WFL when adding
19976         methods to java.lang.Object.
19977         (resolve_and_layout): Now can return NULL_TREE if the type
19978         resolution fails. Otherwise, return the class DECL instead of its
19979         TYPE.
19980         (check_method_redefinition): Don't patch method DECL_NAME if it
19981         belongs to java.lang.Object.
19982         (process_imports): Simply assign error_found to the value returned
19983         by check_pkg_class_access.
19984         (declare_local_variables): Don't use their init statements (if
19985         any) when parsing error were previously found. Reuse MODIFY_EXPR
19986         build during parsing as an init statement.
19987         (java_method_add_stmt): Now return the current method body.
19988         (java_layout_parsed_class, java_register_parsed_class): Functions
19989         removed.
19990         (java_complete_expand_methods): Initialize the constant pool on a
19991         per class basis. Layout the classes before expanding their method
19992         bodies. Don't try expand artificial constructor code if error were
19993         found. Make the classes data and register them if no error were
19994         found.
19995         (java_complete_expand_method): Retrieve an artificial constructor
19996         argument list before entering its body. Assign the top block to
19997         the artificial constructor function body and set types of declared
19998         blocks and compound statements to void. Walk method body if not an
19999         artificial constructor.
20000         (make_qualified_name, cut_identifier_in_qualified): New functions.
20001         (resolve_expression_name): Fixed comments. Save/restore the
20002         current class CLASS_LOADED_P flag value. Build non qualified
20003         static field access and handle qualified expression names.
20004         (resolve_field_access, resolve_qualified_expression_name): New
20005         functions.
20006         (patch_method_invocation_stmt): Use the new expression resolution
20007         scheme, calling resolve_field_access when the function call is
20008         resolved as an expression.
20009         (qualify_ambiguous_name): Function rewritten to work on qualified
20010         expression produced by make_qualified_name.
20011         (java_complete_tree): Promote type when function's argument are
20012         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20013         the assignment to discover further errors if RHS is a expression
20014         name that fails to evaluate. Declare LHS initialized even though
20015         the assignment failed. Don't use the location variable and removed
20016         extra argument in patch function calls. Now handle the ARRAY_REF
20017         case and build internal string representation when STRING_CSTs are
20018         walked.
20019         (build_method_invocation): Don't wrap function call around a WFL.
20020         (build_assignment): Likewise. Use the operator location
20021         information.
20022         (patch_assignment): Handle array access LHSs. Handle error
20023         provenance, resulting in a better error report.
20024         (build_binop): Use op_location from operator as binop location
20025         information.
20026         (build_unaryop, build_incdec, build_cast): Likewise.
20027         (patch_binop): Extract location information from the node. Fixed
20028         typo in error message.
20029         (patch_unary_op): Extract location information from the node.
20030         (build_array_ref, patch_array_ref): New functions.
20031
20032 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20033
20034         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20035         match _Jv_IsInstanceOf.
20036         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20037         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20038
20039 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20040
20041         * decl.c (init_decl_processing): Functions are now named
20042         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20043
20044 1998-06-29  Per Bothner  <bothner@cygnus.com>
20045
20046         * java-tree.h (load_class):  Add prototype.
20047         * class.c (is_compiled_class):  Add missing arg to load_class.
20048         * expr.c (expand_java_NEW):  Call load_class.
20049         * parse.y (process_import):  Removed bogus use of void return value.
20050
20051 1998-06-25  Per Bothner  <bothner@cygnus.com>
20052
20053         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20054         Function name is "_Jv_Throw" instead of "soft_athrow".
20055         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20056         Function name is "_Jv_AllocObject" instead of "soft_new".
20057         Takes an extra parameter (object size).
20058         * expr.c:  Update calls.
20059
20060 1998-06-24  Per Bothner  <bothner@cygnus.com>
20061
20062         * lex.c (java_get_line_col):  Handle end-of-file.
20063         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20064
20065 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20066
20067         * lang.c (lang_init): Make -fexceptions the default.
20068         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20069         exception handling is not turned on.
20070
20071 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20072
20073         * lang.c (flag_new_exceptions): Make this this default.
20074         * decl.c (end_java_method): Call emit_handlers.
20075         * except.c (method_init_exceptions): Set language code and version.
20076         (expand_start_java_handler): Enable exception, and call
20077         expand_eh_region_start.
20078         (expand_end_java_handler): Enable exception, and set up catch blocks.
20079         (emit_handlers): New routine to generate the saved handlers.
20080         * java-except.h (emit_handlers): Add prototype.
20081
20082 1998-06-12  Per Bothner  <bothner@cygnus.com>
20083
20084         We used to have three different representations of the constant pool:
20085         the CPool structure, the tree_constant_pool, and the constructures
20086         used to build the Class object (which may need class and string
20087         constants) in compiled code.  None were appropriate for compiling
20088         to .class files, so I did a major overhaul.
20089
20090         First, the tree_constant_pool array was removed.  Things were
20091         modified to the CPool structure in the JCF could be used.
20092         Second, a "capacity" field was added to the CPool, and functions
20093         written to search for a matching constant, adding one if not found.
20094         The code that generated the Class object was changed to use a CPool.
20095         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20096         the static Class object are now only in build_constants_constructor.
20097         Finally, I wrote code which can generate a .class file (including its
20098         constant pool) from the RECORD_TYPE of a class.  This is a big step
20099         on the way to compiling Java source into .class files.
20100
20101         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
20102         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
20103
20104         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20105         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
20106         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20107         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20108         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
20109         (lang_type):  Removed constant_pool field.
20110         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
20111         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20112         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
20113         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20114
20115         * constants.c (current_constant_pool_tags, current_constant_pool_data,
20116         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20117         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
20118         (set_constant_entry, find_constant1, find_constant2,
20119         find_class_constant, count_constant_pool_bytes, write_constant_pool,
20120         find_utf8_constant, find_class_or_string_constant):  New functions.
20121
20122         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
20123         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
20124         (give_name_to_class, get_class_constant):  Likewise.
20125         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
20126         (get_name_and_type_constant, get_ref_constant):  Removed.
20127         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
20128         * parse.y:  Don't save/restore tree_constant_pool.
20129         * verify.c (verify_jvm_instructions):  Update for new approach.
20130         * expr.c (expand_invoke, expand_java_field_op): Likewise.
20131
20132         * lang-options.h:  Added -femit-class-file, -femit-class-files.
20133         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
20134         (lang_f_options):  Added "emit-class-file(s)".
20135
20136         * expr.c (build_java_arrayaccess):  Generate more efficient array
20137         bounds checking, by using unsigned compare.
20138
20139         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
20140
20141 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20142
20143         * parse.h: New comment on the handling of unresolved type
20144         identifiers. JDEPs are now part of the jdep_code enum.
20145         (typedef struct jdep): Now use enum jdep_code or int, depending on
20146         availability. Both are narrowed down to an 8 bits bitfield.
20147         (CALL_EXPR_PRIMARY): Fixed comment.
20148
20149 1998-06-10  Tom Tromey  <tromey@cygnus.com>
20150
20151         * Make-lang.in (java): Added gjavac and jvgenmain.
20152         (java.start.encap): Depend on gjavac.
20153         (java.rest.encap): Depend on jvgenmain.
20154
20155         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20156         (JAVA_CROSS_NAME): Likewise.
20157         (java.all.build): Depend on jvgenmain and gjavac.
20158         (java.all.cross): Depend on jvgenmain and gjavac-cross.
20159         (jvgenmain$(exeext)): New target.
20160         (java.install-common): Wrote.
20161         * config-lang.in (compilers, stagestuff): Added gjavac and
20162         jvgenmain.
20163
20164 1998-06-10  Dave Brolley  <brolley@cygnus.com>
20165
20166         * lang.c (lang_decode_option): New argc/argv interface.
20167
20168 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20169
20170         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20171         * decl.c (build_decl_no_layout): New function.
20172         * expr.c (java_lang_expand_expr): Layout declarations found in
20173         blocks before they're pushed.
20174         * jcf-parse.c (load_class): Save current line when parsing class
20175         file.
20176         (parse_source_file): Register class before expanding their
20177         methods.
20178         * lang.c (put_decl_node): Produce `null' when `void *' is
20179         processed.
20180         * lex.c (static tree wfl_op): New static global, for error report
20181         on casts.
20182         (java_init_lex): wfl_operator and wfl_op initialized
20183         here. Filename caching added for wfl_op. Return wfl_op when `(' is
20184         parsed.
20185         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20186         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20187         build_unresolved_array_type): New static function definitions.
20188         (build_decl_no_layout): New extern function declared.
20189         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20190         faulty modifier exists.
20191         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20192         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20193         (UNARY_PLUS_EXPR): New fake operator.
20194         (struct parser_ctxt): New field osb_number.
20195         * parse.y (static tree wfl_operator): New static WFL for operator
20196         bound error messages.
20197         (DECR_TK, INCR_TK): Moved.
20198         (OP_TK): Tagged <operator>.
20199         (array_type:): Now call build_unresolved_array_type.
20200         (dim_expr:): Count the number of '[' seen.
20201         (post_increment_expression, post_decrement_expression,
20202         pre_increment_expression, pre_decrement_expression,
20203         unary_expression_not_plus_minus, unary_expression:): Actions are
20204         now building the corresponding unary expressions.
20205         (cast_expression:): Actions are now building cast expressions.
20206         (build_unresolved_array_type): New function.
20207         (create_interface): Reset the number of declared interfaces.
20208         (create_class): Likewise.
20209         (method_header): Methods declared within the scope of an interface
20210         are now implicitly set public and abstract.
20211         (java_complete_class): Variable's and parameter's type are patched
20212         with a promoted type.
20213         (declare_local_variables): Resolved non builtin types are promoted
20214         before being used to build a variable decl. Removed type patch
20215         posted on variable initialization statement.
20216         (source_start_java_method): Use build_decl_no_layout to build the
20217         decl of a parameter of incomplete type.
20218         (java_register_parsed_class): Process interfaces too. Call
20219         rest_of_decl_compilation on each processed class declarations.
20220         (java_complete_expand_methods): Don't attempt to expand things in
20221         interfaces.
20222         (java_complete_tree): Process CONVERT_EXPR, even though it always
20223         has a type. Propagate error_mark_node to node's type too. Promote
20224         method's call argument type and return error_mark_node if
20225         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20226         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20227         handle unary operator nodes.
20228         (build_assignment): Added comment.
20229         (print_int_node): New function.
20230         (patch_assignment): New second argument. New error handling. Use
20231         print_int_node. Handle references. Use can_cast_to_p to issue
20232         different error message according to the context and check upon
20233         the initialization of the RHS.
20234         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20235         (operator_string): Handle more operators.
20236         (patch_binop): No longer use a function static
20237         wfl_operator. Improved error message on shift distance.
20238         (build_unaryop, build_incdec, build_cast, patch_unaryop,
20239         patch_cast): New functions.
20240
20241 1998-06-05  Per Bothner  <bothner@cygnus.com>
20242
20243         * jvspec.c:  New file.
20244         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
20245
20246         * java-tree.h (identifier_subst):  Add declaration.
20247
20248 1998-06-04  Tom Tromey  <tromey@cygnus.com>
20249
20250         * jvgenmain.c (main): Generate call to JvRunMain.
20251
20252         * class.c (make_class_data): Push value for "sync_info" field.
20253         * decl.c (init_decl_processing): Push "sync_info" field.
20254
20255 1998-06-03  Per Bothner  <bothner@cygnus.com>
20256
20257         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
20258         Java (source) name, not signature.
20259         Set TYPE_ALIGN to (at least) that of element_type.
20260
20261 1998-06-02  Per Bothner  <bothner@cygnus.com>
20262
20263         * class.c:  Moved classname-mangling-rekated code to ...
20264         * mangle.c:  ... this new file.
20265         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
20266         * Makefile.in:  Update for above changes.
20267
20268 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20269
20270         * expr.c (truthvalue_conversion): Convert integer and floating
20271         point value to their truth value.
20272         * lex.c (java_lex): Handle the `null' literal.
20273         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20274         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20275         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20276         New macros.
20277
20278         * parse.y: Reorganization/documentation on token declaration.
20279         (binop_lookup[]): New added new tree codes.
20280         (relational_expression): Build corresponding binary operators.
20281         (equality_expression, conditional_and_expression,
20282         conditional_or_expression): Likewise.
20283         (java_complete_class): Fix crash in debug message.
20284         (java_complete_tree): Check initialization of method call
20285         arguments. Further bogus node evaluation to detect more error
20286         during assignments. Handles more binary operators.
20287         (patch_assignment): Use DECL_P.
20288         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20289         code.
20290         (operator_string): Handle more case. Compacted source.
20291         (patch_binop): Changed function comment. Checking for
20292         uninitialized first operand takes the compound assignment into
20293         account and uses DECL_P. Checking for uninitialized second operand
20294         delayed to routine's end. Use macros to issue type bound error
20295         messages and issue messages on both operands if their types are
20296         different. Force fixed type into node. Handle all binary
20297         operators.
20298
20299 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20300
20301         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20302         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20303         build operator node and return tokens.
20304         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20305         * parse.h (java_complete_tree): Changed returned type in prototype.
20306         (build_method_invocation, build_assignment, patch_assignment,
20307         patch_binop): New static function declarations.
20308         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20309         BUILD_EXPR_WFL): New macros.
20310         * parse.y (enum tree_code binop_lookup[]): New static for token to
20311         TREE_CODE lookup.
20312         (%union): Parser union has new sub-structure `operator'.
20313         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20314         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20315         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20316         ASSIGN_ANY_TK): Tokens tagged `operator'.
20317         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20318         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20319         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20320         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20321         (assignment_operator:): Rule tagged `operator'.
20322         (expression_statement:): Re-installed default rule.
20323         (method_invocation:): Sub rules call build_method_invocation.
20324         (postfix_expression:): Don't attempt to resolve name here. Just
20325         return an ID.
20326         (multiplicative_expression:): Sub-rules build corresponding binop
20327         expression node.
20328         (additive_expression:, shift_expression:, and_expression:,
20329         exclusive_or_expression:, inclusive_or_expression:): Likewise.
20330         (assignment:): Sub rule invoke build_assignment.
20331         (assignment_operator:): Default rules on sub rules.
20332         (force_error): Added documentation on this variable.
20333         (declare_local_variables): Build initialization calling
20334         build_assignment.
20335         (expand_start_java_method): Removed unused rtx declaration. Mark
20336         arguments as already initialized.
20337         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20338         (java_complete_expand_methods): Don't process next method if
20339         completion of the previous one triggered errors.
20340         (java_complete_expand_method): Call source_end_java_method if no
20341         error were found during completion.
20342         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20343         locals declaratilon. Handle names found within a class. Return
20344         error_mark_node when things aren't found.
20345         (patch_method_invocation_stmt): Return error_mark_node on failures.
20346         (patch_invoke): Removed unused local. Return the correct node.
20347         (java_complete_tree): Now returns a value. The BLOCK section binds
20348         local identifiers and the type of a BLOCK is now void. Assign the
20349         result of operand completion on COMPOUND_EXPR. Assign the
20350         encapsulated node of a WFL to the result of its completion, except
20351         when the node is an identifier. Now handle MODIFY_EXPR and several
20352         binary operators. Return error_mark_node on errors.
20353         (build_method_invocation, build_assignment, patch_assignment,
20354         build_binop, operator_string, patch_binop): New functions.
20355         * typeck.c (binary_numeric_promotion): New function.
20356
20357 1998-05-21  Per Bothner  <bothner@cygnus.com>
20358
20359         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
20360         Replace most uses of ident_subst by identifier_subst.
20361
20362         * class.c (push_class_static_dummy_field):  Removed function.
20363         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
20364         instead of looking got "class" static field.  Create that decl here.
20365         (class_identifier_node):  Removed;  no longer needed.
20366         (init_class_processing):  Don't init class_identifier_node.
20367         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
20368         Do nreverse 0 times (instead of twice) for Object and Class.
20369         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20370
20371 1998-05-20  Per Bothner  <bothner@cygnus.com>
20372
20373         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
20374         while initializing linenumber_count and linenumber_table.
20375         Do it before init_function_start (which calls emit_line_note).
20376         * expr.c (expand_byte_code):  Don't need to clear lineno here.
20377
20378 1998-05-18  Tom Tromey  <tromey@cygnus.com>
20379
20380         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20381         then mangle number as _N_.
20382
20383         * class.c (mangle_class_field): New function.
20384         (build_class_ref): Set assembler name of class reference using
20385         mangle_class_field.
20386         (push_class_static_dummy_field): Likewise.
20387
20388 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
20389
20390         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20391         of assigning to TREE_CODE.  The latter method exploits a feature
20392         of GCC that is not ANSI compliant.
20393
20394 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20395
20396         * decl.c (pushdecl_force_head): New function.
20397         (pushlevel): Removed conditional printf.
20398         (complete_start_java_method): Don't enter local variable scope if
20399         function is compiled from source code.
20400         * expr.c: parse.h now included
20401         (java_lang_expand_expr): New function.
20402         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20403         printf. Terminate buffer when doing directories.
20404         * jcf-parse.c (parse_source_file): Call lang_init_source before
20405         parsing and before code generation.
20406         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20407         use printf if the macro is defined.
20408         * lang.c (lang_init): Install lang_expand_expr hook on
20409         java_lang_expand_expr.
20410         (java_dummy_print): New function.
20411         (lang_init_source): New function.
20412         * lex.c (java_lex): Remember location of an opening brace at the
20413         second nesting level.
20414         (java_is_eol): Unget character seen after a CR if it is EOF.
20415         * parse.h: Now includes lex.h
20416         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20417         printf if the macro is defined.
20418         (expand_start_java_method, build_expr_block, enter_block,
20419         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20420         New static function declarations.
20421         (pushdecl_force_head): New extern function declaration.
20422         (INCOMPLETE_TYPE_P): New macro.
20423         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20424         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20425         BLOCK_EXPR_ORIGIN): New macros.
20426         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20427         DECL_SOURCE_LINE_LAST): New macros.
20428         (struct parser_ctxt): Removed field current_method_decl, redundant
20429         with the field current_function_decl. Added fields
20430         first_ccb_indent1 and pending_block.
20431         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20432         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20433         tagged <node>
20434         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20435         (compilation_unit:): Cosmetic on sub rule.
20436         (type_declaration:): Cosmetic on sub rules. Added an error rule.
20437         (variable_initializer:): Installed default rule on expression:.
20438         (method_declaration:): method_header: starts a new
20439         method. method_body: installs the function body, absorbs blocks
20440         emitted for temporary variable scopings, pops function's body block
20441         and merges function's last statement lineno in DECL_SOURCE_LINE.
20442         (method_body:): Installed default rules.
20443         (block:): Call enter_block when an opening brace is seen.  Absorb
20444         scoping blocks and call exit_block when a closing brace is seen.
20445         (block_statement:): Cosmetic changes.
20446         (method_invocation:): Create WFL around CALL_EXPR node.
20447         (patch_stage): Added comment around definition.
20448         (method_header): Try to use first_ccb_indent1 as the first line of
20449         the method, so BP debug info are emitted at the first opening
20450         brace of the function. If the function has no body, use the
20451         location of the function's name. Override currently defined method
20452         name with the matching WFL so we can point redefinition errors
20453         using the location where the function's name was declared.
20454         (check_abstract_method_header): Interprets DECL_NAME as an
20455         identifier or as a WFL, accordingly.
20456         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20457         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20458         location and name information out of it and reinstall DECL_NAME to
20459         its original identifier node value.
20460         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20461         function's source code).
20462         (read_import_dir): Test the value returned by find_class and issue
20463         a fatal accordingly.
20464         (declare_local_variables): Push a new block for the scope of the
20465         new variable(s) if code has been already generated at that nesting
20466         level. Pinpoint redefinition errors using the variable id
20467         WFLs. Generate initialization code if necessary. If the variable
20468         type is incomplete, register a patch on its decl.
20469         (source_start_java_method): Rewritten. Define a new block for the
20470         function's parameters. Build parameter decl out of function's
20471         arguments and register them for a patch if their types are
20472         incomplete.
20473         (expand_start_java_method): Includes the part of
20474         source_start_java_method that was pushing the parameter decls and
20475         completing the method start code.
20476         (source_end_java_method): Removed call the expand_end_bindings and
20477         poplevel (already taken care of). Reinstall function's arguments
20478         and get function's last line of code before calling
20479         expand_function_end.
20480         (java_method_add_stmt): New comment before the function's
20481         code. Complement the second operand of the current COMPOUND_EXPR
20482         if necessary.
20483         (java_complete_expand_methods): Don't generate debug info on line
20484         zero when expanding a generated constructor.
20485         (java_complete_expand_method): Set start and end line numbers for
20486         a artificially generated constructor to one and manually call
20487         enter_block and exit_block when defining it. For all methods:
20488         expand function's start calling the new expand_start_java_method
20489         and invoke java_complete_tree on the effective method's body, if
20490         any.
20491         (resolve_expression_name): Now use lookup_name_in_blocks to search
20492         local variable decls and print out an error when variables are
20493         undefined.
20494         (patch_method_invocation_stmt): Inserted comment before the
20495         function's code.
20496         (lookup_method_invoke): Chain method's arguments using chainon
20497         with the current arg list as a second argument. Inserted missing
20498         IDENTIFIER_POINTER when reporting an error on methods not found.
20499         (refine_accessible_methods_list): Don't retain constructors.
20500         (patch_arguments): Function removed.
20501         (java_complete_tree): Inserted comment before the function's
20502         code. New case for BLOCKs. Moved the WFL case a bit
20503         further. Complete function's arguments.
20504         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20505         maybe_absorb_scoping_blocks): New functions.
20506
20507 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20508
20509         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20510         previously set.
20511         * jcf-parse.c (parse_source_file, java_error_count): New forward
20512         and extern declarations.
20513         (java_parse_abort_on_error): Macro moved.
20514         (jcf_parse_source): fatal called if fopen fails. Now calls
20515         parse_source_file.
20516         (parse_source_file): New parse_only parameter. Reflects the
20517         elimination of the second pass.
20518         (yyparse): parse_source_file called with argument set to 0.
20519         * jcf.h (JCF_ZERO): Sets java_source to zero.
20520         * lex.c (java_init_lex): pass argument is gone. Function modified
20521         to be called once during the analysis of a file.
20522         (java_unget_unicode): Fixed typo in fatal message.
20523         (java_get_line_col): Likewise.
20524         (java_lval): Likewise. String literals no longer built during
20525         second pass.
20526         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20527         account.
20528         * parse.h (MODIFIER_WFL): New macro.
20529         (parse_check_super, parser_check_super_interface): Now return int.
20530         (parser_chain_incomplete_item, not_builtin_p,
20531         complete_method_decl): Declarations removed.
20532         (build_method_invocation_stmt, build_invoke): Renamed using the
20533         `patch' instead of `build'
20534         (register-incomplete_type, obtain_incomplete_type,
20535         java_complete_tree, java_complete_expand_method,
20536         unresolved_type_p, create_jdep_list): New function declarations.
20537         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20538         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20539         (jdep): New typedef on new struct _jdep.
20540         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20541         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20542         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20543         JDEP_RESOLVED_P): New macros.
20544         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20545         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20546         JDEP_VARIABLE): New enum values and jdep kinds.
20547         (jdeplist): New typedef on struct _jdeplist.
20548         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20549         macros.
20550         (CALL_EXPR_PRIMARY): New macro.
20551         (struct parser_ctxt): Fields java_pass, current_method_decl,
20552         method_decl_list deleted. New field jdeplist.
20553         (INCOMPLETE_P): Macro deleted.
20554         * parse.y (single_type_import_declaration:): Removed pass switch.
20555         (type_import_on_demand_declaration): Likewise.
20556         (field_declaration:): Removed pass switch on all sub rules.
20557         (class_declaration:): Call the complete_class_decl removed on
20558         class_body rules.
20559         (method_declaration:): Removed second pass switch. No longer chain
20560         methods decl when method_header reduced.
20561         (method_header:): Sub rules no longer depend on pass switch.
20562         (method_declarator:): Likewise.
20563         (method_body:): Likewise.
20564         (abstract_method_declaration:): Likewise.
20565         (block_statement:): Likewise.
20566         (local_variable_declaration:): Likewise.
20567         (argument_list:): Likewise.
20568         (method_invocation:): Likewise. Call to build_method_invocation_stmt
20569         removed. Partial CLASS_EXPR tree node built instead.
20570         (postfix_expression:): Removed pass switch on all sub rules.
20571         (java_pop_parser_context): Free classd_list content.
20572         (yyerror): Call obstrack_grow0 to finalize error message.
20573         (check_class_interface_creation): Comment modified to reflect new
20574         returned value meaning. Removed second pass switch. Return 1 if an
20575         error was found, 0 otherwise. Adjust pointer on filename if a
20576         leading path separator was found.
20577         (maybe_create_class_interface_decl): Removed first pass switch
20578         when linking the class decl to the class_list. Install a new
20579         jdep_list for the class.
20580         (add_superinterfaces): List of unresolved interfaces is
20581         gone. Unresolved interfaces are directly added to the current
20582         dependencies list.
20583         (create_interface): Second pass shortcut removed.
20584         ctpx->modifier_ctx access through MODIFIER_WFL.
20585         (create_class): Second pass shortcut removed. Call to
20586         register_incomplete_type replaces the call to
20587         parser_chain_incomplete_item.
20588         (complete_class_decl): Function removed.
20589         (duplicate_declaration_error): New way of retrieving redeclared
20590         item type.
20591         (register_fields): Call to lookup_modifier_cl replaced by
20592         MODIFIER_WFL. New way of handling unresolved type, using
20593         unresolved_type_p and obtain_incomplete_type.
20594         register_incomplete_type replaces call to parser_chain_incomplete_item.
20595         (patch_stage): New static global variable.
20596         (method_header): New way of handling unresolved type, using
20597         unresolved_type_p and obtain_incomplete_type. patch_stage used to
20598         indicates that the method decl needs to be patched.
20599         (check_abstract_method_header): Call to lookup_modifier_cl
20600         replaced by MODIFIER_WFL.
20601         (method_declarator): Incomplete argument type are registered
20602         calling register_incomplete_type. Patch on the declared method is
20603         issued in that case.
20604         (unresolved_type_p): New function.
20605         (parser_check_super_interface): New comment to reflect function's
20606         modified returned type (int). Function and has a new argument
20607         this_wfl. Call to parse_error_context uses this_wfl instead of
20608         relying on lookup_cl.
20609         (parser_check_super): Comment reflects function's new returned
20610         type (int). Function returns nonzero value on error.
20611         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20612         register_incomplete_type, jdep_resolve_class): New functions to
20613         handle incomplete types in declarations.
20614         (java_complete_class): Rewritten to work with the new incomplete
20615         type handling scheme.
20616         (complete_class_report_errors): Likewise.
20617         (complete_method_decl): Removed: it jobs is now handled by
20618         java_complete_class.
20619         (do_resolve_class): Class loaded in not already loaded and not
20620         found in Java source code.
20621         (java_check_regular_methods, java_check_abstract_methods): Don't
20622         call complete_method_decl anymore.
20623         (lookup_modifier_cl, not_builtin_p): Functions deleted.
20624         (read_import_dir): Got rid of the pass number dependency.
20625         (declare_local_variables): New handling of unresolved types (patch
20626         issued).
20627         (source_start_java_method): New parameter level. Function called
20628         with level set to 1 when argument types are potentially
20629         unresolved.  Called to complete the job with level set to 2 once
20630         types are complete.
20631         (source_end_java_method): Call to permanent_allocation
20632         removed. Waiting to be replaced by a more suitable obstack
20633         management.
20634         (java_complete_expand_methods, java_complete_expand_method,
20635         java_expand_finals): New functions.
20636         (build_method_invocation_stmt): Renamed
20637         patch_method_invocation_stmt. Extracts function call expression
20638         (wfl) and arguments (args) from CALL_EXPR tree operands.
20639         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20640         call. Patch the function and argument operand of the CALL_EXPR
20641         tree argument.
20642         (patch_argument, java_complete_tree): New functions.
20643
20644 1998-04-20  Per Bothner  <bothner@cygnus.com>
20645
20646         Recover from missing fields and methods (i.e. error instead of fatal).
20647         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
20648         * expr.c (expand_invoke):  Recover from missing method.
20649         (expand_java_field_op):  Recover from missing field.
20650         Inline references to java.lang.{Integer,Char,...}.TYPE.
20651         * typeck.c (get_type_from_signature), java-tree.h:  New function.
20652         * class.c (add_method):  Use get_type_from_signature.
20653         (build_class_ref):  Handle a class that was not found.
20654         * typeck.c (convert):  Handle conversion to pointers (for convenience).
20655         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
20656         instead of lookup_field to handle missing fields.
20657
20658         * jcf-parse.c (process_zip_dir):  Set java_source.
20659
20660 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
20661
20662         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20663
20664 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20665
20666         * jcf-parse.c (load_class): Don't change input_filename before
20667         calling jcf_parse_source (but still do it before calling
20668         jcf_parse).
20669         (jcf_parse_source): Assign input_filename after having saved the
20670         parser context.
20671         * lex.c (java_init_lex): Chain a WFL node to the import on demand
20672         list. ctxp->modifier_ctx zeroed according to its new
20673         definition. ctxp->filename initialized. Removed
20674         JAVA_MODIFIER_CTX_UNMARK.
20675         (java_unget_unicode): Update the character based column position.
20676         (java_allocate_new_line): ref_count not used anymore. Always free
20677         ctxp->p_line. Initialize c_line->char_col to 0.
20678         (java_get_unicode): Update the character based column position.
20679         (java_lex): Use ctxp->elc to store current position in source
20680         file, at the beginning of the parsed token. Set modifier_ctx entry
20681         corresponding to the parse modifier to a WFL node. Return a WFL
20682         node when an identifier is parsed.
20683         (java_lex_error): Now uses ctxp->elc to store current position in
20684         source.
20685         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20686         * lex.h (build_wfl_node): New function definitions.
20687         (struct java_line): ref_count and next fields are gone. New field
20688         char_col.
20689         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20690         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20691         (JAVA_COLUMN_DELTA): New macro.
20692         (java_lc): New typedef on new struct _java_lc.
20693         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20694         (parse_error_context, parse_warning_context): Changed prototypes.
20695         (java_get_line_col): Added as an available global function.
20696         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20697         (IC_DECL): Replaced by macro IC_TYPE
20698         (DEPEND_WFL): New macro.
20699         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20700         wrong modifier.
20701         (exit_java_complete_class): Removed a commented out statement.
20702         (struct parser_ctxt): Added comments on fields. modifier_ctx is
20703         now an array of tree nodes. Deleted fields line_list and
20704         e_line. New field elc, to replace e_line.
20705         * parse.y (array_type:): Build WFL node.
20706         (qualified_name:): Build a single WFL node out of two. Retain
20707         the location information of the first node in the resulting node.
20708         (package_declaration:): Use package name as a WFL node
20709         (single_type_import_declaration:): Use imported name as a WFL node.
20710         (type_import_on_demand_declaration:): Use root of the imported
20711         packages as a WFL node.
20712         (field_declaration:): Removed unused local variable cl.
20713         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20714         (yyerror): New static elc. Removed static error_line, error_pos.
20715         New local code_from_source. Save ctxp->elc into elc at the first
20716         pass. Call java_get_line_col to get a string of the line where
20717         the error occurred.
20718         (debug_line): Removed static function.
20719         (parse_error_context, parse_warning_context): Parameter cl is now
20720         a WFL node. Use its value to initialize ctxp->elc.
20721         (redefinition_error): Parameter cl is now a WFL node.
20722         (parse_add_interface): New parameter wfl. No longer call
20723         lookup_cl, use wfl instead.
20724         (check_class_interface_creation): Parameter cl is now a WFL node.
20725         (maybe_create_class_interface_decl): Likewise.
20726         (add_superinterfaces): New function.
20727         (create_interface): Removed local cl, node, super_decl,
20728         super_decl_type.  Function now uses id as a WFL node. Better
20729         warning/error report on obsolete or forbidden mix of
20730         modifiers. Now calls add_superinterfaces to register interfaces.
20731         (create_class): Removed local cl, node. Local variable id is used
20732         as a WFL node. Better error report on forbidden modifier
20733         mix. Uses add_superinterfaces to register interfaces.
20734         (find_field): Argument cl is now a WFL node. Now store the WFL
20735         node of a fields that needs to be checked for their
20736         initialization.
20737         (method_header): Local variable node non longer used. Local
20738         variable id replaces cl.
20739         (check_modifiers_consistency): Local variable cl is now a WFL
20740         node.
20741         (method_declarator): Local variable cl replaced by parameter id.
20742         (parser_qualified_name): Now uses parameter name as a WFL node.
20743         (parser_check_super_interface): New parameter wfl, for achieve
20744         greater accuracy during error reports.
20745         (parser_chain_incomplete_item): New parameter named location. Used,
20746         along the decl, to construct the incomplete item node.
20747         (java_complete_class): resolve_class now uses WFL node extracted
20748         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20749         where appropriate.
20750         (complete_method_decl): Unresolved function's argument types are WFL.
20751         (resolve_class): Parameter cl is now a WFL node.
20752         (resolve_and_layout): Likewise.
20753         (do_resolve_class): Likewise. Try first to use cl and then do the
20754         lookup on the decl when calling check_pkg_class_access.
20755         (complete_class_report_errors): Use IC_TYPE in place of
20756         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20757         instead of doing a lookup over the decl.
20758         (java_check_final): Use WFL info from field tree list.
20759         (lookup_cl): Rewritten and returns a statically defined WFL node.
20760         (lookup_modifier_cl): Now uses information from WFL nodes.
20761         (process_imports): Likewise.
20762         (read_import_dir): name and cl arguments replaced by a single WFL
20763         node. Function modified accordingly.
20764         (find_in_imports_on_demand): Now uses WFL node.
20765         (check_pkg_class_access): cl argument is now a WFL node.
20766         (declare_local_variables): Fixed to use WFL nodes.
20767         (resolve_expression_name): Likewise.
20768         (build_method_invocation_stmt): name_combo argument renamed
20769         wfl. Function modified to use WFL nodes.
20770         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20771         (lookup_method_invoke): cl is now a WFL node. Added missing
20772         IDENTIFIER_POINTER to class type decl name.
20773
20774 1998-04-14  Dave Brolley  <brolley@cygnus.com>
20775
20776         * lang.c (init_parse): Now returns char* containing the filename.
20777
20778 1998-04-10  Per Bothner  <bothner@cygnus.com>
20779
20780         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
20781
20782         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
20783         * class.c (make_class_data):  If flag_assume_compiled, initial class
20784         state is CSTATE_PREPARED; make superclass and interfaces direct
20785         references, rather than constant pool indexes.
20786
20787 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20788
20789         * parser.y: Include flags.h. Removed debug variable pl.
20790         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20791         (block:): Likewise.
20792         (labeled_statement_nsi:): Generate debug info when reducing
20793         expression_statement:.
20794         (check_pkg_class_access): get_access_flags_from_decl invocation
20795         fixed for new CLASS_* flags location.
20796         (source_end_java_method): Save/restore parser context when
20797         entering/leaving this routine. Restore lineno to its right value
20798         before calling expand_end_bindings.
20799         (build_method_invocation_stmt): build_invoke called with the
20800         current line information.
20801         (build_invoke): New argument cl. Wrap the function call around a
20802         wfl node.
20803         (refine_accessible_methods_list): Changed comment, removed
20804         unnecessary code.
20805         * parse.h: Fixed typo in comments.
20806         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20807         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20808         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20809         parser_ccb_indent.
20810         * lex.c (java_lex): Record the last closing curly bracket of a
20811         function.
20812         * jcf-parse.c (jcf_parse_source): Now calls
20813         java_check_methods. Clarified comment, fixed typo.
20814
20815 1998-04-09  Dave Brolley  <brolley@cygnus.com>
20816
20817         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20818         (finish_parse): Expose for non USE_CPPLIB builds.
20819
20820 1998-04-08  Jeffrey A Law  (law@cygnus.com)
20821
20822         * lang.c (lang_print_xnode): New function.
20823
20824 1998-04-03  Per Bothner  <bothner@cygnus.com>
20825
20826         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
20827         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
20828         used to build a class's dispatch table.
20829         (make_class_data):  Generate dispatch table if flag_assume_compiled.
20830         Set dtable of class object to address of class_dtable_decl.
20831
20832         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
20833         be volatile and have side effects - generates better code.
20834
20835         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
20836         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20837
20838         * expr.c (expand_invoke):  If class is final, method is
20839         effectively final, so can call it directly.
20840
20841         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
20842
20843         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
20844
20845 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20846
20847         * parse.y (build_method_invocation_stmt): Removed extra argument
20848         to build_invoke.
20849
20850 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20851
20852         * expr.c (dtable_indent): Now static global.
20853         (expand_invoke): Now call invoke_build_dtable and
20854         build_invokevirtual.
20855         (invoke_build_dtable, build_invokevirtual): New functions.
20856         * jcf-io.c (find_class): Defer issuing a warning by setting
20857         jcf->outofsynch to 1.
20858         * jcf-parse.c (jcf_out_of_synch): New function.
20859         (load_class): Test this_jcf.outofsynch flag and call
20860         jcf_out_of_synch accordingly.
20861         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20862         comment indentation.
20863         * lex.c (java_get_unicode): Fixed code indentation.
20864         (java_lex): Create string literal. Fixed typo. Removed several
20865         premature obstack_free.
20866         * parse.h: New enums for name resolution and invocation mode.
20867         (struct qualification): New data structure.
20868         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20869         (do_resolve_class, build_method_invocation_stmt,
20870         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20871         debug_line, identical_subpath_p, invocation_mode,
20872         refine_accessible_methods_list, build_invoke,
20873         lookup_method_invoke): New functions declared.
20874         (build_invokevirtual, invoke_build_dtable, match_java_method,
20875         build_field_ref, jcf_out_of_synch): New references to external
20876         functions.
20877         (struct parse_ctxt): Removed artificial_constructor field.
20878         * parse.y: (array_type:): Type defined for this rule.
20879         (class_type:): Installed default rule for interface_type:.
20880         (array_type:): Now build Java array type.
20881         (qualified_name:): Now use obstack_grow0.
20882         (method_declaration:): Skip the artificial constructor added to
20883         the list, if any.
20884         (abstract_method_declaration:): Execute the code only during pass 1.
20885         (block:): Installed default rule in block_statements:.
20886         (block_statement:): Add the statement to the method during pass 2.
20887         (statement_expression): Installed default rule for
20888         method_invocation:.
20889         (argument_list:): Added code to build the argument list.
20890         (method_invocation:): Added call to create the method invocation
20891         node.
20892         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20893         (debug_line): New function for debug.
20894         (complete_class_decl): No longer do something during pass 1.
20895         (method_header): Use BUILD_PTR_FROM_NAME.
20896         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20897         obstack_free.
20898         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20899         function's main comment.
20900         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20901         classes.
20902         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20903         (resolve_class): Now works with arrays.
20904         (do_resolve_class, resolve_and_layout): New functions.
20905         (java_check_regular_methods): Reverse method list before and after
20906         having processed it. No longer set ctxp->artificial_constructor.
20907         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20908         accordingly. Fixed typo in issued error message. Now use
20909         obstack_grow0.
20910         (find_in_imports_on_demand): Now use obstack_grow0.
20911         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20912         (source_end_java_method): Call expand_expr_stmt instead of
20913         expand_expr. Calls it before calling expand_function_end.
20914         (java_method_add_stmt): Do nothing if errors were found during
20915         parsing.
20916         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20917         (build_method_invocation_stmt, build_invoke, invocation_mode,
20918         lookup_method_invoke, refine_accessible_methods_list,
20919         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20920         New functions.
20921         * typeck.c (build_java_signature): Properly end method signature
20922         if return type skipped.
20923         (match_java_method): New function.
20924
20925 1998-03-16  Per Bothner  <bothner@cygnus.com>
20926
20927         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20928
20929 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20930
20931         * expr.c (build_invoke_non_interface): New function.
20932         (methods_ident, ncode_ident): Now static globals.
20933         (expand_invoke): Use build_invoke_non_interface.
20934         * java-tree.h (struct lang_decl): New field function_decl_body.
20935         (DECL_FUNCTION_BODY): New macro.
20936         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20937         CLASS_FROM_SOURCE_P.
20938         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20939         before starting pass 2. Call to java_generate_parsed_class replaced
20940         by java_register_parsed_class.
20941         * lex.c: Fixed typo in header. Some line width related formating.
20942         * lex.h: Some line width related formating.
20943         * parse.h (source_end_java_method, resolve_expression_name,
20944         complete_class_decl, maybe_create_class_interface_decl,
20945         check_class_interface_creation): New static function declarations.
20946         (java_layout_parsed_class, java_method_add_stmt): New function
20947         declarations.
20948         (struct parser_ctxt): Field mark_class_generate removed. New
20949         fields class_list and artificial_constructor.
20950         * parse.y: Fixed typo in header.
20951         (class_declaration:): Call complete_class_decl when class body
20952         parsed.
20953         (method_declaration:): Call source_end_java_method in pass 2 when
20954         the method body is defined.
20955         (postfix_expression:): Do expression name resolution on sub-rule
20956         name during pass 2.
20957         (create_class, create_interface): Merged common pieces.
20958         (check_class_interface_creation, maybe_create_class_interface_decl):
20959         New functions.
20960         (complete_class_decl): New function.
20961         (register_fields): Fixed line width related typo.
20962         (method_header): Correctly skip first argument when fixing
20963         argument line. Changed the loop.
20964         (java_check_circular_reference): Now use ctxp->class_list.
20965         (java_complete_class): Removed start/stop marking.
20966         (java_check_regular_methods): Now takes a class decl as an
20967         argument.  Add default constructor if none were encountered.
20968         (java_check_methods): Now use ctxp->class_list. Changed call to
20969         java_check_regular_methods.
20970         (source_start_java_method): Set DECL_ARG_TYPE for each function
20971         arguments.
20972         (source_end_java_method, java_method_add_stmt): New functions.
20973         (java_generate_parsed_class): No longer exists.
20974         (java_layout_parsed_class, java_register_parsed_class): New functions.
20975         (resolve_expression_name): New function.
20976
20977 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20978
20979         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20980         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20981         until pass initializations are done. Call read_import_dir with
20982         pass set to 0.
20983         * parse.h: (lookup_modifier_cl): New function declared.
20984         (INTERFACE_FIELD_MODIFIERS): New macro.
20985         (OBSOLETE_MODIFIER_WARNING): New macro.
20986         * parse.y: (register_fields): Class type and current field name in
20987         local variables. Check modifier(s) if adding field(s) to an interface.
20988         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
20989         and report errors using the faulty modifier line context.
20990         (lookup_modifier_cl): New function.
20991         (read_import_dir): Detect and report default import processing
20992         failure.
20993
20994 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
20995
20996         Add a pair of -fassume-compiled/-fno-assume-compiled options.
20997         * class.c (is_compiled_class): Return 1 after making sure it
20998         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
20999         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21000         * java-tree.h (flag_assume_compiled): Add decl.
21001         * lang.c (lang_f_options): Add the flag.
21002         (flag_assume_compiled): Add decl, default to 0.
21003
21004 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21005
21006         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21007         (is_compiled_class): Likewise.
21008         (layout_class): Likewise.
21009         (layout_class): Detect and lay out classes defined in source code.
21010         (interface_of_p, add_interface_do, may_add_interface): New
21011         function.
21012         (add_interface): Now use add_interface_do.
21013         (add_method_1): New function.
21014         (add_method): Now use add_method_1.
21015         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21016         (complete_start_java_method): New function.
21017         (start_java_mehod): Now call complete_start_java_method.
21018         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21019         (expand_invoke): Likewise and fixed typo.
21020         *gjava.c: (print_super_field): Use new argument to find_class
21021         DO_CLASS_FILE.
21022         (main): Likewise.
21023         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21024         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21025         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21026         IDENTIFIER_NODE.
21027         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21028         (add_method_1, push_class): New prototypes.
21029         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21030         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21031         directory where the class was found.
21032         (find_class): New argument DO_CLASS_FILE. Function find_class
21033         modified accordingly.
21034         *jcf-parse.c: (fix_class_path): New function.
21035         (load_class): Use new VERBOSE argument. load_class now finds and
21036         loads/parses .class/.java files. Save read_state of current_jcf
21037         if necessary.
21038         (java_parser_abort_on_error): New macro.
21039         (jcf_parse_source, parse_source_file): New function.
21040         (jcf_parse): Fixed typo.
21041         (yyparse): Call parse_source_file () only.
21042         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21043         writing the real class name back in the zip directory entry.
21044         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21045         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21046         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21047         (find_class): Prototype fixed.
21048         *lex.c: Added 1998 time stamp.
21049         Removed all static global variables, moved into the parser
21050         context data structure.. Now include unistd.h if SEEK_SET not
21051         defined.
21052         (java_init_lex): Rewritten.
21053         (java_sneak_unicode): Modified current unicode access in current line.
21054         (java_unget_unicode): Likewise.
21055         (java_allocate_new_line): New allocation management.
21056         (java_read_char): Modified access and storage of unget_utf8_value.
21057         New way of processing current unicode.
21058         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21059         (java_get_unicode): Now use the parser context.
21060         (java_lineterminator): Likewise.
21061         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21062         of the reentrant parser implementation. Function now use the
21063         parser context data structure and java_lval. Fixed production of
21064         the float and double constant "out of range" error message. Fixed
21065         obstack use. Return integer value when hitting a modifier. Now
21066         return type for TRUE, FALSE and other predefined types. Return
21067         identifier as a TREE_LIST list containing the current line context
21068         as the TREE_VALUE sub-node.
21069         (java_unicode_2_utf8): Fixed typo in declaration.
21070         (java_lex_error): Now use the parser context data structure.
21071         *lex.h: Added 1998 time stamp.
21072         (struct java_line): New fields ref_count and next.
21073         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21074         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21075         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21076         *parse.h: Added 1998 time stamp.
21077         (java_parse_source_file): Renamed from parse_source_file.
21078         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21079         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21080         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21081         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21082         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21083         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21084         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21085         (struct parser_ctxt): New data structure to keep the parser context.
21086         *parse.y: Added 1998 time stamp, got rid of static global variables.
21087         (java_error_count, ctxp): New global variables.
21088         (%union): New value field.
21089         (numeric_type, integral_type): Rules removed.
21090         (primitive_type): Rule defined to handle integral, float, double and
21091         boolean types.
21092         (qualified_name, package_declaration,
21093         single_type_import_declaration, type_import_on_demand_declaration,
21094         modifiers, class_declaration, super, interfaces,
21095         interface_type_list, class_body, field_declaration,
21096         field_declaration, variable_declarators, variable_declarator,
21097         variable_declarator_id, method_declaration, method_header,
21098         formal_parameter_list, formal_parameter, method_body, block,
21099         static, interface_declaration, extends_interfaces,
21100         abstract_method_declaration, local_variable_declarators): Rules now
21101         define actions.
21102         (force_error, do_warning): New global statics.
21103         (push_parser_context, parser_context_save_global,
21104         parser_context_restore_global, pop_parser_context): New functions.
21105         (yyerror): Now uses the global parser context. Fixed use of obstack.
21106         (parse_error, parse_error_context, parse_warning_context,
21107         java_accstring_lookup, redefinition_error, check_modifiers,
21108         parser_add_interface, create_interface, create_class, find_field,
21109         duplicate_declaration_error, register_fields, method_header,
21110         check_modifiers_consistency, check_abstract_method_header,
21111         method_declarator, parser_qualified_classname,
21112         parser_check_super_interface, parser_check_super,
21113         parser_chain_incomplete_item, java_check_circular_reference,
21114         layout_class_from_source, java_complete_class,
21115         complete_method_decl, resolve_class, complete_class_report_errors,
21116         java_check_final, check_method_redefinition,
21117         java_check_regular_methods, java_check_abstract_methods,
21118         java_check_methods, lookup_java_interface_method2,
21119         lookup_java_method2, lookup_cl, find_name_in_single_imports,
21120         process_imports, find_in_imports, read_import_entry,
21121         read_import_dir, find_in_imports_on_demand,
21122         check_pkg_class_access, not_builtin_p, declare_local_variables,
21123         source_start_java_method, java_generate_parsed_class): New
21124         functions.
21125         *typeck.c: (signature_include_return): New global variable.
21126         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21127         to add the function returned type in the signature.
21128
21129 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
21130
21131         * jcf-io.c (open_in_zip): Use strncmp and LEN.
21132
21133 1998-01-29  Dave Brolley  <brolley@cygnus.com>
21134
21135         * Make-lang.in (java.info): Added.
21136         (java.install-info): Added
21137
21138 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
21139
21140         * Makefile.in (clean): Also remove java/parse.c.
21141
21142 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
21143
21144         Add a pair of -fbounds-check/-fno-bounds-check options.
21145         * lang.c (lang_decode_option): Add code to grok arguments.
21146         (flag_bounds_check): Add decl.
21147         (lang_f_options): New array w/ the option in it.
21148         * java-tree.h (flag_bounds_check): Add decl.
21149         * lang-options.h: New file.
21150         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21151         of a static macro value.
21152         (JAVA_ARRAY_EXCEPTION): Delete macro.
21153
21154 1998-01-23  Per Bothner  <bothner@cygnus.com>
21155
21156         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
21157         * expr.c (build_anewarray):  Add missing promote_type.
21158
21159 1998-01-22  Per Bothner  <bothner@cygnus.com>
21160
21161         Add array types with known length to optimize bounds checking.
21162         * typeck.c (build_java_array_type):  Take length parameter.
21163         (java_array_type_length, build_prim_array_type):  New functions.
21164         * java-tree.h:  Update for new functions.
21165         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21166         * class.c:  Use build_prim_array_type.
21167         * expr.c (can_widen_reference_to):  Handle known-length array types.
21168         (verify_jvm_instructions):  Keep track of integer push instructions
21169         followed by newarray/anewarray, so we can build known-length arrays.
21170         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
21171         (java_array_data_offset):  New function.
21172         (build_java_array_length_access):  New function.  Optimize if constant.
21173         (build_java_arrayaccess):  Constant fold bounds check.
21174         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
21175         (build_newarray, build_anewarray):  New functions.
21176         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
21177         * verify.c (merge_types):  Handle known-lengh array types.
21178
21179 1998-01-19  Per Bothner  <bothner@cygnus.com>
21180
21181         * expr.c (expand_byte_code):  Fix performace bug, which caused
21182         searching linenumber_table to be linear rather than constant.
21183
21184 1997-12-12  Per Bothner  <bothner@cygnus.com>
21185
21186         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
21187
21188         * decl.c, java-tree.h (soft_fmod_node):  New global.
21189         * decl.c (init_decl_processing):  Define __builtin_fmod.
21190         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
21191         using __builtin_fmod.
21192
21193 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21194
21195         * keyword.h: New file, output of keyword.gperf as processed by
21196         gperf.
21197         * lex.c (java_lex_init): Initialize java_error_flag.
21198         * parse.c (YYERROR_NOW): Uses java_error_flag.
21199         * parse.y: New static java_error_flag. Useless definition of
21200         buffer_error gone.
21201         * parse.y (java_error): Portable error recovery using
21202         java_error_flag (not yet completely tuned).
21203
21204 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
21205
21206         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21207
21208 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21209
21210         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21211         (parse.c, lex.c, keyword.h): New rules for Java source code
21212         front-end.
21213         * parse.c: Renamed into jcf-parse.c.
21214         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21215         * keyword.gperf: New file, Java keywords.
21216         * parse.y: New file, Java language grammar.
21217         * parse.h: New file, Java language grammar definitions.
21218         * lex.c: New file, Java language lexer.
21219         * lex.h: New file, Java language lexer definitions.
21220
21221 1997-12-03  Per Bothner  <bothner@cygnus.com>
21222
21223         * decl.c (clinit_identifier_node), java-tree.h:  New global.
21224         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
21225         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
21226         * expr.c (expand_java_field_op):  Check for invalid assignment
21227         to final field.
21228
21229         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
21230
21231 1997-10-27  Per Bothner  <bothner@cygnus.com>
21232
21233         * verify.c (verify_jvm_instructions):  When processing a handler,
21234         attempt to set the current_subr to the right value.
21235         (More complicated code combines Sep 17 and Oct 22 versions.)
21236
21237 1997-10-24  Per Bothner  <bothner@cygnus.com>
21238
21239         * class.c (push_class):  Figure out (guess) name of source file.
21240         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
21241         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
21242         (parse_class_file):  Change return type from int to void.
21243         Call debug_start_source_file/debug_end_source_file.
21244
21245         * expr.c (build_java_binop):  Fix masking 2nd operand.
21246         * decl.c (init_decl_processing):  Set sizetype first.
21247
21248 1997-10-22  Per Bothner  <bothner@cygnus.com>
21249
21250         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
21251         (Revert Sep 17 change.)
21252
21253 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21254
21255         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21256         .class extension in their name and fix thing so we don't process
21257         them parse_zip_file_entries().
21258         (parse_zip_file_entries): Cleaned unused local variables.
21259
21260 1997-10-20  Per Bothner  <bothner@cygnus.com>
21261
21262         * expr.c (can_widen_reference_to):  Allows equal array element types.
21263         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
21264         * jcf-dump.c (RET):  Get (and print) index.
21265
21266         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21267         Promote element type to POINTER_TYPE.
21268
21269 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21270
21271         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21272         find_in_current_zip, jcf_figure_file_type): Moved from
21273         jcf-reader.c to parse.c.
21274         * zextract.c: (read_zip_archive): takes file_comment_length possible
21275         field into account.
21276
21277 1997-10-20  Per Bothner  <bothner@cygnus.com>
21278
21279         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
21280
21281         * verify.c (merge_types):  Handle array types even better ...
21282
21283 1997-10-17  Per Bothner  <bothner@cygnus.com>
21284
21285         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
21286
21287         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
21288         * class.c (make_class_data):  Don't build fields_decl if no fields.
21289         When building fields_decl, skip if DECL_ARTIFICIAL.
21290
21291         * expr.c (java_stack_swap):  Update stack_type_map.
21292         * verify.c (merge_types):  Handle array types better.
21293
21294 1997-10-15  Per Bothner  <bothner@cygnus.com>
21295
21296         * class.c (add_field):  Don't promote short integral fields to
21297         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21298         * expr.c (push_value):  Promote and convert short integral values.
21299
21300         * decl.c, java-tree.h (integer_two_node):  New constant node.
21301         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
21302
21303 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21304
21305         * class.c (append_gpp_mangled_type): Use function argument
21306         unpromoted type to generate mangled name.
21307
21308 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21309
21310         * constants.c (build_constant_data_ref): Now uses current_class
21311         instead of main_class.
21312         (build_constants_constructor): Now uses current_class instead of
21313         main_class.
21314         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21315         of the global variable SeepZipFiles done here.
21316         * zextract.c (read_zip_archive): extra_field optional field taken
21317         into account while computing the position of the class file in the
21318         archive.
21319         * verify.c (verify_jvm_instructions): Use current_jcf to search
21320         the constant pool.
21321         * parse.c (load_class): First search for the class to load in the
21322         current zip file. Saves current_jcf (restored before returning
21323         from that function). Don't call JCF_FINISH in the class was found
21324         in the current ZIP file.
21325         (jcf_parse): If the class was found in the current ZIP file, save
21326         its tree_constant_pool (for later reuse).
21327         (parse_class_file): New function. Process each method defined in
21328         the current class and record the class as to be later registered.
21329         (yyparse): Rewritten. Figure the type of the current file and switch
21330         accordingly.
21331         * lang.c: New global variable current_jcf.
21332         (lang_init): Removed compiling_from_source test (done later, in
21333         yyparse). Removed call the jcf_parse ().
21334         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21335         (typedef struct JCF): New fields seen_in_zip (to mark a class found
21336         in the current ZIP file) and zip_offset (offset to the class data in
21337         the current zip file).
21338         * jcf-reader.c: zipfile.h included.
21339         localToFile: New ZipFileCache static global variable
21340         (parse_zip_file_entries): New function. Browse the current ZIP
21341         file directory and process each class found.
21342         (process_zip_dir): New function. Register each class found in the
21343         ZIP file directory. The class aren't parsed but a valid JCF is
21344         link to each of them.
21345         (find_in_current_zip): New function. Search for a class in the
21346         current ZIP file directory. If found, prepare the class so that it
21347         can be loaded.
21348         (jcf_figure_file_type): New function. Examine the file structure
21349         to figure a class file, a ZIP file. If none of these categories are
21350         matched, a source file is assumed.
21351         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21352         SeenZipFile: New global variable.
21353         (open_in_zip): Use zipmember's length to accelerate the search for
21354         a member. If zipmember was NULL and zip file successfully read,
21355         return 0.
21356         * java-tree.h: New global variable current_jcf declared.  Added
21357         declaration for current_constant_pool_tags, current_constant_pool_data,
21358         current_constant_pool_length, current_constant_pool_data_ref.
21359         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21360         store the JCF of classes seen in a zip file) and tree *constant_pool
21361         (to save a loaded class constant pool). current_class declared here.
21362         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21363         retrieve method_ref_constant.
21364         (PUSHC): java_push_constant_from_pool now uses current_jcf.
21365         (OBJECT): get_class_constant now uses current_jcf.
21366         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21367         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21368         (expand_invoke): Now uses current_class instead of main_class
21369         (build_class_init): Now uses current_class instead of main_class
21370         * class.c: New static global variable registered_class.
21371         (register_class): New function.
21372         (emit_register_class): Modified to use registered_class instead of
21373         main_class
21374         (is_compiled_class): Now take into account class seen in the archive.
21375
21376 1997-10-06  Per Bothner  <bothner@cygnus.com>
21377
21378         * except.h:  Renamed to: java-except.h.
21379         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
21380         * except.c:  Add semi-working (commented out) implementation.
21381
21382         * expr.c (expand_iinc):  Add needed flush_quick_stack.
21383         * parse.c (set_source_filename):  New function.
21384         (give_name_to_class):  Set input_filename from package.classname.java.
21385
21386         * jcf-io.c (find_class):  Don't look first in ".".
21387
21388 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21389
21390         * zextract.c (read_zip_archive): Now takes into account the
21391         extra_field field.
21392         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21393
21394 1997-09-20  Per Bothner  <bothner@cygnus.com>
21395
21396         * constants.c, java-tree.h (build_internal_class_name):  New function.
21397         (alloc_class_constant):  Re-implement using build_internal_class_name.
21398         * class.c (make_class_data):  Likewise.
21399         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
21400
21401 1997-09-17  Per Bothner  <bothner@cygnus.com>
21402
21403         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
21404         to NULL before pushing an exception handler target.
21405
21406         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
21407         (java_stack_swap, java_stack_dup):  Re-write to be safe from
21408         clobbering registers.
21409         (build_class_init):  New function.
21410
21411 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21412
21413         * typeck.c (build_java_array_type): Temporary use
21414         permanent_obstack to create the array 'length' field.
21415         * expr.c (lookup_label): Temporay use permanent_obstack to create
21416         label if not found.
21417         * class.c (push_super_field): Tempory use permanent_obstack.
21418
21419 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21420
21421         * typeck.c (type_for_mode): Now handles double_type_node and
21422         float_type_node.
21423         * verify.c (verify_jvm_instructions): The instruction following
21424         the wide bytecode is checked. OPCODE_ret added to the list of
21425         wide.
21426
21427 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21428
21429         * class.c (make_class): Temporary use permanent_obstack. Set the
21430         class CLASS_P field to 1.
21431         (push_class): Temporary use permanent_obstack.
21432         (set_super_info): Temporary use permanent_obstack.
21433         (add_method): Temporary use permanent_obstack, set
21434         METHOD_TRANSIENT().
21435         (add_field): Temporary use permanent_obstack. Sets
21436         FIELD_VOLATILE() and FIELD_TRANSIENT().
21437         (build_class_ref): Temporary use permanent_obstack if the class
21438         isn't compiled.
21439         (build_static_field_ref): Temporary use permanent_obstack when
21440         creating field's rtl.
21441         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21442         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21443         and fields. Function finalized, as far as flag handling.
21444         (push_class_static_dummy_field): Temporary use permanent_obstack.
21445         (emit_register_class): Force generation of class registration at
21446         -O3 or deeper.
21447         * decl.c (end_java_method): Call permanent_allocation() before
21448         returning.
21449         * expr.c (can_widen_reference_to): Added comment to interface
21450         handling, fixed typo.
21451         (lookup_field): Now uses CLASS_P() to correct FIXME
21452         (expand_invoke): Verification on public && !static &&
21453         !abstract moved into soft_lookupinterfacemethod (kaffe).
21454         Use Object class dtable if objectref is an array when expanding
21455         invokeinterface.
21456         (java_push_constant_from_pool): Temporary use permanent_obstack
21457         for CONSTANT_string
21458         * parse.c (get_ref_constant): Temporary use permanent_obstack to
21459         create constant references.
21460         (get_constant): Temporary use permanent_obstack to create constant.
21461         (load_class): Temporary use permanent_obstack to load class.
21462         (jcf_parse): Temporary use permanent_obstack to perform class
21463         layout.
21464         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21465         (build_java_signature): Temporary use permanent_obstack.
21466         * verify.c: (verify_jvm_instruction): removed unnecessary verification
21467         on ACC_SUPER flag.
21468         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21469         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21470         (CLASS_P): Defined
21471
21472 1997-09-11  Per Bothner  <bothner@cygnus.com>
21473
21474         * class.c (append_gpp_mangled_type):  Fix typo.
21475         (emit_register_class):  Use main_class to get class object, rather
21476         than looking for no-longer-existing static decl starting with _CL.
21477         * typeck.c (parse_signature_type):  Promote array element type
21478         if it is a RECORD_TYPE.
21479
21480 1997-09-10  Per Bothner  <bothner@cygnus.com>
21481
21482         * class.c (push_class_static_dummy_field):  New function.
21483         (mangle_static_field):  New. Do G++-style mangling of static fields.
21484         (layout_class):  Mandle static fields here, not in add_field.
21485         (build_class_ref):  The class object is now a dummy static field.
21486         * decl.c (find_local_variable):  Look for best, instead of first match.
21487         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
21488         (build_java_athrow):  Don't check here if exception is Throwable.
21489         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
21490         (TYPE_USED):  Removed.  No longer used ...
21491         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
21492         * verify.c (push_pending_label):  New function.
21493         (push_pending_block):  Renamed to check_pending_block.
21494         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
21495         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
21496         re-checking possible handlers) after a store (less wasted work).
21497         Check for null handler (finally) before calling add_handler.
21498         Various changes to (finally?) correctly handle try/finally.
21499
21500 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
21501
21502         * class.c: Include stdio.h.
21503
21504 1997-09-04  Per Bothner  <bothner@cygnus.com>
21505
21506         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21507         to make sure class is initialized before static/special invoke.
21508
21509         * verify.c (verify_jvm_instructions):  On a store instruction,
21510         call find_local_variable to force pre-allocation of decl and rtx.
21511         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
21512
21513 1997-09-03  Per Bothner  <bothner@cygnus.com>
21514
21515         * class.c (build_class_ref):   Strip off "promoted_" if need be.
21516         (make_field_value): Call build_java_signature when needed.
21517         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
21518         * expr.c (build_java_athrow):  Don't push_value of exception.
21519         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21520         match specification of [fd]cmp[lg] for NaNs.
21521         (expand_byte_code):  Add support for exception handler ranges.
21522         * except.c:  Add skeleton for EH code-generation.
21523         * verify.c (merge_types):  Treat all promoted integral types as equal.
21524         * constants.c (build_constants_constructor):  To force creation of
21525         current_constant_pool_data_ref, call build_constant_data_ref.
21526
21527         * javaop.def (lload):  Fix typo.
21528         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
21529
21530 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
21531
21532         * parse.c: Don't include function.h.
21533
21534 1997-08-27  Per Bothner  <bothner@cygnus.com>
21535
21536         * except.[ch]:  New files.
21537         * Makefile.in (JAVA_OBJS):  Add except.o
21538         * expr.c:  Temporary warning about unimplemented exceptions.
21539         * verify.c:  Verify exception handlers.
21540
21541         * jcf-dump.c (disassemble_method):  Print exception table.
21542
21543 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21544
21545         * expr.c (verify_jvm_instructions): Started a thorough
21546         verification of invoke* bytecodes.
21547         (expand_byte_code): flush quick stack if PC is the target of a
21548         branch.  and undef RET (conflicting with config/i386/i386.h).
21549         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21550         used.
21551         (expand_invoke): Now handles invokeinterface and do more
21552         verification according to the bytecode.
21553         (lookup_field): Don't try to load the class if processing
21554         dtable_type.
21555         (can_widen_reference_to): Now handles interfaces.
21556         * decl.c (init_decl_processing): New global variable
21557         soft_lookupinterfacemethod_node, declared in java-tree.h.
21558         Call set_super_info on string_type_node.
21559         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21560         defined.
21561         * class.c (set_super_info): Fills the CLASS_* flags according to
21562         access_flags.
21563         (get_access_flags_from_decl): Handles all class flags.
21564
21565 1997-08-26  Per Bothner  <bothner@cygnus.com>
21566
21567         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
21568         * parse.c (yyparse):  Check for abstract method, and missing code.
21569         * expr.c (expand_byte_code):  Change interface.
21570         * lang.c (put_decl_node):  Print promoted types prettier.
21571         * verify.c (verify_jvm_instruction):  Change interface.
21572         Partial support for scanning exception table.
21573         For load instructions, handle promoted integral types.
21574
21575 1997-08-21  Per Bothner  <bothner@cygnus.com>
21576
21577         * verify.c:  New file, with contents moved from expr.c.
21578         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
21579         * typeck.c (is_array_type_p):  Moved here from expr.c.
21580         * java-tree.h:  Add some now-needed function declarations.
21581         * Makefile.in (JAVA_OBJS): Added verify.o.
21582
21583 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21584
21585         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21586         METHOD_ABSTRACT flag.
21587
21588         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21589         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21590         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21591
21592         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21593         variables.
21594         (start_java_method): Hook for SYNCHRONIZED methods.
21595
21596         * expr.c (build_java_jsr, build_java_ret): New functions
21597         (JSR,PRE): New macros
21598         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21599         (verify_jvm_instructions): tableswitch, lookupswitch,
21600         monitorenter, monitorexit, goto_w: verified.
21601         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21602         (build_java_monitor): New function.
21603         (MONITOR_OPERATION): Modified to call build_java_monitor()
21604         (verify_jvm_instructions): Started a thorough verification of
21605         invoke* bytecodes.
21606
21607 1997-08-19  Per Bothner  <bothner@cygnus.com>
21608
21609         Support verification of jsr/ret subroutines (used for try/finally).
21610         * decl.c (return_address_type_node):  New type node.
21611         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21612         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21613         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
21614         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21615         TYPE_USED):  New macros for special types in type_map.
21616
21617         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
21618         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
21619         BCODE_JUMP_TARGET.
21620         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
21621
21622         * expr.c (can_widen_reference_to):  New function.
21623         (pop_type):  Use it.
21624         (merge_type_state):  Support handling start of subroutine.
21625         (push_pending_block):  Return char* error message, instead of calling
21626         fatal on an error.  Also handle subroutines.
21627         (verify_jvm_instructions):  Handle errors from push_poending_block.
21628         Support jsr and ret instructions.
21629
21630 1997-08-19  Per Bothner  <bothner@cygnus.com>
21631
21632         * jcf-io.c (find_classfile):  Fix thinko.
21633         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
21634
21635 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
21636
21637         * Makefile.in (BISON): Remove.
21638
21639 1997-08-07  Per Bothner  <bothner@cygnus.com>
21640
21641         * Makefile.in:  Convert to autoconf.
21642         * config-lang.in (outputs):  Added java/Makefile.
21643
21644         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21645         Rename cc1java to jc1.
21646
21647         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
21648         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
21649
21650         * class.c (class_depth):  Do load_class if needed.
21651
21652         Mostly better verification.
21653         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
21654         (init_decl_processing):  Change return type of soft_checkcast.
21655         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
21656         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21657         lang_print_error):  New functions.
21658         (lang_init):  Set global hook print_error_function to lang_print_error.
21659         * expr.c:  In the type_map ptr_type_node is only used for null now.
21660         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
21661         (merge_types):  Dererence pointer to record types before comparing.
21662         (decode_newarray_type, merge_types):  On error just return NULL.
21663         (build_java_binop):  Add preliminary implementation (with warning)
21664         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21665         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
21666         (expand_compare, expand_java_goto, expand_java_call):  Don't
21667         push_pending_block, since that only makes sense when verifying.
21668         (merge_type_state):  Different return codes.
21669         (push_pending_block):  A block may need to be verified more than once.
21670         (expand_byte_code):  Warn about unused code at code generation time.
21671         (verify_jvm_instruction):  Changed logic, since code may need to be
21672         re-verified if type-state has changed.  Also, better error handling.
21673         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21674         Improve newarray, anewarray, ?aload, athrow,
21675         * java-tree.h (LABEL_CHANGED):  New macro.
21676
21677 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21678
21679         * decl.c (soft_athrow_node): New global variable initialized.
21680         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21681         * typeck.c (convert): Added support for REAL_TYPE.
21682         (convert_to_char): New function.
21683         (convert): Handle CHAR_TYPE.
21684         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21685         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21686         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21687         promoted type.
21688         (verify_jvm_instructions): Added break a the end of bogus unop: label.
21689         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21690         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21691         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21692         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21693         to Use The Right Things.
21694         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21695         compatible with INT. BOOLEAN is made equivalent to BYTE.
21696         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21697         OPCODE_ifnonnull): Now supported.
21698         (build_java_athrow): New function.
21699
21700 1997-08-04  Per Bothner  <bothner@cygnus.com>
21701
21702         Rename method name <init> to match G++ (and fix mangling).
21703         * class.c (layout_class):  Replace method name of <init> by class name.
21704         (make_method_value):  Do inverse renaming of constructor from <init>.
21705         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
21706         * typeck.c (lookup_java_constructor):  New function.
21707         * expr.c (expand_invoke):  If method_name is <init>, call
21708         lookup_java_constructor to find constructor.
21709
21710         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
21711
21712 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21713
21714         * parse.c (get_class_constant): Modified to handle array "classes"
21715         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21716         wide type.
21717         (convert): Modified to handle real type.
21718         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21719         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21720         variables declared.
21721         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21722         soft_multianewarray, soft_newarray_node, soft_throw_node): New
21723         global variables initialized.
21724         (find_local_variable): Handles the case of a pointer
21725         (end_java_method): Restore the use of one more scope
21726         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21727         build_java_array_length_access, expand_java_arrayload,
21728         expand_java_arraystore, expand_java_array_length,
21729         expand_java_multianewarray, expand_java_anewarray,
21730         build_java_check_indexed_type, is_array_type_p,
21731         build_java_throw_out_of_bound_exception): New functions.
21732         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21733         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21734         OPCODE_<t>aload): Implemented code for verification.
21735         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21736         ARRAY_NEW_MULTI): Macro defined.
21737         (CONVERT): Modified to invoke convert().
21738         (case OPCODE_aload2): Fixed index typo from 2 to 1.
21739
21740 1997-07-31  Per Bothner  <bothner@cygnus.com>
21741
21742         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
21743         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
21744         (make_class_data):  Field name needs '/' as package prefix.
21745         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
21746
21747 1997-07-25  Per Bothner  <bothner@cygnus.com>
21748
21749         Implement debug information for local variables.
21750         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21751         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21752         DECL_LOCAL_SLOT_CHAIN):  New macros.
21753         (struct lang_decl_var):  New type.
21754         * parse.c (give_name_to_locals):  Move to decl.c.
21755         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
21756         (start_java_method):  Re-write parameter handling.
21757         (pending_local_decls):  New global variable.
21758         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
21759         (find_local_variable):  Accept pc so we can skips decls not in range.
21760         (struct binding_level):  Add end_pc field.
21761         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21762         (various):  Change so current pc gets passed to find_local_variable.
21763
21764         * decl.c (init_decl_processing):  Re-arrange fields in
21765         class_type_node and and method_type_node to match kaffe 0.9.1.
21766         * class.c (make_method_value, make_class_data):  Update
21767         initializations to match.
21768
21769 1997-07-16  Per Bothner  <bothner@cygnus.com>
21770
21771         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21772         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
21773         (push_super_field):  New function.
21774         (make_class_data):  Handle inheritance of class static initializer.
21775         (layout_class):  New name mangling.
21776         * constants.c (build_constant_data_ref):  Init type of data array
21777         to a one-element array.
21778         (build_constants_constructor):  Set DECL_SIZE from complete array type.
21779         * decl.c:  Rename class_type, object_type etc to class_type_node,
21780         object_type_node etc.  Make former inherit from latter.
21781         * expr.c (expand_invoke):  Add cast of function address.
21782         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
21783         * parse.c (yyparse):  Don't call layout_class here.
21784         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
21785
21786 1997-06-14  Per Bothner  <bothner@cygnus.com>
21787
21788         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
21789         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
21790         (alloc_class_constant):  New.
21791         * expr.c (expand_invoke):  Make sure method's class is initialized.
21792         * class.c (interits_from_p, emit_register_class):  New functions.
21793         * parse.c (yyparse):  Call emit_register_class.
21794
21795 1997-06-09  Per Bothner  <bothner@cygnus.com>
21796
21797         * constants.c:  New file, to handle constant pool.
21798         * Makefile.in (JAVA_OBJS):  Add constants.o.
21799         * decl.c (init_decl_processing):  Update, fix, finish various structs.
21800         (pushdecl_top_level):  New.
21801         * parse.c (layout_class):  Moved to class.c.
21802         * expr.c (java_push_constant_from_pool):  New function.
21803         * class.c (build_class_ref):  Make work fully
21804         (make_class_data):  Emit super-class, constant pool, interface vector.
21805
21806 1997-06-03  Per Bothner  <bothner@cygnus.com>
21807
21808         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
21809         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
21810         * class.c (class_depth):  New function.
21811         (lookup_named_class):  Replaced by new function lookup_class.
21812         * decl.c (object_type_node, string_type_node):  New.
21813         Remove various types that we no longer need.
21814         * expr.c (verify_jvm_instructions):  New separate verifier pass.
21815         (push_type, pop_type):  New functions for verifier.
21816         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
21817         (expand_byte_code):  Simplify, since we assume already verified.
21818         (expand_invoke):  Now mostly works.
21819         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21820         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
21821         * parse.c:  Wait to allocate class object until we know its name.
21822         (layout_class):  Calculate DECL_VINDEX for each virtual method.
21823         * typeck.c (get_array_type):  Rename to ...
21824         (build_java_array_type):  ... and provide working implementation.
21825         (build_java_signature):  New function - build Java signature of type.
21826         (set_java_signature):  New function - cache signature with type.
21827         (lookup_java_method):  New function.
21828
21829 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
21830
21831         * class.c (ident_subst):  Take extra SUFFIX parameter.
21832         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
21833         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
21834         (build_class_ref):  Actually implement.
21835         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
21836         * decl.c (builtin_function):  New.
21837         (init_decl_processing):  Update for current Kaffe.  Declare some
21838         builtin Kaffe functions.
21839         * expr.c (build_address_of):  New.
21840         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21841         Renamed (from expand_java_new etc), and added working implementations.
21842         (build_field_ref):  Now also handle static fields.
21843         (expand_invoke):  Implement invokestatic, and start implement rest.
21844         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
21845         * javaop.def:  Rename invokevirt -> invokevirtual.
21846         * lang.c (use_handles):  Removed.
21847         * parse.c:  Add support for ConstantValue attribute.
21848         Handle nested loading of a class.  (JPOOL_UTF):  New.
21849
21850 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21851
21852         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21853
21854 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21855
21856         * Make-lang.in (java.install-man):  New empty rule.
21857         * typeck.c (set_local_type):  New function.
21858         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21859         not find_stack_slot.  Call set_local_type.
21860
21861 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21862
21863         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21864         and building RECORD_TYPE CONSTRUCTORs.
21865         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21866
21867         * lang.c (use_handles):  Change the default to 0.
21868         * decl.c:  Define and build class_type, field_type, utf8const_type.
21869         * class.c (make_class_data, make_field_value,
21870         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21871         hashUtf8String, strLengthUtf8, mangled_classname:
21872         Functions to build reflective data structures.
21873         * parse.c (yyparse):  Call make_class_data.
21874
21875         * jcf-io.c (open_class, find_classfile):  New functions.
21876         * jcf-dump.c:  Support reading classfile from explicitly-named
21877         class file (without CLASSPATH searching).
21878
21879 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21880
21881         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21882         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21883         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21884         (get_constant):  Now trivial for CONSTANT_Utf8.
21885
21886         * jcf.h:  Make NEW_CPOOL the default.
21887         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21888
21889 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21890
21891         New directory.
21892
21893 \f
21894 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
21895 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
21896
21897 Copying and distribution of this file, with or without modification,
21898 are permitted in any medium without royalty provided the copyright
21899 notice and this notice are preserved.