OSDN Git Service

Scan "lea\[lq\]?\[ \t\]" instead of "lea\[ \t\]".
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
2
3         * decl.c (java_init_decl_processing): Remove argument in call to
4         initialize_sizetypes
5
6 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
7
8         * exception.cc (_Jv_Throw): Avoid set but not used warning.
9         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
10         sizeof to avoid set but not used warnings.
11
12 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
13
14         * lang.c (java_post_options): Constify variable "dot".
15
16         * jcf-parse.c (set_source_filename): Constify variable "dot".
17         (load_class): Constify variable "separator".
18         Use get_identifier_with_length.
19
20         * jvspec.c (lang_specific_driver): Constify two variables named "p".
21
22 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
23
24         * jcf-dump.c (version): Update copyright notice dates.
25
26 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
27
28         * jvspec.c (lang_specific_driver): Remove unused
29         saw_verbose_flag variable.
30         * jcf-dump.c (main): Remove unused general_purpose_bits
31         variable.
32         * builtins.c (initialize_builtins): Remove unused float_ftype_float
33         variable.
34         * expr.c (java_stack_pop): Remove unused val variable.
35         (build_jni_stub): Remove unused res_type variable.
36         * verify-impl.c (check_field_constant): Remove unused len variable.
37
38 2009-10-20  Joel Dice <dicej@mailsnare.net>
39
40         PR java/28474
41         * mangle_name.c (append_unicode_mangled_name): Fix mangling
42         of names with multiple underscores and "U".
43         (unicode_mangling_length): Likewise.
44
45 2009-10-03  Simon Baldwin  <simonb@google.com>
46
47         * config-lang.in (lang_dirs): Remove zlib.
48
49 2009-09-28  Richard Henderson  <rth@redhat.com>
50
51         * builtins.c (initialize_builtins): Update call to
52         build_common_builtin_nodes.
53         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
54
55 2009-09-14  Richard Henderson  <rth@redhat.com>
56
57         * builtins.c (initialize_builtins): Update call to
58         build_common_builtin_nodes.
59         * decl.c (java_init_decl_processing): Don't call
60         default_init_unwind_resume_libfunc.
61         * except.c: Include tree-iterator.h.
62         (build_exception_object_var): New.
63         (build_exception_object_ref): Use it.
64         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
65         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
66         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
67
68 2009-09-13  Richard Guenther  <rguenther@suse.de>
69         Rafael Avila de Espindola  <espindola@google.com>
70
71         * decl.c (do_nothing): Remove.
72         (java_init_decl_processing): Do not set lang_eh_runtime_type.
73         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
74         * lang.c (java_eh_personality): New.
75         (java_eh_personality_decl): Likewise.
76         (LANG_HOOKS_EH_PERSONALITY): Define.
77
78 2009-09-03  Diego Novillo  <dnovillo@google.com>
79
80         * lang.c (lang_hooks): Remove const qualifier.
81
82 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
83
84         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
85         type.
86
87 2009-09-01  Richard Guenther  <rguenther@suse.de>
88
89         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
90         * java-tree.h (java_mark_addressable): Likewise.
91         * typeck.c (java_mark_addressable): Likewise.
92
93 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
94
95         * Make-lang.in (java.install-pdf): Install gcj.pdf in
96         $(pdfdir)/gcc, alongside the other manuals.
97
98 2009-08-12  Andrew Haley  <aph@redhat.com>
99
100         * builtins.c (compareAndSwapInt_builtin): Use
101         flag_use_atomic_builtins.
102         (compareAndSwapLong_builtin): Likewise.
103         (compareAndSwapObject_builtin): Likewise.
104         * jvspec.c: Add flag_use_atomic_builtins.
105         * gcj.texi: Likewise.
106         * java-tree.h: Likewise.
107         * lang.opt: Likewise.
108
109 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
110
111         PR debug/40990
112         * lang.c (put_decl_node): Outputs different level of information
113         depending on the verbosity level.
114
115 2009-07-31  Andrew Haley  <aph@redhat.com>
116
117         PR java/40867
118         * decl.c (java_replace_references): Set EXPR_LOCATION on all
119         generated expressions.
120         (binding_level.loc): new field.
121         (clear_binding_level): Initialize loc.
122         (set_input_location): New function.
123         (pushlevel): Set new binding_level.loc.
124         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
125         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
126         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
127
128 2009-07-17  Richard Guenther  <rguenther@suse.de>
129
130         PR c/40401
131         * java-gimplify.c (java_genericize): Do not gimplify here.
132         But replace all local references.
133         (java_gimplify_expr): Do not replace local references here.
134         (java_gimplify_modify_expr): Likewise.
135         * jcf-parse.c (java_parse_file): Do not finalize the CU or
136         optimize the cgraph here.
137         * decl.c (java_replace_reference): Make static.
138         (java_replace_references): New function.
139         (end_java_method): Clear base_decl_map.
140         * java-tree.h (java_replace_references): Declare.
141         (java_replace_reference): Remove.
142
143 2009-07-14  Taras Glek  <tglek@mozilla.com>
144             Rafael Espindola  <espindola@google.com>
145
146         * Make-lang.in (java.install-plugin): New target for
147         installing plugin headers.
148
149 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
150
151         * class.c: Replace %J by an explicit location. Update all calls.
152         
153 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
154
155         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
156
157 2009-06-29  Andrew Haley  <aph@redhat.com>
158
159         PR java/40590
160         * java-tree.h (cxx_keyword_p): New declaration.
161         * mangle_name.c (utf8_cmp): Move here from mangle.c.
162         (cxx_keywords): Likewise.
163         (cxx_keyword_p): Likewise.
164         (MANGLE_CXX_KEYWORDS): New macro.
165         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
166         (append_gpp_mangled_name): Likewise.
167         * mangle.c: Move code to mangle_name.c. 
168         (mangle_member_name): Don't call cxx_keyword_p.
169
170 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
171
172         * java-gimplify.c (java_gimplify_block): New argument to
173         build_empty_stmt.
174         * expr.c (force_evaluation_order): Same.
175         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
176         * class.c: Same.
177         * decl.c: Same.
178         * jcf-parse.c: Same.
179         * constants.c: Same.
180         * resource.c: Same.
181         * except.c: Same.
182         * builtins.c: Same.
183         * expr.c: Same.
184         * java-tree.h (PUSH_FIELD): Add location field.
185         
186 2009-06-09  Ian Lance Taylor  <iant@google.com>
187
188         * verify.h: Remove extern "C".
189
190 2009-06-07  Ian Lance Taylor  <iant@google.com>
191
192         * jcf-parse.c (handle_constant): Change local variable 'kind' to
193         unsigned int.
194
195 2009-06-01  Ian Lance Taylor  <iant@google.com>
196
197         * jcf-io.c (find_class): Use CONST_CAST.
198
199 2009-05-27  Ian Lance Taylor  <iant@google.com>
200
201         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
202         $(LINKER).
203         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
204
205 2009-05-26  Ian Lance Taylor  <iant@google.com>
206
207         * Make-lang.in (jvspec.o): Use $(COMPILER).
208         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
209         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
210
211 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
212
213         * Make-lang.in (GCJ): Renamed to...
214         (XGCJ): ... this.
215
216 2009-04-27  Ian Lance Taylor  <iant@google.com>
217
218         * builtins.c (java_builtins): Add casts to enum type.
219         * verify-impl.c (check_class_constant): Add cast to enum type.
220         (check_constant, check_wide_constant): Likewise.
221
222 2009-04-27  Richard Guenther  <rguenther@suse.de>
223
224         PR java/38374
225         * constants.c (build_constants_constructor): Retain the old
226         pointer type as valid TYPE_POINTER_TO after patching the
227         type of the constant pool decl.
228
229 2009-04-24  Ian Lance Taylor  <iant@google.com>
230
231         * jcf-parse.c (handle_constant): Add cast to enum type.
232
233 2009-04-21  Taras Glek <tglek@mozilla.com>
234
235         * builtins.c: Update GTY annotations to new syntax
236         * decl.c: Likewise
237         * java-tree.h: Likewise
238         * jcf.h: Likewise
239         * lang.c: Likewise
240
241 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
242
243         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
244         license notices.
245
246 2009-04-18  Ian Lance Taylor  <iant@google.com>
247
248         * verify-impl.c (verify_instructions_0): Add cast to enum type.
249
250 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
251
252         * builtins.c (compareAndSwapLong_builtin,
253         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
254         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
255
256 2009-03-31  Richard Guenther  <rguenther@suse.de>
257
258         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
259         the first operand of binary and comaprison expressions.
260
261 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
262
263         PR rtl-optimization/323
264         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
265         Give an error for -fexcess-precision=standard for processors where
266         the option is significant.
267
268 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
269
270         * lang.opt: Unify help text for -Wdeprecated.
271
272 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
273
274         * jcf-dump.c (version): Update copyright notice dates.
275
276 2009-01-16  Richard Guenther  <rguenther@suse.de>
277
278         PR tree-optimization/38835
279         PR middle-end/36227
280         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
281
282 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
283
284         PR bootstrap/38262
285         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
286
287 2008-11-04  Andrew Haley  <aph@redhat.com>
288
289         PR java/37068
290         * jcf-parse.c (java_emit_static_constructor): Don't call
291         cgraph_build_static_cdtor.  Rewrite.
292
293 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
294
295         * Make-lang.in (check-java-subtargets): New target.
296
297 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
298
299         PR target/35483
300         * Make-lang.in (class.o): Depend on $(TM_P_H).
301         (expr.o): Same.
302         * class.c: Include tm_p.h.
303         * expr.c: Include tm_p.h.
304
305 2008-10-14  Andrew Haley  <aph@redhat.com>
306
307         * constants.c (build_constant_data_ref): Make sure we only build
308         one copy of the decl for the constant pool.
309
310 2008-09-22  Andrew Haley  <aph@redhat.com>
311
312         * expr.c (rules): Add new rule for
313         gnu.java.lang.VMCPStringBuilder.toString.
314         (rewrite_rule.new_classname): New field.
315         (maybe_rewrite_invocation): Use new_classname field instead of
316         DECL_CONTEXT (*method_p).
317         Allow rewrite_arglist to be NULL.
318
319 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
320
321         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
322         (java_get_callee_fndecl): Kill.
323
324 2008-09-17  Jan Hubicka  <jh@suse.cz>
325
326         PR c++/18071
327         * class.c (add_method_1): Do not initialize DECL_INLINE.
328         (make_local_function_alias): Likewise.
329         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
330         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
331
332 2008-09-09  Richard Guenther  <rguenther@suse.de>
333
334         * decl.c (build_result_decl): Remove no longer applicable
335         promotion.
336
337 2008-09-05  David Daney  <ddaney@avtrex.com>
338
339         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
340
341 2008-08-21  David Daney  <ddaney@avtrex.com>
342
343         * class.c (make_class_data): Don't add field_index when
344         flag_reduced_reflection set.
345
346 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
347
348         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
349
350 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
351
352         PR 28875
353         * lang.c (java_handle_option): Replace set_Wunused with
354         warn_unused.
355
356 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
357
358         * gcj.texi: Update copyright years.  Do not list GPL as
359         Invariant Section.
360
361 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
362
363         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
364         from ctype's sizes.
365
366         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
367         alignment.
368
369 2008-07-29  Jan Hubicka  <jh@suse.cz>
370
371         * lang.c (java_post_options): Remove handling of flag_no_inline.
372
373 2008-07-28  Richard Guenther  <rguenther@suse.de>
374
375         Merge from gimple-tuples-branch.
376
377         2008-07-18  Richard Guenther  <rguenther@suse.de>
378
379         * expr.c: Include tree-iterator.h.
380         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
381
382         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
383
384         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
385         * expr.c: Same.
386
387         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
388
389         * java-gimplify.c (java_gimplify_expr): Same.
390         (java_gimplify_modify_expr): Same.
391         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
392
393         2008-05-02  Diego Novillo  <dnovillo@google.com>
394
395         * expr.c (build_java_throw_out_of_bounds_exception): Fix
396         mixed declarations and code.
397
398         2008-05-02  Doug Kwan  <dougkwan@google.com>
399         
400         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
401         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
402
403         2008-02-19  Diego Novillo  <dnovillo@google.com>
404
405         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
406
407         * java-gimplify.c (java_gimplify_self_mod_expr): Change
408         gimple_seq arguments to gimple_seq *.  Update all users.
409
410         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
411
412         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
413         sequences.
414         (java_gimplify_self_mod_expr): Same.                                    
415         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
416         sequences.
417
418 2008-07-24  Jan Hubicka  <jh@suse.cz>
419
420         * java/decl.c: Include cgraph.h
421         (end_java_method): Remove non-unit-at-a-time code.
422         (java_mark_decl_local): Likewise; sanity check that we don't touch
423         finalized nodes.
424
425 2008-07-15  Jan Hubicka  <jh@suse.cz>
426
427         * lang.c (java_init_options): Enable unit-at-a-time by default.
428
429 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
430
431         * Make-lang.in (jvspec.o): Fix dependencies.
432
433 2008-07-06  Tom Tromey  <tromey@redhat.com>
434
435         * Make-lang.in (java/parse.o-warn): Remove.
436         (java/jcf-io.o-warn): Remove.
437
438 2008-07-05  Tom Tromey  <tromey@redhat.com>
439
440         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
441         (compare_path): Remove.
442         (java_or_class_file): Likewise.
443         (memoized_dirlist_entry): Likewise.
444         (memoized_dirlist_hash): Likewise.
445         (memoized_dirlist_lookup_eq): Likewise.
446         (memoized_dirlists): Likewise.
447         (caching_stat): Likewise.
448         (find_class): Use stat.
449         * jcf.h (JCF_USE_SCANDIR): Remove.
450
451 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
452
453         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
454         doc/rebuild-gcj-db.1
455         (java.uninstall): Likewise.
456         (java.maintainer-clean): Likewise.
457         (aot-compile.pod): New rule.
458         (rebuild-gcj-db.pod): New rule.
459         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
460         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
461
462 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
463
464         * Make-lang.in (java/jcf-io.o-warn): New.
465
466 2008-06-24  Tom Tromey  <tromey@redhat.com>
467
468         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
469         * expr.c (add_type_assertion): Rename argument.
470         (build_java_arrayaccess): Don't name variable 'throw'.
471         (ARRAY_NEW_MULTI): Don't name variable 'class'.
472         * jcf-io.c (find_class): Don't name variable 'class'.
473         * mangle.c (compression_table_add): Don't name variable 'new'.
474         * constants.c (cpool_for_class): Rename argument.
475         (alloc_constant_fieldref): Likewise.
476         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
477         'class'.
478         (read_class): Likewise.
479         (parse_zip_file_entries): Likewise.
480         (process_zip_dir): Likewise.
481         * decl.c (java_mark_class_local): Rename argument.
482         * class.c (GEN_TABLE): Use type_name, not typename.
483         (gen_indirect_dispatch_tables): Likewise.
484         (add_field): Rename argument.
485         (is_compiled_class): Likewise.
486         (safe_layout_class): Likewise.
487         (emit_assertion_table): Likewise.
488         * typeck.c (has_method): Rename argument.
489
490 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
491
492         * class.c (ident_subst, mangled_classname, unmangle_classname,
493         gen_indirect_dispatch_tables, add_method_1,
494         build_fieldref_cache_entry, make_local_function_alias,
495         layout_class, java_treetreehash_find, java_treetreehash_new,
496         split_qualified_name): Fix for -Wc++-compat.
497         * constants.c (set_constant_entry, cpool_for_class): Likewise.
498         * decl.c (make_binding_level, java_dup_lang_specific_decl,
499         start_java_method): Likewise.
500         * except.c (prepare_eh_table_type): Likewise.
501         * expr.c (type_assertion_hash, note_instructions): Likewise.
502         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
503         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
504         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
505         Likewise.
506         * jcf-parse.c (reverse, java_read_sourcefilenames,
507         annotation_grow, rewrite_reflection_indexes, java_parse_file,
508         process_zip_dir): Likewise.
509         * jcf-path.c (add_entry, add_path, jcf_path_init,
510         jcf_path_extdirs_arg): Likewise.
511         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
512         * jvgenmain.c (do_mangle_classname): Likewise.
513         * lang.c (put_decl_string): Likewise.
514         * verify-impl.c (make_state_copy, make_state, add_new_state):
515         Likewise.
516
517 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
518
519         * gcj.texi: Expand TABs, remove whitespace from blank lines.
520
521 2008-06-14  Tom Tromey  <tromey@redhat.com>
522
523         PR java/36247:
524         * class.c (build_class_ref): Initialize this_classdollar when
525         needed.
526
527 2008-05-23  Andrew Haley  <aph@redhat.com>
528
529         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
530         pathname of source file.
531
532 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
533
534         * jcf-dump.c (print_constant): Use
535         HOST_LONG_LONG_FORMAT.
536
537 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
538
539         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
540         DECL_PURE_P.
541
542 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
543
544         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
545         (build_classdollar_field): Don't set TREE_INVARIANT.
546         (get_dispatch_table): Don't set TREE_INVARIANT.
547         (make_class_data): Don't set TREE_INVARIANT.
548         (build_symbol_entry): Don't set TREE_INVARIANT.
549         (emit_symbol_table): Don't set TREE_INVARIANT.
550         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
551         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
552         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
553         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
554
555 2008-04-03  Tom Tromey  <tromey@redhat.com>
556
557         * Make-lang.in (java_OBJS): New variable.
558
559 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
560
561         * java-tree.h (insert_block): Kill.
562         * decl.c (insert_block): Kill.
563                 
564 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
565
566         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
567         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
568         gpl.texi.
569
570 2008-03-27  Tom Tromey  <tromey@redhat.com>
571
572         * Make-lang.in: Revert automatic dependency patch.
573
574 2008-03-25  Tom Tromey  <tromey@redhat.com>
575
576         * Make-lang.in: Removed most explicit .o targets.
577         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
578         ($(GCJ)$(exeext)): Update.
579         (JAVA_OBJS): New variable.
580         (JCFDUMP_OBJS): Reformat.
581         (java_OBJS): New variable.
582         (java/jvspec.o-warn): Update.
583         (java/parse.o-warn): Remove.
584         (JAVA_TREE_H): Remove.
585         (java/jcf-io.o): Reduce to variable setting.
586         (ALL_CPPFLAGS): Likewise.
587
588 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
589
590         * mangle.c (java_mangle_decl): Remove dead check.
591
592 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
593
594         * jcf-parse.c (java_parse_file): Assert binding levels are
595         left in order.
596         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
597         Delete.
598
599 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
600
601         * jcf-dump.c (version): Update copyright notice dates.
602
603 2008-02-29  Tom Tromey  <tromey@redhat.com>
604
605         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
606         method.
607         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
608
609 2008-02-26  Tom Tromey  <tromey@redhat.com>
610
611         * lang.c (java_post_options): Remove conditional.
612         * expr.c (expand_byte_code): Remove old location code.
613         * jcf-parse.c (set_source_filename): Remove old location code.
614         (give_name_to_class): Likewise.
615         (jcf_parse): Likewise.
616         (duplicate_class_warning): Likewise.
617         (parse_class_file): Likewise.
618         (java_parse_file): Likewise.
619         * decl.c (finish_method): Remove old location code.
620         * class.c (push_class): Remove old location code.
621
622 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
623
624         PR other/35107
625         * Make-lang.in (jc1): Add $(GMPLIBS).
626
627 2008-01-23  David Daney  <ddaney@avtrex.com>
628
629         * class.c (hide)  Rename to...
630         (java_hide_decl) ... this throughout, and make public.
631         * resource.c (Jr_count): Remove.
632         (compile_resource_data): Call java_mangle_resource_name to generate
633         decl name.  Make resource decl public and hidden.
634         * mangle.c (java_mangle_resource_name): New function.
635         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
636         functions.
637
638 2008-01-04  Andrew Haley  <aph@redhat.com>
639
640         PR java/17779
641         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
642         C90.
643
644 2008-01-03  Andrew Haley  <aph@redhat.com>
645
646         PR java/17779
647         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
648         we're about to re-layout the type.
649
650 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
651
652         * lang.c (java_classify_record): Don't return
653         RECORD_IS_INTERFACE for now.
654
655 2007-12-18  Andrew Haley  <aph@redhat.com>
656
657         PR java/27643
658         * jcf-parse.c (java_parse_file): Remove call to
659         java_mark_class_local.
660         (parse_class_file): Reinstate call to java_mark_class_local here.
661         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
662         already set, call java_mangle_decl() and make_decl_rtl() to
663         rewrite its name as a hidden alias.
664
665 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
666
667         PR debug/7081
668         * lang.c (java_classify_record): New.
669         (LANG_HOOKS_CLASSIFY_RECORD): Override.
670
671 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
672
673         PR 34081/C++
674         * decl.c (finish_method): Pass 'false' for the new
675         allocate_struct_function parameter.
676
677 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
678
679         * expr.c (build_jni_stub): Use the computed jni func type for
680         variable meth.
681
682 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
683
684         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
685
686 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
687
688         * expr.c (type_assertion_hash): Hash type uids rather than
689         tree pointers.
690
691 2007-11-17  David Daney  <ddaney@avtrex.com>
692             Andrew Haley  <aph@redhat.com>
693
694         * constants.c (build_constants_constructor):  Use POINTER_SIZE
695         insead of BITS_PER_WORD in big-endian work around.
696
697 2007-11-07  Tom Tromey  <tromey@redhat.com>
698
699         PR java/34019:
700         * gcj.texi (Input Options): Add missing noun.
701
702 2007-11-02  Tom Tromey  <tromey@redhat.com>
703
704         PR java/33765:
705         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
706         * zipfile.h (ZIPEMPTYMAGIC): New define.
707
708 2007-11-01  Tom Tromey  <tromey@redhat.com>
709
710         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
711         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
712         (java/jcf-io.o): Depend on zipfile.h.
713
714 2007-10-17  Richard Guenther  <rguenther@suse.de>
715
716         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
717         dependencies.
718
719 2007-10-03  Andrew Haley  <aph@redhat.com>
720
721         PR java/33639
722         * class.c (mangled_classname): Detect and replace illegal
723         characters in assembly language symbols.
724         (gen_indirect_dispatch_tables): Call mangled_classname() on
725         the type.
726
727 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
728
729         * lang.c (java_print_error_function): Add third argument.
730
731 2007-09-15  Tom Tromey  <tromey@redhat.com>
732
733         * java-tree.h (struct lang_decl_func) <function_decl_body>:
734         Remove.
735         <init_final>: Likewise.
736         * lang.c (java_dump_tree): Update.
737         * java-tree.h (DECL_FUNCTION_BODY): Remove.
738
739 2007-09-11  Jan Hubicka <jh@suse.cz>
740
741         * decl.c (java_expand_body): Kill.
742         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
743
744 2007-09-06  Tom Tromey  <tromey@redhat.com>
745
746         * jcf-parse.c (parse_class_file): Re-enter the current file.
747
748 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
749
750         * boehm.c (mark_reference_fields): Move misaligned pointer check
751         after JREFERENCE_TYPE_P test
752
753 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
754
755         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
756         if pointer is misaligned.
757
758 2007-09-06  Tom Tromey  <tromey@redhat.com>
759
760         * lang.c (java_post_options): Update.
761         * jcf-parse.c (set_source_filename): Update.
762         (give_name_to_class): Update.
763         (jcf_parse): Update.
764         (duplicate_class_warning): Update.
765         (parse_class_file): Update.
766         (java_parse_file): Update.
767         * expr.c (expand_byte_code): Update.
768
769 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
770
771         * decl.c (finish_method): Use set_cfun.
772
773 2007-09-04  Andrew Haley  <aph@redhat.com>
774
775         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
776         when using the ARM EABI.
777
778 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
779
780         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
781
782 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
783
784         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
785         CONST_CAST.
786         * jcf.h (JCF_FINISH): Likewise.
787
788 2007-08-28  Tom Tromey  <tromey@redhat.com>
789
790         * Make-lang.in (java.tags): Don't tag '*.y' files.
791
792 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
793
794         * lang.c (java_decl_ok_for_sibcall): Likewise.
795
796 2007-08-21  Paul Brook  <paul@codesourcery.com>
797             Nathan Sidwell  <nathan@codesourcery.com>
798             Mark Mitchell  <mark@codesourcery.com>
799             Joseph Myers  <joseph@codesourcery.com>
800
801         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
802         date.
803
804 2007-08-20  Richard Guenther  <rguenther@suse.de>
805
806         * lang.c (java_tree_inlining_walk_subtrees): Remove.
807         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
808
809 2007-08-17  Tom Tromey  <tromey@redhat.com>
810
811         * typeck.c (find_method_in_interfaces): Update.
812         * jcf-parse.c (load_class): Update.
813         * java-gimplify.c (java_gimplify_component_ref): Removed.
814         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
815         arguments.
816         (java_gimplify_expr): Update.
817         * decl.c (java_init_decl_processing): Update.
818         * class.c (set_constant_value): Update.
819         (make_class_data): Update.
820         (finish_class): Update.
821         (build_static_field_ref): Update.
822         (is_compiled_class): Update.
823         (maybe_layout_super_class): Update.
824         (layout_class): Update.
825         (layout_class_method): Update.
826         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
827         (lang_decl_var) <am, final_iud, cif>: Removed fields.
828         (lang_decl_func) <init_calls_this>: Removed field.
829         (lang_type) <dot_class, verify_method>: Removed fields.
830         (FIELD_NESTED_ACCESS): Removed.
831         (FIELD_NESTED_ACCESS_P): Removed.
832         (DECL_FIELD_FINAL_IUD): Removed.
833         (DECL_LOCAL_FINAL_IUD): Removed
834         (LOCAL_FINAL_P): Removed.
835         (FINAL_VARIABLE_P): Removed.
836         (CLASS_FINAL_VARIABLE_P): Removed.
837         (DECL_BIT_INDEX): Removed.
838         (DECL_INIT_CALLS_THIS): Removed.
839         (FIELD_LOCAL_ALIAS): Removed.
840         (FIELD_LOCAL_ALIAS_USED): Removed.
841         (FIELD_THISN): Removed.
842         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
843         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
844         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
845         (TYPE_DOT_CLASS): Removed.
846         (TYPE_VERIFY_METHOD): Removed.
847         (ID_CLASSDOLLAR_P): Removed.
848         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
849         Removed.
850         (classdollar_identifier_node): Removed.
851         (TYPE_UNKNOWN): Removed.
852         (CLASS_FROM_SOURCE_P): Removed.
853         * expr.c (build_jni_stub): Update.
854         (force_evaluation_order): Update.
855         (build_java_empty_stmt): Update.
856         (build_class_init): Update.
857         (java_stack_swap): Update.
858         (build_jni_stub): Update.
859
860 2007-08-17  Tom Tromey  <tromey@redhat.com>
861
862         * java-tree.h (LABEL_TYPE_STATE): Removed.
863         (load_type_state): Removed.
864         (LABEL_PC): Removed.
865         (LABEL_VERIFIED): Removed.
866         (type_states): Declare.
867         * expr.c (type_states): New global.
868         (load_type_state): Now static.  Use type_states.  Changed
869         argument.
870         (lookup_label): Don't set LABEL_PC.
871         (expand_byte_code): Don't use LABEL_VERIFIED.
872         (note_instructions): Initialize type_states.
873         * verify-glue.c (vfy_note_stack_depth): Rewrote.
874         (vfy_note_stack_type): Use type_states.
875         (vfy_note_local_type): Likewise.
876
877 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
878
879         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
880         * jcf.h (JCF_FINISH): Likewise.
881
882 2007-07-31  Nick Clifton  <nickc@redhat.com>
883
884         * java-gimplify.c: Change copyright header to refer to version 3
885         of the GNU General Public License and to point readers at the
886         COPYING3 file and the FSF's license web page.
887         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
888         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
889         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
890         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
891         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
892         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
893         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
894
895 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
896
897         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
898
899 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
900
901         * lang.c (java_get_callee_fndecl): Constify.
902
903 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
904
905         * mangle.c (set_type_package_list): Constify.
906         * verify-glue.c (vfy_make_string): Delete.
907         * verify.h (vfy_make_string): Likewise.
908
909 2007-07-26  Tom Tromey  <tromey@redhat.com>
910
911         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
912         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
913         EXIT_BLOCK_LABELED_BLOCK): Likewise.
914         * lang.c (java_tree_inlining_walk_subtrees): Update.
915         (java_dump_tree): Likewise.
916         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
917         Remove.
918         * decl.c (push_labeled_block, pop_labeled_block): Remove.
919         * java-gimplify.c (java_gimplify_labeled_block_expr,
920         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
921         (java_gimplify_expr): Update.
922
923 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
924
925         * class.c (java_treetreehash_hash, java_treetreehash_compare):
926         Constify. 
927         * expr.c (type_assertion_eq): Likewise.
928         * jcf-io.c (compare_path): Likewise.
929         * jcf-parse.c (cmpstringp): Likewise.
930         * verify-impl.c (get_one_type, compute_argument_types,
931         compute_return_type): Likewise. 
932
933 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
934
935         PR target/32462
936         PR libgcj/32465
937         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
938
939 2007-07-12  Richard Guenther  <rguenther@suse.de>
940
941         * expr.c (expand_java_return): RETURN_EXPR has void type.
942         (build_jni_stub): Likewise.  Use a comparison against zero
943         for null-pointer test in COND_EXPR.
944         (build_field_ref): Build POINTER_PLUS_EXPR with correct
945         type.  Convert result instead.
946         (build_invokevirtual): Likewise.
947
948 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
949
950         PR 32617
951         * lang.c (java_init): Remove setting of force_align_functions_log.
952         * class.c (add_method_1): Set DECL_ALIGN of non-static method
953         to cope with ptrmemfunc_vbit_in_pfn.
954
955 2007-07-03  David Daney  <ddaney@avtrex.com>
956
957         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
958         include path.
959         (doc/gcj.dvi): Same.
960         (doc/gcj.pdf): Same.
961         (java/index.html): Same.
962
963 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
964
965         * class.c (make_class_data): Build the index in sizetype.
966         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
967         adding to a pointer type.
968         (build_symbol_entry): Likewise.
969         * expr.c (build_java_arrayaccess): Likewise.
970         (build_field_ref): Likewise.
971         (build_known_method_ref): Likewise.
972         (build_invokevirtual): Likewise.
973         * except.c (build_exception_object_ref): Do a
974         NEGATIVE and then a POINTER_PLUS_EXPR instead
975         of a MINUS_EXPR.
976
977 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
978
979         * typeck.c (java_signed_type): Remove.
980         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
981         * java-tree.h (java_signed_type): Remove.
982
983 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
984
985         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
986         (print_constant): Likewise.
987
988 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
989
990         * expr.c (build_java_binop): Use unsigned_type_for instead of
991         java_unsigned_type.
992         * java-tree.h (java_unsigned_type): Remove.
993         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
994         * typeck.c (java_unsigned_type): Remove.
995
996 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
997
998         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
999         instead of checking GIMPLE_STMT_P in chain_next.
1000
1001 2007-04-06  Colin Walters  <walters@redhat.com>
1002
1003         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1004         * jcf-io.c (open_class): Copy 'filename'.
1005
1006 2007-04-03  Andrew Haley  <aph@redhat.com>
1007
1008         * jvgenmain.c (main): Change main to use class$, not class$$.
1009         (do_mangle_classname): Likewise.
1010         * class.c (hide): New function.
1011         (add_field): Hide everything that shouldn't be visible outside a
1012         DSO.
1013         (build_static_class_ref): Likewise.
1014         (build_classdollar_field): Likewise.
1015         (make_class_data): Likewise.
1016         (layout_class_method): Likewise.
1017         * expr.c (special_method_p): New function.
1018
1019         * class.c (push_class): Don't bogusly guess the source filename.
1020         * jcf-parse.c (give_name_to_class): Don't set input_location from
1021         DECL_ARTIFICIAL decls.
1022
1023 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1024
1025         * typeck.c (java_signed_or_unsigned_type): Removed.
1026         (java_signed_type): use get_signed_or_unsigned_type instead of
1027         java_signed_or_unsigned_type.
1028         (java_unsigned_type): Ditto.
1029         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1030         * java-tree.h (java_signed_or_unsigned_type): Removed.
1031
1032 2007-03-26  Tom Tromey  <tromey@redhat.com>
1033
1034         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1035         (java.maintainer-clean): Likewise.
1036         (java.install-man): Likewise.
1037         (.INTERMEDIATE): Removed grmiregistry.pod.
1038         (grmiregistry.pod): Removed.
1039         * gcj.texi (Invoking gcjh): Removed.
1040         (Invoking gjnih): Likewise.
1041         (Invoking grmiregistry): Likewise.
1042         (direntry): Updated.
1043         (Top): Likewise.
1044         (which-gcj): Removed.
1045
1046 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1047
1048         * Make-lang.in: Add install-pdf target as copied from
1049         automake v1.10 rules.
1050
1051 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1052
1053         * gcj.texi: Standardize title page.
1054
1055 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1056
1057         * class.c: Fix a comment typo.
1058
1059 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1060             Brooks Moses  <brooks.moses@codesourcery.com>
1061             Lee Millward  <lee.millward@codesourcery.com>
1062
1063         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1064         of build3.
1065         (BUILD_MONITOR_EXIT): Likewise.
1066
1067         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1068         (java_gimplify_modify_expr): Likewise.
1069
1070         * class.c (cache_this_class_ref): Use build_call_expr.
1071         (build_static_field_ref): Likewise.
1072         (emit_indirect_register_classes): Likewise.
1073         (emit_register_classes): Likewise.
1074
1075         * resource.c (write_resource_constructor): Use build_call_expr.
1076
1077         * builtins.c (builtin_creator_function): Change interpretation of
1078         the second parameter to be the whole CALL_EXPR instead of the arglist.
1079         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1080         (min_builtin): Likewise.
1081         (abs_builtin): Likewise.
1082         (java_build_function_call_expr): Likewise.
1083         (convert_real): Likewise.
1084         (UNMARSHAL3): Likewise.
1085         (UNMARSHAL4): Likewise.
1086         (UNMARSHAL5): Likewise.
1087         (build_arglist_for_builtin): Delete.  Fix callers to use
1088         build_call_expr instead.
1089         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1090         accessors.
1091         (compareAndSwapInt_builtin): Likewise.
1092         (compareAndSwapLong_builtin): Likewise.
1093         (compareAndSwapObject_builtin): Likewise.
1094         (putVolatile_builtin): Likewise.
1095         (getVolatile_builtin): Likewise.
1096         (VMSupportsCS8_builtin): Likewise.
1097         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1098         instead of arglist.
1099
1100         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1101         (build_java_throw_out_of_bounds_exception): Likewise.
1102         (java_check_reference): Likewise.
1103         (build_java_arraystore_check): Likewise.
1104         (build_newarray): Likewise.
1105         (build_anewarray): Likewise.
1106         (expand_java_multinewarray): Use build_call_list instead of build3.
1107         (build_java_monitor): Use build_call_nary instead of build3.
1108         (java_create_object): Likewise.
1109         (expand_java_NEW): Likewise.
1110         (build_instanceof): Likewise.
1111         (expand_java_CHECKCAST): Likewise.
1112         (build_java_soft_divmod): Likewise.
1113         (build_java_binop): Likewise.
1114         (build_field_ref): Likewise.
1115         (build_class_init): Likewise.
1116         (rewrite_arglist_getcaller): Use build_call_expr.
1117         (build_invokeinterface):  Use build_call_nary instead of build3.
1118         (expand_invoke): Use build_call_list instead of build3.
1119         (build_jni_stub): Use build_call_nary, build_call_list, or
1120         build_call_expr instead of build3.
1121         (expand_java_field_op): Use build_call_expr instead of build3.
1122         (force_evaluation_order): Use new CALL_EXPR accessors.
1123
1124         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1125
1126 2007-02-15  David Daney  <ddaney@avtrex.com>
1127
1128         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1129         (java.maintainer-clean):Add gc-analyze.1.
1130         (.INTERMEDIATE): Add gc-analyze.pod.
1131         (gc-analyze.pod): New rule.
1132         (java.install-man): Install gc-analyze.1
1133         * gcj.texi: Add new section for the gc-analyze program.
1134
1135 2007-02-07  Andrew Haley  <aph@redhat.com>
1136
1137         * class.c (uncache_this_class_ref): New.
1138         * expr.c (build_jni_stub): Initialize the class.
1139         (expand_byte_code): Call uncache_this_class_ref after generating
1140         code.
1141
1142 2007-02-06  Tom Tromey  <tromey@redhat.com>
1143
1144         PR java/30714:
1145         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1146
1147 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1148
1149         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1150
1151 2007-02-02  Andrew Haley  <aph@redhat.com>
1152
1153         * expr.c (expand_byte_code): Call cache_this_class_ref() and
1154         cache_cpool_data_ref().
1155         Set TYPE_CPOOL_DATA_REF.
1156         (cache_cpool_data_ref): New function.
1157         * constants.c (build_ref_from_constant_pool): Remove special-case
1158         code for flag_indirect_classes.
1159         (build_constant_data_ref): Move special-case code for
1160         flag_indirect_classes here from build_ref_from_constant_pool.
1161         * decl.c (finish_method): Move class initialization from here to
1162         cache_this_class_ref.
1163         * class.c (cache_this_class_ref): New function.
1164         (build_class_ref): Use this_classdollar for the ouput class.
1165
1166 2007-02-02  David Daney  <ddaney@avtrex.com>
1167
1168         * class.c (is_compiled_class): Move check to avoid reloading
1169         current class.
1170         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1171         already set.
1172
1173 2007-02-01  Andrew Haley  <aph@redhat.com>
1174
1175         PR java/30641
1176         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1177
1178 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1179
1180         * class.c, jcf-parse.c: Fix comment typos.
1181
1182 2007-01-30  Tom Tromey  <tromey@redhat.com>
1183
1184         * gcj.texi (Strings): Fix documentation for JvNewString.
1185
1186 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1187
1188         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1189         typos.
1190
1191 2007-01-30  Ben Elliston  <bje@au.ibm.com>
1192
1193         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1194
1195 2007-01-29  Tom Tromey  <tromey@redhat.com>
1196
1197         PR java/30607:
1198         * jvspec.c (lang_specific_driver): Handle separate -I argument.
1199         * lang.opt (-I): Add 'Separate'.
1200
1201 2007-01-29  Andrew Haley  <aph@redhat.com>
1202
1203         * class.c (add_method_1): Mark fndecl as external unless we are
1204         compiling it into this object file.
1205
1206 2007-01-24  Andrew Haley  <aph@redhat.com>
1207
1208         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1209         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1210
1211 2007-01-22  Andrew Haley  <aph@redhat.com>
1212
1213         * builtins.c (VMSupportsCS8_builtin): New function.
1214
1215 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1216
1217         PR java/30454
1218         * jcf-io.c (opendir_in_zip): Close the file
1219         and free zipf before returning after an error.
1220
1221 2007-01-16  Tom Tromey  <tromey@redhat.com>
1222
1223         * java-tree.def: Added copyright header.
1224
1225 2007-01-15  Tom Tromey  <tromey@redhat.com>
1226
1227         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1228         case.
1229         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1230         Removed case.
1231         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1232         (EXPR_WFL_NODE): Likewise.
1233         (EXPR_WFL_LINECOL): Likewise.
1234         (EXPR_WFL_FILENAME): Likewise.
1235         (EXPR_WFL_LINENO): Likewise.
1236         (build_expr_wfl, expr_add_location): Don't declare.
1237         (build_unknown_wfl): Removed.
1238         (EXPR_WFL_FILENAME_NODE): Removed.
1239         (EXPR_WFL_COLNO): Removed.
1240         (EXPR_WFL_SET_LINECOL): Removed.
1241         (DECL_FUNCTION_WFL): Removed.
1242         (DECL_FIELD_FINAL_WFL): Removed.
1243         (struct lang_decl_func) <wfl>: Removed field.
1244         <called_constructor>: Likewise.
1245         <inner_access>: Likewise.
1246         (struct lang_decl_var) <wfl>: Removed field.
1247         (DECL_CONSTRUCTOR_CALLS): Removed.
1248         (DECL_FUNCTION_ACCESS_DECL): Likewise.
1249         (DECL_FUNCTION_INNER_ACCESS): Likewise.
1250         (DECL_SPECIFIC_COUNT): Likewise.
1251         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1252         * expr.c (build_expr_wfl): Removed.
1253         (expr_add_location): Likewise.
1254
1255 2007-01-12  Tom Tromey  <tromey@redhat.com>
1256
1257         * jcf-dump.c (main): Updated call to find_class.
1258         * lang.c (java_init): Removed dead code.
1259         * jcf-parse.c (read_class): Don't use java_source field.  Removed
1260         dead code.
1261         (parse_zip_file_entries): Don't use java_source field.
1262         (process_zip_dir): Likewise.
1263         (jcf_parse): Removed dead code.
1264         (java_parse_file): Likewise.
1265         (read_class): Updated call to find_class.
1266         * jcf-io.c (find_class): Don't use java_source field.  Removed
1267         'source_ok' argument, .java logic.
1268         * jcf.h (JCF) <java_source>: Removed field.
1269         (JCF_ZERO): Updated.    (find_class): Updated.
1270         * decl.c: Removed dead code.
1271         * class.c: Removed dead code.
1272
1273 2007-01-11  Tom Tromey  <tromey@redhat.com>
1274
1275         * typeck.c (convert): Don't use flag_emit_class_files.
1276         * lang.c (java_post_options): Don't use flag_emit_class_files.
1277         (java_handle_option): Don't use flag_extraneous_semicolon or
1278         flag_redundant.
1279         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1280         flag_emit_class_files.
1281         (load_class): Likewise.
1282         * java-tree.h (flag_emit_class_files): Don't declare.
1283         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1284         (flag_extraneous_semicolon): Don't declare.
1285         (flag_not_overriding): Likewise.
1286         (flag_static_local_jdk1_1): Likewise.
1287         (flag_redundant): Likewise.
1288         * expr.c (build_newarray): Don't use flag_emit_class_files.
1289         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1290         flag_emit_class_files.
1291         (build_class_ref): Likewise.
1292         * builtins.c (check_for_builtin): Don't use
1293         flag_emit_class_files.
1294
1295 2007-01-10  Tom Tromey  <tromey@redhat.com>
1296
1297         * lang.c (java_can_use_bit_fields_p): Removed.
1298         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1299
1300 2007-01-09  Andrew Haley  <aph@redhat.com>
1301
1302         * expr.c (build_java_arrayaccess): Rewrite to generate array
1303         access in canonical form.
1304         (expand_java_arraystore): Use build_fold_addr_expr() on address of
1305         array access.
1306
1307 2007-01-03  Andrew Haley  <aph@redhat.com>
1308
1309         PR java/28754
1310         * expr.c (expand_java_field_op): If we're initializing a field's
1311         declaring interface we should not also initialize the class
1312         context in which it was referenced.
1313
1314 2007-01-02  Tom Tromey  <tromey@redhat.com>
1315
1316         * java-tree.h (compiling_from_source, current_encoding,
1317         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1318         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1319         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1320         JTI_WFL_OPERATOR): Removed
1321         (finit_identifier_node, instinit_identifier_node,
1322         length_identifier_node, super_identifier_node,
1323         continue_identifier_node, access0_identifier_node, wfl_operator):
1324         Removed.
1325         (cyclic_inheritance_report,
1326         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1327         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1328         DECL_FIXED_CONSTRUCTOR_P): Removed.
1329         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1330         Removed.
1331         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1332         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1333         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1334         import_list, import_demand_list>: Removed.
1335         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1336         cxx_keyword_p): Removed.
1337         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1338         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1339         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1340         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1341         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1342         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1343         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1344         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1345         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1346         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1347         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1348         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1349         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1350         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1351         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1352         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1353         java_parse_abort_on_error, extract_field_decl): Removed.
1354         (finput): Declare.
1355         * lang.c: (compiling_from_source, current_encoding): Removed.
1356         (java_handle_option): Ignore -fencoding.
1357         * parse.h: Don't include lex.h.
1358         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1359         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1360         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1361         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1362         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1363         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1364         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1365         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1366         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1367         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1368         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1369         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1370         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1371         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1372         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1373         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1374         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1375         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1376         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1377         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1378         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1379         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1380         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1381         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1382         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1383         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1384         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1385         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1386         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1387         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1388         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1389         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1390         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1391         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1392         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1393         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1394         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1395         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1396         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1397         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1398         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1399         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1400         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1401         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1402         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1403         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1404         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1405         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1406         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1407         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1408         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1409         SET_CPC_STATIC_INITIALIZER_STMT,
1410         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1411         java_complete_class, java_check_circular_reference,
1412         java_fix_constructors, java_layout_classes, java_reorder_fields,
1413         java_method_add_stmt, java_get_line_col, reset_report,
1414         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1415         java_finish_classes, ctxp, ctxp_for_generation,
1416         ctxp_for_generation_last): Removed.
1417         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1418         * mangle.c (utf8_cmp): New function.
1419         (cxx_keywords): New global.
1420         (cxx_keyword_p): New function.
1421         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1422         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1423         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1424         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1425         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1426         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1427         * Make-lang.in (java.srcextra): Do nothing.
1428         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1429         (JAVA_OBJS): Don't mention deleted files.
1430         (java.mostlyclean): Likewise.
1431         (java.clean): Likewise.
1432         (JAVA_LEX_C): Removed.
1433         (buffer.o, check-init.o, parse.o): Remove unused targets.
1434         (typeck.o): Updated.
1435         * jcf-parse.c (read_class): Comment out unused code.
1436         (java_layout_seen_class_methods): New function.
1437         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1438         Removed.
1439         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
1440         (init_jcf_parse): Removed.
1441         * config-lang.in (gtfiles): Remove deleted files.
1442         * decl.c (java_init_decl_processing): Don't initialize
1443         finit_identifier_node, instinit_identifier_node,
1444         length_identifier_node, super_identifier_node,
1445         continue_identifier_node, access0_identifier_node.  Don't call
1446         init_jcf_parse.
1447         * class.c (cyclic_inheritance_report): New global.
1448         (add_method_1): Don't use
1449         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1450         (maybe_layout_super_class): Comment out code.
1451         (safe_layout_class): New function.
1452         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1453         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1454         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1455         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1456         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1457         (java_gimplify_case_expr): Removed.
1458         (java_gimplify_default_expr): Likewise.
1459         (java_gimplify_new_array_init): Likewise.
1460         * parse.y: Removed.
1461         * keyword.gperf, keyword.h: Removed.
1462         * chartables.h: Removed.
1463         * check-init.c: Removed.
1464         * buffer.c, buffer.h: Removed.
1465         * convert.h: Removed.
1466         * gen-table.pl: Removed.
1467         * lex.c, lex.h: Removed.
1468
1469 2007-01-02  Andrew Haley  <aph@redhat.com>
1470
1471         * expr.c (expand_java_arraystore): Make sure we perform a bounds
1472         check at runtime before we perform a type check.
1473
1474 2006-12-19  Andrew Haley  <aph@redhat.com>
1475
1476         * decl.c: Bump minor BC ABI version.
1477
1478 2006-12-13  Gary Benson  <gbenson@redhat.com>
1479
1480         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1481
1482 2006-12-12  Tom Tromey  <tromey@redhat.com>
1483
1484         * lang-specs.h: Pass -M options to jc1.
1485         * jcf-depend.c (jcf_dependency_add_file): Don't emit
1486         dependencies.
1487
1488 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
1489
1490         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1491
1492 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
1493
1494         * lang-specs.h: Pass '%U'-based options as separate arguments.
1495
1496 2006-12-05  Tom Tromey  <tromey@redhat.com>
1497
1498         PR java/29495:
1499         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
1500         classes as well.
1501         * class.c (add_field): Handle ACC_SYNTHETIC.
1502         (add_method_1): Likewise.  Handle bridge and varargs.
1503         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
1504         annotation.
1505         (set_class_decl_access_flags): Handle synthetic and annotation.
1506         * java-tree.h (METHOD_BRIDGE): New macro.
1507         (METHOD_VARARGS): Likewise.
1508         (TYPE_SYNTHETIC): Likewise.
1509         (TYPE_ANNOTATION): Likewise.
1510         (lang_type): New fields 'synthetic' and 'annotation'.
1511         (lang_decl_func): New fields 'varargs' and 'bridge'.
1512
1513 2006-12-04  Andrew Haley  <aph@redhat.com>
1514
1515         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
1516         there's no map.
1517
1518 2006-11-29  Gary Benson  <gbenson@redhat.com>
1519
1520         * expr.c (rewrite_arglist_getcaller): Reorder.
1521
1522 2006-11-29  Andrew Haley  <aph@redhat.com>
1523
1524         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
1525         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
1526
1527 2006-11-23  Andrew Haley  <aph@redhat.com>
1528
1529         * expr.c (rewrite_arglist_getcaller): New.
1530         (rewrite_arglist_getclass): Fix indentation.
1531         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
1532         gnu.classpath.VMStackWalker.getCallingClassLoader().
1533         * builtins.c (initialize_builtins): Remove duplicate def'n of
1534         __sync_synchronize.
1535         Add __builtin_return_address.
1536
1537 2006-11-22  Andrew Haley  <aph@redhat.com>
1538
1539         * jcf-reader.c (get_attribute): Mark attr_type unused.
1540
1541         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
1542
1543 2007-01-08  Richard Guenther  <rguenther@suse.de>
1544
1545         * lex.c (do_java_lex): Use build_int_cst_wide_type.
1546         * jcf-parse.c (get_constant): Likewise.
1547
1548 2006-11-12  Jan Hubicka  <jh@suse.cz>
1549
1550         * resource.c (compile_resource_data): Update for new varpool names.
1551         * java/class.c (build_utf8_ref): Likewise.
1552
1553 2006-11-12  David Daney  <ddaney@avtrex.com>
1554
1555         PR java/29805
1556         * typeck.c (build_java_array_type): Increase buffer sizes.
1557
1558 2006-11-11  Richard Guenther  <rguenther@suse.de>
1559
1560         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
1561         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
1562
1563 2006-11-06  Andrew Haley  <aph@redhat.com>
1564
1565         * java-tree.h (CONSTANT_LazyFlag): New.
1566         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
1567         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
1568         reflection_data.
1569         (handle_constant): Return 0 for dummy cpool entries.
1570         Handle constants of kind Class.
1571         Handle constants of kind NameAndType.
1572         (handle_enclosingmethod_attribute): New.
1573         (handle_signature_attribute): New.
1574         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
1575         (HANDLE_SIGNATURE_ATTRIBUTE): New.
1576         (handle_constant): Use unmangle_classname()rather than calling
1577         identifier_subst() directly.
1578
1579 2006-11-02  Andrew Haley  <aph@redhat.com>
1580
1581         * java-tree.h (FIELD_ENUM): New.
1582         (lang_decl_var.field_enum): New.
1583         (lang_type.enum_class): New.
1584         (CLASS_ENUM): New.
1585         * class.c (set_class_decl_access_flags): Handle enum types.
1586         (add_field): Handle enum fields.
1587         (get_access_flags_from_decl): Likewise.
1588
1589         * class.c (make_class_data): Put reflection_data into rodata.
1590
1591 2006-11-01  Andrew Haley  <aph@redhat.com>
1592
1593         * jcf-parse.c (field_offsets, bit_obstack): New variables.
1594         (jcf_parse): Write end marker to annotation_data.
1595         (java_parse_file): Create field_offsets bitmap.  Destroy it.
1596         (annotation_grow, annotation_rewrite_byte) 
1597         (annotation_rewrite_short, annotation_rewrite_int) 
1598         (annotation_read_short, annotation_write_byte) 
1599         (annotation_write_short, annotation_write_int) 
1600         (handle_long_constant, handle_constant, handle_element_value) 
1601         (handle_annotation, handle_annotations) 
1602         (handle_annotation_attribute, rewrite_reflection_indexes) 
1603         (handle_member_annotations, handle_parameter_annotations) 
1604         (handle_default_annotation): New functions.
1605         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
1606         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
1607         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1608         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
1609         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
1610         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
1611         (TYPE_REFLECTION_DATA): New.
1612         (TYPE_REFLECTION_DATASIZE): New.
1613         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
1614         an enum.
1615         * jcf-reader.c (get_attribute): Pass field/method index and
1616         attribute type to get_attribute().
1617         * constants.c (find_class_or_string_constant): Make nonstatic.
1618         (cpool_for_class): Likewise.
1619         (build_constants_constructor): Separate string and scalar types.
1620         * class.c (make_class_data): Generate field_indexes permutation.
1621         Pass it to rewrite_reflection_indexes().
1622         (make_class_data): Generate constructor for reflection_data field.
1623
1624 2006-10-20  Tom Tromey  <tromey@redhat.com>
1625
1626         * gcj.texi (Top): Don't mention jv-scan.
1627         (Invoking gcj): Likewise.
1628         (Invoking gcjh): Likewise.
1629         (Invoking gjnih): Likewise.
1630         (Invoking gij): Likewise.
1631         (Invoking gcj-dbtool): Likewise.
1632         (Invoking jv-scan): Removed.
1633         * parse-scan.y: Removed.
1634         * jv-scan.c: Removed.
1635         * config-lang.in (stagestuff): Don't mention jv-scan.
1636         * Make-lang.in (java): Removed jv-scan.
1637         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1638         (JVSCAN_OBJS): Removed.
1639         (jv-scan$(exeext)): Likewise.
1640         (JAVA_MANFILES): Removed jv-scan.1.
1641         (java.uninstall): Don't mention jv-scan.
1642         (java.mostlyclean): Likewise.
1643         (java.maintainer-clean): Likewise.
1644         (.INTERMEDIATE): Likewise.
1645         (java/jv-scan.o): Removed.
1646         (jv-scan.pod): Likewise.
1647         (java.srcextra): Don't mention parse-scan.c.
1648         (java.mostlyclean): Likewise.
1649         (java/parse-scan.c): Removed.
1650         (java/parse-scan.o-warn): Removed.
1651         (java/parse-scan.o): Removed.
1652
1653 2006-10-20  Tom Tromey  <tromey@redhat.com>
1654
1655         * lang.c (java_handle_option): Don't use
1656         jcf_write_base_directory.
1657         * jcf.h (jcf_write_base_directory): Removed.
1658         * parse.y (java_expand_classes): Don't call write_classfile.
1659         * config-lang.in (gtfiles): Removed jcf-write.c.
1660         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
1661         (java/jcf-write.o): Removed.
1662         * jcf-parse.c (parse_class_file): Don't call write_classfile.
1663         * java-tree.h (write_classfile): Removed declaration.
1664         * jcf-write.c: Removed.
1665
1666 2006-10-20  Tom Tromey  <tromey@redhat.com>
1667
1668         * Make-lang.in (java): Removed gjnih, gcjh.
1669         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
1670         (GCJH_OBJS): Removed.
1671         (GJNIH_OBJS): Likewise.
1672         (gjnih$(exeext)): Likewise.
1673         (gcjh$(exeext)): Likewise.
1674         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
1675         (java.install-common): Don't special case gcjh.
1676         (java.uninstall): Don't mention gcjh, gjnih.
1677         (java.mostlyclean): Likewise.
1678         (java.maintainer-clean): Likewise.
1679         (.INTERMEDIATE): Likewise.
1680         (gcjh.pod): Removed.
1681         (gjnih.pod): Likewise.
1682         (GCJH_TARGET_INSTALL_NAME): Removed.
1683         (java/gjavah-jni.o): Removed.
1684         (java/gjavah.o): Likewise.
1685         * config-lang.in (stagestuff): Removed gjnih, gcjh.
1686         * gjavah.c: Removed.
1687
1688 2006-10-17  Tom Tromey  <tromey@redhat.com>
1689
1690         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
1691         "string" case.
1692
1693 2006-10-17  Tom Tromey  <tromey@redhat.com>
1694
1695         * jvgenmain.c (main): Handle -findirect-dispatch.
1696         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
1697         jvgenmain.
1698
1699 2006-10-06  Andrew Haley  <aph@redhat.com>
1700
1701         * builtins.c (compareAndSwapInt_builtin): Check that we really do
1702         have a compare_and_swap builtin.
1703         (compareAndSwapLong_builtin): Likewise.
1704         (compareAndSwapObject_builtin): Likewise.
1705
1706 2006-10-04  Andrew Haley  <aph@redhat.com>
1707
1708         * builtins.c (java_builtins): Add compareAndSwapInt,
1709         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
1710         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
1711         putObjectVolatile, getObjectVolatile, getIntVolatile,
1712         getLongVolatile, getLong.
1713         (UNMARSHAL3): New macro.
1714         (UNMARSHAL4): Likewise.
1715         (UNMARSHAL5): Likewise.
1716         (build_arglist_for_builtin): New function.
1717         (build_addr_sum, build_check_this): New functions.
1718         (putObject_builtin. compareAndSwapInt_builtin,
1719         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
1720         putVolatile_builtin, getVolatile_builtin): New builtins.
1721
1722 2006-06-08  Andrew Haley  <aph@redhat.com>
1723  
1724         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
1725         get_symbol_table_index().
1726         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
1727         private method.
1728         (build_known_method_ref): New arg: special.  Pass it to
1729         get_symbol_table_index.
1730         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
1731         the method list.
1732         (build_invokevirtual): New arg: special.  Pass it to
1733         get_symbol_table_index.
1734         (expand_invoke): New variable: special.
1735         Pass it to maybe_rewrite_invocation().
1736         Pass it to build_known_method_ref().
1737         * class.c (build_symbol_entry): Add new arg: special.  Use it to
1738         build the symbol table conbstructor.
1739         (emit_symbol_table): Extract SPECIAL from the method list and pass
1740         it to build_symbol_entry().
1741         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
1742         special accordingly.
1743  
1744 2006-09-08  Andrew Haley  <aph@redhat.com>
1745
1746         * class.c (layout_class_method): Use build_java_signature, not
1747         build_java_argument_signature.  Use lookup_java_method, not
1748         lookup_argument_method.
1749
1750 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1751             Bryce McKinlay  <bryce@mckinlay.net.nz>
1752
1753         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1754
1755 2006-07-18  Tom Tromey  <tromey@redhat.com>
1756
1757         * lang.opt: Added missing -W options.
1758
1759 2006-07-12  Tom Tromey  <tromey@redhat.com>
1760
1761         PR java/28329:
1762         * lang-specs.h: Pass '%U'-based options as separate arguments.
1763         Use -faux-classpath.
1764         * lang.c (java_handle_option): Handle OPT_faux_classpath.
1765         * lang.opt (faux-classpath): New option.
1766
1767 2006-07-07  Tom Tromey  <tromey@redhat.com>
1768
1769         * class.c (make_class_data): Set value for reflection_data field.
1770         * decl.c (java_init_decl_processing): Add reflection_data field.
1771
1772 2006-07-07  Tom Tromey  <tromey@redhat.com>
1773
1774         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
1775         earlier.
1776         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1777
1778 2006-07-07  Andrew Haley  <aph@redhat.com>
1779
1780         * jcf-parse.c (set_source_filename): Don't check for
1781         CLASS_FROM_CURRENTLY_COMPILED_P.
1782         Remove // comments.
1783
1784 2006-07-07  Andrew Haley  <aph@redhat.com>
1785
1786         * java-tree.h (java_read_sourcefilenames): Declare.
1787         * lang.c (java_handle_option): Call java_read_sourcefilenames().
1788         * lang.opt (fsource-filename): New opt.
1789         * lang-specs.h: Add -fsource-filename.
1790         * jcf-parse.c (num_files, filenames): New variables.
1791         (reverse, cmpstringp, java_read_sourcefilenames,
1792         find_sourcefile): New.
1793         (set_source_filename): Call find_sourcefile to find the real name
1794         of a source file.
1795
1796 2006-06-27  Tom Tromey  <tromey@redhat.com>
1797
1798         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
1799         Signature, LocalVariableTypeTable, annotation attributes.
1800         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
1801         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
1802         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
1803         (HANDLE_METHOD): Likewise.
1804         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
1805         (print_annotation): New function.
1806         (print_element_value): Likewise.
1807         (indent): Likewise.
1808         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
1809         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
1810         (print_parameter_annotations): New function.
1811         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
1812         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
1813         Likewise.
1814         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
1815         (print_annotations): New function.
1816
1817 2006-06-23  Tom Tromey  <tromey@redhat.com>
1818
1819         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
1820         emitting class files, always use 1.5.
1821         * gcj.texi (Input Options): Document -fsource.
1822         (Code Generation): Document -ftarget.
1823
1824 2006-06-21  Tom Tromey  <tromey@redhat.com>
1825
1826         PR java/28089:
1827         * expr.c (expand_java_field_op): Initialize field's declaring
1828         class.
1829
1830 2006-06-20  Tom Tromey  <tromey@redhat.com>
1831
1832         * expr.c (push_value): Always flush quick stack.
1833
1834 2006-06-19  Tom Tromey  <tromey@redhat.com>
1835
1836         * expr.c (push_value): Also flush quick stack if value is a
1837         component_ref.
1838
1839 2006-06-19  Tom Tromey  <tromey@redhat.com>
1840
1841         * expr.c (push_value): Flush quick stack if value has side
1842         effects.
1843
1844 2006-06-13  Tom Tromey  <tromey@redhat.com>
1845
1846         * class.c (is_compiled_class): Explicitly check for current
1847         class.
1848
1849 2006-06-09  Tom Tromey  <tromey@redhat.com>
1850
1851         * gjavah.c (decompile_method): Don't decompile a static field
1852         accessor method.
1853
1854 2006-06-06  Tom Tromey  <tromey@redhat.com>
1855
1856         * lang-specs.h <jc1>: Add .jar file to command line if
1857         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
1858
1859 2006-06-05  Tom Tromey  <tromey@redhat.com>
1860
1861         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
1862         synthetic, enum, annotation.
1863         * jcf.h (ACC_BRIDGE): New macro.
1864         (ACC_VARARGS): Likewise.
1865         (ACC_SYNTHETIC): Likewise.
1866         (ACC_ENUM): Likewise.
1867         (ACC_ANNOTATION): Likewise.
1868
1869 2006-06-04  Tom Tromey  <tromey@redhat.com>
1870
1871         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
1872         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
1873         and -ftarget.
1874         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
1875         when needed.  Handle classpath-setting.
1876         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
1877         * lang-specs.h: Rewrote.
1878
1879 2006-06-04  Tom Tromey  <tromey@redhat.com>
1880
1881         * jcf-io.c (find_class): Set source_ok to 0.
1882         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
1883         (parse_class_file): Don't call java_mark_class_local.
1884         (java_parse_file): Skip .java files.  Call java_mark_class_local
1885         before lowering any code.
1886         (parse_zip_file_entries): Don't call duplicate_class_warning
1887         here.
1888         (process_zip_dir): ... call it here.
1889         * class.c (add_field): Don't mark field external if it is being
1890         compiled into this object.
1891         (make_class_data): Handle situation where class_dtable_decl is
1892         created before Class is compiled.
1893         (is_compiled_class): Don't assume files in zip are compiled into
1894         this object.
1895         (layout_class_method): Don't mark method external if it is being
1896         compiled into this object.
1897
1898 2006-06-04  Tom Tromey  <tromey@redhat.com>
1899
1900         * jcf-path.c (jcf_path_compute): New function.
1901         * jcf.h (jcf_path_compute): Declare.
1902
1903 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
1904
1905         * decl.c: Include langhooks.h.
1906         (builtin_function): Remove.
1907         (java_init_decl_processing): Replace calls to builtin_function
1908         with add_builtin_function.
1909         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
1910         (java/decl.o): Depend on langhooks.h.
1911         * java-tree.h (builtin_function): Remove.
1912
1913 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
1914
1915         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
1916
1917 2006-09-12  Tom Tromey  <tromey@redhat.com>
1918
1919         * expr.c (push_value): Always flush quick stack.
1920
1921 2006-09-12  Tom Tromey  <tromey@redhat.com>
1922
1923         PR java/29013:
1924         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
1925         the push of the called method's return result.
1926
1927 2006-09-12  Tom Tromey  <tromey@redhat.com>
1928
1929         * jvspec.c (lang_specific_driver): Read spec file even if
1930         -fsyntax-only.
1931
1932 2006-09-12  Tom Tromey  <tromey@redhat.com>
1933
1934         PR java/28754:
1935         * expr.c (expand_java_field_op): Initialize field's declaring
1936         interface if necessary.
1937
1938 2006-09-12  Tom Tromey  <tromey@redhat.com>
1939
1940         PR java/28892:
1941         * expr.c (expand_java_field_op): No error for assignments not in
1942         class initializer or constructor.
1943
1944 2006-08-22  Andrew Haley  <aph@redhat.com>
1945
1946         * decl.c (java_add_stmt): Give the statement list a type.
1947
1948 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
1949             Bryce McKinlay  <bryce@mckinlay.net.nz>
1950
1951         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
1952
1953 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
1954
1955         PR java/8923
1956         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
1957         or '--' is used with a constant operand.
1958         (java_complete_lhs): When processing a '++' or '--' expression,
1959         don't call java_complete_tree but java_complete_lhs, so that a
1960         static final variable operand is never replaced by its value. This
1961         avoids an ICE later on.
1962         (patch_unaryop): Fixed typo in comment.
1963
1964 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
1965
1966         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1967
1968 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1969
1970         * builtins.c (check_for_builtin): If a builtin could result in a
1971         direct call being generated, don't use it if flag_indirect_dispatch
1972         is set.
1973
1974 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
1975
1976         * gcj.texi (Invocation): Corrections for Invocation API example.
1977
1978 2006-07-04  Andrew Haley  <aph@redhat.com>
1979
1980         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
1981         entry.
1982
1983 2006-06-21  Andrew Haley  <aph@redhat.com>
1984
1985         * java-tree.h (update_aliases): Remove
1986         * expr.c (expand_iinc): Remove call to update_aliases().
1987         (STORE_INTERNAL): Likewise.
1988         * decl.c (update_aliases, initialize_local_variable) 
1989         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
1990
1991 2006-06-19  Andrew Haley  <aph@redhat.com>
1992
1993         PR java/1305
1994         PR java/27908
1995         * expr.c (java_modify_addr_for_volatile): New function.
1996         (expand_java_field_op): Handle volatile fields.
1997         * java-gimplify.c (java_gimplify_component_ref): Call
1998         java_modify_addr_for_volatile to give the field_ref the correct
1999         volatile type.
2000         (java_gimplify_modify_expr): Likewise.
2001         * java-tree.h (java_modify_addr_for_volatile): New decl.
2002
2003 2006-06-17  Karl Berry  <karl@gnu.org>
2004
2005         * gcj.texi (@dircategory): Use "Software development" instead
2006         of "Programming", following the Free Software Directory.
2007
2008 2006-06-16  Andrew Haley  <aph@redhat.com>
2009
2010         * class.c (make_class_data): When using flag_indirect_classes,
2011         don't initialize the vtable of Class instances.
2012
2013 2006-06-09  Andrew Haley  <aph@redhat.com>
2014
2015         PR java/1305
2016         PR java/27908
2017         * builtins.c (initialize_builtins): Add __sync_synchronize().
2018         * class.c (add_field): Mark volatile fields.
2019         * java-gimplify.c (java_gimplify_expr): Call new functions to
2020         handle self-modifying exprs and COMPONENT_REFs.
2021         (java_gimplify_component_ref): New.
2022         (java_gimplify_modify_expr): Add handling for volatiles.
2023
2024 2006-06-08  Tom Tromey  <tromey@redhat.com>
2025
2026         * gcj.texi (libgcj Runtime Properties): Document
2027         gnu.gcj.user.realname.
2028
2029 2006-06-08  Andrew Haley  <aph@redhat.com>
2030
2031         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2032         get_symbol_table_index().
2033         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2034         private method.
2035         (build_known_method_ref): New arg: special.  Pass it to
2036         get_symbol_table_index.
2037         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2038         the method list.
2039         (build_invokevirtual): New arg: special.  Pass it to
2040         get_symbol_table_index.
2041         (expand_invoke): New variable: special.
2042         Pass it to maybe_rewrite_invocation().
2043         Pass it to build_known_method_ref().
2044         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2045         build the symbol table conbstructor.
2046         (emit_symbol_table): Extract SPECIAL from the method list and pass
2047         it to build_symbol_entry().
2048         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2049         special accordingly.
2050
2051 2006-06-06  David Daney  <ddaney@avtrex.com>
2052
2053         * gcj.texi (libgcj Runtime Properties): Document
2054         gnu.gcj.runtime.NameFinder.show_raw and
2055         gnu.gcj.runtime.NameFinder.remove_unknown.
2056
2057 2006-06-06  Tom Tromey  <tromey@redhat.com>
2058
2059         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2060         synthetic, enum, annotation.
2061         * jcf.h (ACC_BRIDGE): New macro.
2062         (ACC_VARARGS): Likewise.
2063         (ACC_SYNTHETIC): Likewise.
2064         (ACC_ENUM): Likewise.
2065         (ACC_ANNOTATION): Likewise.
2066
2067 2006-06-06  Mike Stump  <mrs@apple.com>
2068
2069         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2070         installing during build.
2071
2072 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2073
2074         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2075         classname-to-library resolution mechanism.
2076         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2077         mechanism deprecated.
2078         (libgcj Runtime Properties): Document
2079         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2080
2081 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2082
2083         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2084         bit wide type.
2085         (jword): Define to uint64 on 64-bit arches.
2086         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2087
2088 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2089
2090         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2091         typos.
2092
2093 2006-05-26  Tom Tromey  <tromey@redhat.com>
2094
2095         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2096         * verify-glue.c (vfy_class_type): New function.
2097         * verify-impl.c (check_constant): Allow 'ldc class'.
2098         * verify.h (vfy_class_type): Declare.
2099
2100 2006-05-25  Andrew Haley  <aph@redhat.com>
2101
2102         PR java/27756
2103         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2104         update all lifetimes, not just the first one.
2105
2106 2006-05-24  Tom Tromey  <tromey@redhat.com>
2107
2108         * java-tree.h: Fixed flag documentation.
2109
2110 2006-05-24  Tom Tromey  <tromey@redhat.com>
2111
2112         PR libgcj/27729:
2113         * jcf.h (ACC_INVISIBLE): Changed value.
2114
2115 2006-05-24  Andrew Haley  <aph@redhat.com>
2116
2117         PR java/27754
2118         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2119         COMPOUND_EXPR.
2120
2121 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2122
2123         * lang.opt (femit-class-file): Remove VarExists.
2124
2125 2006-05-16  Tom Tromey  <tromey@redhat.com>
2126
2127         * verify-impl.c (verify_instructions_0) <op_return>: Special case
2128         for Object.<init>.
2129
2130 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2131
2132         PR driver/26885
2133         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2134         $(GCC_OBJS).
2135
2136 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2137
2138         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2139         (java/expr.o): Replace target.h with $(TARGET_H).
2140         (java/parse.o): Likewise.
2141
2142 2006-05-10  Andrew Haley  <aph@redhat.com>
2143
2144         * class.c (emit_indirect_register_classes): Fix comment.
2145
2146 2006-05-04  Tom Tromey  <tromey@redhat.com>
2147
2148         * java-tree.h (uses_jv_markobj_p): Declare.
2149         * class.c (uses_jv_markobj_p): Removed.
2150         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2151         (get_boehm_type_descriptor): Use it.
2152         (uses_jv_markobj_p): Moved from class.c.  Return bool.
2153
2154 2006-05-04  Tom Tromey  <tromey@redhat.com>
2155
2156         * java-tree.def (THIS_EXPR): Now a tcc_expression.
2157
2158 2006-05-04  Andrew Haley  <aph@redhat.com>
2159
2160         * class.c (make_field_value): Always build_address_of fdecl if
2161         there is an initializer.
2162
2163 2006-05-03  Andrew Haley  <aph@redhat.com>
2164
2165         PR libgcj/27352
2166         * expr.c (maybe_rewrite_invocation): New function.
2167         (rewrite_arglist_getclass): Likewise.
2168         (rules): New.
2169         (expand_invoke): Call maybe_rewrite_invocation.
2170         * parse.y (patch_invoke): Likewise.
2171         * java-tree.h: (maybe_rewrite_invocation): New function.
2172
2173 2006-04-21  Andrew Haley  <aph@redhat.com>
2174
2175         * lang.c (java_init): Handle flag_indirect_classes.
2176         * jvgenmain.c: Use "class$$" instead of "class$".
2177         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2178         DECLs.
2179         (mangle_class_field): Special case "class$$" as well as "class$".
2180         * constants.c (build_ref_from_constant_pool): If
2181         flag_indirect_classes, generate a ref into the heap.
2182         * decl.c (constants_field_decl_node,
2183         constants_data_field_decl_node): New.
2184         * class.c (build_static_class_ref): New.
2185         (build_classdollar_field): Factor out from build_class_ref().
2186         (make_field_value): Handle static fields in heap.
2187         (make_class_data): Make sure we get a static ref to class.
2188         Make class initializer const if flag_indirect_classes.
2189         (register_class): Build a class_ref for initialization if
2190         flag_indirect_classes.
2191         (emit_indirect_register_classes): New.
2192
2193 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2194
2195         * expr.c, gjavah.c: Fix comment typos.
2196
2197 2006-04-03  Andrew Haley  <aph@redhat.com>
2198
2199         PR java/26858
2200         * expr.c (build_field_ref): Don't check the field offset if
2201         flag_syntax_only.
2202
2203 2006-03-30  Andrew Haley  <aph@redhat.com>
2204
2205         PR java/26858
2206         * lang.c (java_attribute_table): New.
2207         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2208         * expr.c (build_field_ref): Add a null pointer check for all
2209         fields of offset > 4k.  Don't do so for accesses via the this
2210         pointer, which we know can never be null.
2211         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2212         methods nonnull.
2213
2214 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
2215
2216         * Make-lang.in: Rename docdir to gcc_docdir.
2217
2218 2006-03-30  Tom Tromey  <tromey@redhat.com>
2219
2220         PR java/26042:
2221         * parse.y (java_reorder_fields): Reset superclass field's size as
2222         well.
2223
2224 2006-03-28  Tom Tromey  <tromey@redhat.com>
2225
2226         PR java/26390:
2227         * parse.y (find_most_specific_methods_list): Added 'class'
2228         argument.
2229         (lookup_method_invoke): Updated.
2230
2231 2006-03-15  Tom Tromey  <tromey@redhat.com>
2232
2233         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2234         non-static method calls.
2235
2236 2006-03-15  David Daney  <ddaney@avtrex.com>
2237
2238         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2239         declaration.
2240
2241 2006-03-15  David Daney  <ddaney@avtrex.com>
2242
2243         * lang.opt (-freduced-reflection): New option.
2244         * lang.c (java_post_options): Generate an error if
2245         -freduced-reflection used with -fjni or -findirect-dispatch.
2246         * java-tree.h (flag_reduced_reflection): Declare new variable.
2247         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2248         if bitmap overflows and flag_reduced_reflection set.
2249         * class.c (uses_jv_markobj_p): New function.
2250         (make_class_data): Moved generation of vtable to before
2251         reflection data, generate less reflection data if
2252         flag_reduced_reflection set.
2253         * gcj.texi: Document -freduced-reflection.
2254
2255 2006-03-15  Tom Tromey  <tromey@redhat.com>
2256
2257         PR java/26638:
2258         * class.c (get_interface_method_index): Don't put <clinit> into
2259         interface table.
2260
2261 2006-03-15  Tom Tromey  <tromey@redhat.com>
2262
2263         * parse.y (analyze_clinit_body): Ignore empty statements.
2264
2265 2006-03-08  David Daney  <ddaney@avtrex.com>
2266
2267         * gcj.texi: Document -static-libgcj option.
2268
2269 2006-02-20  Andrew Haley  <aph@redhat.com>
2270
2271         * jcf-parse.c (parse_class_file): Set input_location from
2272         current_class.
2273
2274 2006-02-15  Andrew Haley  <aph@redhat.com>
2275
2276         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2277         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2278         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2279
2280 2006-02-09  Andrew Haley  <aph@redhat.com>
2281
2282         PR java/26192
2283         * expr.c (expand_invoke): Allow methods in arrays to be resolved
2284         in their superclass.
2285
2286         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2287         array types.
2288         
2289 2006-02-08  Tom Tromey  <tromey@redhat.com>
2290
2291         PR java/22578:
2292         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2293         * builtins.c (convert_real): New function.
2294         (java_builtins): Handle Float.intBitsToFloat,
2295         Float.floatToRawIntBits, Double.longBitsToDouble,
2296         Double.doubleToRawLongBits.
2297
2298 2006-02-07  Andrew Haley  <aph@redhat.com>
2299
2300         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
2301         class other than the one in which we expected to find it, ignore
2302         the result.
2303
2304         PR java/25535
2305         * constants.c (build_constants_constructor): move initializer into
2306         first halfword on a 64-bit big-endian machine.
2307
2308 2006-02-04  Tom Tromey  <tromey@redhat.com>
2309
2310         PR java/25676:
2311         * builtins.c (max_builtin): Skip floating point 'max'.
2312         (min_builtin): Skip floating point 'min'.
2313         (check_for_builtin): Never return NULL_TREE.
2314
2315 2006-02-04  Tom Tromey  <tromey@redhat.com>
2316
2317         PR java/26097:
2318         * expr.c (push_type): Avoid side effect in gcc_assert.
2319
2320 2006-02-04  Roger Sayle  <roger@eyesopen.com>
2321
2322         * decl.c (java_init_decl_processing): Create char_type_node as a
2323         regular INTEGER_TYPE node.
2324         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2325         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2326         test for char_type_node and promoted_char_type_node as special
2327         instances of INTEGER_TYPE tree codes.
2328         (promote_type,build_java_signature): Likewise.
2329         * jcf-write.c (adjust_typed_op): Likewise.
2330         * mangle.c (mangle_type): Likewise.
2331         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2332         * parse.h (JINTEGRAL_TYPE_P): Likewise.
2333
2334 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
2335
2336         * expr.c (java_stack_swap): Revert gcc_assert patch.
2337
2338 2006-02-03  Ben Elliston  <bje@au.ibm.com>
2339
2340         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2341         * typeck.c: Likewise.
2342         * verify-impl.c: Likewise.
2343         * class.c: Likewise.
2344         * decl.c: Likewise.
2345         * jcf-parse.c: Likewise.
2346         * constants.c: Likewise.
2347         * check-init.c: Likewise.
2348         * jcf-write.c: Likewise.
2349         * verify-glue.c: Likewise.
2350         * mangle.c: Likewise.
2351         * expr.c: Likewise.
2352         * lang.c: Likewise.
2353         * boehm.c: Likewise.
2354
2355 2006-02-01  Jan Hubicka  <jh@suse.cz>
2356
2357         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2358         * lang.c (java_init_options): Set no_unit_at_a_time_default.
2359
2360 2006-01-30  Andrew Haley  <aph@redhat.com>
2361
2362         PR java/21428
2363         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2364
2365 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
2366
2367         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2368         Update copyright notice dates.
2369
2370 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2371
2372         * jvspec.c (lang_specific_spec_functions): Remove.
2373
2374 2006-01-06  Tom Tromey  <tromey@redhat.com>
2375
2376         * gcj.texi (Arrays): Added more documentation for
2377         JvNewObjectArray.
2378         (Primitive types): Correct information about primitive classes.
2379         (Reference types): New node.
2380         (Index): New node.
2381
2382 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
2383
2384         * jcf-parse.c (set_source_filename): Set the decl source location
2385         even when returning early.
2386
2387 2005-12-15  Tom Tromey  <tromey@redhat.com>
2388             Andrew Haley  <aph@redhat.com>
2389
2390         PR java/25429
2391         * parse.y (resolve_expression_name): Don't generate accessor
2392         methods for constant fields.
2393
2394 2005-12-13  Andrew Haley  <aph@redhat.com>
2395
2396         PR java/25366
2397         PR java/25368
2398         * class.c (maybe_layout_super_class): Update current_class before
2399         calling do_resolve_class.
2400
2401 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
2402
2403         PR java/25330
2404         * jcf-write.c (write_classfile): Use PID in temporary class
2405         file. Save/restore errno when reporting error.
2406
2407 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2408
2409         PR java/9861
2410         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2411         to bare_function_type and including the return type
2412         * builtins.c (initialize_builtins) : Change builtin mangled name
2413         constants to conform to new mangling scheme
2414
2415 2005-12-08  Andrew Haley  <aph@redhat.com>
2416
2417         PR libgcj/25265
2418         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2419         (soft_abstractmethod_node): New.
2420         * expr.c (build_field_ref): Add in-line check for missing field.
2421         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2422
2423 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2424
2425         * Make-lang.in (java.all.build, java.install-normal): Remove.
2426
2427 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2428
2429         * Make-lang.in: Remove all dependencies on s-gtype, except for
2430         gt-java-parse.h.
2431
2432 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
2433
2434         * class.c (build_utf8_ref, emit_register_classes): Use
2435         switch_to_section and get_section.
2436
2437 2005-12-06  Tom Tromey  <tromey@redhat.com>
2438
2439         PR java/25283:
2440         * parse.y (patch_new_array_init): Revert previous patch.
2441         (lookup_method_invoke): Use size-less array type when creating an
2442         anonymous constructor.
2443
2444 2005-12-05  Tom Tromey  <tromey@redhat.com>
2445
2446         * parse.y (patch_new_array_init): Don't set length on array.
2447
2448 2005-12-02  Richard Guenther  <rguenther@suse.de>
2449
2450         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2451         buildN instead of build.
2452         * class.c (finish_class): Likewise.
2453         * expr.c (java_create_object): Likewise.
2454
2455 2005-11-28  Tom Tromey  <tromey@redhat.com>
2456
2457         PR java/18278:
2458         * expr.c (build_jni_stub): Unwrap the return value.
2459         * java-tree.h (soft_unwrapjni_node): New define.
2460         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2461         * decl.c (java_init_decl_processing): Initialize
2462         soft_unwrapjni_node.
2463
2464 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
2465
2466         * gcj.texi (gij options): Add -Xss documentation.
2467
2468 2005-11-08  Wil Mahan  <wmahan@gmail.com>
2469
2470         PR java/23617
2471         * zextract.c (read_zip_archive): Fix out of memory error when
2472         reading jar files with zip-style comments.
2473
2474 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
2475
2476         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2477         formats.
2478         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2479
2480 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2481             Wil Mahan <wmahan@gmail.com>
2482
2483         PR java/23620
2484         * class.c (make_class): Create empty binfo here.
2485         (set_super_info): Only create binfo if we have superclasses.
2486
2487 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
2488
2489         PR java/24127
2490         * parse.y (method_header): Make the result of the rule a NULL_TREE
2491         when a parsing error occurs.
2492
2493 2005-09-29  Tom Tromey  <tromey@redhat.com>
2494
2495         PR java/24120:
2496         * jcf-io.c (memoized_dirlist_hash): New function.
2497         (caching_stat): Use it.
2498
2499 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
2500
2501         PR java/21418
2502         * class.c (inherits_from_p): Try to lay out super class
2503         if it is not already laid out.
2504         (maybe_layout_super_class): Handle the case where SUPER_CLASS
2505         is a NULL_TREE.
2506
2507 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
2508
2509         * builtins.c (max_builtin, min_builtin, abs_builtin,
2510         java_build_function_call_expr): Use fold_buildN.
2511         * class.c (layout_class_method): Likewise.
2512         * expr.c (java_truthvalue_conversion, build_java_jsr,
2513         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
2514         build_java_binop, build_field_ref, expand_compare,
2515         build_known_method_ref, build_invokevirtual,
2516         process_jvm_instruction): Likewise.
2517         * parse.y (patch_binop, patch_exit_expr): Likewise.
2518         * typeck.c (convert_ieee_real_to_integer): Likewise.
2519         (convert): Don't call fold after convert_ieee_real_to_integer.
2520
2521 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
2522
2523         PR java/23891
2524         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
2525         the newly created type. Set import lists here, not in create_class.
2526         (jdep_resolve_class): Set current_class.
2527         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
2528         the current package context, not ctxp->package.
2529         (cicp_cache): Removed.
2530         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
2531         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
2532         * java-tree.h (TYPE_PACKAGE): New macro.
2533         (struct lang_type): New member 'package'.
2534
2535 2005-09-09  Andrew Haley  <aph@redhat.com>
2536
2537         PR libgcj/23182 
2538         * expr.c (pop_type_0): If the expected type is object or ptr
2539         (i.e. void*), return the type of the object we just popped from
2540         the stack.
2541
2542 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
2543
2544         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
2545         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
2546
2547 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
2548
2549         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
2550         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
2551         typos.  Follow spelling conventions.
2552
2553 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
2554
2555         PR java/23431
2556         * typeck.c (lookup_do): Look up interfaces for the original class,
2557         not the base class.
2558         * parse.y (java_check_regular_methods): Fix diagnostic message for
2559         more restrictive overriding of a method from an interface.
2560
2561 2005-08-16  Tom Tromey  <tromey@redhat.com>
2562
2563         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
2564         class' initial state.
2565
2566 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2567
2568         PR java/22113
2569         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
2570         `literal_token' for large numeric input tokens.
2571
2572 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
2573
2574         PR java/19870
2575         * parse.y (nested_field_access_p): Rename to nested_member_access_p
2576         and expand to handle method accesses across nested classes.
2577         (build_outer_method_access_method): Rename to
2578         build_nested_method_access_method.  Minor adjustments to comments.
2579         (resolve_expression_name): Use the newly-renamed
2580         nested_member_access_p method.
2581         (resolve_qualified_expression_name): Likewise.
2582         (patch_method_invocation): Also consider static methods for access
2583         method generation.  Minor adjustments to comments.
2584         (maybe_use_access_method): Use the more general
2585         nested_memeber_access_p to determine access across nested class
2586         boundaries.  Allow THIS_ARG to be NULL (for static methods).
2587
2588 2005-08-15  Tom Tromey  <tromey@redhat.com>
2589
2590         PR java/23300.
2591         * expr.c (build_field_ref): Don't generate otable reference when
2592         DECL_FIELD_OFFSET is 0.
2593         * class.c (maybe_layout_super_class): Pass outer class to
2594         do_resolve_class.
2595
2596 2005-08-15  Tom Tromey  <tromey@redhat.com>
2597
2598         * java-tree.h (LABEL_IN_SUBR): Removed.
2599         (LABEL_IN_SUBR): Likewise.
2600         (LABEL_IS_SUBR_START): Likewise.
2601         (LABEL_SUBR_START): Likewise.
2602         (LABEL_SUBR_CONTEXT): Likewise.
2603         (LABEL_CHANGED): Likewise.
2604         (LABEL_RETURN_LABEL): Likewise.
2605         (LABEL_RETURN_TYPE_STATE): Likewise.
2606         (LABEL_RETURN_LABELS): Likewise.
2607         (RETURN_MAP_ADJUSTED): Likewise.
2608         (LABEL_PENDING_CHAIN): Likewise.
2609
2610 2005-08-15  Tom Tromey  <tromey@redhat.com>
2611
2612         * Make-lang.in (JAVA_OBJS): Removed verify.o
2613         (java/verify.o): Removed.
2614         * verify.c: Removed.
2615         * lang.c (flag_new_verifier): Removed.
2616         (java_post_options): Updated.
2617         * java-tree.h (flag_new_verifier): Removed.
2618         (verify_jvm_instructions): Removed.
2619         * expr.c (pop_type_0): Assume flag_new_verifier is true.
2620         (build_java_check_indexed_type): Likewise.
2621         (expand_java_arraystore): Likewise.
2622         (expand_java_arrayload): Likewise.
2623         (pop_arguments): Likewise.
2624         (expand_byte_code): Likewise.
2625         (process_jvm_instruction): Likewise.
2626
2627 2005-08-10  Andrew Haley  <aph@redhat.com>
2628
2629         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
2630         type mismatches to make legal GIMPLE.
2631
2632 2005-08-10  Robin Green <greenrd@greenrd.org>
2633
2634         PR java/23230:
2635         * parse.y (maybe_use_access_method): Generalize check from
2636         java.lang.Object to any superclass of current_class
2637
2638 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
2639
2640         * class.c (build_class_ref): Wrap the primary class type in a
2641         NOP_EXPR.
2642         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
2643         primary class type from the NOP_EXPR in which it was placed.
2644
2645 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
2646
2647         * expr.c (expand_load_internal): Fix missing parens in
2648         predicate.
2649
2650 2005-07-28  Andrew Haley  <aph@redhat.com>
2651
2652         * expr.c (expand_load_internal): Convert to destination type.
2653
2654 2005-07-22  Manfred Hollstein  <mh@suse.com>
2655
2656         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
2657         (check_constant): Likewise.
2658         (check_wide_constant): Likewise.
2659
2660 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
2661
2662         Make CONSTRUCTOR use VEC to store initializers.
2663         * check-init.c (check_init): Update to cope with VEC in
2664         CONSTRUCTOR_ELTS.
2665         * class.c (make_field_value, make_method_value, get_dispatch_table,
2666         make_class_data, emit_symbol_table, emit_catch_table,
2667         emit_assertion_table): Use build_constructor_from_list instead of
2668         build_constructor.
2669         * constants.c (build_constants_constructor): Likewise.
2670         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
2671         VEC in CONSTRUCTOR_ELTS.
2672         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
2673         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
2674         of a TREE_LIST.
2675         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
2676         CONSTRUCTOR_ELTS.
2677         * parse.y (build_new_array_init): Use build_constructor_from_list
2678         instead of build_constructor.
2679         (patch_new_array_init): Update to cope with VEC in
2680         CONSTRUCTOR_ELTS.
2681         (array_constructor_check_entry): Likewise.
2682
2683 2005-07-12  Tom Tromey  <tromey@redhat.com>
2684
2685         * jvspec.c (lang_specific_driver): Put filelist_filename first on
2686         command line.
2687
2688 2005-07-12  Tom Tromey  <tromey@redhat.com>
2689
2690         PR java/19674:
2691         * parse-scan.y (interface_member_declaration): Added
2692         empty_statement.
2693
2694 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
2695         
2696         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
2697         (LABEL_PENDING_CHAIN): Ditto.
2698         (LABEL_PC): Ditto.
2699         (DECL_BIT_INDEX): Ditto.        
2700
2701 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2702
2703         PR java/18119
2704         * parse.y (inner_class_accessible): New function. Logic moved from
2705         check_inner_class_access.
2706         (check_inner_class_access): Use inner_class_accessible.
2707         (resolve_inner_class): Simplify arguments. Create circularity hash
2708         here. Keep looking for classes if we found one that was inaccessible. 
2709         Return the inaccessible class only if there is no other match.
2710         (do_resolve_class): Update for new resolve_inner_class arguments.
2711         Don't create circularity_hash here.
2712
2713 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
2714
2715         PR java/21045
2716         * parse.y (add_exception_to_throws): New function.
2717         (purge_unchecked_exceptions): Removed.
2718         (get_constructor_super): Renamed from verify_constructor_super. Now
2719         returns the super constructor after verification.
2720         (java_complete_expand_method): Don't use purge_unchecked_exceptions
2721         or save/restore the exception list.
2722         (check_thrown_exceptions): Add uncaught exceptions in anonymous
2723         class initializers and constructors to the throws clause of the method. 
2724
2725 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
2726
2727         PR java/19674
2728         * parse.y (interface_member_declaration): Allow empty statements in
2729         interface declarations.
2730
2731 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
2732
2733         * Makefile.in (parse.o): Adjust dependencies.
2734         * parse.y: Include tree-dump.h.
2735
2736 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
2737
2738         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
2739         flag for quoting.
2740
2741 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
2742
2743         * parse.y (issue_warning_error_from_context): Call
2744         pp_output_formatted_text to be able to get the buffer.
2745
2746 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
2747
2748         * parse.y (issue_warning_error_from_context): Update for the
2749         renaming of pp_format_text to pp_format.
2750
2751 2005-06-28  Paul Brook  <paul@codesourcery.com>
2752
2753         * decl.c (java_init_decl_processing): Call
2754         default_init_unwind_resume_libfunc.
2755
2756 2005-06-27  Tom Tromey  <tromey@redhat.com>
2757
2758         PR java/21540, PR java/13788:
2759         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
2760         fold_constant_for_init.
2761         (patch_binop): Added 'folding' argument.  Updated all callers.
2762         (patch_unaryop) <NOP_EXPR>: New case.
2763         (fold_constant_for_init) <NOP_EXPR>: Likewise.
2764         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
2765
2766 2005-06-25  Jan Hubicka  <jh@suse.cz>
2767
2768         * builtins.c (define_builtin): Accept new flags parameter.
2769         (initialize_builtins): Mark the builtins const and nothrow accordingly.
2770
2771 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
2772
2773         * all files: Update FSF address in copyright headers.
2774
2775 2005-06-24  Tom Tromey  <tromey@redhat.com>
2776
2777         * verify-impl.c (verify_instructions_0): Correctly handle
2778         situation where PC falls off end.
2779
2780 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
2781
2782         PR java/20697
2783         * parse.y (find_most_specific_methods_list): Remove special case for
2784         inner classes.
2785
2786 2005-06-15  Tom Tromey  <tromey@redhat.com>
2787
2788         PR libgcj/21906:
2789         * class.c (make_method_value): Use soft_abstractmethod_node for
2790         abstract method.
2791         * java-tree.h (soft_abstractmethod_node): New define.
2792         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
2793         * decl.c (java_init_decl_processing): Initialize
2794         soft_abstractmethod_node.
2795
2796 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
2797
2798         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
2799
2800 2005-06-13  Per Bothner  <per@bothner.com>
2801
2802         * expr.c (int highest_label_pc_this_method,
2803         start_label_pc_this_method): New globals.
2804         (lookup_label): Add start_label_pc_this_method to pc for label, and
2805         update highest_label_pc_this_method.  This prevents conflicts between
2806         labels from different methods.
2807         * java-tree.h: Declare new globals.
2808         * jcf-parse.c (parse_class_file): If needed bump
2809         start_label_pc_this_method and reset highest_label_pc_this_method.
2810
2811 2005-06-13  Tom Tromey  <tromey@redhat.com>
2812
2813         PR java/21844:
2814         * parse.y (nested_field_access_p): Handle case where outer field
2815         is inherited by enclosing class.
2816
2817 2005-06-12  Per Bothner  <per@bothner.com>
2818
2819         * class.c (inherits_from_p): Do load_class if needed.
2820
2821 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2822
2823         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
2824         * java-tree.h (parse_error_context): Move...
2825         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
2826         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
2827         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
2828
2829 2005-06-08  Roger Sayle  <roger@eyesopen.com>
2830
2831         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
2832
2833 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
2834
2835         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
2836         msgid for argument name.
2837         * gjavah.c (error): Likewise.
2838         * java-tree.h (parse_error_context): Likewise.
2839         * parse.y (parse_error_context, parse_warning_context,
2840         issue_warning_error_from_context): Likewise.
2841
2842 2005-06-01  Tom Tromey  <tromey@redhat.com>
2843
2844         PR java/21722:
2845         * class.c (build_static_field_ref): Don't fold constant fields if
2846         current class is from a .class file and we're using indirect
2847         dispatch.
2848
2849 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2850
2851         * java/verify-glue.c: Don't include errors.h and include toplev.h.
2852         * java/Make-lang.in: Updates dependencies.
2853
2854 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
2855
2856         PR java/19870.
2857         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
2858         NESTED_FIELD_ACCESS_IDENTIFIER_P.
2859         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
2860         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
2861         * jcf-write.c (generate_classfile): Use
2862         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2863         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2864         * parse.y (build_outer_field_access): Rename to
2865         build_nested_field_access. Support static fields and outer-to-inner
2866         class accesses.
2867         (outer_field_access_p): Rename to nested_field_access_p. Support
2868         static fields and generalise to outer-to-inner class and sibling
2869         inner class accesses.
2870         (outer_field_expanded_access_p): Rename to
2871         nested_field_expanded_access_p and support static fields.
2872         (outer_field_access_fix): Rename to nested_field_access_fix and
2873         support static fields.
2874         (build_outer_field_access_expr): Rename to
2875         build_nested_field_access_expr and support static fields.
2876         (build_outer_field_access_methods): Rename to
2877         build_nested_field_access_methods and support static fields. For
2878         static fields, generate accessors without class instance parameters.
2879         (build_outer_field_access_method): Rename to
2880         build_nested_field_access_method and support static fields.
2881         (build_outer_method_access_method): Use
2882         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
2883         OUTER_FIELD_ACCESS_IDENTIFIER_P.
2884         (resolve_expression_name): Consider static field accesses across
2885         nested classes.
2886         (resolve_qualified_expression_name): Likewise.
2887         (java_complete_lhs): Use nested_field_access_fix instead of
2888         outer_field_access_fix.
2889         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
2890         Use nested_field_expanded_access_p instead of
2891         outer_field_expanded_access_p. Use nested_field_access_fix instead
2892         of outer_field_access_fix.
2893         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
2894         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
2895
2896 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
2897
2898         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
2899         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
2900         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
2901         MINOR_BINARYCOMPAT_ABI_VERSION): New.
2902         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
2903         (parse_version): Calculate version ID using new method. Use bit-flags
2904         for flag_indirect_dispatch and flag_bootstrap_classes.
2905
2906 2005-05-25  Richard Henderson  <rth@redhat.com>
2907
2908         PR libgcj/21692
2909         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
2910         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
2911         DECL_CONTEXT; avoid pushdecl_top_level.
2912         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
2913         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
2914         (layout_class_method): Likewise.
2915         * decl.c (java_mark_cni_decl_local): New.
2916         (java_mark_class_local): Use it.
2917         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
2918         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
2919         (struct lang_decl_func): Add local_cni;
2920         (struct lang_decl_var): Add class_field, vtable.
2921         (java_mangle_decl): Declare.
2922         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
2923         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
2924         (mangle_obstack_1): New.
2925         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
2926         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
2927         lhd_set_decl_assembler_name for things that don't need mangling.
2928         (mangle_class_field): Rename from java_mangle_class_field, make
2929         static, don't call init_mangling or finish_mangling.
2930         (mangle_vtable): Similarly.
2931         (mangle_local_cni_method_decl): New.
2932         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
2933         gcc_assert, and MANGLE_RAW_STRING.
2934         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
2935
2936 2005-05-25  DJ Delorie  <dj@redhat.com>
2937
2938         * class.c (set_constant_value): Move warning control from if() to
2939         warning(OPT_*).
2940
2941 2005-05-24  Richard Henderson  <rth@redhat.com>
2942
2943         * builtins.c (define_builtin): Don't call make_decl_rtl.
2944         * constants.c (build_constant_data_ref): Likewise.
2945         * class.c (build_utf8_ref): Likewise.
2946         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
2947         (get_dispatch_table, layout_class_method): Likewise.
2948         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
2949         by hand.
2950         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
2951         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
2952         to determine if we need a non-zero address.
2953         * decl.c (builtin_function): Don't call make_decl_rtl.
2954         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
2955         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
2956         * resource.c (compile_resource_data): Likewise.
2957         * parse.y (resolve_field_access): Re-word comment to avoid
2958         building DECL_RTL.
2959
2960 2005-05-24  Richard Henderson  <rth@redhat.com>
2961
2962         * class.c (registered_class): Take it out of class_roots; turn into
2963         a vec of trees.
2964         (register_class): Make static.  Don't duplicate decl node.  Use
2965         VEC_safe_push.
2966         (emit_register_classes): Use VEC_iterate.  Use output_constant
2967         instead of assemble_integer.  Don't call mark_decl_referenced
2968         directly.
2969         * java-tree.h (register_class): Remove decl.
2970
2971 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
2972
2973         PR java/17845
2974
2975         * parse.y (register_package, package_list): Remove.
2976         (package_declaration): Do not call register_package.
2977         (do_resolve_class): Do not use package_list.
2978
2979 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
2980
2981         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
2982         unused variable.
2983
2984 2005-05-15  Tom Tromey  <tromey@redhat.com>
2985
2986         PR java/21519:
2987         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
2988         NOTE_PUSH.
2989
2990 2005-05-12  Aaron Luchko <aluchko@redhat.com>
2991
2992         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
2993
2994 2005-05-11  Tom Tromey  <tromey@redhat.com>
2995
2996         * gcj.texi (Code Generation): Document -fbootstrap-classes.
2997         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
2998         (parse_version): Use it.
2999         * lang.opt (-fbootstrap-classes): New option.
3000
3001 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
3002
3003         PR java/21436
3004         * class.c (maybe_layout_super_class): Look for imports in this_class.
3005         * parse.h (ctxp_for_generation_last): New.
3006         (do_resolve_class): Add a parameter.
3007         * parse.y (ctxp_for_generation_last): New.
3008         (java_pop_parser_context): Add at end of list.
3009         (find_in_imports, find_in_imports_on_demand): Look in ctxp
3010         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3011         the given type are NULL.
3012         (do_resolve_class): Look into the imports of the new second parameter.
3013         Adjust recursive calls.
3014         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3015         calls to do_resolve_class.
3016         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3017         (java_complete_class): Do not do that here.
3018
3019 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3020
3021         PR java/20309
3022         * Make-lang.in (java): Add gjnih.
3023         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3024         (GJNIH_OBJS): New variable.
3025         (gjnih$(exeext)): New target.
3026         (JAVA_MANFILES): Add gjnih.1.
3027         (java.uninstall): Add gjnih.1.
3028         (java.mostlyclean): Add gjnih.
3029         (java.maintainer-clean): Add gjnih.1.
3030         (java/gjavah-jni.o): New target.
3031         (.INTERMEDIATE): Add gjnih.pod.
3032         (gjnih.pod): New target.
3033         * config-lang.in (stagestuff): Add gjnih.
3034         * gcj.texi (Top): Add gjnih node.
3035         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3036         -bootclasspath options.
3037         (Invoking gjnih): New node.
3038         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3039         (TOOLNAME): New macro.
3040         (error): Replace hard-coded gcjh with TOOLNAME.
3041         (process_file): Likewise.
3042         (usage): Likewise.
3043         (version): Likewise.
3044         (help): Likewise.  Add help output for -force, -old, -trace and -J
3045         options.
3046         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3047         (options): Add force, old, trace and J fields.
3048         (main): Handle -force, -old, -trace and -J options.
3049
3050 2005-05-03  Tom Tromey  <tromey@redhat.com>
3051
3052         PR java/21245:
3053         * gjavah.c (main): Unlink output file on error.
3054
3055 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3056
3057         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3058         copyright.
3059
3060 2005-04-29  Tom Tromey  <tromey@redhat.com>
3061
3062         * expr.c (build_jni_stub): Updated for change to build_block.
3063
3064 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3065
3066         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3067
3068 2005-04-28  Andrew Haley  <aph@redhat.com>
3069
3070         PR java/19285
3071         * java-tree.h (soft_resolvepoolentry_node): New.
3072         (alloc_constant_fieldref): Declare.
3073         * expr.c (expand_java_field_op): Don't call class_init for
3074         accesses to static fields with indirect dispatch.
3075         * builtins.c (initialize_builtins): Add "__builtin_expect".
3076         * decl.c (soft_resolvepoolentry_node): New variable.
3077         (java_init_decl_processing): Create a decl for
3078         "_Jv_ResolvePoolEntry".
3079         * class.c (build_fieldref_cache_entry): New function.
3080         (build_static_field_ref): Rewrite for indirect dispatch.
3081         * constants.c (find_name_and_type_constant_tree): New function.
3082         (alloc_constant_fieldref): Likewise.
3083         (build_constants_constructor): Handle CONSTANT_Fieldref and
3084         CONSTANT_NameAndType.
3085
3086         PR java/21115
3087         * expr.c (force_evaluation_order): Convert outgoing args smaller
3088         than integer.
3089
3090 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3091
3092         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3093         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
3094         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3095
3096 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3097
3098         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3099         to `unlock_stream' with `unlock_std_streams'.
3100
3101 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3102
3103         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3104         instead of just expr.h.
3105
3106 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3107
3108         * gjavah.c (main): Unlock the stdio streams.
3109         * jcf-dump.c (main): Likewise.
3110         * jv-scan.c (main): Likewise.
3111         * jvgenmain.c (main): Likewise.
3112
3113 2005-04-23  DJ Delorie  <dj@redhat.com>
3114
3115         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3116         parse.y: Adjust warning() callers.
3117
3118 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
3119
3120         * gcj.texi (Object fields): Change "Integer" to "Int" in example
3121         contructor.
3122
3123 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3124
3125         * gcj.texi: Fix typos and bogus example.
3126
3127 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
3128
3129         * except.c: Fix a comment typo.
3130
3131 2005-04-19  Julian Brown  <julian@codesourcery.com>
3132
3133         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3134         indirect dispatch with PIC.
3135
3136 2005-04-18  Andrew Haley  <aph@redhat.com>
3137
3138         * java-except.h (struct eh_range.handler): Remove unused field.
3139         (handle_nested_ranges): Remove function declaration.
3140         (sanity_check_exception_range): Add function declaration.       
3141         * verify.c (verify_jvm_instructions): Remove call to
3142         handle_nested_ranges.
3143         * verify-glue.c (verify_jvm_instructions_new): Call
3144         sanity_check_exception_range.
3145         * except.c (link_handler, eh_range_freelist, link_handler,
3146         handle_nested_ranges): Remove.
3147         (add_handler): Rewrite.
3148         (sanity_check_exception_range): New function.
3149         (print_ranges): New function.
3150
3151 2005-04-13  Julian Brown  <julian@codesourcery.com>
3152
3153         * decl.c (finish_method): Give methods once-only linkage.
3154
3155 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
3156
3157         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3158
3159 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3160
3161         * java-tree.h: Don't use PARAMS().
3162
3163 2005-04-07  Per Bothner  <per@bothner.com>
3164
3165         * class.c (push_class): By default, suppress debug output.
3166         (finish_class): Enable debug output for classes we're emitting.
3167
3168 2005-04-07  Andrew Haley  <aph@redhat.com>
3169
3170         * gcj.texi: Correct gcj-dbtool instructions.
3171
3172 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
3173
3174         * gcj.texi: Fix a typo.
3175         * lang.c: Fix a comment typo.
3176
3177 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
3178
3179         * gcj.texi (Invoking gij): Add descriptions of new -X options.
3180         Mention recognized-and-ignored compatibility options.
3181         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3182         JvFree.
3183         (About CNI): Add Memory allocation section.
3184
3185 2005-04-01  Tom Tromey  <tromey@redhat.com>
3186
3187         * decl.c (java_init_decl_processing): Fix types of
3188         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3189         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3190         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3191
3192 2005-03-31  Jan Hubicka  <jh@suse.cz>
3193
3194         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3195         * class.c: Include cgraph.h
3196         (make_local_functoin_alias): Mark aslias as needed.
3197         * resource.c: Include cgraph.h
3198         (compile_resource_data): Go via cgraph interface.
3199
3200 2005-03-30  Ian Lance Taylor  <ian@airs.com>
3201
3202         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3203
3204 2005-03-30  Tom Tromey  <tromey@redhat.com>
3205
3206         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3207         inner_class_info_index==0 or outer_class_info_index==0.
3208
3209 2005-03-29  Tom Tromey  <tromey@redhat.com>
3210
3211         * gcj.texi (libgcj Runtime Properties): Document
3212         gnu.gcj.runtime.endorsed.dirs.
3213
3214 2005-03-24  Anthony Green  <green@redhat.com>
3215
3216         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3217         'gcj-dbtool -p'.
3218
3219 2005-03-23  Tom Tromey  <tromey@redhat.com>
3220
3221         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3222         (parse_version): Use it.
3223
3224 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3225
3226         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3227
3228 2005-03-18  Andrew Haley  <aph@redhat.com>
3229
3230         PR java/20522
3231         * decl.c (update_aliases): Don't update variables that are about
3232         to die.
3233         (maybe_poplevels): Add comment.
3234
3235 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
3236
3237         PR java/20502
3238         * jcf-parse.c (duplicate_class_warning): New function.
3239         (java_parse_file): Call duplicate_class_warning if 
3240         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3241         (parse_zip_file_entries): Likewise. Also set
3242         CLASS_FROM_CURRENTLY_COMPILED_P.
3243
3244 2005-03-16  Andrew Haley  <aph@redhat.com>
3245
3246         * expr.c (expand_java_arrayload): Don't generate a
3247         NullPointerException based on the type of the node.
3248         (build_java_array_length_access): Likewise.
3249
3250 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
3251
3252         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3253
3254 2005-03-11  Tom Tromey  <tromey@redhat.com>
3255
3256         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3257         (libgcj Runtime Properties): Document the default .db.
3258
3259 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3260
3261         PR java/20312
3262         * parse.y (checks_throws_clauses): Check exceptions list even when
3263         the base class does not come from a source file being compiled.
3264         (java_complete_lhs): Remove unused variable 'wfl'.
3265
3266 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
3267
3268         PR java/20338
3269         * decl.c (finish_method): Emit _Jv_InitClass for private static
3270         methods inside inner classes as well.
3271
3272 2005-03-08  Julian Brown  <julian@codesourcery.com>
3273         * Revert patch from 2005-03-08 for causing bootstrap failure on
3274         ppc-darwin.
3275
3276 2005-03-08  Julian Brown  <julian@codesourcery.com>
3277
3278         * decl.c (finish_method): Give methods once-only linkage.
3279
3280 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3281
3282         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3283
3284 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
3285
3286         * verify-glue.c (vfy_is_assignable_from): Perform static check using
3287         can_widen_reference_to if the C++ ABI is in use.
3288         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3289         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3290         type_isresolved, init_state, set_pc, state_get_pc,
3291         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3292         (verify_fail): Report the current PC from the verifier context.
3293         (free_state): Remove #if 0 block to enable this function.
3294         (free_verifier_context): Call free_state on state_list iterator
3295         values before freeing them.
3296         * expr.c (pop_type_0): Pop correct type for error message when stack
3297         contains a multi-word type.
3298
3299 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3300
3301         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3302         for known NULL array length access.
3303
3304 2005-03-07  Tom Tromey  <tromey@redhat.com>
3305
3306         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3307
3308 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
3309
3310         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3311         typeck.c: Update copyright.
3312
3313 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
3314
3315         Remove xref code.
3316         * xref.c, xref.h: Remove file.
3317         * Make-lang.in (java/xref.o): Remove.
3318         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3319         * lang.c (flag_emit_xref): Remove definition.
3320         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3321         * typeck.c (convert): Remove use of do_not_fold.
3322         * parse.y (do_not_fold): Remove definition.
3323         (parser grammar): Remove xref code.
3324         (maybe_create_class_interface_decl, create_class): Likewise.
3325         (register_fields, method_header, finish_method_declaration): Likewise.
3326         (declare_local_variables, source_end_java_method): Likewise.
3327         (java_complete_expand_classes): Do not set do_not_fold.
3328         (java_complete_expand_method): Remove xref code.
3329         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3330         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3331         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3332         (patch_synchronized_statement, patch_throw_statement): Likewise.
3333         (maybe_build_class_init_for_field): Likewise.
3334
3335 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
3336
3337         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3338         instead of IS_NON_TYPE_CODE_CLASS.
3339
3340 2005-03-04  Andrew Haley  <aph@redhat.com>
3341
3342         PR java/18362
3343         * class.c (set_method_index): Don't set method_index if it is
3344         NULL_TREE.
3345         (layout_class_method): Don't complain about "non-static method foo
3346         overrides static method" in the case of indirect dispatch.
3347
3348 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3349
3350         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3351         warning.
3352         * Make-lang.in: Don't elide warnings in jcf-io.c.
3353
3354 2005-03-01  Per Bothner  <per@bothner.com>
3355
3356         PR java/8608
3357         * check-init.c (wfl): Remove static.
3358         (final_assign_error, check_init): Replace calls to parse_error_context
3359         by plain error.
3360         (check_init): Save, set, and restore input_location for each exp.
3361
3362 2005-03-01  Per Bothner  <per@bothner.com>
3363
3364         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3365         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3366         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3367
3368 2005-03-01  Per Bothner  <per@bothner.com>
3369
3370         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3371
3372 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3373
3374         PR libgcj/16923
3375         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3376         JvVMOption.
3377
3378 2005-02-22  Tom Tromey  <tromey@redhat.com>
3379
3380         PR java/20056:
3381         * verify-impl.c (EITHER): New define.
3382         (types_compatible): Handle it.
3383         (check_field_constant): Use it.
3384
3385 2005-02-18  Tom Tromey  <tromey@redhat.com>
3386
3387         PR java/20056:
3388         * verify-impl.c (types_equal): Fixed test.
3389
3390         PR java/20056:
3391         * verify-glue.c (vfy_class_has_field): New function.
3392         * verify.h (vfy_class_has_field): Declare.
3393         * verify-impl.c (check_field_constant): Added 'putfield'
3394         argument.
3395         (verify_instructions_0): Updated.
3396         (types_equal): New function.
3397
3398 2005-02-14  Tom Tromey  <tromey@redhat.com>
3399
3400         PR java/19921:
3401         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3402         stack effect of multianewarray.
3403
3404 2005-02-14  Andrew Haley  <aph@redhat.com>
3405
3406         PR java/19907
3407         * expr.c (expand_byte_code): Call promote_arguments().
3408         (promote_arguments): New function.
3409         * decl.c (check_local_unnamed_variable): Remove special case for
3410         new verifier.
3411         (find_local_variable): Promote all boolean types to int
3412         when searching for local variable decls.
3413
3414 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
3415
3416         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3417         parse-scan.y: Update copyright.
3418
3419 2005-02-11  Per Bothner  <per@bothner.com>
3420
3421         PR java/15543
3422         * parse-scan.y (input_location): Remove variable.
3423         (main_input_filename): New - replaces input_filename, which isn't
3424         settable if USE_MAPPED_LOCATION.
3425         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3426         so we don't reference input_location or wfl_operator in that case.
3427         * jv-scan.c (expand_location): Remove - no longer used.
3428         (main): Set main_input_filename rather than input_filename.
3429
3430 2005-02-09  Richard Henderson  <rth@redhat.com>
3431
3432         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3433         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3434
3435 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
3436
3437         * expr.c (add_type_assertion): Use the proper enumeration type,
3438         since this is what htab_find_slot() is expecting.
3439
3440 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
3441
3442         * gcj.texi: Update copyright dates.
3443
3444 2005-02-02  Tom Tromey  <tromey@redhat.com>
3445
3446         * gcj.texi (libgcj Runtime Properties): Default library_control
3447         to 'cache'.
3448
3449 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
3450
3451         PR java/15543
3452         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3453         (modifiers) when square brackets are present in a declaration for
3454         a final paramter.
3455         * jv-scan.c (main): Set input_filename and input_line.
3456
3457 2005-02-01  Tom Tromey  <tromey@redhat.com>
3458
3459         PR java/19742:
3460         * gjavah.c (get_field_name): Don't override name for JNI header.
3461
3462 2005-02-01  Roger Sayle  <roger@eyesopen.com>
3463
3464         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3465         of unsigned types using iushr and lushr JVM bytecodes.
3466
3467 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3468
3469         PR java/19738
3470         * gjavah.c (jni_print_float): Do not emit floating-point
3471         initialiser for a static final field.
3472         (jni_print_double): Likewise.
3473
3474 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
3475
3476         Revert:
3477         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3478         * gjavah.c (print_field_info): Mark static data members of
3479         floating-point type with "__extension__".
3480
3481 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3482
3483         * gjavah.c (print_field_info): Mark static data members of
3484         floating-point type with "__extension__".
3485
3486 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3487
3488         PR java/9157
3489         * parse.y (build_string_concatenation): Remove redundant if.
3490         (patch_conditional_expr): Attempt to patch_string() the condition
3491         of a ?: as well, in addition to its other operands.
3492
3493 2005-01-25  Tom Tromey  <tromey@redhat.com>
3494
3495         * Make-lang.in (java/java-tree-inline.o): Removed.
3496
3497 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
3498
3499         PR java/19070
3500         * parse.y (patch_binop): Allow comparisons against NULL only
3501         if the other operand is of a reference type.
3502
3503 2005-01-24  Tom Tromey  <tromey@redhat.com>
3504
3505         * java-tree.h (gcj_abi_version): Declare.
3506         * class.c (make_class_data): Push gcj_abi_version into "next"
3507         field.  Renamed field.
3508         * decl.c (gcj_abi_version): New global.
3509         (parse_version): New function.
3510         (java_init_decl_processing): Call it.  Renamed 'next' field.
3511         Include version.h.
3512         (GCJ_BINARYCOMPAT_ADDITION): New define.
3513
3514 2005-01-24  Roger Sayle  <roger@eyesopen.com>
3515
3516         PR java/19295
3517         * jcf-write.c (generate_bytecode_insns): Conversions between
3518         integer types of the same precision shouldn't generate widening
3519         or narrowing conversion bytecodes.
3520
3521 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
3522
3523         * java-except.h, java-tree.h: Remove unused prototypes.
3524
3525 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
3526
3527         PR java/18091:
3528         * jcf-write.c (perform_relocations): Don't call memcpy if source
3529         and destination are the same.
3530
3531 2005-01-17  Tom Tromey  <tromey@redhat.com>
3532
3533         * verify-impl.c (get_short): Sign extend.
3534         (get_int): Likewise.
3535
3536 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
3537
3538         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
3539         with TYPE_SIZE.
3540
3541 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3542
3543         * verify.c: Revert to the version before the BC-ABI merge.
3544
3545 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
3546
3547         PR java/19277
3548         * check-init.c (check_init): Take care of references that do not
3549         have an explicit final variable declaration (e.g. array length
3550         access) for pre/post in/de-crement operators.
3551
3552 2005-01-08  Mark Wielaard  <mark@klomp.org>
3553
3554         * parse.y (process_imports): Allocate (and free) original_name only
3555         when not already defined.
3556         * jcf-parse.c (read_class): Free results of find_class() and
3557         lrealpath().
3558         (java_parse_file): Keep pointer to head of file_list and free when
3559         done. Free result of lrealpath().
3560
3561 2005-01-05  Tom Tromey  <tromey@redhat.com>
3562
3563         * gcj.texi (Standard Properties): java.ext.dirs is now used.
3564
3565 2004-12-20  Andrew Haley  <aph@redhat.com>
3566
3567         * typeck.c: Use fold_convert for ints and booleans.
3568
3569 2004-12-17  Andrew Haley  <aph@redhat.com>
3570
3571         PR java/18931
3572         * typeck.c (convert): Use a CONVERT_EXPR when converting to
3573         BOOLEAN_TYPE or CHAR_TYPE.
3574         (convert_to_boolean, convert_to_char) : Remove.
3575         * convert.h (convert_to_boolean, convert_to_char) : Remove.
3576         * expr.c (expand_load_internal): Do type conversion if type is not
3577         as required.
3578
3579 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
3580
3581         PR target/18459
3582         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
3583         Update comment.
3584
3585 2004-12-07  Andrew Haley  <aph@redhat.com>
3586
3587         PR java/18811:
3588         * jcf-parse.c (load_class): Remove sanity test for missing inner
3589         class file.
3590
3591 2004-12-06  Tom Tromey  <tromey@redhat.com>
3592
3593         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
3594         (java.uninstall): Likewise.
3595         (java.maintainer-clean): Likewise.
3596         (.INTERMEDIATE): Likewise.
3597         (java.install-man): Likewise.
3598         (gcj-dbtool.pod): New target.
3599         * gcj.texi (Code Generation): Document -findirect-dispatch.
3600         (libgcj Runtime Properties): Document
3601         gnu.gcj.precompiled.db.path.
3602         (Top): Link to "Invoking gcj-dbtool".
3603
3604 2004-12-06  Tom Tromey  <tromey@redhat.com>
3605
3606         PR java/14853:
3607         * java-tree.h (extract_field_decl): Declare.
3608         * parse.y (extract_field_decl): Renamed from
3609         strip_out_static_field_access_decl.  No longer static.
3610         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
3611
3612 2004-12-03  Tom Tromey  <tromey@redhat.com>
3613
3614         * lang.c (flag_new_verifier): Define.
3615         (java_post_options): Set flag_new_verifier if indirect dispatch
3616         is being used.
3617         * lang.opt (fnew-verifier): Removed.
3618
3619 2004-12-03  Tom Tromey  <tromey@redhat.com>
3620
3621         PR bootstrap/14614:
3622         * Make-lang.in (java.install-common): Only install transformed
3623         gcjh if gcj-cross exists.
3624
3625 2004-12-03  Andrew Haley  <aph@redhat.com>
3626
3627         PR java/18812
3628         * except.c (link_handler): Patch 'outer' field of siblings of the
3629         range we're demoting.
3630
3631 2004-12-03  Andrew Haley  <aph@redhat.com>
3632
3633         PR java/18697
3634         * class.c (layout_class_method): Don't fail to override a method
3635         simply because it has DECL_ARTIFICIAL set.
3636
3637 2004-12-02  Tom Tromey  <tromey@redhat.com>
3638
3639         PR java/16675:
3640         * parse.y (craft_constructor): Special case null_pointer_node.
3641
3642 2004-12-02  Tom Tromey  <tromey@redhat.com>
3643
3644         PR java/18741:
3645         * java-gimplify.c (java_gimplify_expr): Don't call
3646         SET_EXPR_LOCATION unless wrapped tree is an expression.
3647
3648 2004-11-27  Per Bothner  <per@bothner.com>
3649
3650         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
3651         Fix fencepost error in 'i', which got executed one too many times.
3652         Also, fold memcpy into explicit loop, as originally intended.
3653         Also, free temporary 'buf' which otherwise leaks.
3654
3655 2004-11-27  Per Bothner  <per@bothner.com>
3656
3657         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
3658         local static variables if not USE_MAPPED_LOCATION.
3659
3660 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
3661
3662         * class.c, decl.c, expr.c: Fix comment typos.
3663
3664 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
3665
3666         PR java/18305
3667         * decl.c (end_java_method): Call
3668         attach_init_test_initialization_flags on all the init_decls.
3669         * parse.y (attach_init_test_initialization_flags): Move to ...
3670         * expr.c (attach_init_test_initialization_flags): here and
3671         support BIND_EXPR also.
3672         * java-tree.h (attach_init_test_initialization_flags): Prototype.
3673         * jcf-parse.c (parse_class_file): Don't disable class init
3674         optimization.
3675
3676 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
3677
3678         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
3679         in diagnostics.
3680
3681 2004-11-24  Richard Henderson  <rth@redhat.com>
3682
3683         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
3684         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
3685
3686 2004-11-24  Tom Tromey  <tromey@redhat.com>
3687
3688         * verify.c (defer_merging): Don't use C++-style comment.
3689         * verify.h (java_opcode): Added java_opcode_end.
3690         * class.c (build_class_ref): Remove C++ comment and old FIXME.
3691
3692         * verify-impl.c (vfy_push_type): Removed bogus "return".
3693         (initialize_stack): Use vfy_alloc and vfy_free.
3694         (verify_instructions_0): Likewise.
3695
3696         * Merged gcj-abi-2-dev-branch to trunk.
3697
3698 2004-11-24  Andrew Haley  <aph@redhat.com>
3699
3700         * jcf-parse.c (parse_class_file): Set file_start_location.
3701
3702 2004-11-10  Tom Tromey  <tromey@redhat.com>
3703
3704         * class.c (make_field_value): Don't call build_static_field_ref.
3705         (build_static_field_ref): Don't emit direct references when using
3706         indirect dispatch.
3707
3708         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
3709         -verbose:class into man page synopsis.
3710
3711 2004-11-09  Tom Tromey  <tromey@redhat.com>
3712
3713         * expr.c (build_java_arraystore_check): Still generate check if
3714         element type is itself an array.
3715
3716 2004-11-08  Tom Tromey  <tromey@redhat.com>
3717
3718         * java-tree.h (soft_check_assignment_node): Removed.
3719         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
3720         * decl.c (java_init_decl_processing): Don't initialize
3721         soft_check_assignment_node.
3722
3723 2004-11-05  Tom Tromey  <tromey@redhat.com>
3724
3725         * class.c (layout_class_methods): Don't add Miranda methods when
3726         using indirect dispatch.
3727
3728 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
3729
3730         * class.c (make_class_data): Call emit_assertion_table to set the
3731         'assertion_table' field.
3732         (build_signature_for_libgcj): Move here from expr.c.
3733         (add_assertion_table_entry): New function. Callback for assertion
3734         hashtable traversal.
3735         (emit_assertion_table): New. Take class argument, and generate
3736         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
3737         * decl.c (init_decl_processing): Define assertion_entry_type record.
3738         Push 'assertion_table' class field instead of 'verify'.
3739         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
3740         (type_assertion_hash): Include 'assertion_code' in hash.
3741         (add_type_assertion): Rewritten. Take class and assertion_code
3742         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
3743         (can_widen_reference_to): Use new add_type_assertion() arguments.
3744         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
3745         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
3746         (verify_identifier_node): Removed.
3747         (assertion_entry_type, assertion_table_type): New.
3748         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
3749         assertion code definitions.
3750         (struct type_assertion): Add assertion_code. Rename 'source_type' and
3751         'target_type' to 'op1' and 'op2'.
3752         (add_type_assertion): Declare.
3753         (lang_printable_name_wls): Remove unused definition.
3754         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
3755         to emit runtime assertion.
3756         (vfy_note_stack_type): Clean up non-C90 declarations.
3757         (vfy_note_local_type): Likewise.
3758         * verify.h (vfy_is_assignable_from): Declare.
3759         * verify-impl.c (is_assignable_from_slow): Remove unused function.
3760         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
3761         instead of is_assignable_from_slow().
3762         (types_compatible): Reinstate ref_compatible() call.
3763
3764 2004-11-04  Tom Tromey  <tromey@redhat.com>
3765
3766         * class.c (build_static_field_ref): Reverted previous patch.
3767
3768         * class.c (build_static_field_ref): Don't emit direct references
3769         when using indirect dispatch.
3770
3771 2004-11-03  Tom Tromey  <tromey@redhat.com>
3772
3773         * expr.c (expand_java_arrayload): Set lhs_type_node.
3774         (expand_java_arraystore): Set rhs_type_node.
3775
3776 2004-11-02  Tom Tromey  <tromey@redhat.com>
3777
3778         * jcf-parse.c (compute_class_name): Use filename length from zip
3779         directory, not strlen.
3780
3781         * expr.c (expand_invoke): Mark new interface methods as abstract.
3782
3783 2004-11-01  Tom Tromey  <tromey@redhat.com>
3784
3785         * verify-impl.c (push_jump): Removed check for uninitialized
3786         objects.
3787         (push_exception_jump): Likewise.
3788         (handle_ret_insn): Likewise.
3789         (handle_jsr_insn): Likewise.
3790         (state_check_no_uninitialized_objects): Removed.
3791
3792         * decl.c (check_local_unnamed_variable): Recognize
3793         promoted-to-int parameters when using the new verifier.
3794         * expr.c (expand_java_arraystore): Explicitly request array type
3795         when using new verifier.
3796         (expand_java_arrayload): Likewise.
3797         (invoke_build_dtable): Don't pass object_type_node as
3798         expression argument to build_java_indirect_ref.
3799         (build_java_check_indexed_type): Do nothing.
3800         (build_java_arraystore_check): Handle case where array doesn't
3801         have array type.
3802         (build_java_array_length_access): Likewise.
3803         (expand_invoke): Handle case where interface overrides a method
3804         from Object.
3805         (pop_type_0): Always succeed for reference types.
3806         (process_jvm_instruction): Don't pop a value in a dead
3807         exception handler.
3808         (pop_arguments): Convert arguments to correct types.
3809
3810 2004-10-29  Andrew Haley  <aph@redhat.com>
3811
3812         * jcf-parse.c (give_name_to_class): Remove line that was
3813         incorrectly merged.
3814
3815 2004-10-29  Andrew Haley  <aph@redhat.com>
3816
3817         * jcf-parse.c (set_source_filename): Add code to build new sfname.
3818
3819 2004-10-20  Andrew Haley  <aph@redhat.com>
3820
3821         * decl.c (end_java_method): Don't expand if flag_syntax_only.
3822
3823 2004-10-26  Tom Tromey  <tromey@redhat.com>
3824
3825         * verify.h (vfy_notify_verified): Removed.
3826         * verify-glue.c (vfy_notify_verified): Removed.
3827
3828 2004-10-26  Tom Tromey  <tromey@redhat.com>
3829
3830         * verify-impl.c (debug_print_state): Declare `i' before code.
3831         (merge_types): Modify `t' when it is null_type.
3832
3833 2004-10-26  Tom Tromey  <tromey@redhat.com>
3834
3835         * verify-impl.c (type_print): Renamed from print.  Now static and
3836         takes an argument.
3837         (debug_print_state): Use type_print.
3838
3839 2004-10-25  Tom Tromey  <tromey@redhat.com>
3840
3841         * expr.c (build_invokeinterface): Compute correct offset for
3842         index into interface methods.
3843
3844 2004-10-20  Tom Tromey  <tromey@redhat.com>
3845
3846         * java-tree.h (verify_jvm_instructions_new): Declare.
3847
3848         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
3849         command line.
3850
3851         * verify-impl.c (verify_instructions): Correctly handle wide
3852         types on the stack.
3853         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
3854         (vfy_get_component_type): Strip pointer types.
3855         (vfy_find_class): Use get_type_from_signature.  Strip pointer
3856         types.
3857         Include java-except.h.
3858
3859 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
3860
3861         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
3862         vfy_push_type_t, set_variable, add_new_state, merge_into,
3863         handle_jsr_insn, branch_prepass, check_class_constant,
3864         check_wide_constant, get_one_type, compute_static_types,
3865         verify_instructions_0): Clean up C99 declarations after statements.
3866
3867 2004-10-20  Tom Tromey  <tromey@redhat.com>
3868
3869         * verify-impl.c (merge_refs): Compare reference against iterator,
3870         not ref2.
3871
3872         * verify-glue.c (vfy_tag): Mask off resolved flag.
3873
3874 2004-10-19  Tom Tromey  <tromey@redhat.com>
3875
3876         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
3877         (init_state_with_stack): Initialize `this_type' in state.
3878         (verify_method): Use debug_print.
3879         * verify-glue.c (vfy_is_primitive): Removed debugging print.
3880         (vfy_note_stack_depth): Reverted last patch.
3881         (vfy_note_stack_type): Note pointer to Object, not Object.
3882         (vfy_note_local_type): Likewise.
3883
3884         * verify.h (vfy_note_instruction_seen): Declare.
3885         * verify-glue.c (verify_jvm_instructions_new): Set
3886         BCODE_EXCEPTION_TARGET on target instruction.
3887         (vfy_note_instruction_seen): New function.
3888         * verify-impl.c (FLAG_INSN_SEEN): New define.
3889         (verify_instructions_0): Set flag on instruction.  Save state for
3890         PC=0 later.
3891         (verify_instructions): Call vfy_note_instruction_seen.
3892
3893         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
3894         (verify_jvm_instructions_new): Call method_init_exceptions,
3895         add_handler, and handle_nested_ranges.
3896         * verify-impl.c (verify_method): Return 1 on success.
3897         (verify_instructions_0): Save the state at PC=0.
3898
3899         * verify-impl.c (init_type_from_class): Set is_resolved and
3900         ref_next on new ref_intersection.
3901         (init_type_from_string): Likewise.
3902
3903 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
3904
3905         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
3906         if flag_new_verifier is set.
3907         * java-tree.h (flag_new_verifier): Declare.
3908         * lang.opt (fnew-verifier): New option.
3909         * verify-impl.c: Work around namespace pollution by undef'ing
3910         'current_class'.
3911         (struct verifier_context): Make 'bytecode' const.
3912         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
3913         (types_compatible): For the BC-ABI, always consider reference types
3914         compatible.
3915         (check_class_constant): Use vfr->current_class.
3916         (check_constant): Likewise.
3917         (check_wide_constant): Likewise.
3918         (check_field_constant): Check for 'L' at start of type name.
3919         (get_one_type): Return pointer instead of type. Set type result in
3920         caller via passed type pointer.
3921         (compute_argument_types): Update to use new get_one_type arguments.
3922         (compute_return_type): Likewise.
3923         (make_verifier_context): New. Allocate and initialize 'vfr'.
3924         (free_verifier_context): New. Free 'vfr' and its contents.
3925         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
3926         and free_verifier_context.
3927
3928 2004-10-15  Tom Tromey  <tromey@redhat.com>
3929
3930         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
3931         * verify.h (vfy_fail): Fixed formatting.
3932
3933         * verify-impl.c (vfr): Fixed comment formatting.
3934         (collapse_type): New function.
3935         (verify_instructions): Notify compiler about type map.
3936         * verify.h (vfy_note_stack_depth): Updated.
3937         (vfy_note_stack_type): Likewise.
3938         (vfy_note_local_type): Likewise.
3939         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
3940         Declare.
3941         * verify-glue.c (vfy_note_stack_depth): Correctly size type
3942         state.  Added `method' argument.
3943         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
3944         argument.
3945         (vfy_note_local_type): New function.
3946         (vfy_unsuitable_type): Likewise.
3947         (vfy_return_address_type): Likewise.
3948         (vfy_null_type): Likewise.
3949
3950         * verify.h (VFY_IN_GCC): Removed.
3951         (VFY_WANT_TYPEMAP): Removed.
3952         * verify-impl.c (verify_instructions_0): Removed useless "\".
3953         (struct state) <next>: Uncomment.
3954
3955 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
3956
3957         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
3958         C-style.
3959
3960 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3961
3962         * Make-lang.in (verify.o): Re-enabled this target.
3963         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
3964         (vfy_get_interface): Likewise.
3965         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
3966         * verify.h (verify_jvm_instructions_new): Declare.
3967         * verify-impl.c (free_state): Temporarily comment out unused
3968         function.
3969
3970 2004-10-06  Tom Tromey  <tromey@redhat.com>
3971
3972         * java-tree.h (JV_STATE_READ): New enum value.
3973
3974 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
3975
3976         * verify.h: New file.
3977
3978 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
3979
3980         * verify-impl.c, verify-glue.c, verify.h: New files.
3981         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
3982
3983 2004-09-24  Andrew Haley  <aph@redhat.com>
3984
3985         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
3986         for a slot if it's of pointer type.
3987
3988 2004-09-14  Tom Tromey  <tromey@redhat.com>
3989
3990         * class.c (make_class_data): Correctly initialize "state" field.
3991         Initialize "engine" field.
3992         * decl.c (java_init_decl_processing): Add "engine" field.
3993
3994 2004-09-10  Andrew Haley  <aph@redhat.com>
3995
3996         PR java/12760
3997         * expr.c (build_invokeinterface): Use fast method for interface
3998         dispatch.
3999         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4000         JTI_ITABLE_PTR_TYPE.
4001         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
4002         (emit_symbol_table): Add new arg, element_size.
4003         * decl.c (java_init_decl_processing): Initialize Class.itable.
4004         * class.c (GEN_TABLE): New macro.
4005         (gen_indirect_dispatch_tables): Use it.  Add itable.
4006         (make_class_data): Add new arg for emit_symbol_table().
4007         Emit itable.
4008         (add_miranda_methods): Make sure search_class has been parsed.
4009         (emit_symbol_table): Add new arg, element_size.
4010
4011 2004-09-06  Andrew Haley  <aph@redhat.com>
4012
4013         * verify.c (merge_types): Return Object for all merges of
4014         interfaces.
4015         * expr.c (add_type_assertion): Don't generate assertions when
4016         source type is array of Object.
4017
4018 2004-09-03  Andrew Haley  <aph@redhat.com>
4019
4020         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4021
4022         * lang.c (java_post_options): Force flag_verify_invocations if
4023         we're not using indirect dispatch.
4024
4025         * expr.c (pop_type_0): Move test for interfaces before call to
4026         can_widen_reference_to().
4027         (build_signature_for_libgcj): Remove generation of canonical array
4028         type.
4029         (add_type_assertion): Canonicalize both arrays.
4030         Don't assert that type X can be assigned to Object.
4031         Don't assert that type X an be assigned to type X.
4032         Don't assert that Object can be assigned to type X.
4033         (can_widen_reference_to): Warn whenever we generate an assertion.
4034         (process_jvm_instruction): Use throwable_type_node for the type of
4035         an exception class.
4036
4037 2004-09-01  Andrew Haley  <aph@redhat.com>
4038
4039         * decl.c (java_init_decl_processing): Change
4040         verify_identifier_node to "__verify".
4041         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4042         * java-tree.h (verify_identifier_node): Change to "__verify".
4043
4044         * expr.c (build_signature_for_libgcj): New function.
4045         (add_type_assertion): Use it to construct signatures for
4046         source_type and target_type.
4047
4048 2004-08-27  Andrew Haley  <aph@redhat.com>
4049
4050         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4051         (verify_identifier_node): New.
4052         (TYPE_VERIFY_METHOD): New.
4053         (struct type_assertion): New type.
4054         * expr.c (type_assertion_eq): New function.
4055         (type_assertion_hash): New function.
4056         (add_type_assertion): New function.
4057         (can_widen_reference_to): Call add_type_assertion().
4058         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4059         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4060         (finish_class): Output TYPE_VERIFY_METHOD (type).
4061
4062         * decl.c (end_java_method): Nullify unused fields.
4063
4064 2004-08-17  Andrew Haley  <aph@redhat.com>
4065
4066         * verify.c (defer_merging): Quieten.
4067         * jcf-parse.c (load_class): Only try to open a class file if it's
4068         java.lang.Object or if it's part of the current compilation.
4069         Check that the class we just tried to load is the class we just
4070         loaded.  Quieten.
4071         (java_parse_file): Set flag_verify_invocations off if we're
4072         compiling from .class.
4073         (parse_zip_file_entries): Abort if we try to read a dummy class.
4074         * expr.c (can_widen_reference_to): Quieten.
4075         (build_invokevirtual): Abort if we try to invokevirtual an
4076         interface.
4077         (expand_invoke): Don't build a non-interface call to an interface.
4078         (build_instanceof): Don't do premature optimization if
4079         flag_verify_invocations is not set.
4080         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4081         from superclass.
4082         (build_static_field_ref): Add correct type conversion for
4083         field_address.
4084         (add_miranda_methods): Disable generation of Miranda methods for
4085         dummy classes.
4086         (layout_class_method): Don't complain about non-static method
4087         overrides static method with dummy classes.
4088
4089 2004-08-13  Tom Tromey  <tromey@redhat.com>
4090
4091         * class.c (build_static_field_ref): Re-enable atable lookups for
4092         static fields.
4093
4094         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4095
4096 2004-08-11  Tom Tromey  <tromey@redhat.com>
4097
4098         * gcj.texi (libgcj Runtime Properties): Document new properties.
4099
4100 2004-08-06  Andrew Haley  <aph@redhat.com>
4101
4102         * jcf-parse.c (load_class): Check that we really have loaded the
4103         class we're looking for.
4104
4105 2004-07-19  Andrew Haley  <aph@redhat.com>
4106
4107         * verify.c (verify_jvm_instructions): Comment change only.
4108
4109         * typeck.c (build_java_array_type): Add size field to array name.
4110
4111         * java-tree.h (LOCAL_SLOT_P): New.
4112         (update_aliases): Add PC argument.
4113         (pushdecl_function_level): New function.
4114
4115         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4116         MODIFY_EXPR, and SAVE_EXPR.
4117         (java_gimplify_modify_expr): New function.
4118
4119         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4120         (expand_iinc): Pass PC to update_aliases().
4121         (STORE_INTERNAL): Likewise.
4122         (process_jvm_instruction): Likewise.
4123
4124         * decl.c (base_decl_map): New variable.
4125         (uniq): New variable.
4126         (update_aliases): Rewrite with more thorough checking.
4127         (debug_variable_p): New function.
4128         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4129         (check_local_named_variable): Delete whole function.
4130         (initialize_local_variable): New function.
4131         (check_local_unnamed_variable): Add checks and comments.
4132         (find_local_variable): Rewrite.
4133         (java_replace_reference): New function.
4134         (function_binding_level): New variable.
4135         (pushdecl_function_level): New function.
4136         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4137         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4138         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4139         function_binding_level.
4140         (end_java_method): Null unused fields to save memory.
4141
4142 2004-06-29  Andrew Haley  <aph@redhat.com>
4143
4144         * except.c (expand_start_java_handler): Push a new binding level.
4145         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4146         register_exception_range() to register where we'll do it.
4147         (expand_end_java_handler): Remove old bogus code.  Replace with
4148         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4149         the top of the expression we're curently building.
4150         (maybe_end_try): Delete.
4151         * decl.c (binding_level.exception_range): New field.
4152         (clear_binding_level): Add field exception_range.  Reformat.
4153         (poplevel): Call expand_end_java_handler().
4154         (poplevel): Call java_add_stmt only if functionbody is false.
4155         (maybe_poplevels): Don't call maybe_end_try() from here.
4156         (end_java_method): Clear no longer used trees in function decl.
4157         (register_exception_range): New function.
4158         * java-tree.h (register_exception_range, struct eh_range): Declare.
4159
4160 2004-06-22  Andrew Haley  <aph@redhat.com>
4161
4162         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4163         the otable.
4164         * check-init.c (get_variable_decl): Teach check-init about
4165         FIELD_DECLs addressed via the otable.
4166         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4167         CLASS_PARSED_P.
4168
4169 2004-05-28  Andrew Haley  <aph@redhat.com>
4170
4171         * jcf-parse.c (load_class): Don't try to read a class that we've
4172         already read.
4173
4174         * expr.c (build_invokeinterface): Use the old-fashioned way of
4175         doing indirect dispatch: look up interfaces by name.
4176         * java-tree.h (enum java_tree_index): Add
4177         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4178         * decl.c (java_init_decl_processing): Add
4179         soft_lookupinterfacemethodbyname_node.
4180
4181         * gjavah.c (print_method_info): Final methods have vtable entries,
4182         so gjavah needs to output them.
4183         * class.c (layout_class_method): Generate vtable entries for final
4184         methods.
4185         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4186         dispatch, even if a method is final.
4187
4188 2004-05-25  Andrew Haley  <aph@redhat.com>
4189
4190         * class.c (build_symbol_entry): Convert the names of constructors
4191         to init_identifier_node when generating an entry for the indirect
4192         dispatch table.
4193
4194         * expr.c (build_known_method_ref): Generate indirect calls for
4195         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4196
4197 2004-05-24  Andrew Haley  <aph@redhat.com>
4198
4199         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4200         atable element is of the right type.
4201
4202         * class.c (build_static_field_ref): Cast pointer to correct type
4203         for field.
4204
4205 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4206
4207         * Merged with HEAD as of 20040514. Diff against
4208         gcj-abi-2-merge-20040514.
4209
4210 2004-04-16  Andrew Haley  <aph@redhat.com>
4211
4212         * verify.c (check_pending_block): Disable subroutine checks.
4213         (defer_merging): New function.
4214         (merge_types): If types are dummy, use defer_merging to combine them.
4215         (verify_jvm_instructions): If invocation is invokeinterface and
4216         target is dummy, assume target really is an interface.
4217
4218         * parse.y (patch_invoke): Break out call to java_create_object.
4219
4220         * lang.c (flag_verify_invocations): New.
4221
4222         * jcf-parse.c (load_class): If we've already failed to load a
4223         class, don't try again.
4224         (load_class): If we can't find a .class file, don't fail, but emit
4225         a warning.
4226         (parse_class_file): Don't act on dummy methods.
4227
4228         * java-tree.h (flag_verify_invocations): New.
4229         (TYPE_DUMMY): New.
4230         (lang_type.dummy_class): New field.
4231         (java_create_object): New function.
4232         (METHOD_DUMMY): New.
4233
4234         * expr.c (build_field_ref): Widen field offset.
4235         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4236         that each of its elements is compatible with the one we're
4237         popping.
4238         (pop_type_0): Issue a warning to say that we need to generate a
4239         runtime check.
4240         (java_create_object): New function.
4241         (build_field_ref): Only generate hard refs if we're not using
4242         indirect dispatch.
4243         (expand_java_field_op): If we're using !verify_invocations and we
4244         see a missing field, generate a decl for it.
4245
4246         (expand_invoke): If a class doesn't have the method we seek and
4247         we're using !flag_verify_invocations, generate a decl for the
4248         method now.
4249
4250         (build_known_method_ref): Always use indirect dispatch via the
4251         atable for static methods.
4252
4253         (expand_java_NEW): Break out object creation into new function,
4254         java_create_object.
4255
4256         (can_widen_reference_to): Issue a warning to say that we need to
4257         generate a runtime check.
4258
4259         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4260         (make_method_value): Also use index for interfaces.
4261         (make_class_data): Skip dummy field for inherited data.
4262         Don't build method array for dummy methods.
4263         Set size_in_byte to -1 when using inirect dispatch
4264         Don't build a hard class ref if we don't have a hard ref to our
4265         superclass, or if we're using inirect dispatch.
4266         Null out dispatch tables.
4267
4268         (layout_class_method): Don't complain about non-static method
4269         overrides static method is method is artificial.
4270
4271         (build_static_field_ref): Disable atable references to static
4272         fields for the time being.
4273
4274         (layout_class_methods): Check for CLASS_INTERFACE as
4275         well as CLASS_ABSTRACT.
4276
4277 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4278
4279         * class.c (make_class_data): Don't check flag_inline_functions.
4280         * lang.c (flag_really_inline): Remove unused flag.
4281         (java_handle_option): Don't set it here.  Remove special handling
4282         of flag_inline_functions for Java.
4283         (java_init): Don't set flag_inline_trees here.  Already done...
4284         (java_post_options): ...here.  Don't clear flag_inline_functions.
4285
4286 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4287
4288         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4289         (java_gimplify_exit_block_expr): New function.
4290         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4291         LABELED_BLOCK_EXPR.
4292         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4293         (EXIT_BLOCK_EXPR): Likewise.
4294         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4295         (LABELED_BLOCK_BODY): Likewise.
4296         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4297         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4298         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
4299         TREE_OPERAND.
4300         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4301         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4302         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
4303         second operand of EXIT_BLOCK_EXPR.
4304         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4305         TREE_OPERAND.
4306         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4307
4308 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4309
4310         * xref.h (xref_flag_value): Remove.
4311         (xref_set_data, xref_get_data): Likewise.
4312         (xref_set_current_fp): Likewise.
4313         (XREF_NONE): Likewise.
4314         (XREF_GET_DATA): Likewise.
4315         * xref.c (xref_flag_value): Remove.
4316         (xref_set_data, xref_get_data): Likewise.
4317         (xref_set_current_fp): Likewise.
4318
4319 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4320
4321         * gjavah.c (output_directory): Make static.
4322         (temp_directory): Likewise.
4323
4324 2004-11-15  Tom Tromey  <tromey@redhat.com>
4325
4326         * decl.c (instn_ptr_type_node): Removed.
4327         (lineNumbers_ptr_type_node): Removed.
4328         (jint_type): Removed.
4329         (jint_ptr_type): Removed.
4330
4331 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
4332
4333         PR java/15576
4334         * check-init.c (check_init): Ignore DECL_EXPR.
4335         * expr.c (always_initialize_class_p): Reenable.
4336         (build_class_init): Use a variable to store the decl.  Also use
4337         boolean_false_node instead of integer_zero_node.
4338         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4339         to the block.
4340
4341 2004-11-08  Tom Tromey  <tromey@redhat.com>
4342
4343         PR java/16843:
4344         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4345         generating a JNI header.
4346         (print_field_info): Handle JNI headers.
4347         (jni_print_float): Likewise.
4348         (jni_print_double): Likewise.
4349
4350 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
4351
4352         * decl.c (end_java_method): Remove duplicated code.
4353
4354 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
4355             Gerald Pfeifer  <gerald@pfeifer.com>
4356
4357         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4358         as well.
4359
4360 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
4361
4362         PR java/17265
4363         * class.c: Reinstate 2004-08-18 patch.
4364         (make_local_function_alias): Don't create an alias for extern (native)
4365         functions.
4366
4367 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4368
4369         PR java/17265
4370         * class.c (make_local_function_alias): Revert 2004-08-18 change.
4371         (make_method_value): Likewise.
4372
4373 2004-10-21  Andrew Haley  <aph@redhat.com>
4374
4375         PR java/18091:
4376         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4377
4378 2004-10-20  Andrew Haley  <aph@redhat.com>
4379
4380         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4381         Remove duplicated code block.
4382
4383 2004-10-18  Steven Bosscher  <stevenb@suse.de>
4384
4385         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4386         New rules to work around old Bison warnings.
4387
4388 2004-10-17  Steven Bosscher  <stevenb@suse.de>
4389
4390         * class.c (ident_subst): Always alloca buffer.
4391         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4392         opcode after including javaop.def.
4393         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4394         conditional expression that exits, to avoid warnings.
4395         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4396         a user of an extension.
4397         * win32-host.c: Move check down to have non-empty file when
4398         WIN32 is not defined.
4399
4400         * Make-lang.in (java-warn): Add STRICT_WARN.
4401         (java/jcf-io.o-warn): Don't have Werror for this file.
4402         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4403
4404 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
4405
4406         * expr.c (expr_add_location): Move declaration to before all
4407         statements.
4408         * parse.y (java_expand_classes): Ditto.
4409         * lex.c (java_peek_unicode): Ditto.
4410
4411 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4412
4413         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4414         if possible, else convert `foo' to 'foo'.
4415         * class.c: Likewise.
4416         * decl.c: Likewise.
4417         * expr.c: Likewise.
4418         * jcf-io.c: Likewise.
4419         * jcf-parse.c: Likewise.
4420         * lang.c: Likewise.
4421         * lex.c: Likewise.
4422         * parse.h: Likewise.
4423
4424 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4425
4426         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4427         rename parameter 'msg' to 'msgid' in function declaration.
4428         (issue_warning_error_from_context): Likewise.
4429         (yyerror): Rename parameter 'msg' to 'msgid'.
4430         (all over): Use new quoting style for diagnostics.
4431
4432 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
4433
4434         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4435         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4436         Update copyright.
4437
4438 2004-10-14  Matt Austern  <austern@apple.com>
4439
4440         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4441         pointer_set_t* now.
4442
4443 2004-10-13  Tom Tromey  <tromey@redhat.com>
4444
4445         PR java/15578:
4446         * lang.opt (--extdirs): Document.
4447         * jvspec.c (lang_specific_driver): Recognize -encoding and
4448         -extdirs.
4449
4450 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
4451
4452         * parse.y (issue_warning_error_from_context): Use va_list *
4453         instead of va_list parameter.
4454         (parse_error_context): Update call.
4455         (parse_warning_context): Likewise.
4456
4457 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
4458
4459         * parse.y, parse-scan.y: Add list of diagnostic messages to
4460         insulate translation template from version of yacc/bison used
4461         to compile the grammar.
4462
4463 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
4464
4465         Prepare for %q, %< and %> in diagnostic message strings.
4466         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4467         Name second parameter 'msgid'.
4468         * parse.y: Additionally include pretty-print.h and diagnostic.h.
4469         (issue_warning_error_from_context): Use pretty-printer functions
4470         instead of vsprintf for constructing formatted messages. Rename
4471         parameter 'msg' to 'msgid'.
4472         (parse_error_context): Rename parameter 'msg' to 'msgid'.
4473         (parse_warning_context): Likewise.
4474
4475 2004-10-05  Andrew Haley  <aph@redhat.com>
4476
4477         PR java/17779
4478         * jcf-parse.c (parse_zip_file_entries): If a class has a
4479         superclass and a TYPE_SIZE of zero, lay it out.
4480
4481 2004-09-30  Andrew Haley  <aph@redhat.com>
4482
4483         PR java/17733
4484         * jcf-parse.c (compute_class_name): Rewrite.
4485
4486 2004-10-01  Jan Hubicka  <jh@suse.cz>
4487
4488         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4489
4490 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4491
4492         * lex.c: Fix a comment typo.
4493
4494 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4495
4496         * java-tree.h: Fix a comment typo.
4497
4498 2004-09-30  Per Bothner  <per@bothner.com>
4499
4500         Simplify lexer.  Implement --enable-mapped-location support.
4501         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
4502         (parse_source_file_1): Pass filename as extra parameter, so we can call
4503         linemap_add and set input_location here, rather than in both callers.
4504         (read_class): Pass copied filename to parse_source_file_1.
4505         Don't initialize wfl_operator - only needed for source compilation.
4506         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
4507         * lex.h:  Remove a bunch of debugging macros.
4508         * lex.h (struct_java_line, struct java_error):  Remove types.
4509         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
4510         (struct java_lc_s):  Remove prev_col field.
4511         (struct java_lexer):  New fields next_unicode, next_columns, and
4512         avail_unicode.  New position field, and maybe token_start field.
4513         Don't need hit_eof field - use next_unicode == -1 instead.
4514         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
4515         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
4516         * parse.h:  Various changes for USE_MAPPED_LOCATION.
4517         (EXPR_WFL_EMIT_LINE_NOTE): XXX
4518         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
4519         (struct parser_ctxt):  New file_start_location field.
4520         Remove p_line, c_line fields since we no longer save lines.
4521         Remove elc, lineno, and current_jcf fields - no longer used.
4522         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
4523         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
4524         source_location and is probably not needed anymore anyway.
4525         Use new expr_add_Location function.
4526         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
4527         (java_pop_parser_context):  Minor cleanup.
4528         (java_parser_context_save_global, java_parser_context_restore_global,
4529         java_pop_parser_context):  Save/restore input_location as a unit.
4530         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
4531         a source_location instead of a wfl context node.
4532         (check_class_interface_creation):  input_filename is not addressable.
4533         (create_artificial_method):  Calling java_parser_context_save_global
4534         and java_parser_context_restore_global is overkill.  Instead,
4535         temporarily set input_location from class decl.
4536         (java_layout_seen_class_methods): Set input_location from method decl.
4537         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
4538         (finish_loop_body):  Likewise.
4539         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
4540         (java_sprint_unicode):  Take a character, not index in line.
4541         (java_sneak_uncode):  Replaced by java_peek_unicode.
4542         (java_unget_unicode):  No longer used.
4543         (java_allocate_new_line. java_store_unicode):  Removed, since we
4544         no longer remember "lines".
4545         (java_new_lexer):  Update for new data structures.
4546         (java_read_char):  Move unget_value checking to java_read_unicode.
4547         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
4548         efficient functions that are used directly when lexing.
4549         (java_read_unicode_collapsing_terminators):  No longer needed.
4550         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
4551         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
4552         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
4553         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
4554         combine switch branches, and test for common token kinds earlier.
4555         (java_lex_error):  Rewrite.
4556         * jv-scan.c (expand_location): New function, copied from tree.c.
4557         (main): Set ctxp->filename instead of setting input_filename directly.
4558
4559 2004-09-30  Per Bothner  <per@bothner.com>
4560
4561         More cleanup for --enable-mapped-location.
4562         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
4563         input_location here.  Instead do it in give_name_to_class.
4564         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
4565         * expr.c (expand_byte_code): Call linemap_line_start.
4566         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
4567         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
4568         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
4569         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
4570         to USE_MAPPED_LOCATION case.
4571
4572         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
4573         * jcf-parse.c (java_parse_file): Don't set input_filename.
4574         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
4575         Create a list of TRANSLATION_UNIT_DECL.
4576         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
4577         reason is so we can set a DECL_SOURCE_LOCATION for each file.
4578         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
4579         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
4580         (file_start_location):  New static.
4581         (set_source_filename):  Avoid extra access to input_filename macro.
4582         Concatenate new name with class's package prefix.
4583         (set_source_filename, give_name_to_class): Update.
4584         (give_name_to_class):  Set class's "line 0" input_location here.
4585         (parse_class_file):  Set input_location as a unit.
4586
4587         * jcf-parse.c (load_class): Sanity test if missing inner class file.
4588
4589 2004-09-29  Per Bothner  <per@bothner.com>
4590
4591         * java-tree.h:  Redefine some macros and add some declaration
4592         to handle the USE_MAPPED_LOCATION case.
4593         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
4594         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
4595         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
4596         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
4597
4598         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
4599         * decl.c (finish_method, java_add_stmt): Likewise.
4600         * java-gimplify.c (java-gimplify.c):  Likewise.
4601         * jcf-write.c (generate_bytecode_insns):  Likewise.
4602         * lang.c (java_post_options): Likewise - call linemap_add.
4603
4604 2004-09-29  Andrew Haley  <aph@redhat.com>
4605
4606         PR java/17007
4607         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
4608         result of TRUNC_MOD_EXPR.
4609         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
4610         * decl.c (java_init_decl_processing): Mark
4611         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
4612
4613 2004-09-28  Tom Tromey  <tromey@redhat.com>
4614
4615         PR java/15710:
4616         * class.c (add_miranda_methods): Load superinterface if not
4617         already loaded.
4618
4619 2004-09-28  Andrew Haley  <aph@redhat.com>
4620
4621         PR java/17586
4622         * jcf-parse.c (load_class): Don't try to read a class that we've
4623         already read.
4624
4625 2004-09-28  Andrew Haley  <aph@redhat.com>
4626
4627         * jcf-parse.c (load_class): Back out previous broken patch.
4628
4629 2004-09-28  Andrew Haley  <aph@redhat.com>
4630
4631         PR java/17586
4632         * jcf-parse.c (load_class): Don't try to read a class that we've
4633         already read.
4634         Check that we really did read the right class.
4635
4636 2004-09-25  Tom Tromey  <tromey@redhat.com>
4637
4638         PR java/17500:
4639         * parse.y (create_artificial_method): Use add_method_1.
4640
4641 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
4642
4643         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
4644         comment typos.
4645         * gcj.texi: Fix typos.
4646
4647 2004-09-24  Tom Tromey  <tromey@redhat.com>
4648
4649         PR java/15656:
4650         * parse.y (class_instance_creation_expression): Set `$$' to NULL
4651         in error parts of rule.
4652         (unary_expression): Don't call error_if_numeric_overflow when $1
4653         is NULL.
4654
4655 2004-09-24  Tom Tromey  <tromey@redhat.com>
4656
4657         PR java/16789:
4658         * parse.y (resolve_qualified_expression_name): Set
4659         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
4660         * expr.c (force_evaluation_order): Check for empty argument list
4661         after stripping COMPOUND_EXPR.
4662
4663 2004-09-23  Andrew Haley  <aph@redhat.com>
4664
4665         PR java/16927:
4666         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
4667         COND_EXPRs.
4668
4669 2004-09-23  Tom Tromey  <tromey@redhat.com>
4670
4671         PR java/17329:
4672         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
4673         where operand is null.
4674
4675 2004-09-23  Tom Tromey  <tromey@redhat.com>
4676
4677         PR java/17380:
4678         * parse.y (not_accessible_p): Allow access to protected members
4679         even when class is not static.
4680
4681 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
4682
4683         * Make-lang.in: Revert the gcc-none.o change.
4684
4685 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
4686
4687         * parse.y (patch_anonymous_class): VEC_space returns true if there
4688         is space.
4689
4690 2004-09-21  Matt Austern  <austern@apple.com>
4691
4692         Fix bootstrap.
4693         * gjavah.c (free_method_name_list): Fix function definition so
4694         it's a proper C prototype.
4695
4696 2004-09-21  Tom Tromey  <tromey@redhat.com>
4697
4698         PR java/17575:
4699         * gjavah.c (free_method_name_list): New method.
4700         (main): Call it.
4701
4702 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
4703             Zack Weinberg  <zack@codesourcery.com>
4704
4705         * java-tree.def: Use tree_code_class enumeration constants
4706         instead of code letters.
4707         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
4708         new tree-class enumeration constants.
4709
4710 2004-09-13  Tom Tromey  <tromey@redhat.com>
4711
4712         PR java/17216:
4713         * class.c (layout_class_method): Put synthetic methods into the
4714         vtable.
4715
4716 2004-09-11  Andrew Pinski  <apinski@apple.com>
4717
4718         * Make-lang.in (java/ggc-none.c): Change dependency
4719         for ggc.h into $(GGC_H).
4720
4721 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4722
4723         * Make-lang.in (java/win32-host.o): Add dependency on
4724         coretypes.h.
4725         * win32-host.c: Add includes for coretypes.h, jcf.h
4726
4727 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
4728
4729         * Make-lang.in (GCJH_OBJS): Change dependency from
4730         ggc-none.o to java/ggc-none.o
4731         (JCFDUMP_OBJS): Likewise.
4732         (java/ggc-none.o): New target.
4733
4734 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
4735
4736         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
4737         * class.c (build_utf8_ref, build_static_field_ref,
4738         make_field_value, make_method_value, get_dispatch_table,
4739         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4740         * constants.c (get_tag_node, build_ref_from_constant_pool,
4741         build_constants_constructor): Likewise.
4742         * decl.c (java_init_decl_processing): Likewise.
4743         * expr.c (build_java_array_length_access, build_newarray,
4744         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4745         build_java_binop, build_field_ref, expand_java_add_case,
4746         expand_java_call, build_known_method_ref, build_invokevirtual,
4747         build_invokeinterface, build_jni_stub): Likewise.
4748         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4749         * jcf-parse.c (get_constant): Likewise.
4750         * lex.c (do_java_lex): Likewise.
4751         * parse.y (patch_binop, patch_unaryop, patch_cast,
4752         build_newarray_node, patch_newarray): Likewise.
4753         * resource.c (compile_resource_data): Likewise.
4754         * typeck.c (build_prim_array_type): Likewise.
4755
4756 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
4757
4758         * decl.c (java_init_decl_processing): Adjust
4759         initialize_sizetypes call.
4760
4761 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
4762
4763         * jv-scan.c (fancy_abort): Add.
4764
4765 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
4766
4767         * expr.c (build_java_arrayaccess): Use convert to change
4768         len's type.
4769
4770 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
4771
4772         * class.c (make_local_function_alias): Allocate extra space for 'L'
4773         in name buffer. Reported by Thomas Neumann.
4774
4775 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
4776
4777         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
4778         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
4779         * lex.c (do_java_lex): Adjust.
4780         (error_if_numeric_overflow): Likewise.
4781
4782 2004-08-18  Andrew Pinski  <apinski@apple.com>
4783
4784         * class.c (make_local_function_alias): Only make a new decl if we
4785         support alias attribute on all decls.
4786
4787 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
4788
4789         * class.c (make_local_function_alias): New function. Create local
4790         alias for public method DECL.
4791         (make_method_value): Use make_local_function_alias.
4792         * parse.y (craft_constructor): Don't special-case anonymous classes.
4793         Always set ctor_name to init_identifier_node.
4794         (lookup_method_invoke): Call layout_class_method when creating
4795         anonymous class constructor.
4796
4797 2004-08-18  Richard Henderson  <rth@redhat.com>
4798
4799         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
4800         default case.  Treat '<' similarly.  Update for
4801         is_gimple_formal_tmp_var name change.
4802
4803 2004-08-17  Andrew Haley  <aph@redhat.com>
4804
4805         * lang.c (lang_printable_name): Obey verbose flag.
4806         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
4807         lang_printable_name().
4808         (verify_constructor_circularity, get_printable_method_name,
4809         check_abstract_method_definitions, java_check_regular_methods,
4810         java_check_abstract_methods, check_inner_class_access,
4811         fix_constructors, patch_method_invocation, patch_return):
4812         Likewise.
4813         * expr.c (pop_type_0): Likewise.
4814
4815         * java-tree.h (lang_printable_name_wls): Delete.
4816
4817 2004-08-16  Tom Tromey  <tromey@redhat.com>
4818
4819         PR java/8473:
4820         * parse.y (primary): Changed for initialized and uninitialized
4821         array creations.
4822         (array_access): Handle array_creation_initialized.
4823         (array_creation_expression): Split into
4824         array_creation_initialized and array_creation_uninitialized.
4825
4826 2004-08-16  Andrew Haley  <aph@redhat.com>
4827
4828         * jcf-write.c (find_constant_index): Canonicalize NaNs when
4829         generating bytecode.
4830
4831 2004-08-16  Elliot Lee <sopwith@redhat.com>
4832
4833         PR java/9677
4834         * jcf-parse.c (java_parse_file): Handle filenames with embedded
4835         spaces, and quoted filelists.
4836
4837 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
4838
4839         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
4840         * class.c (build_utf8_ref, build_static_field_ref,
4841         make_field_value, make_method_value, get_dispatch_table,
4842         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
4843         * constants.c (get_tag_node,  build_ref_from_constant_pool,
4844         build_constants_constructor): Likewise.
4845         * decl.c (java_init_decl_processing): Likewise.
4846         * expr.c (build_java_array_length_access, build_newarray,
4847         expand_java_multianewarray, expand_java_pushc, expand_iinc,
4848         build_java_binop, build_field_ref, expand_java_add_case,
4849         expand_java_call, build_known_method_ref, build_invokevirtual,
4850         build_invokeinterface, build_jni_stub): Likewise.
4851         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
4852         * jcf-parse.c (get_constant): Likewise.
4853         * lex.c (do_java_lex): Likewise.
4854         * parse.y (patch_binop, patch_unaryop, patch_cast,
4855         build_null_of_type, patch_newarray): Likewise.
4856         * resource.c (compile_resource_data): Likewise.
4857         * typeck.c (build_prim_array_type): Likewise.
4858
4859 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
4860
4861         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
4862         Don't create BLOCK here or call java_gimplify_block.
4863
4864 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4865
4866         * java-tree.h (flag_deprecated): Removed.
4867         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
4868         * parse.y (check_deprecation): Check warn_deprecated instead of
4869         flag_deprecated.
4870
4871 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
4872
4873         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
4874         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
4875         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
4876         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
4877         flag_force_classes_archive_check, flag_optimize_sci,
4878         flag_indirect_dispatch): Remove explicit declarations.
4879         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
4880         final comment.
4881
4882 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
4883
4884         PR bootstrap/14893
4885         * Make-lang.in (java.install-man): Install from either build
4886         tree or source tree, whichever has the file first.
4887
4888 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
4889
4890         * jcf-parse.c (get_constant): Adjust force_fit_type call.
4891         * lex.h (SET_LVAL_NODE_TYPE): Remove.
4892         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
4893         (do_java_lex): Likewise. Adjust force_fit_type call.
4894
4895 2004-08-04  Roger Sayle  <roger@eyesopen.com>
4896             Andrew Haley  <aph@redhat.com>
4897
4898         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
4899         checking trees as they're being built.
4900         (convert): Call convert_ieee_real_to_integer if we're
4901         converting a constant, even if we're writing a class file.
4902
4903 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
4904
4905         PR java/16701
4906         * parse.y (fold_constant_for_init): Call resolve_field_access with
4907         correct current_class context.
4908
4909 2004-08-01  Roger Sayle  <roger@eyesopen.com>
4910
4911         * decl.c (update_aliases, initialize_local_variable): Replace calls
4912         to build with calls to buildN.
4913         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
4914         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
4915         * parse.h (BUILD_THROW): Likewise.
4916         * parse.y (switch_expression, synchronized_statement,
4917         catch_clause_parameter, array_creation_expression,
4918         conditional_expression, make_qualified_name,
4919         resolve_qualified_expression_name, patch_method_invocation,
4920         patch_invoke, build_method_invocation, build_new_invocation,
4921         build_assignment, patch_assignment, build_binop, patch_binop,
4922         build_string_concatenation, build_incdec, patch_unaryop,
4923         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
4924         patch_return, build_if_else_statement, build_labeled_block,
4925         build_new_loop, build_loop_body, build_bc_statement,
4926         build_assertion, encapsulate_with_try_catch, build_try_statement,
4927         build_try_finally_statement, patch_synchronized_statement,
4928         emit_test_initialization): Likewise, replace build with buildN.
4929
4930 2004-07-28  Eric Christopher  <echristo@redhat.com>
4931
4932         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4933         (java_unsafe_for_reeval): Ditto.
4934
4935 2004-07-26    <hp@bitrange.com>
4936
4937         * parse.y (build_super_invocation): Adjust declaration order to
4938         avoid declaration after statement.
4939
4940 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
4941
4942         * decl.c: Rename all identifiers named `class' to `cl'.
4943
4944 2004-07-25  Richard Henderson  <rth@redhat.com>
4945
4946         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
4947
4948 2004-07-23  Mike Stump  <mrs@apple.com>
4949
4950         * boehm.c (set_bit): Improve type safety wrt unsignedness.
4951         * gjavah.c (throwable_p, decode_signature_piece,
4952         print_full_cxx_name, print_include, add_namelet, add_class_decl,
4953         process_file): Likewise.
4954         * jcf-dump.c (main): Likewise.
4955         * jcf-io.c (read_zip_member): Likewise.
4956         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
4957         give_name_to_class, get_class_constant): Likewise.
4958         * jcf-write.c (find_constant_wide, push_long_const,
4959         generate_classfile): Likewise.
4960         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
4961         * parse.y (read_import_dir): Likewise.
4962         * typeck.c (parse_signature_type): Likewise.
4963         * verify.c (verify_jvm_instructions): Likewise.
4964         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
4965
4966 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
4967
4968         * Make-lang.in: Replace rmic and rmiregistry references with
4969         grmic and grmiregistry.
4970         * gcj.texi: Likewise.
4971
4972 2004-07-20  Andrew Haley  <aph@redhat.com>
4973
4974         PR java/16431.
4975         * verify.c (verify_jvm_instructions): Comment change only.
4976
4977         * typeck.c (build_java_array_type): Add size field to array name.
4978
4979         * java-tree.h (LOCAL_SLOT_P): New.
4980         (update_aliases): Add PC argument.
4981         (pushdecl_function_level): New function.
4982
4983         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4984         MODIFY_EXPR, and SAVE_EXPR.
4985         (java_gimplify_modify_expr): New function.
4986
4987         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4988         (expand_iinc): Pass PC to update_aliases().
4989         (STORE_INTERNAL): Likewise.
4990         (process_jvm_instruction): Likewise.
4991
4992         * decl.c (base_decl_map): New variable.
4993         (uniq): New variable.
4994         (update_aliases): Rewrite with more thorough checking.
4995         (debug_variable_p): New function.
4996         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4997         (check_local_named_variable): Delete whole function.
4998         (initialize_local_variable): New function.
4999         (check_local_unnamed_variable): Add checks and comments.
5000         (find_local_variable): Rewrite.
5001         (java_replace_reference): New function.
5002         (function_binding_level): New variable.
5003         (pushdecl_function_level): New function.
5004         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5005         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5006         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5007         function_binding_level.
5008         (end_java_method): Null unused fields to save memory.
5009
5010 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5011
5012         * class.c (add_interface_do): Remove.
5013         (set_super_info, interface_of_p, maybe_add_interface,
5014         add_interface, make_class_data, layout_class,
5015         add_miranda_methods): Adjust BINFO accessors and addition.
5016         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5017         accessors.
5018         * jcf-write.c (generate_classfile): Likewise.
5019         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5020         check_circular_reference, java_complete_class,
5021         check_abstract_method_definitions,
5022         java_check_abstract_method_definitions,
5023         check_interface_throws_clauses, java_check_abstract_methods,
5024         lookup_java_interface_method2,
5025         find_applicable_accessible_methods_list): Adjust BINFO accessors
5026         and addition.
5027         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5028
5029 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5030
5031         * builtins.c (max_builtin, min_builtin,
5032         java_build_function_call_expr): Replace calls to build with buildN.
5033         * class.c (build_class_ref, build_static_field_ref,
5034         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5035         * constants.c (build_ref_from_constant_pool): Likewise.
5036         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5037         add_stmt_to_compound): Likewise.
5038         * except.c (build_exception_object_ref, expand_end_java_handler):
5039         Likewise.
5040         * java-gimplify.c (java_gimplify_case_expr,
5041         java_gimplify_default_expr, java_gimplify_block,
5042         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5043         * jcf-write.c (generate_bytecode_insns): Likewise.
5044         * typeck.c (convert_ieee_real_to_integer): Likewise.
5045
5046 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5047
5048         * java-tree.h (builtin_function): Declare.
5049
5050 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5051
5052         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5053         abuse restore_line_number_status.
5054
5055 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5056
5057         g++/15861
5058         * jcf-parse.c (java_emit_static_constructor): Specify default
5059         priority.
5060
5061 2004-07-13  Per Bothner  <per@bothner.com>
5062
5063         * java-tree.h (all_class_filename):  Remove useless macro.
5064         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5065         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5066         * parse.y (java_parser_context_restore_global):  Replace
5067         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5068         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5069
5070 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5071
5072         PR java/16474
5073         gjavah.c (print_field_info): Emit constant only if field is static.
5074
5075 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5076
5077         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5078         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5079         build_java_ret, build_java_throw_out_of_bounds_exception,
5080         build_java_array_length_access, java_check_reference,
5081         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5082         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5083         expand_java_arrayload, build_java_monitor, expand_java_return,
5084         expand_load_internal, expand_java_NEW, build_get_class,
5085         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5086         build_java_soft_divmod, build_java_binop, build_field_ref,
5087         expand_compare, expand_java_goto, expand_java_switch,
5088         expand_java_add_case, build_class_init, build_known_method_ref,
5089         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5090         expand_invoke, build_jni_stub, expand_java_field_op,
5091         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5092         force_evaluation_order, emit_init_test_initialization): Convert
5093         calls to "build" into calls to the prefered "buildN" functions.
5094
5095 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5096
5097         * java-tree.h (set_block): Remove.
5098         * lang.c (java_clear_binding_stack): New.
5099         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5100         * decl.c (struct binding_level): Remove this_block.
5101         (clear_binding_level): Likewise.
5102         (poplevel): Don't handle this_block.
5103         (set_block): Remove.
5104
5105 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5106
5107         * class.c (common_enclosing_context_p): Remove statement with no
5108         side-effects.
5109
5110 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5111
5112         PR java/8618
5113         * parse.y (create_anonymous_class): Remove 'location' argument. Use
5114         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5115         (craft_constructor): Inherit access flags for implicit constructor
5116         from the enclosing class.
5117         (create_class): Fix comment typo.
5118         (resolve_qualified_expression_name): Pass type of qualifier to
5119         not_accessible_p, not the type in which target field was found.
5120         (not_accessible_p): Handle inner classes. Expand protected
5121         qualifier-subtype check to enclosing instances, but don't apply this
5122         check to static members. Allow protected access to inner classes
5123         of a subtype. Allow private access within common enclosing context.
5124         (build_super_invocation): Get WFL line number info from current
5125         class decl.
5126         (build_incomplete_class_ref): Update for new create_anonymous_class
5127         signature.
5128         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5129         common_enclosing_instance_p.
5130         * class.c (common_enclosing_context_p): New. Determine if types
5131         share a common enclosing context, even across static contexts.
5132         (common_enclosing_instance_p): Renamed from
5133         common_enclosing_context_p. Determines if types share a common
5134         non-static enclosing instance.
5135         * java-tree.h (common_enclosing_instance_p): Declare.
5136         * jcf-write.c (get_method_access_flags): New. Surpress private flag
5137         for inner class constructors.
5138         (generate_classfile): Use get_method_access_flags.
5139
5140 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5141
5142         * class.c (interface_of_p): Check for null TYPE_BINFO.
5143
5144 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
5145
5146         * class.c (make_class): Do not create binfo here.
5147         (set_super_info): Create it here.
5148         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5149
5150 2004-07-08  Richard Henderson  <rth@redhat.com>
5151
5152         * expr.c (case_identity, get_primitive_array_vtable,
5153         java_expand_expr, emit_init_test_initialization): Remove.
5154         * java-tree.h (java_expand_expr): Remove.
5155         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5156
5157 2004-07-07  Per Bothner  <per@bothner.com>
5158
5159         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
5160         get internal error due to mismatched types.
5161
5162         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
5163
5164         * gcj.texi (Linking):   New node.  Document -lgij usage.
5165
5166 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5167
5168         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5169         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5170         * java/class.c (set_super_info, class_depth, interface_of_p,
5171         maybe_add_interface, add_interface, make_class_data,
5172         layout_class, add_miranda_methods): Adjust BINFO macros.
5173         * expr.c (can_widen_reference_to, lookup_field): Likewise.
5174         * jcf-write.c (generate_classfile): Likewise.
5175         * parse.y (patch_anonymous_class,
5176         check_inner_circular_reference, check_circular_reference,
5177         java_complete_class, check_abstract_method_definitions,
5178         java_check_abstract_method_definitions,
5179         check_interface_throws_clauses, java_check_abstract_methods,
5180         lookup_java_interface_method2,
5181         find_applicable_accessible_methods_list): Likewise.
5182         * typeck.c (find_method_in_interface): Likewise.
5183         * verify.c (merge_types): Likewise.
5184
5185 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5186
5187         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5188         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5189
5190 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5191
5192         * class.c (make_class): Use make_tree_binfo.
5193         (set_super_info, add_interface_do): Likewise.
5194         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5195
5196 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5197
5198         * verify.c: Correct array element access formatting thinko.
5199
5200 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5201
5202         * verify.c: Insert a short blurb at the start referring to the JVMS.
5203         (merge_type_state): Remove redundant nested if statement.
5204         (verify_jvm_instructions): Ensure current_subr is initialised to
5205         NULL_TREE.
5206         Minor formatting fixes all over the place.
5207
5208 2004-07-02  Richard Henderson  <rth@redhat.com>
5209
5210         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5211
5212 2004-07-01  Richard Henderson  <rth@redhat.com>
5213
5214         * class.c (registerClass_libfunc): Remove.
5215         (init_class_processing): Don't set it.
5216         (emit_register_classes): Take list_p parameter.  Fill it in
5217         with _Jv_RegisterClass calls.
5218         * decl.c (java_init_decl_processing): Don't call
5219         init_resource_processing.
5220         * jcf-parse.c (java_emit_static_constructor): New.
5221         (java_parse_file): Call it.
5222         * resource.c (registerResource_libfunc): Remove.
5223         (init_resource_processing): Remove.
5224         (write_resource_constructor): Take list_p parameter.  Fill it in
5225         with _Jv_RegisterResource calls.
5226         * java-tree.h: Update prototypes.
5227
5228 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
5229
5230         PR java/1262
5231         * class.c (layout_class_method): Do not override package-private
5232         method if its in a different package.
5233         (split_qualified_name): Move here from parse.y. Rename from
5234         breakdown_qualified. Add comment.
5235         (in_same_package): Move here from parse.y. Add comment.
5236         * java-tree.h (break_down_qualified, in_same_package): Declare.
5237         (in_same_package): Likewise.
5238         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5239         Callers updated.
5240
5241 2004-06-29  Andrew Haley  <aph@redhat.com>
5242
5243         * except.c (expand_start_java_handler): Push a new binding level.
5244         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5245         register_exception_range() to register where we'll do it.
5246         (expand_end_java_handler): Remove old bogus code.  Replace with
5247         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5248         the top of the expression we're curently building.
5249         (maybe_end_try): Delete.
5250         * decl.c (binding_level.exception_range): New field.
5251         (clear_binding_level): Add field exception_range.  Reformat.
5252         (poplevel): Call expand_end_java_handler().
5253         (poplevel): Call java_add_stmt only if functionbody is false.
5254         (maybe_poplevels): Don't call maybe_end_try() from here.
5255         (end_java_method): Clear no longer used trees in function decl.
5256         (register_exception_range): New function.
5257         * java-tree.h (register_exception_range, struct eh_range): Declare.
5258
5259 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
5260
5261         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5262
5263 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
5264
5265         Formatting fixes.
5266         * expr.c (class_has_finalize_method): Fix method name indentation.
5267         (expand_java_call): Remove K&R style parameter declaration.
5268         (expand_invoke): Fix statement indentation.
5269         (expand_java_field_op): Likewise.
5270         * parse-scan.y: Fix typo.
5271         (reset_report): Fix method name indentation.
5272         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5273         line. Fix typos.
5274         * verify.c (verify_jvm_instructions): Document parameters, insert
5275         page break.
5276         * lang.c (lang_init_source): Fix method name indentation.
5277         * class.c (common_enclosing_context_p): Likewise.
5278         (emit_symbol_table): Fix parameter list indentation.
5279         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5280         parameter declaration.
5281         * constants.c: Fix copyright notice indentation.
5282         * typeck.c (find_method_in_superclasses): Fix parameter list
5283         indentation.
5284         (find_method_in_interfaces): Likewise.
5285         * zextract.c (makelong): Fix method name indentation.
5286
5287 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5288
5289         PR java/15715.
5290         * parse.y (create_interface): Set correct access modifiers for
5291         interfaces.
5292         * jcf-write.c (get_classfile_modifiers): New function.
5293         (generate_classfile): Use get_classfile_modifiers, not
5294         get_access_flags.
5295
5296 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5297
5298         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5299         dependency to current parser context, not NULL_TREE, for top-level
5300         classes.
5301         (jdep_resolve_class): Enable member access check for all inner
5302         class dependencies.
5303
5304 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5305
5306         * parse.y (qualify_and_find): Pass type decl, not identifier, to
5307         load_class.
5308
5309 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5310
5311         PR java/15734
5312         * expr.c (expand_java_field_op): Ensure that target class for static
5313         field access has been loaded.
5314
5315 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5316             Ranjit Mathew  <rmathew@hotmail.com>
5317
5318         PR java/1207, java/16178
5319         * jcf-parse.c (load_class): Return immediately if passed a type decl
5320         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5321         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5322         before calling load_class.
5323         (qualify_and_find): Likewise.
5324         (find_in_imports_on_demand): Likewise.
5325         (find_applicable_accessible_methods_list): Likewise.
5326
5327 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
5328
5329         * parse.y (java_layout_seen_class_methods): Don't call load_class
5330         on class defined by source parser.
5331
5332 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
5333
5334         * parse.y (set_nested_class_simple_name_value): Removed.
5335         (java_complete_expand_class): Remove calls to
5336         set_nested_class_simple_name_value.
5337
5338 2004-06-22  Andrew Haley  <aph@redhat.com>
5339             Ranjit Mathew  <rmathew@hotmail.com>
5340
5341         Fixes PR java/16113.
5342         * decl.c (force_poplevels): Remove call to expand_end_bindings.
5343
5344 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
5345
5346         * parse.y (create_class): Correct diagnostic message about
5347         java.lang.Object extending anything else.
5348
5349 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5350
5351         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5352         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5353         * constants.c (build_ref_from_constant_pool): Likewise.
5354         * expr.c (build_java_array_length_access): Likewise.
5355         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5356         (invoke_build_dtable, build_invokevirtual): Likewise.
5357         (build_invokeinterface, java_expand_expr): Likewise.
5358         (emit_init_test_initialization): Likewise.
5359         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5360         * parse.y (make_qualifed_name, build_array_ref): Likewise.
5361
5362 2004-06-21  Andrew Haley  <aph@redhat.com>
5363
5364         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5365         block.
5366
5367 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
5368
5369         * jcf.h (struct JCF): Change java_source, right_zip and finished
5370         to unsigned int.
5371         * lex.h (struct java_lexer): Change hit_eof, read_anything,
5372         byte_swap and use_fallback to unsigned int.
5373         * parse.h (struct _jdep): Change flag0 to unsigned int.
5374
5375 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
5376
5377         Fixes PR java/13948
5378         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5379         before trying to lay out its methods.
5380         * jcf-parse.c (read_class): Track parsed files using canonical paths
5381         obtained via lrealpath from libiberty.
5382         (java_parse_file): Likewise.
5383         (parse_source_file_1): Rename formal parameter to reflect its
5384         modified purpose. Minor formatting fix.
5385
5386 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5387
5388         * class.c (emit_register_classes): Make the function uninlinable,
5389         do not set current_function_cannot_inline.
5390         * resource.c (write_resource_constructor): Do not reset
5391         flag_inline_functions around rest_of_compilation.
5392
5393 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
5394
5395         PR java/15769
5396         * expr.c (java_truthvalue_conversion): Handle
5397         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5398         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5399         i.e. return the expression.
5400
5401 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
5402
5403         * gjavah.c: Include version.h
5404
5405 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
5406
5407         * jcf-write.c (generate_bytecode_conditional): Correct handling
5408         of unordered conditionals. Add comment.
5409
5410 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
5411             Per Bothner  <per@bothner.com>
5412
5413         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5414         local variable was initialised upon declaration.
5415         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5416         variable was final and initialised upon declaration.
5417         * check-init.c (check_final_reassigned): Give error only if a blank
5418         final is not definitely unassigned or if an initialised final is
5419         reassigned.
5420         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5421         assignment expressions. Remove case MODIFY_EXPR, label do_default.
5422         (check_init): Perform initialised-variable-removing-optimisation
5423         only on non-final local variables.
5424
5425 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5426
5427         * jcf-write.c (generate_bytecode_conditional): Handle binops
5428         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5429         and LTGT_EXPR.
5430         (generate_bytecode_insns): Likewise.
5431
5432 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5433
5434         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5435         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5436
5437 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5438
5439         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5440         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5441
5442 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5443
5444         * decl.c (struct binding_level): Add GTY marker. Compile
5445         binding_depth unconditionally.
5446         (current_binding_level, free_binding_level, global_binding_level):
5447         Likewise.
5448         (clear_binding_level): Unconditionally set binding_depth.
5449         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5450
5451 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5452
5453         * lex.c (java_new_lexer): Set 'encoding'.
5454         (java_read_char): Improve error message for unrecognized characters.
5455         * lex.h (struct java_lexer): New field 'encoding'.
5456
5457 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5458
5459         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5460
5461 2004-05-21  Mark Wielaard  <mark@klomp.org>
5462
5463         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5464         extern.
5465
5466 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
5467
5468         * typeck.c: Remove non-printable character 160.
5469
5470 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
5471
5472         * check-init.c: Correct minor typos.
5473
5474 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5475
5476         * Make-lang.in, expr.c, java-gimplify.c: Rename
5477         tree-simple.[ch] to tree-gimple.[ch].
5478
5479 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
5480
5481         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5482
5483 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5484
5485         Merge from tree-ssa-20020619-branch.  See
5486         ChangeLog.tree-ssa for details.
5487
5488         * Make-lang.in, builtins.c, check-init.c, class.c,
5489         constants.c, decl.c, except.c, expr.c, java-except.h,
5490         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5491         lang.c, lang.opt, parse.y, resource.c: Merged.
5492         * java-gimplify.c: New file.
5493
5494 2004-05-10  Andrew Haley  <aph@redhat.com>
5495
5496         * parse.y (create_class): Set TYPE_VFIELD.
5497         * decl.c (java_init_decl_processing): Likewise.
5498
5499         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
5500         * class.c (make_method_value): Replace DECL_VINDEX with call to
5501         get_method_index().
5502         (get_dispatch_vector): Likewise.
5503         (layout_class_method): Likewise.
5504         Replace set of DECL_VINDEX with call to set_method_index().
5505         (set_method_index): New function.
5506         (get_method_index): New function.
5507         * java-tree.h (set_method_index): New function decl.
5508         (get_method_index): New function decl.
5509
5510 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
5511
5512         * parse.y (check_pkg_class_access): Add new argument
5513         and use it when cl is NULL to call lookup_cl on it.
5514         (parser_check_super_interface): Do not call lookup_cl.
5515         Pass this_decl to check_pkg_class_access and NULL
5516         instead of lookup_cl.
5517         (parser_check_super): Update for change in
5518         check_pkg_class_access.
5519         (do_resolve_class): Likewise.
5520         (process_imports): Likewise.
5521         (find_in_imports_on_demand): Likewise.
5522         (resolve_qualified_expression_name): Likewise.
5523
5524 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
5525
5526         Fixes PR java/9685, PR java/15073
5527         * parse.y (accessibility_string): New method.
5528         (not_accessible_field_error): Use accessibility_string()
5529         instead of java_accstring_lookup().
5530         (resolve_qualified_expression_name): Check with
5531         check_pkg_class_access() before allowing access using
5532         qualified names.
5533         Fix comment typo.
5534         Use check_pkg_class_access() instead of not_accessible_p()
5535         for unqualified types.
5536         (not_accessible_p): Use DECL_CONTEXT (member) instead of
5537         REFERENCE for package-private access checking.
5538         (patch_method_invocation): Use accessibility_string() instead
5539         of java_accstring_lookup().
5540
5541 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
5542
5543         Fixes PR java/15133
5544         * gjavah.c (struct method_name): Add member is_native.
5545         (overloaded_jni_method_exists_p): Match candidate method only if
5546         it is native.
5547         (print_method_info): Initialise is_native flag from the method's
5548         access flags.
5549
5550 2004-04-30  Roger Sayle  <roger@eyesopen.com>
5551
5552         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
5553         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
5554
5555 2004-04-22  Roger Sayle  <roger@eyesopen.com>
5556
5557         * resource.c (write_resource_constructor): Guard call to possibly
5558         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
5559
5560 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
5561
5562         * class.c (make_class_data): Add new field aux_info.
5563         * decl.c (java_init_decl_processing): Push type and decl for
5564         `aux_info'.
5565
5566 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
5567
5568         * expr.c (expand_java_NEW): Don't use size argument for
5569         _Jv_AllocObject calls.
5570         * parse.y (patch_invoke): Likewise.
5571
5572 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5573
5574         * expr.c (build_invokeinterface): Remove unused variables to
5575         fix warnings.
5576
5577 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
5578
5579         * class.c (get_interface_method_index): New function. Return dispatch
5580         index for interface method.
5581         (make_method_value): For interface methods, set index field to
5582         iface dispatch index, not DECL_VINDEX.
5583         * expr.c (build_invokeinterface): Use get_interface_method_index.
5584
5585 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5586
5587         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
5588
5589 2004-03-31  Andrew Haley  <aph@redhat.com>
5590
5591         PR java/14104
5592         * jcf-io.c (opendir_in_zip): Tidy up error handling.
5593
5594 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
5595
5596         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
5597         form of GTY markers.
5598
5599 2004-03-25  Marcus Meissner  <meissner@suse.de>
5600
5601         PR java/14689:
5602         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
5603
5604 2004-03-23  Tom Tromey  <tromey@redhat.com>
5605
5606         PR java/14315:
5607         * jcf-write.c (make_class_file_name): Don't report if mkdir
5608         failed with EEXIST.
5609
5610 2004-03-23  Tom Tromey  <tromey@redhat.com>
5611
5612         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
5613
5614 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
5615
5616         * class.c, gjavah.c, lang.c: Fix comment typos.
5617         * gcj.texi: Fix typos.
5618
5619 2004-03-19  Per Bothner  <per@bothner.com>
5620
5621         * gcj.texi (Code Generation):  Document new flags and assert defaults.
5622
5623         * class.c (assume_compiled_node_struct):  Rename type to
5624         class_flag_node_struct, as it is now also used for enable_assertions.
5625         Rename assume_compiled_node typedef.  Rename excludep field to value.
5626         (find_assume_compiled_node):  Rename function to find_class_flag_node.
5627         Minor optimization - avoid needless strlen.
5628         (add_assume_compiled):  Some tweaking and optimization.
5629         Rename and generalize to add_class_flag takem an extra parameter.
5630         (add_assume_compled):  New just calls add_class_flag.
5631         (add_enable_assert, enable_assertions):  New functions.
5632         (enable_assert_tree):  New static.
5633         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
5634         * lang.opt (fenable-assertions, fenable-assertions=,
5635         fdisable-assertions, fdisable-assertions=):  New options.
5636         * lang.c (java_handle_option):  Handle new options.
5637         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
5638         class in an interface - create helper class nested in outer interface.
5639         (build_assertion):  Short-circuit if enable_assertions is false.
5640
5641 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5642
5643         * java-tree.h: Changes throughout to add checking to macros
5644         and numerous whitespace changes.
5645         (VAR_OR_FIELD_CHECK): New macro.
5646         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
5647         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
5648
5649 2004-03-16  Per Bothner  <per@bothner.com>
5650
5651         * jcf-jump.c (options):  New --print-constants option.
5652         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
5653
5654         * jcf-dump.c (flag_print_constant_pool):  Default to off.
5655         (print_constant_terse_with_index):  New helper function.
5656         (various places):  Check flag_print_constant_pool where missing.
5657         (main):  If verbose set flag_print_constant_pool.
5658         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
5659
5660 2004-03-15  Andrew Haley  <aph@redhat.com>
5661
5662         PR java/14581
5663         * parse.y (java_complete_lhs): Check that final variable has an
5664         initializer.
5665
5666 2004-03-12  Andrew Haley  <aph@redhat.com>
5667
5668         PR java/14551
5669         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
5670         conversion.
5671
5672 2004-02-29  Roger Sayle  <roger@eyesopen.com>
5673
5674         * jcf-parse.c (java_parse_file): Handle the case that input_filename
5675         is NULL.
5676
5677 2004-02-27  Per Bothner  <per@bothner.com>
5678
5679         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
5680         suggestion:  Use build_incomplete_class_ref.
5681         This fixes PR java/13508, java/11714.
5682
5683 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
5684
5685         * java/parse.h: Update copyright.
5686
5687 2004-02-26  Andrew Haley  <aph@redhat.com>
5688
5689         PR java/14231:
5690         * parse.y (check_interface_throws_clauses): Check for
5691         !METHOD_INVISIBLE (iface_method).
5692         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
5693         well as CLASS_ABSTRACT.
5694
5695 2004-02-25  Per Bothner  <per@bothner.com>
5696
5697         * parse.y (build_assertion):  If we're in an inner class, create the
5698         class$ helper routine in the outer class.
5699
5700 2004-02-19  Richard Henderson  <rth@redhat.com>
5701
5702         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
5703
5704 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
5705
5706         * Make-lang.in (java.install-man): Add extra dependencies.
5707
5708 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
5709
5710         * Make-lang.in: Install man pages under the same names
5711         (possibly transformed) as the program they document.
5712
5713 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
5714
5715         * gjavah.c: Include "intl.h".
5716         (error): New function.
5717         (main): Call gcc_init_libintl.
5718         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
5719         print_stub_or_jni, process_file, main): Use error rather than
5720         fprintf.
5721         (print_method_info, usage, help, version, main): Mark strings for
5722         translation with _.  Avoid splitting up sentences.  Send
5723         information messages to stdout.
5724         * jcf-dump.c: Include "intl.h".
5725         (main): Call gcc_init_libintl.
5726         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
5727         Mark error, usage and version messages for translation with _.
5728         Avoid splitting up sentences.
5729         * jv-scan.c: Include "intl.h".
5730         (fatal_error, warning): Change parameter s to msgid.  Translate
5731         messages.
5732         (main): Call gcc_init_libintl.
5733         (usage, help, version): Mark error, usage and version messages for
5734         translation with _.  Avoid splitting up sentences.
5735         * jvgenmain.c: Include "intl.h".
5736         (main): Call gcc_init_libintl.
5737         (usage, main): Mark error messages for translation with _.
5738         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
5739         JVGENMAIN_OBJS): Add intl.o.
5740         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
5741         java/jvgenmain.o): Update dependencies.
5742
5743 2004-02-08  Per Bothner  <per@bothner.com>
5744
5745         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
5746         class don't use not_accessible_field_error, which can get confused.
5747
5748 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
5749
5750         Make-lang.in (po-generated):  Delete.
5751
5752 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
5753
5754         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
5755         Depend on target.h.
5756         * decl.c: Include target.h.
5757         (start_java_method): Replace PROMOTE_PROTOTYPES with
5758         targetm.calls.promote_prototypes.
5759         * expr.c: Include target.h.
5760         (pop_arguments): Replace PROMOTE_PROTOTYPES with
5761         targetm.calls.promote_prototypes.
5762         * parse.y: Include target.h.
5763         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
5764         with targetm.calls.promote_prototypes.
5765
5766 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
5767
5768         * typeck.c: Update copyright.
5769
5770 2004-02-02  Tom Tromey  <tromey@redhat.com>
5771
5772         * decl.c (java_init_decl_processing): Remove duplicate
5773         gnu/gcj/RawData.
5774
5775 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
5776
5777         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
5778
5779 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
5780
5781         * expr.c (build_field_ref): Move variable
5782         definition up.
5783
5784 2004-01-28  Andrew Haley  <aph@redhat.com>
5785
5786         * expr.c (build_field_ref): Widen field offset.
5787
5788 2004-01-27  Andrew Haley  <aph@redhat.com>
5789
5790         java/13273
5791         * parse.y (check_interface_throws_clauses): Make sure class_decl
5792         has been loaded.
5793
5794 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
5795
5796         PR java/13733
5797         * parse.y (patch_assignment): Don't modify lhs_type for
5798         reference assignments.
5799
5800 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5801
5802         * Make-lang.in: Replace $(docdir) with doc.
5803         (java.info, java.srcinfo, java.man, java.srcman): New rules.
5804         (java.install-man): Revamp rule.
5805
5806 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
5807
5808         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
5809         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
5810         instead of deferred backquote.
5811
5812 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
5813
5814         * typeck.c (find_method_in_interfaces): Move variable
5815         definition up.
5816
5817 2004-01-16  Andrew Haley  <aph@redhat.com>
5818
5819         PR java/13273:
5820         * typeck.c (shallow_find_method): New.
5821         (find_method_in_superclasses): New.
5822         (find_method_in_interfaces): New.
5823         (lookup_do): Rewrite.
5824         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
5825
5826         * jcf-parse.c (read_class): Save and restore output_class.
5827         * decl.c (java_expand_body): Set output_class from fndecl.
5828
5829 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
5830
5831         * class.c (gen_indirect_dispatch_tables): Fix string length
5832         calculations.
5833
5834 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
5835
5836         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
5837         (java.srcextra): Copy above back to source directory if requested.
5838         (po-generated): Delete reference to $(parsedir).
5839         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
5840         Use implicit rule.
5841
5842 2004-01-14  Jan Hubicka  <jh@suse.cz>
5843
5844         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
5845         estimation.
5846
5847 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
5848
5849         * java-tree.h (java_expand_expr): Change prototype.
5850         * expr.c (java_expand_expr): Add alt_rtl parameter.
5851
5852 2004-01-09  Andrew Haley  <aph@redhat.com>
5853
5854         PR java/12755:
5855         * parse.y (java_fix_constructors):  Set output_class.
5856         (java_reorder_fields): Likewise.
5857         (java_layout_classes): Likewise.
5858         (java_expand_classes): Generate indirect dispatch tables.
5859         (java_expand_classes): Set output_class.
5860         (java_finish_classes): Likewise.
5861         * lang.c (java_init): Turn on always_initialize_class_p if we're
5862         using indirect dis[atch.
5863         (java_decl_ok_for_sibcall): Use output_class, not current_class.
5864         (java_get_callee_fndecl): Use class local atable.
5865         * jcf-parse.c
5866         (always_initialize_class_p): Decl moved to java-tree.h.
5867         (HANDLE_CLASS_INFO): Set output_class.
5868         (read_class): Likewise.
5869         (parse_class_file): Call gen_indirect_dispatch_tables.
5870         (parse_zip_file_entries): Set output_class.
5871         (java_parse_file): Set output_class.  Don't emit symbol tables.
5872         * java-tree.h (output_class): New.
5873         Remove global declarations for otable, atable, and ctable.
5874         (always_initialize_class_p): moved here from decl.c.
5875         (DECL_OWNER): New.
5876         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
5877         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
5878         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
5879         (struct lang_type): Add otable_methods, otable_decl,
5880         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
5881         ctable_decl, catch_classes, type_to_runtime_map.
5882         * expr.c (build_field_ref): Make otable, atable, and ctable class
5883         local rather than global.
5884         (build_known_method_ref): Likewise.
5885         (build_invokeinterface): Likewise.
5886         (java_expand_expr): Pass runtime type (rather than actual type) to
5887         expand_start_catch.
5888         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
5889         this class.  Look up each class in that map to delete duplicates.
5890         (expand_end_java_handler): Pass runtime type (rather than actual
5891         type) to expand_start_catch.
5892         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
5893         (do_nothing): New.
5894         (java_init_decl_processing): Rearrange things.  Remove global
5895         declarations of otable, atable, and ctable.
5896         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
5897         (java_expand_body): Set output_class.
5898         * constants.c (build_constant_data_ref): Use output_class, not
5899         current_class.
5900         (alloc_name_constant): Likewise.
5901         * class.c (gen_indirect_dispatch_tables): New.
5902         (build_class_ref): Generate hard reference to superclass, even if
5903         using indirect dispatch.
5904         (build_static_field_ref): Use class local atable.
5905         (make_class_data): Generate hard reference to superclass, even if
5906         using indirect dispatch.
5907         Generate symbolic references to interfaces when using indirect
5908         dispatch.
5909         (make_class_data): Emit otable, atable, and ctable.
5910         Make otable, atable, and ctable class local rather than global.
5911         (emit_catch_table): Make otable, atable, and ctable class local
5912         rather than global.
5913
5914 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
5915
5916         * parse.y (catch_clause_parameter): Fix typo.
5917
5918         PR java/13404
5919         * parse.y: (catch_clause_parameter): Return early if $3, aka
5920         formal_parameter, is null.
5921
5922 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
5923
5924         * class.c: Remove uses of "register" specifier in
5925         declarations of arguments and local variables.
5926         * decl.c: Likewise.
5927         * expr.c: Likewise.
5928         * gjavah.c: Likewise.
5929         * jcf-dump.c: Likewise.
5930         * jcf-io.c: Likewise.
5931         * jcf-parse.c: Likewise.
5932         * jcf-write.c: Likewise.
5933         * keyword.h: Likewise.
5934         * parse.y: Likewise.
5935         * typeck.c: Likewise.
5936         * verify.c: Likewise.
5937
5938 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
5939
5940         * Make-lang.in (GCJ_CROSS_NAME): Delete.
5941         (java.install_common, java.install-man): Adjust for above.
5942         (java.uninstall): Likewise.
5943
5944 2003-12-03  Michael Koch  <konqueror@gmx.de>
5945
5946         * class.c (make_class_data):
5947         Push field value to 'hack_signers' instead of 'signers'.
5948         * decl.c (java_init_decl_processing):
5949         Push field 'hack_signers' instead of 'signers'.
5950
5951 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
5952
5953         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
5954         including iconv.h.
5955
5956 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
5957
5958         PR java/12374:
5959         * parse.y (qualify_ambiguous_name): Remove lots of broken
5960         field access processing - there's no need to do that here,
5961         because we have resolve_field_access.  Remove
5962         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
5963         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
5964         used.
5965
5966 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
5967
5968         Fix PR java/13237
5969         * parse.y (java_complete_lhs): Save location prior to patching
5970         CALL_EXPR.
5971
5972 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
5973
5974         PR java/12548
5975         * resource.c (write_resource_constructor): Append
5976         "_resource" to constructor identifier name.
5977
5978 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
5979
5980         Fix PR java/13183.
5981         * constants.c (cpool_for_class): New function.
5982         (outgoing_cpool): Remove global variable.
5983         (alloc_name_constant): Use cpool_for_class.
5984         (build_constants_constructor): Likewise.
5985         * decl.c (java_expand_body): Set current_class.
5986         * java-tree.h (outgoing_cpool) Remove declaration.
5987         (init_outgoing_cpool): Likewise.
5988         * jcf-parse.c (init_outgoing_cpool): Remove function.
5989         (parse_class_file): Don't call init_outgoing_cpool.
5990         * parse.y (java_complete_expand_methods): Don't call
5991         init_outgoing_cpool.  Don't save outgoing_cpool.
5992         (java_expand_classes): Don't restore outgoing_cpool.
5993         (java_finish_classes): Likewise.
5994
5995 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
5996
5997         * Make-lang.in: (java.install-common) Add
5998         symlink for $(target_noncanonical)-gcjh for
5999         native builds.
6000
6001 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6002
6003         * Make-lang.in (java.extraclean): Delete.
6004
6005 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6006
6007         * Make-lang.in (check-java): Add.
6008
6009 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
6010
6011         Fix PR java/13024.
6012         * except.c (prepare_eh_table_type): Allocate variable-sized
6013         buffer `buf' with alloca.
6014
6015 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6016
6017         Fix PR java/12857.
6018
6019         decl.c (java_init_decl_processing): Don't initialize
6020         class_not_found_type_node, no_class_def_found_type_node.
6021
6022         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6023         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6024         (class_not_found_type_node, no_class_def_found_type_node):
6025         Don't define.
6026
6027         parse.y (build_dot_class_method_invocation): Add this_class
6028         argument.  Qualify method invocations to a different class.
6029         (create_new_parser_context): Initialize saved_data_ctx to 0.
6030         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6031         (build_dot_class_method): Don't load classes.  Register
6032         incomplete types.
6033         (build_incomplete_class_ref): Special cases for interfaces
6034         and inner classes.  Move build_dot_class_method call to here...
6035         (patch_incomplete_class_ref): ...from here.  Pass current_class
6036         to build_dot_class_method_invocation.
6037         (build_assertion): Pass class_type to
6038         build_dot_class_method_invocation.
6039         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6040
6041 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6042
6043         Fix PR java/12739.
6044         * java-tree.h (BLOCK_EMPTY_P): Define.
6045         * parse.y (java_complete_lhs): Check for empty blocks
6046         in TRY_FINALLY_EXPR case.
6047
6048 2003-11-17  Andrew Haley  <aph@redhat.com>
6049
6050         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6051         (struct lang_decl_var:freed): New variable.
6052         * decl.c (poplevel): Mark local vars that have gone out of scope.
6053         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6054         scope.
6055
6056 2003-11-16  Jason Merrill  <jason@redhat.com>
6057
6058         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6059         and TAGS files that include them for each front end.
6060
6061 2003-11-15  Tom Tromey  <tromey@redhat.com>
6062
6063         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6064
6065 2003-11-12  Jason Merrill  <jason@redhat.com>
6066
6067         PR optimization/12547
6068         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6069         BLOCK_EXPR_BODY directly.
6070
6071 2003-11-12  Andrew Haley  <aph@redhat.com>
6072
6073         PR java/11045
6074         * parse.y (fold_constant_for_init): Check that we really do have a
6075         constant.
6076
6077         PR java/11533
6078         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6079         init_test_decls being inlined.
6080
6081         PR java/12890:
6082         * parse.y (do_resolve_class): Check return value from
6083         breakdown_qualified().
6084
6085 2003-11-11  Tom Tromey  <tromey@redhat.com>
6086
6087         PR java/12915:
6088         * parse.y (merge_string_cste): Handle case where we have a
6089         pointer that happens to be zero, not null_pointer_node.
6090
6091 2003-11-10  Tom Tromey  <tromey@redhat.com>
6092
6093         * jcf-parse.c (classify_zip_file): Correctly compare
6094         filename_length against length of manifest file's name.
6095
6096 2003-11-08  Tom Tromey  <tromey@redhat.com>
6097
6098         PR java/12894:
6099         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6100
6101 2003-11-06  Andrew Haley  <aph@redhat.com>
6102
6103         * expr.c (java_stack_swap): Make sure destination stack slots are
6104         of the correct type.
6105
6106 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6107
6108         * Make-lang.in (dvi): Move targets to $(docobjdir).
6109         (gcj.dvi): Simplify rule and adjust target.
6110         (gcj.info): Simplify rule.
6111         (gcj.pod): New intermediate rule.
6112         (gcjh.pod): Likewise.
6113         (jv-scan.pod): Likewise.
6114         (jcf-dump.pod): Likewise.
6115         (gij.pod): Likewise.
6116         (jv-convert.pod): Likewise.
6117         (rmic.pod): Likewise.
6118         (rmiregistry.pod): Likewise.
6119         (gcj.1): Delete.
6120         (gcjh.1): Delete.
6121         (jv-scan.1): Delete.
6122         (jcf-dump.1): Delete.
6123         (gij.1): Delete.
6124         (jv-convert.1): Delete.
6125         (rmic.1): Delete.
6126         (rmiregistry.1): Delete.
6127
6128 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
6129
6130         Fixes PR java/12866.
6131         * parse.y (resolve_qualified_expression_name): Move test
6132         for outer field access methods from here...
6133         (check_thrown_exceptions) ...to here.
6134
6135 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
6136
6137         * .cvsignore: Delete.
6138
6139 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
6140
6141         * verify.c (verify_jvm_instructions): Don't warn about legal
6142         eh binding regions generated for example by jdk 1.4.1.
6143
6144 2003-10-24  David S. Miller  <davem@redhat.com>
6145
6146         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6147
6148 2003-10-22  Andrew Haley  <aph@redhat.com>
6149
6150         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6151         (java_get_callee_fndecl): New.
6152
6153         * jcf-parse.c (java_parse_file): Call emit_catch_table().
6154
6155         * java-tree.h (ctable_decl): New.
6156         (catch_classes):  New.
6157         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6158
6159         * decl.c (java_init_decl_processing): Add catch_class_type.
6160         Add ctable_decl.
6161         Add catch_classes field.
6162
6163         * class.c (build_indirect_class_ref): Break out from
6164         build_class_ref.
6165         (make_field_value): Check flag_indirect_dispatch.
6166         (make_class_data): Ditto.
6167         Tidy uses of PUSH_FIELD_VALUE.
6168         Add field catch_classes.
6169         (make_catch_class_record): New.
6170
6171         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6172
6173 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6174
6175         * jcf-write.c: Follow spelling conventions.
6176         * parse.y: Likewise.
6177
6178 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6179
6180         * ChangeLog: Fix typos.
6181         * expr.c: Fix comment typos.
6182         * jcf-write.c: Likewise.
6183         * lang.c: Likewise.
6184         * lex.c: Likewise.
6185         * mangle.c: Likewise.
6186         * parse-scan.y: Likewise.
6187         * parse.y: Likewise.
6188
6189 2003-10-22  Tom Tromey  <tromey@redhat.com>
6190
6191         * expr.c (expand_byte_code): Only warn about dead bytecode when
6192         extra_warnings is set.
6193
6194 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
6195
6196         Fix for PR java/12586.
6197         * mangle.c (find_compression_record_match): Don't iterate through
6198         package namespace elements unless they all match compression_table
6199         entries.
6200
6201 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
6202
6203         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6204         (generate-manpages): Likewise.
6205         (java.maintainer-clean): Likewise.
6206         (gcj.info): Likewise.
6207         (gcj.1): Likewise.
6208         (gcjh.1): Likewise.
6209         (jv-scan.1): Likewise.
6210         (jcf-dump.1): Likewise.
6211         (gij.1): Likewise.
6212         (jv-convert.1): Likewise.
6213         (rmic.1): Likewise.
6214         (rmiregistry.1): Likewise.
6215         (java.install-man): Likewise.
6216         (parse-scan.o): Move and define complete compile line.
6217         (parse.o): Likewise.
6218         (jcf-tree-inline.o): Move.
6219
6220 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
6221
6222         * Make-lang.in (info): Update dependencies.
6223         (java.install-info): Remove.
6224         ($(srcdir)/java/gcj.info): Replace with ...
6225         ($(docobjdir)/gcj.info): ... this.
6226
6227 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
6228
6229         * Make-lang.in: Replace uses of $(target_alias) with
6230         $(target_noncanonical).
6231
6232 2003-10-09  Tom Tromey  <tromey@redhat.com>
6233
6234         * decl.c (java_init_decl_processing): Declare signers field.
6235         * class.c (make_class_data): Set signers field.
6236
6237 2003-10-09  Jason Merrill  <jason@redhat.com>
6238
6239         * parse.y (patch_assignment): Use make_node to create a BLOCK.
6240         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6241         POINTER_TYPE.
6242
6243 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
6244
6245         * Make-lang.in (java.info): Replace with ...
6246         (info): ... this.
6247         (java.dvi): Replace with ...
6248         (dvi): ... this.
6249         (java.generated-manpages): Replace with ...
6250
6251 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
6252
6253         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6254
6255 2003-10-01  Andrew Haley  <aph@redhat.com>
6256
6257         * jcf-parse.c (java_parse_file): Write otable and atable.
6258         * java-tree.h (atable_methods): New.
6259         (atable_decl): New.
6260         (atable_syms_decl): New.
6261         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6262         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6263         (symbol_*type): Rename method_symbol* to symbol*type.
6264         (emit_offset_symbol_table): Delete.
6265         (emit_symbol_table): New.
6266         (get_symbol_table_index): New.
6267         (atable_type): New.
6268         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6269         (build_known_method_ref): Likewise.
6270         (get_symbol_table_index): Rename from get_offset_table_index.
6271         Parameterize to allow re-use by differing types of symbol table.
6272         (build_invokevirtual): Pass table to get_offset_table_index.
6273         * decl.c (java_init_decl_processing): Push types and decls for
6274         atable and atable_syyms.
6275         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6276         (make_class_data): Add new fields atable and atable_syms.
6277         (emit_symbol_table): Rename from emit_offset_symbol_table.
6278         Parameterize to allow re-use by different types of symbol table.
6279         (build_symbol_entry): Renamed from build_method_symbols_entry.
6280
6281 2003-09-30  Roger Sayle  <roger@eyesopen.com>
6282
6283         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6284         semantics for SAVE_EXPR, by caching the result in a temporary.
6285
6286 2003-09-28  Richard Henderson  <rth@redhat.com>
6287
6288         * check-init.c (check_init): Save and restore input_location
6289         instead of file and line separately.
6290         * decl.c (java_expand_body): Likewise.
6291         * jcf-write.c (generate_bytecode_insns): Likewise.
6292         * parse.y (safe_layout_class): Likewise.
6293         * jcf-parse.c (read_class, parse_class_file): Likewise.
6294         (java_parse_file): Use %H for warning locator.
6295
6296 2003-09-28  Roger Sayle  <roger@eyesopen.com>
6297
6298         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6299         with void-type branches instead of using a COMPOUND_EXPR.
6300
6301 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
6302
6303         * decl.c (java_optimize_inline, dump_function): Remove.
6304         * java-tree.h (java_optimize_inline): Remove declaration.
6305         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6306         * parse.y (source_end_java_method, java_expand_classes):
6307         Likewise.  Remove dead code.
6308
6309 2003-09-27  Roger Sayle  <roger@eyesopen.com>
6310
6311         * lang.c (java_init_options): Set flag_evaluation_order.
6312         * expr.c (force_evaluation_order): Don't attempt to force
6313         evaluation order of binary operations using save_expr.
6314         * parse.y (java_complete_lhs): No longer need to call
6315         force_evaluation_order when constructing binary operators.
6316
6317 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6318             Bryce McKinlay  <bryce@mckinlay.net.nz>
6319
6320         PR java/1333:
6321         * parse.y (not_accessible_field_error): New function.
6322         (resolve_expression_name): Check field access permissions.
6323         (resolve_qualified_expression_name): Use
6324         not_accessible_field_error.
6325         (resolve_qualified_expression_name): Likewise.
6326
6327 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6328
6329         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6330
6331 2003-09-23  Roger Sayle  <roger@eyesopen.com>
6332
6333         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6334         with equal operands without side-effects.
6335
6336 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
6337
6338         * decl.c (java_init_decl_processing): Don't emit otable decls
6339         if flag_indirect_dispatch is not set.
6340
6341 2003-09-21  Richard Henderson  <rth@redhat.com>
6342
6343         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6344         resource.c: Revert.
6345
6346 2003-09-21  Richard Henderson  <rth@redhat.com>
6347
6348         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6349         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6350
6351 2003-09-20  Richard Henderson  <rth@redhat.com>
6352
6353         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6354
6355 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6356
6357         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6358         * check-init.c (check_init): Likewise.
6359
6360 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6361
6362         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6363
6364 2003-09-16  Andrew Haley  <aph@redhat.com>
6365
6366         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6367
6368 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
6369
6370         Fixes PR java/9577
6371         * mangle.c (find_compression_record_match): Skip
6372         over a "6JArray" (the array template mangled string)
6373         IDENTIFIER_NODE.
6374         (mangle_array_type): Correct minor typo.
6375         (atms): Move definition to the beginning.
6376
6377 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
6378
6379         * class.c (add_miranda_methods): Ensure super-interfaces are laid
6380         out. Fix for PR java/12254.
6381
6382 2003-09-11  Richard Henderson  <rth@redhat.com>
6383
6384         * parse.y (source_end_java_method): Update for new
6385         cgraph_finalize_function argument.
6386
6387 2003-09-09  Richard Henderson  <rth@redhat.com>
6388
6389         * parse.y (source_end_java_method): Update call to
6390         cgraph_finalize_function.
6391
6392 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
6393
6394         * decl.c (java_expand_body): New function.
6395         * expr.c (build_class_init): Set DECL_IGNORED_P.
6396         * java-tree.h (start_complete_expand_method,
6397         java_expand_body): Declare.
6398         * jcf-parse.c (cgraph.h): Include.
6399         (java_parse_file): Handle flag_unit_at_a_time.
6400         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6401         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6402         (java_estimate_num_insns): Use walk_tree_without_duplicates.
6403         (java_start_inlining): New function.
6404         * parse.h (java_finish_classes): Declare.
6405         * parse.y: Include cgraph.h.
6406         (block): Don't special-case empty block production.
6407         (craft_constructor): Set DECL_INLINE.
6408         (source_end_java_method): Handle flag_unit_at_a_time.
6409         Replace inline code with call to java_expand_body.
6410         (start_complete_expand_method): Remove static modifier.
6411         (java_expand_method_bodies): Patch function tree for
6412         class initialization and/or synchronization as needed.
6413         Don't begin RTL expansion yet.
6414         (java_expand_classes): Check flag_unit_at_a_time before
6415         calling finish_class.
6416         (java_finish_classes): New function.
6417         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6418         (patch_assignment): Set DECL_CONTEXT on temporary variable.
6419         (emit_test_initialization): Set DECL_IGNORED_P.
6420
6421 2003-09-03  Roger Sayle  <roger@eyesopen.com>
6422
6423         * builtins.c (enum builtin_type): Delete unused enumeration.
6424         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6425
6426 2003-08-28  Tom Tromey  <tromey@redhat.com>
6427
6428         * gcj.texi (Extensions): Document gcjlib URLs.
6429
6430 2003-08-20  Tom Tromey  <tromey@redhat.com>
6431
6432         * gcj.texi (Extensions): Added xref.
6433         (libgcj Runtime Properties): Document
6434         gnu.gcj.runtime.VMClassLoader.library_control.
6435
6436 2003-08-20  Andrew Haley  <aph@redhat.com>
6437
6438         * except.c (prepare_eh_table_type): Use new encoding for exception
6439         handlers when using -fno-assume-compiled.
6440
6441 2003-08-13  Tom Tromey  <tromey@redhat.com>
6442
6443         * gcj.texi (Invoking gij): Document -X and -?.
6444
6445 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
6446
6447         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6448         GCJH_OBJS, JCFDUMP_OBJS
6449         * win32-host.c: Removed the unnecessary and broken dependency
6450         on jcf.h
6451
6452 2003-08-11  Tom Tromey  <tromey@redhat.com>
6453
6454         * parse.y (java_check_regular_methods): Typo fixes.  Call
6455         check_interface_throws_clauses.  Use
6456         check_concrete_throws_clauses.
6457         (check_interface_throws_clauses): New function.
6458         (check_concrete_throws_clauses): New function.
6459         (hack_is_accessible_p): New function.
6460         (find_most_specific_methods_list): Added FIXME.
6461         * typeck.c (lookup_do): Use `flags' argument to decide what to
6462         do.  Reimplemented.
6463         (lookup_argument_method_generic): New function.
6464         (lookup_argument_method2): Removed.
6465         * jcf.h (ACC_INVISIBLE): New define.
6466         * jcf-write.c (generate_classfile): Skip invisible methods.
6467         * class.c (add_miranda_methods): New function.
6468         (layout_class_methods): Use it.
6469         (get_access_flags_from_decl): Use ACC_INVISIBLE.
6470         * java-tree.h (METHOD_INVISIBLE): New define.
6471         (lang_decl_func) [invisible]: New field.
6472         (lookup_argument_method_generic): Declare.
6473         (SEARCH_INTERFACE): New define.
6474         (SEARCH_SUPER): Likewise.
6475         (SEARCH_ONLY_INTERFACE): Likewise.
6476         (SEARCH_VISIBLE): Likewise.
6477         (lookup_argument_method2): Removed declaration.
6478
6479 2003-08-05  Tom Tromey  <tromey@redhat.com>
6480
6481         Fix for PR java/11600:
6482         * parse.y (java_complete_lhs): See whether we're calling a method
6483         on an array.
6484         (check_thrown_exceptions): Added `is_array_call' argument;
6485         fixed `clone' checking; updated all callers.
6486
6487 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
6488
6489         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6490
6491 2003-08-03  Tom Tromey  <tromey@redhat.com>
6492
6493         * java-tree.h (METHOD_TRANSIENT): Removed.
6494         * decl.c (pushdecl): Removed some dead code.
6495         * class.c (get_access_flags_from_decl): Can't have transient
6496         method.
6497         (add_method_1): Can't have a transient method.
6498
6499 2003-07-28  Andreas Jaeger  <aj@suse.de>
6500
6501         * jvspec.c: Convert to ISO C90 prototypes.
6502
6503 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
6504
6505         * decl.c (force_poplevels): Fix warning call.
6506
6507 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
6508
6509         * expr.c (expand_java_field_op): Don't use xxx_with_decl
6510         (expand_java_field_op): Likewise.
6511         * class.c (layout_class_method): Likewise
6512         (emit_register_classes): Likewise.
6513         * decl.c (pushdecl): Likewise.
6514         (poplevel): Likewise.
6515         (force_poplevels): Likewise.
6516         (give_name_to_locals): Likewise.
6517         * check-init.c (check_for_initialization): Likewise.
6518
6519 2003-07-24  Jason Merrill  <jason@redhat.com>
6520
6521         * java-tree.h: Move boolean_type_node et al to the back end.
6522
6523 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6524
6525         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
6526         casts.
6527
6528 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
6529
6530         * lang.opt: Don't show -MD_ and -MDD_.
6531
6532 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
6533
6534         * lang-options.h: Remove.
6535         * lang.opt: Add help text.
6536
6537 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
6538
6539         * expr.c: Remove the last argument to expand_assignment().
6540
6541 2003-07-09  Jan Hubicka  <jh@suse.cz>
6542
6543         * java-tree.h (DECL_NUM_STMTS): Rename to...
6544         (DECL_ESTIMATED_INSNS): ... this.
6545         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
6546         New static functions.
6547         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
6548         * parser.y (add_stmt_to_compound): Do not account statements.
6549
6550 2003-07-08  Mark Wielaard  <mark@klomp.org>
6551
6552         * gcj.texi: CNI now expands to Compiled Native Interface.
6553
6554 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6555
6556         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
6557
6558 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
6559
6560         * expr.c (expand_byte_code): Adjist emit_line_note call.
6561
6562 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
6563
6564         * lang.c (java_handle_option): Don't handle filenames.
6565
6566 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
6567
6568         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
6569         DIR_SEPARATOR.
6570         Use FILENAME_CMP.
6571         * jcf-write.c: Don't default-define DIR_SEPARATOR.
6572         * jcf.h: Delete COMPARE_FILENAMES definition.
6573
6574 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
6575
6576         * lang.c (java_init_options): Update prototype.
6577
6578 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
6579
6580         * decl.c (poplevel): Adjust define_label call.
6581
6582 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
6583
6584         * gjavah.c (flag_jni): Make non-static.
6585         * parse-scan.y (ctxp): Make non-static.
6586
6587         * class.c (build_method_symbols_entry)
6588         * expr.c (get_offset_table_index)
6589         * jcf-parse.c (jcf_parse):
6590         Mark the definition static, matching the forward declaration.
6591
6592 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
6593
6594         * lang.c (java_handle_option): Don't check for missing arguments.
6595
6596 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
6597
6598         * class.c (push_class): Use a location_t to save place.
6599         (emit_register_classes): Set input_location. Adjust
6600         expand_function_end call.
6601         * resource.c (write_resource_constructor): Likewise.
6602         * decl.c (end_java_method): Adjust expand_function_end call.
6603         * parse.y (source_end_java_method): Likewise.
6604
6605 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
6606
6607         * lang.c (java_handle_option): Likewise.
6608
6609 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
6610
6611         * lang.c (java_handle_option): Special-casing of optional
6612         joined arguments no longer needed.
6613         * lang.opt: Update switches that take optional argument.
6614
6615 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6616
6617         * lang.opt: Declare Java.
6618         * lang.c (java_init_options): Update.
6619
6620 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
6621
6622         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
6623
6624 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6625
6626         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
6627         * lang.c (java_handle_option): -MD and -MMD have an underscore.
6628         * lang.opt: -MD and -MMD have an underscore.
6629
6630 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
6631
6632         * class.c (emit_register_classes): Adjust init_function_start
6633         call.
6634         * decl.c (complete_start_java_method): Likewise.
6635         * resource.c (write_resource_constructor): Likewise.
6636
6637 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
6638
6639         * Make-lang.in: Update to use options.c and options.h.
6640         * lang.c: Include options.h not j-options.h.
6641         (java_handle_option): Abort on unrecognized option.
6642         (java_init_options): Request Java switches.
6643
6644 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
6645
6646         * Make-lang.in: Handle mostlyclean.
6647
6648 2003-06-11  Tom Tromey  <tromey@redhat.com>
6649
6650         * lang.c (java_handle_option): Update dependency_tracking for
6651         OPT_MF case.
6652
6653         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
6654         empty argument.
6655
6656 2003-06-10  Andrew Haley  <aph@redhat.com>
6657
6658         * resource.c (write_resource_constructor): Use expand_expr to
6659         generate the address of the label attached to a resource.
6660         * Make-lang.in (java/resource.o): Add expr.h
6661
6662 2003-06-10  Andrew Haley  <aph@redhat.com>
6663
6664         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
6665         (java_decl_ok_for_sibcall): New.
6666
6667 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
6668
6669         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
6670         (java/j-options.c, java/j-options.h): New.
6671         * java-tree.h (resource_name, compile_resource_file,
6672         compile_resource_data): Constify.
6673         * jcf-write.c (jcf_write_base_directory): Similarly.
6674         * jcf.h (jcf_write_base_directory): Similarly.
6675         * lang.c: Include j-options.h.
6676         (cl_options_count, cl_options, string_option, java_decode_option,
6677         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
6678         process_option_with_no): Remove.
6679         (resource_name): Constify.
6680         (LANG_HOOKS_HANDLE_OPTION): Override.
6681         (java_handle_option): New.
6682         (java_init): Don't call jcf_path_init.
6683         (java_init_options): Call jcf_path_init.
6684         * lang.opt: New.
6685         * resource.c (compile_resource_data, compile_resource_file): Constify.
6686
6687 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
6688
6689         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
6690         (struct lang_decl_func): Add last_line field.
6691         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
6692         DECL_SOURCE_LINE_LAST): Remove.
6693         * parse.y (missing_return_error, finish_method_declaration,
6694         lookup_cl, start_artificial_method_body, source_end_java_method,
6695         start_complete_expand_method): Adjust.
6696
6697 2003-06-08  Tom Tromey  <tromey@redhat.com>
6698
6699         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
6700         fno-assume-compiled.
6701
6702 2003-06-08  Roger Sayle  <roger@eyesopen.com>
6703
6704         * builtins.c (define_builtin_type, builtin_types): Delete.
6705         (define_builtin): Rewritten to take just the built-in code,
6706         the function's name, type and fallback library function name.
6707         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
6708         (initialize_builtins): Overhaul to define the GCC builtins
6709         used by gcj manually, providing the Java run-time's
6710         implementations as the fallback library function.
6711
6712 2003-06-08  Anthony Green  <green@redhat.com>
6713
6714         * parse.y (patch_cast): Fix conversions from floating-point to
6715         integral types.
6716
6717 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
6718
6719         * Make-lang.in: Update.
6720         * lang.c: Include opts.h. Define cl_options_count and cl_options.
6721
6722 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
6723
6724         * lang.c (java_init_options): Update.
6725
6726 2003-06-05  Jan Hubicka  <jh@suse.cz>
6727
6728         * Make-lang.in:  Add support for stageprofile and stagefeedback
6729
6730 2003-05-31  Roger Sayle  <roger@eyesopen.com>
6731
6732         * lang.c (java_init_options): Prescribe wrap-around two's
6733         complement arithmetic overflow by setting flag_wrapv.
6734
6735 2003-05-29  Roger Sayle  <roger@eyesopen.com>
6736
6737         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
6738         (builtin_record): Add an additional builtin_code field to
6739         record which GCC built-in corresponds to the Java function.
6740         (java_builtins):  Add new entries for atan, atan2, exp, log,
6741         pow and tan.
6742         (max_builtin, min_builtin, abs_builtin): Perform constant
6743         folding on the resulting tree.
6744         (java_build_function_call_expr): Likewise, perform constant
6745         folding on the resulting tree.
6746         (initialize_builtins): The NULL creators are now allowed in
6747         the java_builtins table, which is now terminated by an entry
6748         with builtin_code == END_BUILTINS.
6749         (check_for_builtin): Likewise.  If the matching creator is
6750         NULL, construct the call using java_build_function_call_expr
6751         directly with the decl for the corresponding builtin_code.
6752
6753 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
6754
6755         * win32-host.c: Normalize copyright boilerplate.
6756
6757 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6758
6759         * parse.y (print_int_node): Use string concatentation on
6760         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
6761         function calls into one.
6762
6763 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
6764
6765         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
6766         fatal_io_error with calls to fatal_error; add ": %m" to the end of
6767         all the affected error messages.
6768
6769 2003-05-13  Richard Henderson  <rth@redhat.com>
6770
6771         * class.c (layout_class_method): Set DECL_EXTERNAL.
6772         * decl.c (java_mark_decl_local, java_mark_class_local): New.
6773         * java-tree.h (java_mark_class_local): Declare.
6774         * jcf-parse.c (parse_class_file): Use it.
6775         * parse.y (java_expand_classes): Likewise.
6776
6777 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
6778
6779         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
6780         * lex.h: #include input.h.
6781         * jv-scan.c (input_filename): Remove.
6782
6783 2003-05-02  Tom Tromey  <tromey@redhat.com>
6784
6785         PR java/10491:
6786         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
6787         (handle_inner_classes): New function.
6788
6789 2003-05-01  Tom Tromey  <tromey@redhat.com>
6790
6791         PR java/10459:
6792         * parse.y (finish_for_loop): Do nothing if update expression is a
6793         EXPR_WFL_NODE wrapping nothing.
6794         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
6795
6796 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
6797
6798         * lex.h (input_lineno): Remove declaration.
6799         * parse-scan.y: #include input.h.
6800         (input_filename): Remove declaration.
6801         (input_location): Add definition.
6802         (input_line): Remove definition.
6803
6804 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
6805
6806         * lex.h (lineno): Rename to ...
6807         (input_line): ... here
6808         * parse-scan.y (lineno): Rename to ...
6809         (input_line): ... here.
6810         (reset_report): Rename lineno to input_line.
6811         * check-init.c (check_init): Likewise.
6812         * class.c (push_class): Likewise.
6813         * decl.c (complete_start_java_method, end_java_method): Likewise.
6814         * expr.c (expand_byte_code): Likewise.
6815         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
6816         * jcf-write.c (generate_bytecode_insns): Likewise.
6817         * lex.c (java_init_lex, java_allocate_new_line,
6818         do_java_lex): Likewise.
6819         * parse.h (YYNOT_TWICE): Likewise.
6820         * parse.y (empty_statement, expression_statement,
6821         java_pop_parser_context, java_parser_context_save_global,
6822         yyerror, register_fields, method_header, safe_layout_class,
6823         find_in_imports_on_demand, create_artificial_method,
6824         source_end_java_method, start_complete_expand_method,
6825         build_thisn_assign, java_complete_lhs,
6826         maybe_absorb_scoping_block): Likewise.
6827
6828 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
6829
6830         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
6831         '/' when computing java source filename
6832
6833 2003-04-13  Tom Tromey  <tromey@redhat.com>
6834
6835         * gjavah.c (print_c_decl): Indentation fix.
6836
6837 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
6838
6839         * class.c (make_field_value, make_method_value, get_dispatch_table)
6840         (make_class_data, emit_offset_symbol_table)
6841         * constants.c (build_constants_constructor)
6842         * java-tree.h (START_RECORD_CONSTRUCTOR)
6843         * parse.y (maybe_build_array_element_wfl):
6844         Use build_constructor.
6845
6846 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
6847
6848         PR java/10253:
6849         * parse.y (string_convert_int_cst): Always use at least one digit
6850         in string conversion. Remove ASCII dependence.
6851         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
6852
6853 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
6854
6855         * Make-lang.in: added win32-host.c
6856         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
6857         resolves to open() on non-Win32 platforms and
6858         Win32-specific jcf_open_exact_case() on Win32
6859         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
6860         when trying .java and .class files
6861         * win32-host.c: added to repository. Defines
6862         Win32-specific jcf_open_exact_case()
6863
6864 2003-04-10  Andrew Haley  <aph@redhat.com>
6865
6866         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
6867         (maybe_free_localvar): Renamed from localvar_free.
6868         Add new arg, really.
6869         (generate_bytecode_insns): Set new variable, jsrs.
6870         Only free local vars if no jsr insns have been emittted.
6871         Call maybe_free_localvar, not localvar_free.
6872
6873 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
6874
6875         * gcj.texi: Remove @ at start of file.
6876
6877 2003-03-25  Tom Tromey  <tromey@redhat.com>
6878
6879         * parse.y (create_interface): Call CHECK_DEPRECATED.
6880
6881 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
6882
6883         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
6884
6885 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
6886
6887         * javaop.h (jfloat, jdouble): Make them structures mirroring
6888         the bit fields of IEEE float and double respectively.
6889         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
6890         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
6891         (union Word, union DWord): Delete.
6892         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
6893
6894         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
6895         D_NAN_MASK): Delete.
6896         (jni_print_float, jni_print_double): New.  Generate
6897         hexadecimal floating constants.
6898         (print_field_info): Use jni_print_float/double.
6899
6900         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
6901         finite floating point numbers for output; special case
6902         non-finite floats.
6903
6904 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
6905
6906         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
6907         Replace 0 and 1 with true and false in return statements.
6908
6909 2003-03-19  Tom Tromey  <tromey@redhat.com>
6910
6911         * lex.c (do_java_lex): Renamed from java_lex.
6912         (java_lex): New function.
6913         Include timevar.h.
6914
6915 2003-03-13  Tom Tromey  <tromey@redhat.com>
6916
6917         * parse.y (resolve_inner_class): Error if qualifier is a primitive
6918         type.
6919
6920 2003-03-04  Andrew Haley  <aph@redhat.com>
6921
6922         * gjavah.c (is_first_data_member): New global variable.
6923         (print_c_decl): If it's the first data member, align it as the
6924         superclass.
6925         (process_file): Set is_first_data_member.
6926
6927 2003-03-11  Tom Tromey  <tromey@redhat.com>
6928
6929         * parse.y (resolve_field_access): Initialize class if field is
6930         found in another static field.
6931         * expr.c (build_class_init): Don't optimize out initialization of
6932         implemented interface.
6933
6934 2003-03-11  Andrew Haley  <aph@redhat.com>
6935
6936         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
6937         warning.
6938
6939 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
6940
6941         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
6942         and DIR_SEPARATOR_2 for a target.
6943         Correct minor typos.
6944
6945         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
6946         and DIR_SEPARATOR_2 for a target into account.
6947
6948 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
6949
6950         * lang.c (java_init): Update prototype, move code to java_post_options.
6951         (java_post_options): Similarly.
6952
6953 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
6954
6955         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
6956         compare file name components depending on the case-sensitivity
6957         or otherwise of the host file system.
6958
6959         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
6960         "strcmp" to compare file name components.
6961         Use IS_DIR_SEPARATOR instead of comparing directly against
6962         DIR_SEPARATOR.
6963         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
6964         comparing directly against DIR_SEPARATOR.
6965
6966 2003-03-04  Tom Tromey  <tromey@redhat.com>
6967
6968         * Make-lang.in (java.tags): New target.
6969
6970 2003-03-01  Roger Sayle  <roger@eyesopen.com>
6971
6972         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
6973         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
6974
6975 2003-03-01  Tom Tromey  <tromey@redhat.com>
6976
6977         * parse.y (jdep_resolve_class): Only check deprecation if we found
6978         a decl.
6979
6980 2003-02-28  Tom Tromey  <tromey@redhat.com>
6981
6982         PR java/9695:
6983         * class.c (maybe_layout_super_class): Always pass a WFL to
6984         do_resolve_class.
6985         * parse.y (do_resolve_class): Updated comment to explain
6986         parameters.
6987
6988 2003-02-26  Tom Tromey  <tromey@redhat.com>
6989
6990         * jcf-write.c (generate_classfile): Check whether class is
6991         deprecated before writing attribute count.
6992
6993 2003-02-25  Roger Sayle  <roger@eyesopen.com>
6994
6995         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
6996         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
6997
6998 2003-02-23  Tom Tromey  <tromey@redhat.com>
6999
7000         * lang-options.h: Added -Wdeprecated.
7001         * gcj.texi (Warnings): Document -Wdeprecated.
7002         * java-tree.h (flag_deprecated): Declare.
7003         * lang.c (lang_W_options): Added deprecated.
7004         (flag_deprecated): New global.
7005         * chartables.h: Rebuilt.
7006         * gen-table.pl (process_one): Look at whitespace.
7007         (print_tables): Define LETTER_SPACE, LETTER_MASK.
7008         * parse.h (CLEAR_DEPRECATED): New macro.
7009         (CHECK_DEPRECATED_NO_RESET): New macro.
7010         * jcf-parse.c (handle_deprecated): New function.
7011         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7012         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7013         * parse.y (resolve_type_during_patch): Check deprecation.
7014         (jdep_resolve_class): Likewise.
7015         (process_imports): Likewise.
7016         (resolve_expression_name): Likewise.
7017         (check_deprecation): Strip arrays from decl.  Check
7018         flag_deprecated.
7019         (patch_method_invocation): Also check the particular constructor
7020         for deprecation.
7021         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7022         * jcf-write.c (append_deprecated_attribute): New function.
7023         (generate_classfile): Generate deprecated attribute when
7024         appropriate.
7025         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7026         (java_lex) [case '*']: Simplify logic.
7027         (java_start_char_p): Use LETTER_MASK.
7028         (java_part_char_p): Likewise.
7029         (java_space_char_p): New function.
7030
7031 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7032
7033         Change base class access representation.
7034         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7035         (add_interface_do): Likewise.
7036
7037 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7038
7039         * decl.c (java_init_decl_processing): Change
7040         soft_lookupjnimethod_node to reflect the change in
7041         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7042         * expr.c (build_jni_stub): Calculate and pass the size
7043         on the stack of the arguments to a JNI function. Use
7044         new target macro MODIFY_JNI_METHOD_CALL to allow a
7045         target to modify the call to a JNI method.
7046
7047 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7048
7049         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7050         instead of basename to avoid compiler warnings on Tru64.
7051
7052 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7053
7054         * gcj.texi: Update to GFDL 1.2.
7055
7056 2003-01-31  Andrew Haley  <aph@redhat.com>
7057
7058         * parse.y (java_expand_classes): Scan the whole class list looking
7059         for access methods that haven't yet been expanded.
7060
7061 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7062
7063         Fix for java/4269:
7064
7065         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7066         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7067         * jcf-parse.c: Likewise.
7068
7069 2003-01-31  Mark Wielaard  <mark@klomp.org>
7070
7071         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7072
7073 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7074
7075         * class.c (make_class): Use BINFO_ELTS.
7076         (set_super_info): Likewse.
7077         (add_interface_do): Likewise.
7078
7079 2003-01-30  Tom Tromey  <tromey@redhat.com>
7080
7081         * jcf-parse.c (read_class): Update identifier's class value if it
7082         changed during parsing.
7083
7084 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7085
7086         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7087         Propagate change to all other rules as required.
7088         (java/parse-scan.o): Add explicit dependency on
7089         $(parsedir)/java/parse-scan.c .
7090
7091 2003-01-29  Tom Tromey  <tromey@redhat.com>
7092
7093         * parse.y (patch_assignment): Only transform the rhs of an
7094         assignment when compiling to native.
7095
7096 2003-01-28  Tom Tromey  <tromey@redhat.com>
7097
7098         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7099
7100 2003-01-28  Tom Tromey  <tromey@redhat.com>
7101
7102         * lex.c (java_lex): Don't include UEOF as part of token.
7103         (java_read_unicode): Error if \u sequence prematurely terminated.
7104
7105 2003-01-27  Tom Tromey  <tromey@redhat.com>
7106
7107         * parse.y (java_check_regular_methods): Check for construct after
7108         checking types in throws clause.
7109
7110 2003-01-24  Tom Tromey  <tromey@redhat.com>
7111
7112         * class.c (build_static_field_ref): Only a String or numeric field
7113         can fold to a constant.
7114
7115 2003-01-23  Tom Tromey  <tromey@redhat.com>
7116
7117         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7118         file name in resource buffer.
7119
7120 2003-01-23  Tom Tromey  <tromey@redhat.com>
7121
7122         * expr.c (build_known_method_ref): Use method's context to find
7123         method table index.
7124
7125 2003-01-23  Tom Tromey  <tromey@redhat.com>
7126
7127         * constants.c (set_constant_entry): Allocated cleared memory.
7128
7129 2003-01-22  Tom Tromey  <tromey@redhat.com>
7130
7131         * java-tree.h: Don't use PARAMS.
7132         * resource.c: Add prototypes for all functions.
7133         (write_resource_constructor): Use `const char *' to avoid
7134         warning.
7135
7136 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
7137
7138         * jcf-parse.c (process_zip_dir): Remove unused variable.
7139
7140 2003-01-22  Tom Tromey  <tromey@redhat.com>
7141
7142         * expr.c (build_invokeinterface): Abort if method's context is not
7143         an interface.
7144
7145 2003-01-22  Tom Tromey  <tromey@redhat.com>
7146
7147         * gcj.texi (Input and output files): Mention non-class entries.
7148         * decl.c (java_init_decl_processing): Call
7149         init_resource_processing.
7150         * java-tree.h (compile_resource_data, write_resource_constructor,
7151         compile_resource_file, init_resource_processing): Declare.
7152         * config-lang.in (gtfiles): Added resource.c.
7153         * Make-lang.in (gt-java-resource.h): New target.
7154         (JAVA_OBJS): Added resource.o.
7155         (java/resource.o): New target.
7156         * resource.c: New file.
7157         * class.c (compile_resource_file): Moved to resource.c.
7158         (registerResource_libfunc): Likewise.
7159         (utf8_decl_list): Mark with GTY; now static.
7160         * jcf-parse.c (classify_zip_file): New function.
7161         (parse_zip_file_entries): Use it; compile .properties files.
7162         (process_zip_dir): Use classify_zip_file and compute_class_name.
7163         Don't write class name into zip directory.
7164         (java_parse_file): Call write_resource_constructor.
7165         (compute_class_name): New function.
7166         * jcf-io.c (read_zip_member): Reindented.
7167
7168 2003-01-21  Tom Tromey  <tromey@redhat.com>
7169
7170         * class.c (supers_all_compiled): New function.
7171         (make_class_data): Use it.
7172
7173 2003-01-21  Tom Tromey  <tromey@redhat.com>
7174
7175         * parse.y (method_header): Native method can't be strictfp.
7176         No method can be transient or volatile.
7177
7178 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7179
7180         Make-lang.in (jvspec.o-warn): Add -Wno-error.
7181
7182 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
7183
7184         * check-init.c: Fix comment typos.
7185         * class.c: Likewise.
7186         * constants.c: Likewise.
7187         * decl.c: Likewise.
7188         * except.c: Likewise.
7189         * expr.c: Likewise.
7190         * java-except.h: Likewise.
7191         * java-tree.h: Likewise.
7192         * javaop.h: Likewise.
7193         * jcf-dump.c: Likewise.
7194         * jcf-io.c: Likewise.
7195         * jcf-parse.c: Likewise.
7196         * jcf-write.c: Likewise.
7197         * lang.c: Likewise.
7198         * mangle.c: Likewise.
7199         * typeck.c: Likewise.
7200         * verify.c: Likewise.
7201
7202 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7203
7204         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7205         * jcf-write.c: Include "tm_p.h".
7206
7207 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7208
7209         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7210
7211 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7212
7213         * builtins.c (java_build_function_call_expr): Renamed from
7214         build_function_call_expr.  All callers changed.
7215
7216         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7217         * jcf-parse.c: Include tm_p.h.
7218
7219         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7220         warning.
7221
7222 2003-01-14  Tom Tromey  <tromey@redhat.com>
7223
7224         * class.c (make_class_data): Check that super is compiled before
7225         building class reference to it.
7226
7227 2003-01-14  Andrew Haley  <aph@redhat.com>
7228
7229         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7230         varargs function -- correct.
7231
7232 2003-01-14  Andrew Haley  <aph@redhat.com>
7233
7234         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7235
7236 2003-01-14  Andrew Haley  <aph@redhat.com>
7237
7238         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7239         varargs function -- correct.
7240
7241         * parse.y (patch_assignment): Copy the rhs of an assignment into a
7242         temporary if the RHS is a reference.
7243
7244 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7245
7246         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7247         * keyword.h: Regenerated.
7248
7249         * All Files: Convert to ISO C style function definitions.
7250
7251 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7252
7253         * parse.y (check_pkg_class_access): ANSIfy definition.
7254
7255 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7256
7257         * decl.c, parse-scan.y, parse.y: Don't cast return value of
7258         xmalloc et al.
7259
7260         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7261
7262 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
7263
7264         Merge from pch-branch:
7265
7266         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
7267
7268         * Make-lang.in (java/gjavah.o): Update dependencies.
7269         * gjavah.c: Include ggc.h.
7270
7271         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
7272
7273         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7274         (JCFDUMP_OBJS): Add ggc-none.o.
7275         (java/jcf-dump.o): Depend on GGC_H.
7276         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7277         CPool substructures.
7278         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7279         * jcf-dump.c: Include ggc.h.
7280
7281         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7282
7283         * jcf.h (union cpool_entry): New.
7284         (struct CPool): Use gengtype to mark.  Change field 'data' to be
7285         an array of unions.
7286         (struct JCF): Use gengtype to mark.
7287         (CPOOL_UINT): Update for new cpool_entry type.
7288         (CPOOL_USHORT1): Likewise.
7289         (CPOOL_USHORT2): Likewise.
7290         (CPOOL_FINISH): Use GC to free cpool subfields.
7291         * parse.h (struct parser_ctxt): Mark field current_jcf.
7292         * lex.c (java_init_lex): Use GC to allocate struct JCF.
7293         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7294         (main_jcf): Use gengtype to mark.
7295         (ggc_mark_jcf): Delete.
7296         (get_constant): Update for new cpool_entry type.
7297         (give_name_to_class): Likewise.
7298         (get_class_constant): Likewise.
7299         (init_outgoing_cpool): Use GGC to allocate struct CPool.
7300         (java_parse_file): Use GGC to allocate struct JCF.
7301         (init_jcf_parse): Don't call ggc_add_root.
7302         * jcf-reader.c (jcf_parse_constant_pool): Update for new
7303         cpool_entry type.
7304         * java-tree.h (current_jcf): Use gengtype to mark.
7305         (CPOOL_UTF): Update for new cpool_entry type.
7306         (outgoing_cpool): Use gengtype to mark.
7307         (struct lang_type): GC struct JCF and struct CPool.
7308         * config-lang.in (gtfiles): Add jcf.h.
7309         * constants.c (find_tree_constant): New.
7310         (set_constant_entry): Allocate cpool subfields using GGC.  Update
7311         for new cpool_entry type.
7312         (find_constant1): Update for new cpool_entry type.
7313         (find_constant2): Likewise.
7314         (find_utf8_constant): Use find_tree_constant.
7315         (find_class_or_string_constant): Remove unnecessary cast to jword.
7316         Update for new cpool_entry type.
7317         (count_constant_pool_bytes): Update for new cpool_entry type.
7318         (write_constant_pool): Likewise.
7319         (alloc_name_constant): Use find_tree_constant.
7320         (build_constants_constructor): Update for new cpool_entry type.
7321
7322         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7323
7324         * parse.y (mark_parser_ctxt): Delete.
7325         (goal): Don't use ggc_add_root.
7326         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7327         (java_pop_parser_context): Let GC free parser_ctxt.
7328         (java_parser_context_resume): Likewise.
7329         * parse.h (struct parser_ctxt): Use gengtype to mark.
7330         (ctxp): Likewise.
7331         (ctxp_for_generation): Likewise.
7332         * lex.h (struct java_lc_s): Mark for gengtype.
7333         (java_lexer): Rearrange for gengtype.
7334         * config-lang.in (gtfiles): Add lex.h, parse.h.
7335
7336 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7337
7338         * All Files: Remove PARAMS macro.
7339
7340         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7341         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7342         `__STDC__' macros.
7343
7344         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7345         VA_CLOSE.
7346
7347 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
7348
7349         * Make-lang.in (java.install-common, java.uninstall,
7350         java.install-info, java.install-man): Prepend $(DESTDIR)
7351         to destination paths in all (un)installation commands.
7352         (java.install-common): Rewrite $(LN) command to support
7353         DESTDIR with "ln" as well as with "ln -s".
7354
7355 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
7356
7357         * java-tree.h: Protect against multiple inclusion.
7358
7359 2003-01-07  Tom Tromey  <tromey@redhat.com>
7360
7361         * class.c (add_assume_compiled): Don't adjust parent if we're
7362         already at the root of tree.
7363
7364 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7365
7366         * lang.c (dump_compound_expr): Prototype.
7367
7368 2003-01-03  Tom Tromey  <tromey@redhat.com>
7369
7370         Fix for PR java/8712:
7371         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7372         when simply checking against `null'.
7373
7374 2003-01-03  Tom Tromey  <tromey@redhat.com>
7375
7376         * gcj.texi (Standard Properties): Document http.proxyHost and
7377         http.proxyPort.
7378
7379         * gcj.texi (GNU Classpath Properties): Document new properties.
7380
7381 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7382
7383         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7384         java/lang-options.h, java/mangle.c, java/mangle_name.c,
7385         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7386
7387 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7388
7389         * Make-lang.in, boehm.c, buffer.c,
7390           buffer.h, builtins.c, class.c,
7391           config-lang.in, constants.c,
7392           convert.h, decl.c, except.c,
7393           expr.c, java-except.h,
7394           java-tree.h, javaop.def,
7395           jcf-parse.c, jcf-write.c,
7396           jv-scan.c, jvgenmain.c,
7397           jvspec.c, keyword.gperf,
7398           keyword.h, lang-options.h,
7399           lang-specs.h, lang.c, lex.c,
7400           lex.h, mangle.c, mangle_name.c,
7401           parse-scan.y, parse.h, parse.y,
7402           typeck.c, verify.c, xref.c,
7403           xref.h: Replace "GNU CC" with
7404           "GCC" in the copyright header.
7405
7406         * check-init.c, gjavah.c, javaop.h,
7407           jcf-depend.c, jcf-dump.c, jcf-io.c,
7408           jcf-path.c, jcf-reader.c, jcf.h,
7409           zextract.c, zipfile.h: These files are
7410           "part of GCC". Also say "GCC" not "GNU CC".
7411
7412 2002-12-30  DJ Delorie  <dj@redhat.com>
7413
7414         * Make-lang.in: Protect against texi2pod/pod2man failing.
7415
7416 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
7417
7418         * gcj.texi: Use @copying.
7419
7420 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7421
7422         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7423         print_cxx_classname.
7424         (print_cxx_classname): Add add_scope parameter.
7425         (print_class_decls): Do not emit a semicolon after the extern
7426         "Java" block.
7427         (process_file): Adjust calls to print_cxx_classname.
7428
7429 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7430
7431         * gcj.texi: Include Cover Texts in man page.
7432
7433 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
7434
7435         * class.c (build_static_field_ref): Check FIELD_FINAL.
7436
7437         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7438         instead of current_constant_pool_data_ref.
7439         * java-tree.h (current_constant_pool_data_ref): Undefine.
7440         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7441         * jcf-parse.c (init_outgoing_cpool): Don't initialize
7442         current_constant_pool_data_ref.
7443
7444         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7445         not build_internal_class_name.
7446
7447         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7448         Use it when class ref isn't certain to be compiled.
7449
7450 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7451
7452         * gcj.texi: Include gcc-common.texi.
7453         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7454         $(srcdir)/doc/include/gcc-common.texi.
7455
7456 2002-12-22  Anthony Green  <green@redhat.com>
7457
7458         * gcj.texi (Limitations): Add note about org.xml.sax and
7459         org.w3c.dom.
7460
7461 2002-12-20  Tom Tromey  <tromey@redhat.com>
7462
7463         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7464         where minimum case value is Integer.MIN_VALUE.
7465         Fixes PR java/8955.
7466
7467 2002-12-18  Andrew Haley  <aph@redhat.com>
7468
7469         * parse.y (patch_invoke): Force evaluation order when `check' is
7470         set.  For PR libgcj/8945.
7471
7472 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
7473
7474         * gcj.texi: Change version number to 3.4.
7475
7476 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
7477         Andrew Haley <aph@redhat.com>
7478
7479         * parse.y (source_end_java_method): Remove custom encoding of line
7480         numbers for a function decl before passing it to the back end.
7481
7482 2002-12-03  Andrew Haley  <aph@redhat.com>
7483
7484         * class.c (make_class_data): New field, "chain".
7485         * decl.c (java_init_decl_processing): Likewise.
7486
7487 2002-12-02  Tom Tromey  <tromey@redhat.com>
7488
7489         For PR java/8740:
7490         * parse.y (do_resolve_class): Handle qualified name via
7491         recursion.
7492
7493 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7494
7495         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7496         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7497         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
7498         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
7499         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
7500         Include coretypes.h and tm.h.
7501         * Make-lang.in: Update dependencies.
7502
7503 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7504
7505         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
7506
7507 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7508
7509         * jcf-reader.c: Don't expand JCF_readu4 inside the
7510         expansion of JCF_SKIP.
7511
7512 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
7513
7514         * jcf-reader.c: Don't expand JCF_readu4 inside the
7515         expansion of JCF_SKIP.
7516
7517 2002-11-22  Tom Tromey  <tromey@redhat.com>
7518
7519         * parse.y (patch_binop): Cast right hand side of shift expression
7520         to `int'.  Fixes PR java/8676.
7521
7522 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
7523             Andrew Haley <aph@redhat.com>
7524
7525         * gcc/java/jcf-write.c (write_classfile): Remove target
7526         class file, if it exists, before renaming the temporary
7527         class file to it.
7528
7529 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
7530
7531         * jvspec.c (lang_specific_spec_functions): New.
7532
7533 2002-11-18  Tom Tromey  <tromey@redhat.com>
7534
7535         Fix for PR java/7912:
7536         * expr.c (can_widen_reference_to): Allow cast of array to
7537         Cloneable or Serializable.
7538         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
7539         (java_io_serializable_identifier_node): Likewise.
7540         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
7541         (valid_ref_assignconv_cast_p): Use new identifier nodes.
7542         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
7543         java_io_serializable.
7544         * decl.c (java_init_decl_processing): Initialize
7545         java_lang_cloneable_identifier_node and
7546         java_io_serializable_identifier_node.
7547         (java_lang_cloneable_identifier_node): New global.
7548         (java_io_serializable_identifier_node): Likewise.
7549
7550 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
7551
7552         * buffer.c: Remove unnecessary casts.
7553         * check-init.c: Likewise.
7554         * class.c: Likewise.
7555         * constants.c: Likewise.
7556         * decl.c: Likewise.
7557         * except.c: Likewise.
7558         * gjavah.c: Likewise.
7559         * jcf-io.c: Likewise.
7560         * jcf-parse.c: Likewise.
7561         * jcf-path.c: Likewise.
7562         * jvspec.c: Likewise.
7563         * lang.c: Likewise.
7564         * lex.c: Likewise.
7565         * verify.c: Likewise.
7566
7567 2002-11-06  Tom Tromey  <tromey@redhat.com>
7568
7569         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
7570         a JNI header.
7571
7572 2002-11-05  Tom Tromey  <tromey@redhat.com>
7573
7574         Fix for PR java/6388.
7575         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
7576         * java-tree.h (enum java_tree_index): New values
7577         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
7578         (decimal_int_max, decimal_long_max): New defines.
7579         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
7580         (error_if_numeric_overflow): Rewrote range checking.
7581         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
7582         decimal_long_max.
7583
7584 2002-11-02  Tom Tromey  <tromey@redhat.com>
7585
7586         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
7587
7588         * class.c (make_method_value): Put class name, not signature, into
7589         `throws' field.  For PR java/8415.
7590
7591 2002-10-24  Tom Tromey  <tromey@redhat.com>
7592
7593         * gcj.texi (Invoking gij): Document --showversion.
7594         (Standard Properties): java.library.path now set.
7595
7596 2002-10-23  Tom Tromey  <tromey@redhat.com>
7597
7598         * gjavah.c (decode_signature_piece): In JNI mode, print
7599         `jobjectArray' when array depth is nonzero.
7600         Fixes PR java/8296.
7601
7602 2002-10-15  Andrew Haley  <aph@redhat.com>
7603
7604         * parse.y (patch_invoke): Call force_evaluation_order on a static
7605         arg list.
7606         (resolve_qualified_expression_name): Call force_evaluation_order
7607         on a arg list that is part of a Qualified Expression Name.
7608
7609         * lang.c (dump_compound_expr): New.
7610         (java_dump_tree): New.
7611
7612 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
7613
7614         * gcj.texi: Added item describing the GCJ runtime property
7615         "gnu.gcj.progname".
7616
7617 2002-10-15  Richard Henderson  <rth@redhat.com>
7618
7619         * jcf-parse.c (get_constant): Fix type warning.
7620
7621 2002-10-15  Andrew Haley  <aph@redhat.com>
7622
7623         * java-tree.h (java_inlining_merge_static_initializers): Declare.
7624         (java_inlining_map_static_initializers): Declare.
7625
7626 2002-10-14  Andrew Haley  <aph@redhat.com>
7627
7628         * tree-inline.c (remap_block): All local class initialization
7629         flags go in the outermost scope.
7630         (expand_call_inline): Call java_inlining_map_static_initializers.
7631         (expand_call_inline): Call java_inlining_merge_static_initializers.
7632         * java/lang.c (merge_init_test_initialization): New.
7633         (java_inlining_merge_static_initializers): New.
7634         (inline_init_test_initialization): New.
7635         (java_inlining_map_static_initializers): New.
7636
7637 2002-10-11  Mark Wielaard  <mark@klomp.org>
7638
7639         * gcj.texi (Compatibility): Add Limitations and Extensions section.
7640
7641 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7642
7643         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
7644
7645 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7646
7647         * parse.y (merge_string_cste): Add parentheses around & within |.
7648
7649 2002-10-08  Tom Tromey  <tromey@redhat.com>
7650
7651         * parse.y (variable_declarator_id): Simplify error path for
7652         array declarator error.  For PR java/8003.
7653
7654 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
7655
7656         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
7657         bug_report_url.
7658
7659 2002-10-08  Andrew Haley  <aph@redhat.com>
7660
7661         * parse.y (attach_init_test_initialization_flags): Check for
7662         error_mark_node.
7663
7664 2002-10-07  Anthony Green  <green@redhat.com>
7665
7666         * parse.y (merge_string_cste): Fix bug in string concatenation.
7667
7668 2002-10-03  Michael Koch  <konqueror@gmx.de>
7669
7670         * gcj.texi (Standard properties):
7671         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
7672
7673 2002-10-02  Roger Sayle  <roger@eyesopen.com>
7674
7675         PR optimization/6627
7676         * lang.c (java_init): If storing the vbit in function
7677         pointers, ensure that force_align_functions_log is atleast
7678         one to aid compatability with g++ vtables.
7679
7680 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
7681
7682         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
7683         foul of type-based aliasing.
7684
7685 2002-09-30  Anthony Green  <green@redhat.com>
7686
7687         * gcj.texi (Invoking jv-scan): Fix texinfo.
7688
7689 2002-09-28  Anthony Green  <green@redhat.com>
7690
7691         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
7692         (Code Generation): Add -fno-assert documentation.
7693         * jv-scan.c (flag_assert): New global.
7694         (options): Add assert option.
7695         (help): Add --no-assert documentation.
7696         * parse-scan.y (flag_assert): New global.
7697         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
7698         (flag_assert): New global.
7699         * java-tree.h (flag_assert): New global.
7700         * lex.c (java_lex): Obey flag_assert.
7701         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
7702         calling cc1.
7703
7704 2002-09-26  Andrew Haley  <aph@redhat.com>
7705
7706         * expr.c (build_java_array_length_access): Check for null pointer.
7707         * expr.c (expand_java_arrayload): Likewise.
7708
7709 2002-09-21  Richard Henderson  <rth@redhat.com>
7710
7711         * jcf-parse.c (get_constant): Decode from IEEE no matter
7712         what the target format.
7713
7714 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
7715
7716         * ChangeLog: Follow spelling conventions.
7717         * class.c: Likewise.
7718         * decl.c: Likewise.
7719         * expr.c: Likewise.
7720         * gjavah.c: Likewise.
7721         * java-tree.h: Likewise.
7722         * jcf-dump.c: Likewise.
7723         * jcf-parse.c: Likewise.
7724         * jvspec.c: Likewise.
7725         * lang.c: Likewise.
7726         * mangle.c: Likewise.
7727         * parse.y: Likewise.
7728
7729 2002-09-17  Tom Tromey  <tromey@redhat.com>
7730
7731         * lex.c (java_read_unicode_collapsing_terminators): Handle case
7732         where \r appears at EOF.  Fixes PR java/7950.
7733
7734 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
7735
7736         * jvspec.c (lang_specific_driver): Remove unused variable.
7737
7738 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
7739
7740         * java-tree.h (union lang_tree_node): Add chain_next option.
7741
7742 2002-09-16  Richard Henderson  <rth@redhat.com>
7743
7744         * jcf-parse.c (get_constant): Runtime check for IEEE format;
7745         use new real.h interface.
7746         * jcf-write.c (find_constant_index): Use new real.h interface.
7747         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
7748
7749 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
7750
7751         * lang.c: Follow spelling conventions.
7752
7753 2002-09-11  Per Bothner  <per@bothner.com>
7754
7755         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
7756         constant to the type of the field.
7757         (java_complete_tree):  Remove now-redundant code.
7758
7759         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
7760
7761 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
7762
7763         For PR java/5794:
7764         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
7765         return label if a ret instruction for the jsr has been reached.
7766
7767 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
7768
7769         * parse.y (DIR_SEPARATOR): Don't define.
7770         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
7771
7772 2002-08-28  Andrew Haley  <aph@redhat.com>
7773
7774         * verify.c (verify_jvm_instructions): Allow exception handler
7775         inside code that is being protected, but generate a warning.
7776         * except.c (link_handler): Initialize `expanded' in new eh_range.
7777         (binding_depth, is_class_level, current_pc): Declare extern.
7778
7779 2002-09-01  Mark Wielaard <mark@klomp.org>
7780
7781         * gcj.texi: Add chapter about system properties.
7782         Fixed some typos.
7783
7784 2002-08-26  Tom Tromey  <tromey@redhat.com>
7785
7786         * parse.y (try_builtin_assignconv): Allow narrowing primitive
7787         conversion if RHS_TYPE is byte, short, or char.
7788
7789 2002-08-22  Tom Tromey  <tromey@redhat.com>
7790
7791         * gcj.texi (Invoking gij): Document -cp and -classpath.
7792
7793 2002-08-21  Tom Tromey  <tromey@redhat.com>
7794
7795         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
7796         $(prefix)/share.  For PR libgcj/7633.
7797
7798         For PR java/6005 and PR java/7611:
7799         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
7800         (java_can_use_bit_fields_p): New function.
7801
7802 2002-08-16  Tom Tromey  <tromey@redhat.com>
7803
7804         * gcj.texi (Class Initialization): Mention class initialization of
7805         arrays.
7806
7807 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
7808
7809         * Make-lang.in (java-tree-inline.o): New.
7810         (JAVA_OBJS): Add java-tree-inline.o.
7811         * parse.y (source_end_java_method): Call java_optimize_inline.
7812         (java_expand_method_bodies): Save method's tree in
7813         DECL_SAVED_TREE.
7814         (add_stmt_to_compound): Keep track of the number of statments.
7815         * lang.c (java_init): Enable flag_inline_trees.
7816         (java_post_options): If flag_inline_functions is on, enable
7817         flag_inline_trees instread.
7818         (decl_constant_value): New.
7819         (java_tree_inlining_walk_subtrees): New.
7820         * java-tree.h (DECL_NUM_STMTS): New macro.
7821         (java_optimize_inline): Declare.
7822         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
7823         Handle a LABEL_EXPR.
7824         * decl.c (build_result_decl): If we already have a DECL_RESULT
7825         don't make another.
7826         (dump_function): New.
7827         (java_optimize_inline): New.
7828         (dump_function): New.
7829
7830 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
7831
7832         For PR java/7483:
7833         * parse.y (build_assertion): Invert return from
7834         desiredAssertionStatus.
7835
7836 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7837
7838         * jcf-write.c (get_access_flags): Return correct access flags for
7839         private and protected inner classes.
7840
7841 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
7842
7843         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
7844
7845 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
7846
7847         * mangle_name.c: Don't include obstack.h twice.
7848         * xref.c: Don't include obstack.h.
7849
7850 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
7851
7852         * class.c: (permanent_obstack): Delete declaration.
7853         * constants.c: (permanent_obstack): Delete declaration.
7854         * except.c: (permanent_obstack): Delete declaration.
7855         * expr.c: (permanent_obstack): Delete declaration.
7856         * jcf-parse.c: (permanent_obstack): Delete declaration.
7857         (saveable_obstack): Delete declaration.
7858         * parse.h: (permanent_obstack): Delete declaration.
7859         * typeck.c: (permanent_obstack): Delete declaration.
7860
7861 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7862
7863         * gcj.texi (version-gcc): Increase to 3.3.
7864
7865 2002-07-22  Tom Tromey  <tromey@redhat.com>
7866
7867         * lex.c (java_lex): Check for `e' or `E' after 0.
7868
7869 2002-07-21  Richard Henderson  <rth@redhat.com>
7870
7871         * lang.c (java_unsafe_for_reeval): New.
7872         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
7873
7874 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
7875
7876         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
7877         (jcf_path_init): Use GET_ENVIRONMENT.
7878
7879 2002-07-10  Roger Sayle  <roger@eyesopen.com>
7880             Zack Weinberg <zack@codesourcery.com>
7881
7882         * builtins.c (initialize_builtins): Remove defines that
7883         handled C/C++ specific junk hereby removed from builtins.def.
7884
7885 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
7886
7887         * lang.c (java_post_options): Update prototype.
7888
7889 2002-07-05  Roger Sayle  <roger@eyesopen.com>
7890
7891         * builtins.c (initialize_builtins): Ignore the additional
7892         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
7893         the builtins.def file.
7894
7895 2002-07-01  Tom Tromey  <tromey@redhat.com>
7896
7897         For PR libgcj/7073:
7898         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
7899         specially.
7900
7901 2002-07-01  Roger Sayle  <roger@eyesopen.com>
7902
7903         * java/decl.c (builtin_function): Accept additional parameter.
7904         (java_init_decl_processing): Pass an additional NULL_TREE
7905         argument to builtin_function.
7906
7907 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
7908
7909         * gcj.texi: Fixed gcj invocation example so that it compiles.
7910
7911 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7912
7913         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
7914         * parse.y (mark_parser_ctxt): Likewise.
7915         (check_modifiers, declare_local_variables): Avoid incorrect
7916         hardcoded constant 10.
7917
7918         * lex.c (java_read_char): Avoid "comparison is always true"
7919         warning.
7920
7921 2002-06-25  Andreas Schwab  <schwab@suse.de>
7922
7923         * expr.c (JSR): Avoid undefined operation on PC.
7924
7925 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7926
7927         * decl.c (clear_binding_level): Const-ify.
7928
7929 2002-06-13  Akim Demaille  <akim@epita.fr>
7930
7931         * parse.y (class_declaration, interface_declaration): Make sure
7932         all their rules have an action, in order to avoid meaningless `$$
7933         = $1' and their type clashes.
7934
7935 2002-06-11  Tom Tromey  <tromey@redhat.com>
7936
7937         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
7938         * parse-scan.y (statement_without_trailing_substatement): Added
7939         assert_statement.
7940         (assert_statement): New rule.
7941         * java-tree.h (struct lang_type) [assertions]: New field.
7942         (TYPE_USES_ASSERTIONS): New macro.
7943         (CLASS_USES_ASSERTIONS): Likewise.
7944         (FIELD_SYNTHETIC): New define.
7945         * lex.c (java_lval;): Added ASSERT_TK.
7946         * parse.y (ASSERT_TK): Added.
7947         (statement_without_trailing_substatement): Added assert_statement.
7948         (assert_statement): New rule.
7949         (build_assertion): New function.
7950         (maybe_generate_pre_expand_clinit): Create and initialize
7951         $assertionsDisabled.
7952         (lookup_package_type): Removed decl.
7953         * keyword.h: Rebuilt.
7954         * keyword.gperf (assert): New token.
7955
7956 2002-06-10  Akim Demaille  <akim@epita.fr>
7957
7958         * parse.y (interface_type_list, class_member_declaration)
7959         (unary_expression_not_plus_minus): Remove duplicate %type.
7960         Whitespace changes.
7961
7962 2002-06-09  Tom Tromey  <tromey@redhat.com>
7963
7964         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
7965
7966         * parse.y (method_header): Give error message in all cases.
7967         Fixes PR java/6865.
7968
7969 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7970
7971         Don't use RTL inlining. Fix for PR java/6820.
7972         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
7973         (flag_really_inline): New.
7974         (java_decode_option): Set flag_really_inline if -finline-functions
7975         is seen.
7976         (java_post_options): New function. Turn off inlining unless
7977         flag_really_inline is set.
7978
7979 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
7980
7981         * gjavah.c (throwable_p): Accept argument as either a classname or
7982         signature fragment. Create null-terminated classname string for super
7983         when calling itself recursively.
7984         (decode_signature_piece): Skip first character from class name
7985         signature when calling throwable_p.
7986
7987 2002-06-08  H.J. Lu  (hjl@gnu.org)
7988
7989         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
7990
7991 2002-06-04  Tom Tromey  <tromey@redhat.com>
7992
7993         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
7994
7995 2002-06-04  Michael Koch  <konqueror@gmx.de>
7996
7997         * gcj.texi (Input Options): Fixed typo.
7998
7999 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
8000
8001         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8002         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8003         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8004         and all now-pointless local variables.  Rename other local
8005         variables to reflect their not being handles.
8006
8007         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8008         #if JCF_USE_STDIO blocks.
8009
8010         * parse.y: Add missing semicolon at end of rule.
8011
8012 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8013
8014         * check-init.c (attach_initialized_static_class): Delete, unused.
8015         * parse.y: Use htab_t instead of struct hashtable, update
8016         all uses.
8017         * java-tree.h: Include hashtab.h instead of hash.h.
8018         (struct lang_decl_func): Use htab_t, set up for gengtype.
8019         (struct init_test_hash_entry): Delete.
8020         (struct treetreehash_entry): New.
8021         (java_treetreehash_find): New
8022         (java_treetreehash_new): New prototype.
8023         (java_treetreehash_create): New prototype.
8024         (java_mark_tree): Delete prototype.
8025         (java_hash_hash_tree_node): Delete prototype.
8026         (java_hash_compare_tree_node): Delete prototype.
8027         (attach_initialized_static_class): Delete prototype.
8028         * expr.c (build_class_init): Update to use java_treetreehash
8029         functions.
8030         (java_expand_expr): Update to use htab_t.
8031         (emit_init_test_initialization): Likewise.
8032         * decl.c (java_mark_tree): Delete.
8033         * class.c (init_test_hash_newfunc): Delete.
8034         (java_hash_hash_tree_node): Delete.
8035         (java_hash_compare_tree_node): Delete.
8036         (add_method_1): Update to use java_treetreehash functions.
8037         (JAVA_TREEHASHHASH_H): New macro.
8038         (java_treetreehash_hash): New function.
8039         (java_treetreehash_compare): New function.
8040         (java_treetreehash_find): New function.
8041         (java_treetreehash_new): New function.
8042         (java_treetreehash_create): New function.
8043         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8044
8045         * Make-lang.in (java/parse.o): Depend on debug.h.
8046         * java-tree.h (struct lang_identifier): Use gengtype.
8047         (union lang_tree_node): New.
8048         (struct lang_decl_func): Use gengtype.
8049         (struct lang_decl_var): Likewise.
8050         (struct lang_decl): Likewise.
8051         * parse.y: Include debug.h.
8052         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8053
8054         * lang.c (struct language_function): New dummy structure.
8055
8056         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8057         descriminator for DECL_LANG_SPECIFIC.
8058         (struct lang_decl_func): Rename from struct lang_decl.
8059         (enum lang_decl_desc): New.
8060         (struct lang_decl): Make it a union.  Update all the accessor macros.
8061         (struct lang_type): Use gengtype.
8062         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8063         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8064         are now the same size.
8065         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8066         use discriminator to mark DECL_LANG_SPECIFIC.
8067
8068         * Make-lang.in (gt-java-builtins.h): New rule.
8069         (java/builtins.o): Add dependency on gt-<filename>.h.
8070         * builtins.c: Use gengtype for roots.
8071         (union string_or_tree): Use gengtype.
8072         (struct builtin_record): Use gengtype.
8073         * config-lang.in (gtfiles): Add builtins.c.
8074
8075         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8076         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8077         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8078         gt-java-parse.h, gtype-java.h): Add rules to generate.
8079         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8080         (class.o): Add dependency on gt-*.h.
8081         (constants.o): Likewise.
8082         (decl.o): Likewise.
8083         (expr.o): Likewise.
8084         (jcf-parse.o): Likewise.
8085         (jcf-write.o): Likewise.
8086         (lang.o): Likewise.
8087         * config-lang.in (gtfiles): New.
8088         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8089         * constants.c: Replace uses of ggc_add_* with GTY markers.
8090         Include gt-*.h.
8091         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8092         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8093         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8094         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8095         Include gt-*.h.
8096         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8097         Include gt-*.h.
8098         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8099         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8100         gt-*.h.
8101         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8102         Include gtype-java.h.
8103
8104 2002-06-02  Tom Tromey  <tromey@redhat.com>
8105
8106         Fix for PR java/5913:
8107         * parse.y (patch_binop): Call patch_string on op1.
8108
8109 2002-06-02  Tom Tromey  <tromey@redhat.com>
8110
8111         Fix for PR java/1343, PR java/6336:
8112         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8113         formatting.  Changed return type.
8114         (anonymous_class_counter): Moved to top of file.
8115         (maybe_make_nested_class_name): Append number to class name for
8116         function-local classes.
8117
8118 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8119
8120         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8121         * Make-lang.in: Update dependency lists.
8122
8123 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
8124
8125         * gjavah.c (throwable_p): Do not free the name of the class after
8126         passing it to find_class.
8127         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8128         * jcf-io.c (dirent.h): Include it.
8129         (fnmatch.h): Likewise.
8130         (compare_path): New function.
8131         (java_or_class_file): Likewise.
8132         (memoized_dirlist_entry): New type.
8133         (memoized_dirlist_lookup_eq): New function.
8134         (memoized_dirlists): New variable.
8135         (caching_stat): New function.
8136         (memoized_class_lookup_eq): New function.
8137         (memoized_class_lookups): Likewise.
8138         (find_class): Use memoized_class_lookups and caching_stat.
8139         * jcf.h (JCF_USE_SCANDIR): Define.
8140         * parse.y (java_expand_classes): Write the class files in reverse
8141         order.
8142
8143 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8144
8145         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8146
8147 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
8148
8149         * jcf-write.c (write_classfile): Unlink the temporary file if it
8150         cannot be renamed.  Use concat to build up the name of the
8151         temporary file.
8152
8153 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
8154
8155         * jcf-write.c (write_classfile): Write the file to a
8156         temporary file and then rename it.
8157
8158 2002-05-07  Tom Tromey  <tromey@redhat.com>
8159
8160         * gjavah.c (throwable_p): Use xstrdup, not strdup.
8161
8162         Fix for PR java/1200:
8163         * gjavah.c (throwable_p): New function.
8164         (decode_signature_piece): Use it.  A `WeakReference' isn't the
8165         same as a `jweak'.
8166         Include hashtab.h.
8167         (gcjh_streq): New function.
8168
8169 2002-05-07  Andreas Jaeger  <aj@suse.de>
8170
8171         * parse.y (finish_for_loop): Fix if statement.
8172
8173 2002-05-06  Tom Tromey  <tromey@redhat.com>
8174
8175         Fix for PR java/5941:
8176         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8177         loop update expression.
8178         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8179         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8180
8181 2002-05-04  Mark Wielaard  <mark@klomp.org>
8182
8183         For PR java/6519:
8184         * parse.y (build_string_concatenation): Return just op1 only when op2
8185         is null and op1 is a STRING_CST, otherwise always construct a
8186         StringBuffer.
8187
8188 2002-04-27  Tom Tromey  <tromey@redhat.com>
8189
8190         For PR java/6382:
8191         * parse.y (string_convert_int_cst): New function.
8192         (merge_string_cste): Use it.
8193
8194 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8195
8196         * java-tree.h (java_parse_file): Update.
8197         (java_set_yydebug): Remove.
8198         * jcf-parse.c (yydebug): Remove.
8199         (java_set_yydebug): Die.
8200         (java_parse_file): Update.
8201         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8202
8203 2002-04-24  Tom Tromey  <tromey@redhat.com>
8204
8205         For PR java/6425:
8206         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8207         EXPR_WFL_QUALIFICATION of qual_wfl.
8208
8209 2002-04-23  Per Bothner  <per@bothner.com>
8210
8211         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
8212         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
8213         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
8214
8215 2002-04-23  Tom Tromey  <tromey@redhat.com>
8216
8217         For PR java/6314:
8218         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
8219         recognize `-fcompile-resource='.
8220         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
8221         a bit.
8222
8223 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8224
8225         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8226         paths. Fixes PR java/2791.
8227
8228 2002-04-19  Andrew Haley  <aph@redhat.com>
8229
8230         * jcf-write.c (push_long_const): lo, hi: New variables.
8231         Use rshift_double to extract the high part of a 64-bit long.
8232         Use WORD_TO_INT to extract the low part.
8233
8234         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8235         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
8236         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8237
8238 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8239
8240         * typeck.c (incomplete_type_error): Remove.
8241
8242 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8243
8244         * class.c (make_class_data): Set DECL_ALIGN on static class data,
8245         for hash synchronization.
8246         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8247         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8248         class_type_node.
8249
8250 2002-04-16  Mark Wielaard  <mark@klomp.org>
8251
8252         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8253         negative zero.
8254
8255 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8256
8257         Fix for PR java/6294:
8258         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8259         interfaces.
8260
8261 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8262
8263         Fix for PR java/6085:
8264         * parse.y (patch_method_invocation): Always use build_access_to_thisn
8265         to get enclosing "this" argument for inner-class constructor
8266         invocation. Pass correct arguments to build_access_to_thisn.
8267
8268 2002-04-10  Andreas Jaeger  <aj@suse.de>
8269
8270         * gcj.texi (Input Options): Fix extdirs patch.
8271
8272 2002-04-10  Anthony Green  <green@redhat.com>
8273
8274         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8275
8276 2002-04-09  Anthony Green  <green@redhat.com>
8277
8278         * gcj.texi (Input Options): Add --extdirs documentation.
8279         * jcf-dump.c (OPT_extdirs): New macro.
8280         (options): Add extdirs option.
8281         (help): Describe --extdirs.
8282         (main): Handle OPT_extdirs.
8283         * gjavah.c (OPT_extdirs): New macro.
8284         (options): Add extdirs option.
8285         (help): Describe --extdirs.
8286         (main): Handle OPT_extdirs.
8287         * jcf-path.c (jcf_path_init): Add extdirs support.
8288         (jcf_path_extdirs_arg): New function.
8289         (extensions): New variable to hold extensions path entries.
8290         * jvspec.c: Remove -fextdirs= when compiling main().
8291         * lang.c (java_decode_option): Handle -fextdirs=.
8292         * jcf.h (jcf_path_extdirs_arg): Declare new function.
8293         * Make-lang.in: Compile jcf-path with version info for use in
8294         identifying the appropriate libgcj.jar.
8295
8296 2002-04-08  Tom Tromey  <tromey@redhat.com>
8297
8298         For PR libgcj/5303:
8299         * .cvsignore: Added rmic.1 and rmiregistry.1.
8300         * gcj.texi (Top): Link to new nodes.
8301         (Invoking rmic): New node.
8302         (Invoking rmiregistry): Likewise.
8303         * Make-lang.in (java.generated-manpages): Added rmic.1 and
8304         rmiregistry.1.
8305         (java.maintainer-clean): Likewise.
8306         ($(srcdir)/java/rmic.1): New target.
8307         ($(srcdir)/java/rmiregistry.1): Likewise.
8308         (java.install-man): Handle rmic.1 and rmiregistry.1.
8309
8310 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8311
8312         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8313         Add note about handling uncaught exceptions. Add an exception handler
8314         to example.
8315
8316 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8317
8318         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8319         after using it to patch CALL_EXPR.
8320
8321 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8322
8323         * gcj.texi (Invocation): Document CNI invocation API.
8324
8325 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8326
8327         * expr.c (truthvalue_conversion): Rename.  Update.
8328         (expand_compare): Update.
8329         * java-tree.h (java_truthvalue_conversion): New.
8330         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8331
8332 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8333
8334         * java-tree.h (java_mark_addressable): New.
8335         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8336         * typeck.c (mark_addressable): Rename, update.
8337
8338 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8339
8340         * expr.c (build_java_binop): Update.
8341         * java-tree.h (java_signed_type, java_unsigned_type,
8342         java_signed_or_unsigned_type): Update.
8343         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8344         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8345         * parse.y (patch_binop): Update.
8346         * typeck.c (signed_or_unsigned_type, unsigned_type,
8347         signed_type): Update.
8348
8349 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8350
8351         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8352         (java_dummy_print): Remove.
8353         (lang_print_error): Rename.  Exit early if inhibiting output.
8354         (inhibit_error_printing_function): New.
8355         (java_init): Don't set hook.
8356         (lang_init_source): Use new boolean.
8357
8358 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8359
8360         * parse.y (do_resolve_class): Fix infinite recursion.
8361
8362 2002-03-29  Tom Tromey  <tromey@redhat.com>
8363
8364         * parse.y (check_inner_circular_reference): Ignore incomplete
8365         types.
8366
8367 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8368
8369         * Make-lang.in (builtins.o): Update.
8370         * boehm.c (get_boehm_type_descriptor): Update.
8371         * builtins.c: Include langhooks.h.
8372         * decl.c (java_init_decl_processing): Update.
8373         * java-tree.h (java_type_for_mode, java_type_for_size): New.
8374         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8375         Redefine.
8376         * typeck.c (type_for_mode, type_for_size): Update.
8377
8378 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8379
8380         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8381
8382 2002-03-28  Tom Tromey  <tromey@redhat.com>
8383
8384         * except.c (expand_end_java_handler): If the handler type is NULL,
8385         use java.lang.Throwable.  Fixes PR java/5986.
8386
8387 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8388
8389         Fix for PR java/4715:
8390         * jcf-parse.c (parse_source_file_3): New function.
8391         (read_class): Call it.
8392         (java_parse_file): Likewise.
8393
8394 2002-03-28  Jan Hubicka  <jh@suse.cz>
8395
8396         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8397
8398 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8399
8400         * parse.y (resolve_package): Initialize "decl".
8401         (lookup_package_type): Remove unused function.
8402
8403 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8404
8405         Fix for PR java/5993:
8406         * parse.y (resolve_package): Return the decl if resolution was
8407         successful. Don't special case "java.lang" and "java.lang.reflect"
8408         packages. Set type_name to the merged identifier.
8409         (resolved_qualified_expression_name): Print error using "name" if
8410         resolve_package returns NULL_TREE.
8411
8412 2002-03-27  Tom Tromey  <tromey@redhat.com>
8413
8414         * expr.c (expand_invoke): Don't generate null pointer check if
8415         we're calling <init>.
8416
8417 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8418
8419         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8420         fix prototype.
8421         * java-tree.h (java_lang_expand_expr): Similarly.
8422         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8423         (java_init): Don't set hook.
8424
8425 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8426
8427         Fix for PR java/5850:
8428         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8429         context if field was not found in the current scope.
8430         * expr.c (lookup_field): Don't look in enclosing contexts.
8431
8432 2002-03-26  Tom Tromey  <tromey@redhat.com>
8433
8434         Fix for PR java/5942:
8435         * parse.y (init_src_parse): Added sanity check.
8436         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8437         elements, not 11.
8438
8439 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8440
8441         * decl.c (lang_mark_tree): Rename java_mark_tree.
8442         * java-tree.h (java_mark_tree): New.
8443         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8444
8445 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
8446
8447         * lex.c: Change java_perform_atof to take normal parameters
8448         instead of a pointer to a parameter block.  Call it directly
8449         from java_lex.
8450
8451 2002-03-22  Mark Wielaard  <mark@klomp.org>
8452
8453         Fix for PR java/5368:
8454         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8455         when printing error message.
8456
8457 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8458
8459         * decl.c (maybe_build_cleanup): Remove.
8460
8461 2002-03-22  Tom Tromey  <tromey@redhat.com>
8462
8463         Andrew Haley  <aph@cambridge.redhat.com>
8464
8465         * expr.c (build_field_ref): Don't build a check if the field is a
8466         member of `this'.
8467
8468 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
8469
8470         Fix for PR java/6026:
8471         * lex.c (java_lex): Fix parsing of consecutive floats.
8472
8473 2002-03-21  Tom Tromey  <tromey@redhat.com>
8474
8475         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8476         class.
8477
8478 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8479
8480         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8481         insert_block, getdecls, kept_level_p, global_bindings_p): New.
8482
8483 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8484
8485         * gcj.texi: @code{gcj} becomes @command{gcj}.
8486         @code{gcc} becomes @command{gcc}.
8487         GcjRaw changed to gnu.gcc.RawData.
8488
8489 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8490
8491         * decl.c (start_java_method): Use new hook.
8492         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8493         (java_init): Remove old hook.
8494
8495 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8496
8497         * builtins.c (define_builtin): Do nothing if `type' is null.
8498         Fixes PR java/5876.
8499
8500 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8501
8502         * parse.y (parser_check_super_interface): Fix error message
8503         grammar/order.
8504
8505 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8506
8507         * jcf-parse.c (get_constant): Delete unused variables.
8508
8509 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
8510
8511         * java-tree.h (java_parse_file): New.
8512         * jcf-parse.c (yyparse): Rename java_parse_file.
8513         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
8514
8515 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8516
8517         * parse.y (craft_constructor): Return the constructor decl.
8518         (java_expand_classes): Update comments.
8519         (lookup_method_invoke): Call fix_constructors immediately for
8520         anonymous class. Fixes PR java/5935.
8521
8522 2002-03-15  Anthony Green  <green@redhat.com>
8523
8524         * jcf-parse.c (yyparse): Don't emit class registration
8525         constructor when compiling resource files.
8526
8527 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8528
8529         * lang.c (java_tree_code_type, java_tree_code_length,
8530         tree_code_name): Delete.
8531         (tree_code_type, tree_code_length, tree_code_name): Define.
8532         (java_init): Don't try to copy into the various tree_code
8533         arrays.
8534
8535 2002-03-12  Tom Tromey  <tromey@redhat.com>
8536
8537         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
8538         UTF-8, not UCS-2.  Fixes PR java/5923.
8539
8540         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
8541         a call_expr wrapped in a convert.  Fixes PR java/5848.
8542
8543 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8544
8545         * jcf-write.c (write_classfile): Improve error strings.
8546
8547 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8548
8549         * lex.c: Adjust comments to GNU standards.
8550
8551 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
8552
8553         Fix for PR java/5902:
8554         * lex.c (java_lex): Fix parsing of literals.
8555
8556 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8557
8558         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
8559         to prevent it getting evaluated twice in the store checking case.
8560         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
8561         examining OBJECT.
8562
8563 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8564
8565         * decl.c (java_init_decl_processing): Make sure class_type_node
8566         alignment is not less than 64 bits if hash synchronization is enabled.
8567
8568 2002-03-08  Per Bothner  <per@bothner.com>
8569
8570         * parse.y (java_complete_lhs):  Check if patch_assignment
8571         returned an error-mark.
8572
8573         * parse.y (try_builtin_assignconv):  Don't special-case zero.
8574
8575 2002-03-08  Per Bothner  <per@bothner.com>
8576
8577         Fix for PR java/5812.
8578         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
8579         here instead of in JSR macro.  Likewise with load_type_state call.
8580         Do the latter on if the return_pc has been verified (the jsr returns).
8581         (JSR):  Now just call build_java_jsr.
8582
8583 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
8584
8585         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
8586         (java.install-common): Link native driver to
8587         JAVA_TARGET_INSTALL_NAME.
8588
8589 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
8590
8591         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
8592         * builtins.c(sin_builtin): Likewise
8593         * builtins.c(sqrt_builtin): Likewise
8594
8595 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
8596
8597         * java/expr.c, java/jcf-parse.c, java/lex.c:
8598         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
8599         REAL_ARITHMETIC blocks unconditional.  Delete some further
8600         #ifdef blocks predicated on REAL_ARITHMETIC.
8601
8602 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8603
8604         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
8605         explicit sizeof/sizeof.
8606         * decl.c (java_init_decl_processing): Likewise.
8607         * jcf-parse.c (init_jcf_parse): Likewise.
8608         * parse.y (init_src_parse): Likewise.
8609
8610 2002-03-02  Per Bothner  <per@bothner.com>
8611
8612         Make --CLASSPATH by a synonym for --classpath and -classpath.
8613         Implement --bootclasspath.
8614         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
8615         (classpath_l):  Remove.
8616         (jcf_path_CLASSPATH_arg):  Remove.
8617         (jcf_path_bootclasspath_arg):  New function.
8618         (jcf_path_seal):  Simplify accordingly.
8619
8620         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
8621         (jcf_path_CLASSPATH):  Remove declaration.
8622         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
8623         (lang_specific_driver):  Translate -bootclasspath.
8624         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
8625         * lang.c (decode_lang_options):  Do jcf_path_init first.
8626         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
8627         * gjavah.c:  Also handle --bootclasspath.
8628         Handle --CLASSPATH as a synonum for --classpath.
8629         * jcf-dump.c: Likewise.
8630
8631         "." is not part of system path, but is the default for --classpath.
8632         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
8633         (jcf_path_seal):  Add "." if no CLASSPATH specified.
8634
8635         * gcj.texi:  Document changes.
8636
8637 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8638
8639         * expr.c (build_java_arraystore_check): Fix formatting.
8640
8641 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8642
8643         Fix for PR java/5758, java/5632:
8644         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
8645         inner-class separator too.
8646         * parse.y (do_resolve_class): New local `decl_result.'
8647         Progressively build a name for what can have been loaded.
8648
8649 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8650
8651         * expr.c (java_array_data_offset): Removed function.
8652         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
8653         (build_java_array_length_access): Obtain "length" value using a
8654         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
8655         (build_java_arrayaccess): Correct comment. Access "data" using a
8656         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
8657         (build_java_arraystore_check): New function.
8658         (expand_java_arraystore): Use build_java_arraystore_check.
8659         * parse.y (patch_assignment): Simplify code to insert a store check
8660         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
8661         * check-init.c (check_init): Update to reflect that an array length
8662         access is now a COMPONENT_REF.
8663         * gcj.texi (Code Generation): Improve documentation of
8664         -fno-bounds-check. Add documentation for -fno-store-check.
8665         * java-tree.h (flag_store_check): Declare.
8666         (build_java_arraystore_check): Declare.
8667         * lang.c (flag_store_check): Initialize to 1.
8668         (lang_f_options): Add store-check option.
8669         * jvspec.c: Don't pass store-check option to jvgenmain.
8670         * lang-options.h: Add help string for -fno-store-check.
8671
8672 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
8673
8674         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
8675         * java-tree.h (java_dup_lang_specific_decl): New.
8676         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
8677
8678 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
8679
8680         * builtins.c, decl.c: Delete traditional-mode-related code
8681         copied from the C front end but not used, or used only to
8682         permit the compiler to link.
8683
8684 2002-02-22  Tom Tromey  <tromey@redhat.com>
8685
8686         Fix for PR java/2369:
8687         * jvspec.c (verify_class_name): New function.
8688         (lang_specific_driver): Call it.
8689         (JAVA_START_CHAR_P): New macro.
8690         (JAVA_PART_CHAR_P): Likewise.
8691
8692 2002-02-22  Per Bothner  <per@bothner.com>
8693
8694         * class.c:  Change vtable to be more compatible with g++ v3 abi.
8695         (get_dispatch_table):  Prepend offset-to-top (always 0) and
8696         type_info pointer (currently unimplemented hence NULL) to vtable.
8697         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
8698         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
8699         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
8700         (build_dtable_decl):  Add declarations for new fields.
8701
8702 2002-02-20  Per Bothner  <per@bothner.com>
8703
8704         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
8705         to finit$ (otherwise generate_bytecode_insns drops it). However, we
8706         don't need to set it on the COMPOUND_EXPR - the caller does that.
8707
8708 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8709
8710         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
8711         `--CLASSPATH' becomes `--classpath.'
8712         * gjavah.c: Likewise.
8713         * jcf-dump.c: Likewise.
8714         * lang-options.h: Likewise.
8715         * lang.c: Likewise.
8716         * jcf-path.c: Updated comment.
8717         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
8718         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
8719         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
8720         (jcf_path_CLASSPATH_arg): Ditto.
8721         (classpath_u): Updated leading comment.
8722
8723 2002-02-20  Per Bothner  <per@bothner.com>
8724
8725         * builtins.c (check_for_builtin):  New function.
8726         (build_call_or_builtin):  Remove.
8727         * java-tree.h:  Update accordingly.
8728         * expr.c (expand_invoke):  Use build + check_for_builtin instead
8729         of build_call_or_builtin.
8730         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
8731         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
8732         flag (which had caused jcf-write to incorrectly emit invokevirtual).
8733
8734 2002-02-17  Tom Tromey  <tromey@redhat.com>
8735
8736         * java-tree.h (TYPE_STRICTFP): New macro.
8737         (struct lang_type) [strictfp]: New field.
8738         (CLASS_STRICTFP): New macro.
8739         (METHOD_STRICTFP): New macro.
8740         (struct lang_decl) [strictfp]: New field.
8741         * parse.y (method_header): Disallow strictfp constructor or
8742         abstract method.
8743         (STRICT_TK): Move before MODIFIER_TK.
8744         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
8745         (METHOD_MODIFIERS): Likewise.
8746         (INTERFACE_MODIFIERS): Likewise.
8747         * jcf-write.c (get_access_flags): Likewise.
8748         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
8749         (add_method_1): Likewise.
8750         (get_access_flags_from_decl): Likewise.
8751         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
8752         recognize strictfp flag.
8753         * jcf.h (ACC_STRICT): New define.
8754
8755 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
8756
8757         * class.c(build_utf8_ref): Move declaration of decl_size
8758
8759 2002-02-07  Tom Tromey  <tromey@redhat.com>
8760
8761         * gcj.texi (Input Options): --CLASSPATH does not suppress system
8762         path.
8763
8764 2002-02-04  Anthony Green  <green@redhat.com>
8765
8766         * class.c (build_utf8_ref): Put UTF-8 constants into merged
8767         sections if available.
8768
8769 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8770
8771         * parse.y (java_expand_classes): Fix typo in static field loop.
8772
8773 2002-02-02  Richard Henderson  <rth@redhat.com>
8774
8775         * class.c (add_field): Mark static fields external.
8776         (build_class_ref): Remove redundant set.
8777         * parse.y (java_expand_classes): Mark static fields of classes
8778         to be compiled as local.
8779         * jcf-parse.c (parse_class_file): Likewise.
8780
8781 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8782
8783         * gcj.texi (About CNI): New node.
8784
8785 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
8786
8787         PR java/5080
8788         * jcf-parse.c : Check for HAVE_LOCALE_H before using
8789         setlocale() with LC_CTYPE as a parameter.
8790         * jv-scan.c: Same.
8791
8792 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
8793
8794         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
8795         Follow GNU Coding Standards for --version.
8796
8797 2002-01-28  Tom Tromey  <tromey@redhat.com>
8798
8799         * expr.c (build_jni_stub): Ensure storage for `meth' is
8800         generated.
8801         * parse.y (java_complete_expand_methods): Set
8802         current_function_decl before building JNI stub.
8803
8804 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
8805
8806         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
8807         BUILT_IN_SQRTF.
8808
8809 2002-01-22  Tom Tromey  <tromey@redhat.com>
8810
8811         * decl.c (java_init_decl_processing): Use add_predefined_file.
8812         Predefine RawData.java.
8813         (predef_filenames): Removed.
8814         (java_init_decl_processing): Don't register predef_filenames.
8815         * jcf-parse.c (add_predefined_file): New function.
8816         (predefined_filename_p): Rewrote.
8817         (predefined_filename_p): No longer static.
8818         * decl.c (java_init_decl_processing): Call initialize_builtins.
8819         * Make-lang.in (JAVA_OBJS): Added builtins.o.
8820         (java/builtins.o): New target.
8821         * builtins.c: New file.
8822         * parse.y (patch_invoke): Use build_call_or_builtin.
8823         * java-tree.h (build_call_or_builtin): Declare.
8824         (initialize_builtins): Declare.
8825         (java_set_exception_lang_code): Removed unused declaration.
8826         (PREDEF_FILENAMES_SIZE): Removed.
8827         (java_tree_index): Added JTI_PREDEF_FILENAMES.
8828         (predef_filenames): New define.
8829         (add_predefined_file): Declare.
8830         (predefined_filename_p): Declare.
8831         * expr.c (expand_invoke): Use build_call_or_builtin.
8832
8833 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8834
8835         * parse.y (patch_switch_statement): Fix format specifier.
8836
8837 2002-01-16  Tom Tromey  <tromey@redhat.com>
8838
8839         More for PR java/5365:
8840         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
8841         default.
8842         (process_file): Generate include for
8843         java.lang.UnsupportedOperationExceptions.
8844
8845 2002-01-15  Andreas Jaeger  <aj@suse.de>
8846
8847         * .cvsignore: Add man pages.
8848
8849 2002-01-15  Tom Tromey  <tromey@redhat.com>
8850
8851         Fix for PR java/5365:
8852         * gjavah.c (process_file): Turn class name into a file name.
8853
8854 2002-01-14  Matthias Klose  <doko@debian.org>
8855
8856         * gcj.texi: Fix whitespace and formatting errors in the
8857         synopsis of the man pages. Update copyright.
8858
8859 2002-01-14  Tom Tromey  <tromey@redhat.com>
8860
8861         For PR libgcj/5303:
8862         * Make-lang.in (java.install-man): Handle jv-convert man page.
8863         (java.generated-manpages): Added jv-convert.1.
8864         (java.uninstall): Remove jv-convert.1.
8865         (java.maintainer-clean): Likewise.
8866         ($(srcdir)/java/jv-convert.1): New target.
8867         * gcj.texi (Top): Link to jv-convert node.
8868         (Individual utilities): Likewise.
8869         (Invoking jv-convert): New node.
8870
8871 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
8872             Martin Kahlert  <martin.kahlert@infineon.com>
8873
8874         * jcf-parse.c (get_constant): Don't swap lo/hi for big
8875         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
8876
8877 2002-01-03  Graham Stott  <grahams@redhat.com>
8878
8879         * class.c (compile_resource_file): Update copyright date.
8880         Constify filename parameter.
8881         (java-tree.h): Update copyright date.
8882         (compile_resource_file): Constify filename parameter.
8883
8884 2002-01-03  Graham Stott  <grahams@redhat.com>
8885
8886         * gcc/jcf-parse.c: Update copyright date.
8887         (yyparse): Constify resource_filename.
8888
8889 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8890
8891         * parse.y (src_parse_roots): Don't needlessly zero init.
8892
8893 2001-12-31  Tom Tromey  <tromey@redhat.com>
8894
8895         * parse.y (dump_java_tree): New function.
8896         (source_end_java_method): Call it.
8897         (end_class_declaration): Likewise.
8898         * lang.c (java_decode_option): Call dump_switch_p.
8899
8900 2001-12-28  Tom Tromey  <tromey@redhat.com>
8901
8902         * gen-table.pl: Don't process characters after \uffff.  Added
8903         comment pointing to input file.
8904
8905 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8906
8907         * gen-table.pl: Const-ify output.  Document the location of a
8908         suitable unicode input file.
8909
8910         * chartables.h: Regenerate.
8911
8912 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8913
8914         * chartables.h: Const-ify.
8915         * gjavah.c (options): Likewise.
8916         * jcf-dump.c (options): Likewise.
8917         * jv-scan.c (options): Likewise.
8918         * lex.c (java_start_char_p, java_part_char_p): Likewise.
8919         * parse.y (binop_lookup): Likewise.
8920
8921 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8922
8923         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
8924         the static arrays that are output.
8925         * jvspec.c (jvgenmain_spec): Make static.
8926         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
8927         * keyword.h: Regenerate.
8928         * lang.c (string_option, process_option_with_no, lang_f_options,
8929         lang_W_options): Const-ify.
8930         * lex.c (java_lex): Likewise.
8931
8932 2001-12-21  Richard Henderson  <rth@redhat.com>
8933
8934         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
8935         (get_boehm_type_descriptor): ... here.  Arrange for the
8936         TREE_TYPE to get set properly.
8937
8938 2001-12-21  Richard Henderson  <rth@redhat.com>
8939
8940         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
8941         only if the target requires collect2.
8942
8943         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
8944
8945 2001-12-20  Tom Tromey  <tromey@redhat.com>
8946
8947         For PR java/4509:
8948         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
8949         CAN_COMPLETE_NORMALLY for the node.
8950         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
8951         generate code for second branch if first branch can't complete
8952         normally.
8953         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
8954         the loop head if the loop body can't complete normally.
8955
8956 2001-12-20  Tom Tromey  <tromey@redhat.com>
8957
8958         For PR java/4766:
8959         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
8960         case where `finally' clause can't complete normally.
8961
8962 2001-12-20  Tom Tromey  <tromey@redhat.com>
8963
8964         Fixes PR java/5057:
8965         * parse.y (analyze_clinit_body): Added this_class parameter.
8966         Check for more cases where we must keep <clinit>.
8967         (maybe_yank_clinit): Cleaned up flow control.
8968
8969 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8970
8971         * decl.c (java_init_decl_processing): Don't initialize
8972         finit_leg_identifier_node.
8973         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
8974         (finit_leg_identifier_node): Remove.
8975         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
8976
8977 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8978
8979         * mangle.c (mangle_member_name): Don't special-case for
8980         NO_DOLLAR_IN_LABEL.
8981         * mangle_name.c (unicode_mangling_length): Likewise.
8982         (append_unicode_mangled_name): Likewise.
8983         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
8984         code.
8985
8986 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8987
8988         * expr.c (build_java_array_length_access): Don't force null pointer
8989         check unless flag_check_references is set.
8990
8991 2001-12-20  Tom Tromey  <tromey@redhat.com>
8992
8993         Fix for PR java/3417:
8994         * parse.y (patch_assignment): Added special processing for
8995         `return'.
8996         (patch_return): Don't convert booleans to integers, and don't
8997         special-case `null'.
8998
8999 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9000
9001         * config-lang.in (diff_excludes): Remove.
9002
9003 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9004
9005         * gcj.texi: Update link to GCC manual.
9006
9007 2001-12-17  Tom Tromey  <tromey@redhat.com>
9008
9009         * parse.y (link_nested_class_to_enclosing): Removed useless
9010         statement.
9011
9012 2001-12-16  Tom Tromey  <tromey@redhat.com>
9013
9014         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9015         Fixes PR java/5088.
9016
9017 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9018
9019         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9020         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9021         spelling errors.
9022
9023 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9024
9025         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9026
9027 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9028
9029         * decl.c (java_init_decl_processing): Build otable_type correctly.
9030         otable_decl is an otable_type.
9031
9032 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9033
9034         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9035         otable_type, otable_ptr_type, method_symbol_type,
9036         method_symbols_array_type, method_symbols_array_ptr_type): New
9037         field/global tree definitions.
9038         (flag_indirect_dispatch): New flag.
9039         * decl.c (java_init_decl_processing): Initialize new otable and
9040         otable_syms type nodes and decls. Add new field "index" to
9041         method_type_node.
9042         * class.c (build_method_symbols_entry): New function.
9043         (make_method_value): Set "index" to to method's vtable index for
9044         virtual methods when indirect-dispatch is not used.
9045         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9046         and set vtable_method_count to -1. Set otable and otable_syms field
9047         if indirect-dispatch is used and there was something to put in them.
9048         (build_method_symbols_entry): New function.
9049         (emit_offset_symbol_table): New function.
9050         * expr.c (get_offset_table_index): New function.
9051         (build_invokevirtual): Build array reference to otable at the index
9052         returned by get_offset_table_index, and use the result as the vtable
9053         offset.
9054         (build_invokeinterface): Similar.
9055         * jcf-parse.c (yyparse): If indirect-dispatch, call
9056         emit_offset_symbol_table at the end of compilation, after all classes
9057         have been generated.
9058         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9059         * lang.c (flag_indirect_dispatch): Define.
9060         (lang_f_options): Add indirect-dispatch flag.
9061
9062 2001-12-14  Matthias Klose  <doko@debian.org>
9063
9064         * gcj.texi: Markup for man page generation. Document missing
9065         options printed by <tool> --help.
9066         Terminate description of gij's -ms option with a dot.
9067         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9068         (java.generated-manpages java.install-man, java.uninstall,
9069         java-maintainer-clean) Updated.
9070
9071 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9072
9073         * class.c (get_dispatch_table): Fix java vtable layout
9074         for TARGET_VTABLE_USES_DESCRIPTORS.
9075         * decl.c (java_init_decl_processing): Initialize
9076         alloc_no_finalizer_node, finalize_identifier_node.
9077         * expr.c (class_has_finalize_method): New function.
9078         (expand_java_NEW): Generate calls for finalizer-free allocation.
9079         (build_invokevirtual): Fix java vtable layout for
9080         TARGET_VTABLE_USES_DESCRIPTORS.
9081         * java-tree.h (enum java_tree_index): New entries:
9082         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9083         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9084         (class_has_finalize_method): declare.
9085         (HAS_FINALIZER_P): New macro.
9086         * parse.y (patch_invoke): Generate calls for finalizer-free
9087         allocation.
9088
9089 2001-12-12  Matthias Klose  <doko@debian.org>
9090
9091         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9092         whitespace at end of line.
9093
9094 2001-12-11  Tom Tromey  <tromey@redhat.com>
9095
9096         * lex.c (java_init_lex): Define wfl_to_string as
9097         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9098
9099 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9100
9101         * class.c (make_method_value): Use null_pointer_node to
9102         represent empty exception table.
9103
9104 2001-12-10  Tom Tromey  <tromey@redhat.com>
9105
9106         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9107
9108 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9109
9110         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9111
9112 2001-12-09  Per Bothner  <per@bothner.com>
9113
9114         * check-init.c (current_switch_has_default):  New static field.
9115         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
9116         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
9117         DEFAULT_EXPR seen, simulate a default alternative that copies state.
9118
9119 2001-12-09  Tom Tromey  <tromey@redhat.com>
9120
9121         * check-init.c (check_init): Don't allow pre- or post- increment
9122         or decrement of final variable.
9123         (final_assign_error): Minor error message rewording.
9124
9125 2001-12-08  Tom Tromey  <tromey@redhat.com>
9126
9127         * java-tree.h: Fixed typo.
9128
9129         * gjavah.c (decompile_method): Don't decompile to `return this'
9130         for static methods.
9131
9132         * gjavah.c (cxx_keywords): Re-sorted.
9133         * lex.c (cxx_keywords): Re-sorted.
9134
9135         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9136         else.
9137
9138         * gjavah.c (print_namelet): Clear subnamelets.
9139         (HANDLE_METHOD): Set `method_printed' earlier.
9140
9141 2001-12-07  Tom Tromey  <tromey@redhat.com>
9142
9143         * lang.c (lang_f_options): Added
9144         optimize-static-class-initialization.
9145         (java_decode_option): Removed special case.
9146
9147 2001-12-07  Per Bothner  <per@bothner.com>
9148
9149         * check-init.c (check_init):  Fix typo freeing memory twice.
9150
9151 2001-12-05  Per Bothner  <per@bothner.com>
9152
9153         Restore support for static class initialization optimization.
9154         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9155         * check-init.c (check_int):  At end of BLOCK handle initialization
9156         blocks, which used to be done in java_complete_expand_method but did
9157         not handle the case where check_for_initialization might allocate
9158         more than a word of bits.
9159         * decl.c (lang_make_tree):  The smic field is now a tree.
9160         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
9161         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
9162
9163         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
9164
9165         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9166         Change from a hash table to a list.
9167         (struct_lang_decl):  Change field 'smic' to match.
9168         * class.c (add_method_1):  Initialize
9169         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9170         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
9171         (java_expand_method_bodies): -here, since 'smic' is now a list.
9172         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
9173
9174         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
9175
9176         * class.c (java_hash_compare_tree_node):  Fix casts.
9177
9178 2001-12-04  Per Bothner  <per@bothner.com>
9179
9180         * check-init.c:   Handle definite unassignment to finals in addition
9181         to definite assignment.
9182         (loop_current_locals):  New field.
9183         (num_current_locals, int start_current_locals, num_current_words):
9184         Make static.
9185         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
9186         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9187         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
9188         (get_variable_decl, check_final_reassigned):  New functions.
9189         (check_init, check_bool_init):  Modify as needed for checking finals.
9190         (check_for_initialization):  Take extra parameter and return void.
9191         Do extra start-up logic to check final fields for assignment.
9192         * parse.y (check_static_final_variable_assignment_flag,
9193         reset_static_final_variable_assignment_flag, check_final_assignment,
9194         check_final_variable_local_assignment_flag,
9195         reset_final_variable_indirect_assignment_flag,
9196         reset_final_variable_global_assignment_flag):  Remove functions.
9197         (java_complete_expand_methods, outer_field_access_fix,
9198         patch_assignment): Remove no-longer used logic.
9199         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
9200         * parse.y (register_fields, java_complete_tree):  Update accordingly.
9201
9202         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
9203         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
9204         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
9205
9206         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
9207
9208         * java-tree.h (DECL FINAL):  New bit-field.
9209         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
9210         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
9211         (DECL_INIT_CALLS_THIS):  New macro.
9212         (struct lang_decl):  New bit-field init_calls_this.
9213         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9214         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9215         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
9216         use it for both local variables and final fields.
9217         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
9218         and local_final.
9219         (struct lang_type):  Remove hfv bit-field.
9220         (check_for_initialization):  Change to return void.
9221
9222         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
9223         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
9224         * check-init.c (final_assign_error):  New helper function.
9225         (check_final_reassigned, check_init):  Use it.
9226         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9227
9228         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
9229         bit-fields to unsigned.
9230
9231 2001-12-03  Per Bothner  <per@bothner.com>
9232
9233         * parse.y (patch_binop):  Minor constant folding.
9234
9235         * parse.y (build_current_thisn):  Shorter 'buffer'.
9236
9237 2001-12-03  Per Bothner  <per@bothner.com>
9238
9239         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
9240         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9241         * jcf-write.c (generate_bytecode_insns):  Remove support for
9242         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9243         * check-init.c (check_init):  Likewise.
9244
9245 2001-12-03  Per Bothner  <per@bothner.com>
9246
9247         * verify.c (subroutine_nesting):  New function.
9248         (verify_jvm_instructions):  Use it to fix logic for checking that
9249         we're done with the current subroutine.
9250
9251         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9252         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9253
9254 2001-12-03  Per Bothner  <per@bothner.com>
9255
9256         * jcf.h:  Fix obvious typo in comment.
9257         * typeck.c (build_null_signature):  Add comment.
9258
9259 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9260
9261         * expr.c: Remove leading capital from diagnostic messages, as
9262         per GNU coding standards.
9263         * jcf-io.c: Similarly.
9264         * jcf-parse.c: Similarly.
9265         * jv-scan.c: Similarly.
9266         * jvspec.c: Similarly.
9267         * mangle.c: Similarly.
9268
9269 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
9270             Alexandre Petit-Bianco  <apbianco@redhat.com>
9271
9272         * expr.c (build_java_arrayaccess): Call save_expr on array for
9273         correct evaluation order, modified comment, fixed indentation.
9274         * parse.y: (patch_assignment): Correctly extract the array base
9275         from the tree generate by build_java_arrayaccess, added comments.
9276         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9277         Fixes PR java/3096, PR java/3803, PR java/3965.
9278
9279 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9280
9281         * expr.c (expand_byte_code): Remove trailing periods from messages.
9282         * jcf-parse.c (load_class, jcf_parse): Similarly.
9283         * jcf-write.c (generate_classfile): Similarly.
9284         * lex.c (java_lex): Similarly.
9285
9286 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9287
9288         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9289
9290 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9291
9292         * Make-lang.in (java.generated-manpages): New dummy target.
9293
9294 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9295
9296         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9297         ASM_FINAL_SPEC.
9298         (lang_specific_pre_link): Use set_input to set input_filename.
9299         Append `main' here.
9300         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9301         (main): Fix definition.
9302         Strip `main' from classname.
9303         Fixes PR java/227.
9304
9305 2001-11-18  Roger Sayle <roger@eyesopen.com>
9306
9307         * parse.h (java_expand_switch): Remove old prototype.
9308
9309 2001-11-18  Tom Tromey  <tromey@redhat.com>
9310
9311         Fix for PR java/1401:
9312         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9313         arg0 is null.
9314         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9315         correctly.
9316
9317 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9318
9319         * lang.c (finish_parse): Rename to java_finish.
9320         (LANG_HOOKS_FINISH, java_finish): New.
9321
9322 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9323
9324         * decl.c (init_decl_processing): Rename java_init_decl_processing.
9325         * java-tree.h: New prototype.
9326         * lang.c (java_init): Update prototype.  Combine with old init_parse.
9327
9328 2001-11-13  Tom Tromey  <tromey@redhat.com>
9329
9330         * gjavah.c (method_signature): New global.
9331         (HANDLE_METHOD): Set it.
9332         (decompile_return_statement): New function.
9333         (decompile_method): Use it.
9334         (print_method_info): Removed `synth' argument.
9335
9336 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9337
9338         * java-tree.h (java_set_yydebug): New.
9339         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9340         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9341         (print_lang_decl, print_lang_type, print_lang_identifier,
9342         print_lang_statistics, lang_print_xnode): Remove.
9343
9344 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9345
9346         * jcf-parse.c (init_lex): Remove.
9347         * lang.c (language_string, lang_identify): Remove.
9348         (struct lang_hooks): Constify.
9349         (LANG_HOOKS_NAME): Override.
9350         (init_parse): Update.
9351
9352 2001-11-08  Andreas Franck  <afranck@gmx.de>
9353
9354         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9355         program_transform_name the way suggested by autoconf.
9356         (java.install-common): Also transform auxiliary program names with
9357         program_transform_name.
9358
9359 2001-11-08  Tom Tromey  <tromey@cygnus.com>
9360
9361         * parse.y (trap_overflow_corner_case): New rule.
9362         (unary_expression): Use it.
9363         * lex.c (java_init_lex): Don't set minus_seen.
9364         (yylex): Don't use minus_seen.  Communicate overflow to parser for
9365         it to handle.
9366         (error_if_numeric_overflow): New function.
9367         * parse.h (minus_seen): Removed field.
9368         (JAVA_RADIX10_FLAG): New define.
9369
9370 2001-11-07  Tom Tromey  <tromey@redhat.com>
9371
9372         Patch for PR java/1414:
9373         * parse.y (case_label_list): New global.
9374         (goal): Register case_label_list with GC.
9375         (java_complete_lhs): Save new case on case_label_list.
9376         (patch_switch_statement): Check for duplicate case labels.
9377
9378 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9379
9380         * parse.y (patch_assignment): Removed unused third argument.
9381         (java_complete_lhs): Removed unused third argument to patch_assignment.
9382
9383 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9384
9385         * lang.c: Include langhooks-def.h.
9386         * Make-lang.in: Update.
9387
9388 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9389
9390         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9391
9392 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9393
9394         * mangle.c (find_compression_record_match): Don't match compression
9395         records for package name elements unless they occur at the start of
9396         the name. Fix for PR java/4717.
9397
9398 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9399
9400         * expr.c (expand_java_field_op): Don't special-case references to
9401         java.lang.PRIMTYPE.TYPE.
9402         (build_primtype_type_ref): Removed.
9403         * java-tree.h (build_primtype_type_ref): Remove prototype.
9404         * parse.y (maybe_build_primttype_type_ref): Removed.
9405         (complete_function_arguments): Don't special-case references to
9406         java.lang.PRIMTYPE.TYPE.
9407         (patch_assignment): Likewise.
9408         (array_constructor_check_entry): Likewise.
9409
9410 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9411
9412         * mangle.c (static tree compression_table): Fixed leading comment.
9413         * parse.h (struct parser_ctxt): Fixed field comment.
9414         * parse.y (check_pkg_class_access): New prototype, fixed leading
9415         comment, new parameter used to emit error only if passed as true.
9416         (parse_check_super): Pass extra argument to check_pkg_class_access.
9417         (do_resolve_class): Likewise.
9418         (process_imports): Likewise.
9419         (read_import_dir): Fixed indentation.
9420         (find_in_imports_on_demand): New local class_type_name. Local
9421         node_to_use deleted. while loop changed into for loop. Report
9422         multiple definition only for accessible classes. Improved error
9423         message.
9424         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9425         assigned to parameter list, fixed indentation. while loop changed
9426         into for loop, restore TREE_CHAIN on local `tem' before the next
9427         iteration.
9428
9429 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9430
9431         * lang.c (lang_get_alias_set): Deleted.
9432
9433 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9434
9435         * gjavah.c (jni_print_char): Fix thinko in last change.
9436
9437         * gjavah.c (jni_print_char, decode_signature_piece): Use
9438         safe-ctype macros and/or fold extra calls into fewer ones.
9439         * lex.c (java_read_unicode, java_lex): Likewise.
9440         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9441         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9442         * mangle_name.c (append_unicode_mangled_name,
9443         unicode_mangling_length): Likewise.
9444
9445 2001-10-17  Richard Henderson  <rth@redhat.com>
9446
9447         * Make-lang.in (java/lang.o): Depend on langhooks.h.
9448
9449 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9450
9451         * lang.c (langhooks.h): Included.
9452         (LANG_HOOKS_INIT): Redefined.
9453         (LANG_HOOKS_INIT_OPTIONS): Likewise.
9454         (LANG_HOOKS_DECODE_OPTION): Likewise.
9455         (struct lang_hooks lang_hooks): New initialization.
9456
9457 2001-10-11  Per Bothner  <per@bothner.com>
9458
9459         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
9460         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9461         The former is simpler, and jcf-write.c handles it better.
9462         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
9463         or WITH_CLEANUP_EXPR.
9464         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
9465         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9466
9467         * parse.y (patch_if_else_statement):  If the condition is constant,
9468         optimize away the test.
9469
9470 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9471
9472         * parse.y (patch_cast): Call patch_string on the first operand of
9473         the incoming node, update it if necessary. Fixes PR java/4510.
9474
9475 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9476
9477         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9478         when name qualifier matches a package name.
9479
9480 2001-10-08  Tom Tromey  <tromey@redhat.com>
9481
9482         Fix for PR java/4489:
9483         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9484         force a new label when computing `body_block'.
9485
9486 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9487
9488         * jcf-io.c (format_uint): Const-ify.
9489         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9490         * lex.c (java_get_line_col): Likewise.
9491         * parse.y (build_incdec): Likewise.
9492
9493 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9494
9495         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9496         a NULL enclosing context if appropriate. Fixes PR java/4466.
9497
9498 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
9499
9500         * parse.y (patch_assignment): Use lvalue's original TYPE when
9501         building the final COMPOUND_EXPR.
9502         (try_reference_assignconv): Fixed leading comment.
9503
9504 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
9505
9506         * parse.y (check_final_variable_indirect_assignment): For
9507         COMPOUND_EXPR, return only if finals were found initialized
9508         properly, if not, keep on checking.
9509         (check_final_variable_global_assignment_flag): New local
9510         error_found, set when appropriate and used to decide whether to
9511         report uninitialized finals. Fixed typo in comment.
9512
9513 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9514
9515         * decl.c (init_decl_processing): Fixed typo in predef_filenames
9516         last three initializations. Fixes PR java/4360.
9517
9518 2001-09-21  Richard Henderson  <rth@redhat.com>
9519
9520         * class.c (get_dispatch_table): Handle function descriptors.
9521         (build_dtable_decl): Likewise.
9522         * expr.c (build_invokevirtual): Likewise.
9523
9524 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
9525
9526         * parse.y (patch_method_invocation): Build class initialization
9527         when static finals are used to qualify method invocation.
9528         Fixes PR java/4366.
9529
9530 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
9531
9532         * parse.h: (WFL_STRIP_BRACKET): Re-written using
9533         build_type_name_from_array_name.
9534         (STRING_STRIP_BRACKETS): New macro.
9535         * parse.y (build_type_name_from_array_name): New function.
9536         (array_creation_expression:): Accumulate []s instead of [s.
9537         (cast_expression:): Accumulate []s instead of [s after cast type
9538         name.
9539         (build_array_from_name): Local string deleted, use
9540         build_type_name_from_array_name.
9541         (build_unresolved_array_type): Accumulate []s instead of [s after
9542         type name.
9543         (register_fields): Fixed comment.
9544         (resolve_class): Local name, base deleted, new locals tname and
9545         array_dims. Use build_type_name_from_array_name. Use array_dims to
9546         build array type.
9547         (purify_type_name): Use STRING_STRIP_BRACKETS.
9548
9549 2001-09-18  Andreas Jaeger  <aj@suse.de>
9550
9551         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
9552         * jv-scan.c: Likewise.
9553
9554 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9555
9556         * parse.y (patch_method_invocation): Inner class creation context
9557         check not enforced within constructors. Fixes PR java/1873.
9558
9559 2001-09-16  Tom Tromey  <tromey@redhat.com>
9560
9561         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
9562         NOTE_PUSH for single-case push.  Fixes PR java/4189.
9563
9564 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9565
9566         * java-tree.h (TYPE_IMPORT_LIST): New macro.
9567         (TYPE_IMPORT_DEMAND_LIST): Likewise.
9568         (struct lang_type): New fields import_list and import_demand_list.
9569         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
9570         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
9571         (do_resolve_class): New local saved_enclosing_type, initialized,
9572         passed as parameter to find_in_imports and find_in_imports_on_demand.
9573         (find_in_imports): Added paramater enclosing_type, use its
9574         TYPE_IMPORT_LIST when applicable.
9575         (find_in_imports_on_demand): Added parameter enclosing_type, use
9576         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
9577         declaration and initialization.
9578         (fold_constant_for_init): Switch/restore current_class to the
9579         appropriate context.
9580
9581 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
9582
9583         * verify.c (verify_jvm_instructions): Fix typo.
9584
9585 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9586
9587         * expr.c (expand_invoke): Const-ification.
9588         * parse.y (patch_method_invocation): Likewise.
9589
9590 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9591
9592         * gjavah.c (cxx_keywords): Const-ification.
9593         * keyword.gperf (java_keyword): Likewise.
9594         * lang.c (java_tree_code_name): Likewise.
9595         * lex.c (cxx_keywords): Likewise.
9596         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
9597
9598 2001-09-11  Richard Henderson  <rth@redhat.com>
9599
9600         * parse.h (ctxp_for_generation): Mark extern.
9601
9602 2001-09-10  Richard Henderson  <rth@redhat.com>
9603
9604         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
9605
9606 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
9607
9608         * typeck.c (java_array_type_length, build_prim_array_type):
9609         Represent empty arrays by NULL index.
9610
9611 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
9612
9613         * java-tree.h (compile_resource_file): Grouped with other prototypes.
9614         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
9615
9616 2001-09-06  Anthony Green  <green@redhat.com>
9617
9618         * class.c (O_BINARY): Define if necessary.
9619         (registerResource_libfunc): Declare.
9620         (init_class_processing): Initilize registerResource_libfunc.
9621         (compile_resource_file): New function.
9622         * java-tree.h (resource_name): Declare.
9623         (compile_resource_file): Declare.
9624         * jcf-parse.c (yyparse): Handle compiling java resource files.
9625         * lang.c (java_decode_option): Handle -fcompile-resource option.
9626         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
9627         resource files.
9628         * gcj.texi (Code Generation): Add documentation for -R flag.
9629
9630 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
9631
9632         * jcf-write.c (generate_classfile): Issue an error in case of
9633         field/initial value mismatch.
9634         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
9635         being initialized and we're generating bytecode.
9636         (java_complete_lhs): In MODIFY_EXPR section: added comments,
9637         set DECL_INITIAL properly when appropriate.
9638         Fixes PR java/4230
9639         Fixes PR java/4204
9640
9641 2001-09-01  Per Bothner  <per@bothner.com>
9642
9643         * parse.y (maybe_yank_clinit):  A field without an initializer is not
9644         relevant.  All initializers except static final and constant require
9645         <clinit>, regardless of flag_emit_class_files.
9646
9647 2001-08-31  Per Bothner  <per@bothner.com>
9648
9649         * class.c (set_constant_value):  When not emitting class files, then a
9650         String ConstantValue is a utf8const_ptr_type.
9651
9652 2001-08-30  Per Bothner  <per@bothner.com>
9653
9654         * jcf-write.c (generate_classfile):  Check that field is primitive
9655         or string before emitting ConstantValue attribute.
9656
9657 2001-08-30  Per Bothner  <per@bothner.com>
9658
9659         * parse.y (resolve_qualified_expression_name):  If creating a
9660         COMPOUND_EXPR, set it's type correctly.
9661
9662 2001-08-30  Per Bothner  <per@bothner.com>
9663
9664         * jcf-io.c (open_class):  Set filename field.
9665
9666         * jcf-parse,c (parse_class_file):  Set current_function_decl
9667         for better error message when Code attribute is missing.
9668
9669         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
9670         better diagnostics, especially for constructors.
9671
9672 2001-08-30  Per Bothner  <per@bothner.com>
9673
9674         * jcf-write.c (generate_classfile):  Don't write ConstantValue
9675         attribute if field is not final, for compatibility with jdk.
9676
9677         * jcf-write.c (generate_classfile):  Convert ConstantValue values
9678         to correct type.  Work-around for front-end bug.
9679         * class.c (set_constant_value):  Error if constant has wrong type.
9680
9681 2001-08-30  Per Bothner  <per@bothner.com>
9682
9683         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
9684         "Double" are printed at verbosity 1.
9685
9686         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
9687
9688         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
9689
9690 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
9691
9692         * parse.y (patch_assignment): Don't verify final re-assignment here.
9693         (java_complete_lhs): Verify assignments to finals calling
9694         patch_assignment. Verify re-assignments to finals before calling
9695         patch_assignment.
9696
9697 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
9698
9699         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
9700         Fixes PR java/1413
9701
9702 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9703
9704         * lex.c (java_lex): new local found_hex_digits. Set and then used
9705         in test to reject invalid hexadecimal numbers.
9706         * parse.y (java_complete_tree): Prevent unwanted cast with
9707         initialized floating point finals.
9708         (patch_binop): Emit a warning when detecting a division by zero,
9709         mark result not constant, don't simplify non integer division.
9710
9711 2001-08-28  Per Bothner  <per@bothner.com>
9712
9713         * jcf-write.c  (generate_bytecode_insns):  For increments and
9714         decrements just recurse to push constant.  Improvement on Mark's patch.
9715
9716 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
9717
9718         * jcf-write.c (generate_bytecode_insns): Generate an integer to
9719         real conversion for increments and decrements of reals.
9720
9721 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
9722
9723         * parse.y (resolve_qualified_expression_name): Handle unresolved
9724         qualified expressions, prevent numerical qualifiers, fixed typo.
9725         Fixes PR java/4141
9726
9727 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9728
9729         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
9730         don't report anything but deprecated class when marked so. Handle
9731         VAR_DECL.
9732         (patch_method_invocation): Check deprecation on methods and types.
9733         (patch_binop): code becomes an enum tree_code, added default: to
9734         switch to handle that. Detect division by zero, try to fold and
9735         return before using a subroutine.
9736
9737 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
9738
9739         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
9740         file smaller than 4 bytes.
9741         * parse.y (check_inner_circular_reference): New function.
9742         (check_circular_reference): Likewise.
9743         (array_initializer:): Accept {,}.
9744         (java_check_circular_reference): Rewritten using
9745         check_circular_reference and check_inner_circular_reference.
9746         (java_complete_expand_method): Unconditionally save and restore
9747         the unpurged exception list.
9748         (build_dot_class_method_invocation): Unmangle signature parameter.
9749
9750 2001-08-21  Tom Tromey  <tromey@redhat.com>
9751
9752         * decl.c (init_decl_processing): Add `throws' field to method
9753         descriptor.
9754         * class.c (make_method_value): Compute `throws' field for method.
9755
9756 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
9757
9758         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
9759         circularity is detected.
9760         (ctors_unchecked_throws_clause_p): Fixed leading comment.
9761
9762 2001-08-17  Richard Henderson  <rth@redhat.com>
9763
9764         * class.c (emit_register_classes): Add align parameter to
9765         call to assemble_integer.
9766
9767 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
9768
9769         * jcf-parse.c (load_class): New locals saved and class_loaded. If
9770         loading a class_or_name fails, try considering an innerclass name
9771         and load the enclosing context.
9772         * parse.y (resolve_inner_class): New function.
9773         (find_as_inner_class): Added leading comment.
9774         (register_incomplete_type): Keep the current context as enclosing
9775         context for JDEP_FIELD dependencies.
9776         (do_resolve_class): Locals new_class_decl and super initialized to
9777         NULL. Call resolve_inner_class, explore the enclosing context
9778         superclass if necessary.
9779         Fixes PR java/4007
9780
9781 2001-08-16  Tom Tromey  <tromey@redhat.com>
9782
9783         * jcf-dump.c (main): Updated for change to jcf_path_seal.
9784         * gjavah.c (main): Updated for change to jcf_path_seal.
9785         * lang.c (version_flag): New global.
9786         (java_decode_option): Recognize `-version'.
9787         (java_init): Update for change to jcf_path_seal.
9788         * jcf.h (jcf_path_seal): Added `print' argument.
9789         * jcf-path.c (jcf_path_seal): Added `print' argument.
9790
9791 2001-08-13  Zack Weinberg  <zackw@panix.com>
9792
9793         * Make-lang.in (java/decl.o): Update dependencies.
9794         * decl.c: Include libfuncs.h, don't include toplev.h.
9795
9796 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
9797
9798         * decl.c (init_decl_processing): exception_type_node,
9799         class_not_found_type_node, and no_class_def_found_type_node
9800         initialized. predef_filenames augmented accordingly.
9801         instinit_identifier_node initialized.
9802         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
9803         * java-tree.h (enum java_tree_index): New entries
9804         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
9805         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
9806         (exception_type_node): New macro.
9807         (class_not_found_type_node): Likewise.
9808         (no_class_def_found_type_node): Likewise.
9809         (instinit_identifier_node): Likewise.
9810         (PREDEF_FILENAMES_SIZE): Adjusted.
9811         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
9812         (struct lang_type): Fixed typo in bitfield name.
9813         (DECL_INSTINIT_P): New macro.
9814         (ID_INSTINIT_P): Likewise.
9815         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
9816         attribute.
9817         * parse.y (encapsulate_with_try_catch): New function.
9818         (generate_instinit): Likewise.
9819         (build_instinit_invocation): Likewise.
9820         (ctors_unchecked_throws_clause_p): Likewise.
9821         (add_instance_initializer): Deleted.
9822         (build_instance_initializer): Likewise.
9823         (in_instance_initializer): Likewise.
9824         (check_method_redefinition): instinit$ not to be verified.
9825         (java_complete_expand_methods): Generate instinit$, simplified code.
9826         (build_dot_class_method): Eliminated unnecessary locals. Use
9827         encapsulate_with_try_catch, removed unnecessary code.
9828         (fix_constructors): New local iii. Use build_instinit_invocation.
9829         (patch_method_invocation): Added comment.
9830         (maybe_use_access_method): Don't consider instinit$.
9831         (find_applicable_accessible_methods_list): Shorten the search for
9832         instinit$ too.
9833         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
9834         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
9835         (patch_throw_statement): Likewise. Fixed typo.
9836
9837 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
9838
9839         Revert:
9840         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9841         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9842         ASM_FINAL_SPEC.
9843         (lang_specific_pre_link): Use set_input to set input_filename.
9844         Append `main' here.
9845         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9846         (main): Fix definition.
9847         Strip `main' from classname.
9848         Fixes PR java/227.
9849
9850 2001-08-11  Zack Weinberg  <zackw@panix.com>
9851
9852         * lex.h: Don't include setjmp.h.  Don't define
9853         SET_FLOAT_HANDLER or prototype set_float_handler.
9854
9855 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9856
9857         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
9858         `poplevel' in the right order.
9859
9860 2001-08-09  Richard Henderson  <rth@redhat.com>
9861
9862         * Make-lang.in (class.o): Depend on TARGET_H.
9863         * class.c (emit_register_classes): Use target hooks instead of
9864         assemble_constructor and assemble_destructor.
9865
9866 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
9867
9868         * check-init.c (flags.h): Include
9869         (check_init): Don't report uninitialized static class
9870         initialization flags, don't free bit index when doing static class
9871         initialization optimization.
9872         (check_for_initialization): Return type changed to `unsigned int.'
9873         (attach_initialized_static_class): New function.
9874         * class.c (add_method_1): Create the initialized static class
9875         table if necessary.
9876         (finish_class): Always emit deferred inline methods.
9877         * decl.c (emit_init_test_initialization): Moved to expr.c
9878         (complete_start_java_method): Don't traverse
9879         DECL_FUNCTION_INIT_TEST_TABLE.
9880         (lang_mark_tree): Mark hash tables in function decls.
9881         * expr.c (emit_init_test_initialization): Moved from decl.c.
9882         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
9883         initialization flag, set DECL_CONTEXT and
9884         LOCAL_CLASS_INITIALIZATION_FLAG.
9885         (java_lang_expand_expr): Emit initialization code for static class
9886         initialized flags when entering block, if necessary.
9887         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
9888         * java-tree.h (flag_optimize_sci): New global variable declaration.
9889         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
9890         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
9891         (LOCAL_FINAL_P): Fixed typo in comment.
9892         (FINAL_VARIABLE_P): Likewise.
9893         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
9894         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
9895         (struct lang_decl): New fields `ict', `smic' and `cif.'
9896         (check_for_initialization): New returned value for global.
9897         (attach_initialized_static_class): New global function.
9898         (STATIC_CLASS_INIT_OPT_P): New macro.
9899         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
9900         * lang.c (java_decode_option): Handle
9901         `-fno-optimize-static-class-initialization'
9902         * parse.y (start_complete_expand_method): New function.
9903         (java_expand_method_bodies): Likewise.
9904         (attach_init_test_initialization_flags): Likewise.
9905         (adjust_init_test_initialization): Likewise.
9906         (emit_test_initialization): Likewise.
9907         (java_complete_expand_methods): Nullify abstract and native method
9908         bodies.
9909         (java_complete_expand_method): New locals `fbody', `block_body'
9910         and `exception_copy.' Reorganized: directly return on empty method
9911         bodies, call `start_complete_expand_method', remember definitely
9912         initialized static class in function, don't expand method bodies.
9913         (java_expand_classes): Call `java_expand_method_bodies' before
9914         `finish_class' when compiling to native.
9915         (resolve_expression_name): Use `orig' after building outer class
9916         field access.
9917         (patch_invoke): Remember static method invocations.
9918
9919 2001-08-06  Richard Henderson  <rth@redhat.com>
9920
9921         * class.c (emit_register_classes): Pass a symbol_ref and priority
9922         to assemble_constructor.
9923
9924 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
9925
9926         * java-tree.h (all_class_filename): New macro.
9927         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
9928         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
9929         newly created IDENTIFIER_NODE to `all_class_filename.'
9930
9931 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
9932
9933         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
9934         Use ggc_add_tree_root to register roots.
9935
9936 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
9937
9938         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
9939         second operand calling check_init.
9940         * decl.c (complete_start_java_method): Swaped second and third
9941         arguments while creating WITH_CLEANUP_EXPR node.
9942         * jcf-write.c (generate_bytecode_insns): Use second operand
9943         instead of third when handling WITH_CLEANUP_EXPR.
9944         * parse.y (java_complete_lhs): Expand second operand of
9945         WITH_CLEANUP_EXPR nodes.
9946         (patch_synchronized_statement): Swaped second and third arguments
9947         while creating WITH_CLEANUP_EXPR node.
9948
9949 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9950
9951         * parse.y (create_interface): Avoid cyclic inheritance report when
9952         syntax error encountered during class definition.
9953         Fixes PR java/2956
9954
9955 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9956
9957         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9958         ASM_FINAL_SPEC.
9959         (lang_specific_pre_link): Use set_input to set input_filename.
9960         Append `main' here.
9961         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9962         (main): Fix definition.
9963         Strip `main' from classname.
9964         Fixes PR java/227.
9965
9966 2001-07-18  Tom Tromey  <tromey@redhat.com>
9967
9968         For PR java/2812:
9969         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
9970         * lex.c (java_new_lexer): Use ICONV_CONST.
9971         (java_read_char): Likewise.
9972         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
9973         (jv-scan$(exeext)): Likewise.
9974
9975 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9976
9977         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
9978         * parse.y (check_class_interface_creation): Allow `private' if the
9979         enclosing is not an interface.
9980         (create_interface): Interface tagged public if the enclosing
9981         context is an interface.
9982         (create_class): Class tagged public if the enclosing context
9983         is an interface.
9984         Fixes PR java/2959
9985
9986 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
9987
9988         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
9989         Fixes PR java/2665
9990
9991 2001-07-14  Tim Josling  <tej@melbpc.org.au>
9992
9993         * check-init.c (check_init): Remove references to EXPON_EXPR.
9994
9995 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
9996
9997         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
9998         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
9999         Fixes PR java/3602
10000
10001 2001-07-13  Tom Tromey  <tromey@redhat.com>
10002
10003         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10004         invocation.
10005
10006 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10007
10008         * parse.y (patch_method_invocation): Don't override primary if one
10009         is already provided, but let this$<n> be built. Fixed comment.
10010
10011 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10012
10013         * parse.y (empty_statement:): Report empty statement error only
10014         when found at class declaration level.
10015         Fixes PR java/3635
10016
10017 2001-07-12  Tom Tromey  <tromey@redhat.com>
10018
10019         * expr.c (expand_load_internal): New function.
10020         (LOAD_INTERNAL): Use it.
10021
10022 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10023
10024         * parse.y (verify_constructor_super): Compare anonymous class ctor
10025         args with `valid_method_invocation_conversion_p.'
10026         Fixes PR java/3285
10027
10028 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10029
10030         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10031         `-fsyntax-only.' Fixes PR java/3248
10032
10033 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10034
10035         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10036
10037 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10038
10039         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10040         current function is static. Fixes PR java/1970
10041
10042 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10043
10044         * parse.y (patch_method_invocation): Add enclosing context to ctor
10045         calls if necessary. Fixes PR java/2953
10046
10047 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10048
10049         * parse.y (resolve_package): Abort if qualified expression member
10050         isn't right.
10051         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10052         Fixes PR java/1391
10053
10054 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10055
10056         * verify.c: Don't use // comments.
10057
10058 2001-07-05  Tom Tromey  <tromey@redhat.com>
10059
10060         * lang.c (flag_assume_compiled): Removed.
10061         * java-tree.h (flag_assume_compiled): Removed.
10062         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10063         -fhash-synchronization, -fuse-divide-subroutine,
10064         -fcheck-references, -femit-class-file, -femit-class-files,
10065         -fassume-compiled.  Updated --encoding information.  Changed
10066         -foutput-class-dir to `-d'.
10067
10068 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10069
10070         * jcf-parse.c (parse_class_file): Add lineno parameter to
10071         debug_start_source_file call.
10072
10073 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10074
10075         * gcj.texi: Use gpl.texi.
10076         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10077         dependencies and use doc/include in search path.
10078
10079 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10080
10081         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10082         `this'.  If so, don't build instance initializers.
10083
10084 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10085
10086         * parse.y (resolve_expression_name): Improved error message for
10087         inner class cases. Fixes PR java/1958
10088
10089 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10090
10091         * lang.c: #include diagnostic.h
10092         (lang_print_error): Add a `diagnostic_context *' parameter.
10093         (java_dummy_print): Likewise.
10094         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10095
10096 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10097
10098         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10099         * jcf.h (typedef struct JCF): New bitfield `finished.'
10100         (JCF_FINISH): Set `finished.'
10101         (JCF_ZERO): Reset `finished.'
10102         Fixes PR java/2633
10103
10104 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10105
10106         * parse.y (class_body_declaration:): Don't install empty instance
10107         initializers.
10108         Fixes PR java/1314
10109
10110 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10111
10112         * class.c (set_super_info): Call `set_class_decl_access_flags.'
10113         (set_class_decl_access_flags): New function.
10114         * java-tree.h (set_class_decl_access_flags): New prototype.
10115         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10116         (parse_class_file): New local `decl_max_locals.' Take wide types
10117         into account to compute DECL_MAX_LOCALS.
10118         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10119         imports on demand.
10120
10121 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
10122
10123         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10124
10125 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10126
10127         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10128         * parse.y (do_resolve_class): Moved comments out to leading comment
10129         section. Removed local `start', New local `_ht' and
10130         `circularity_hash.'  Record `enclosing' in hash table and search
10131         it to detect circularity.  Use `enclosing' as an argument to
10132         `lookup_cl.' Free the hash table when done.
10133
10134 2001-06-19  Tom Tromey  <tromey@redhat.com>
10135
10136         * lex.c (java_read_char): Disallow invalid and overlong
10137         sequences.  Fixes PR java/2319.
10138
10139 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
10140
10141         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10142
10143 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10144
10145         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10146         arguments accordingly.
10147
10148 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10149
10150         * gcj.texi: Move contents to just after title page.
10151
10152 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
10153
10154         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10155         builtin type.
10156         (patch_incomplete_class_ref): Build the class ref, build the class
10157         init if necessary, complete the tree.
10158         Fixes PR java/2605
10159
10160 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10161
10162         * parse.y (lookup_field_wrapper): Test `name' code.
10163         (resolve_qualified_expression_name): Test `qual_wfl' code.
10164         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10165         handle `qual_wfl' by code.
10166         (maybe_build_primttype_type_ref): Test `wfl' code.
10167
10168 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10169
10170         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10171         fdl.texi.
10172         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
10173         the dvi file in the java directory.
10174
10175 2001-05-25  Sam TH  <sam@uchicago.edu>
10176
10177         * gen-table.pl javaop.h jcf.h lex.h,
10178         parse.h: Fix header include guards.
10179
10180 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
10181
10182         * jv-scan.c (version): Update copyright year.
10183
10184 2001-05-21  Per Bothner  <per@bothner.com>
10185
10186         * jcf-parse.c (read_class):  If class is from .class or .zip file
10187         and it's already been read, don't push/pop parser context.
10188
10189 2001-05-18  Per Bothner  <per@bothner.com>
10190
10191         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
10192         command line so the jvgenmain-generated main program comes first.
10193
10194 2001-05-15  Tom Tromey  <tromey@redhat.com>
10195
10196         * class.c (build_utf8_ref): Don't generate identifier based on
10197         utf8const contents.
10198
10199 2001-05-12  Richard Henderson  <rth@redhat.com>
10200
10201         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10202         * expr.c (java_lang_expand_expr): Expand it.
10203         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10204         calling build_exception_object_ref.
10205         * parse.y (catch_clause_parameter): Likewise.
10206         (build_dot_class_method): Likewise.
10207         (try_reference_assignconv): Likewise.
10208         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10209         * jcf-write.c (generate_bytecode_insns): Likewise.
10210
10211 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10212
10213         * parse.y (build_unresolved_array_type): Set
10214         EXPR_WFL_QUALIFICATION on the newly created wfl.
10215         Fixes PR java/2538. Fixes PR java/2535.
10216
10217 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10218
10219         * parse.y (fix_constructors): Removed unnecessary assignment to
10220         local. Moved assignment to `this$<n>', fixed comments and
10221         indentation.
10222         (build_wfl_wrap): Fixed indentation.
10223         Fixes PR java/2598, java/2579 and java/2658.
10224
10225 2001-05-03  Mo DeJong  <mdejong@redhat.com>
10226
10227         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10228         check for byte swap.
10229
10230 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
10231
10232         * expr.c (build_class_init): Move MODIFY_EXPR
10233         outside of COND_EXPR.  Remove variable `call'.
10234
10235 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10236
10237         * decl.c: NULL_PTR -> NULL.
10238         * jcf-write.c: Likewise.
10239
10240 2001-05-01  Tom Tromey  <tromey@redhat.com>
10241
10242         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10243         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10244         * gcj.texi: Updated copyright text.  Include fdl.texi.
10245         (Top): Link to new node.
10246
10247 2001-05-01  Per Bothner  <per@bothner.com>
10248
10249         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
10250
10251 2001-05-01  Per Bothner  <per@bothner.com>
10252
10253         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
10254         import_list contains the name, not the TREE_PURPOSE.
10255
10256 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10257
10258         * jcf-io.c (read_zip_member): Cast to long in comparison with
10259         signed value.
10260
10261         * jvspec.c (lang_specific_driver): Initialize variables.
10262
10263         * mangle.c (find_compression_record_match): Likewise.
10264
10265         * typeck.c (build_null_signature): Provide static prototype.  Mark
10266         parameter with ATTRIBUTE_UNUSED.
10267
10268         * verify.c (verify_jvm_instructions): Initialize variable.
10269
10270 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10271
10272         * parse.y (do_resolve_class): Check for cyclic inheritance during
10273         inner class resolution.
10274
10275 2001-04-27  Per Bothner  <per@bothner.com>
10276
10277         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
10278         while iterating, since that could cause gc to lose stuff.
10279
10280 2001-04-26  Per Bothner  <per@bothner.com>
10281
10282         Fix method search wrt scope of inner classes to match JLS2.
10283         * typeck.c (build_null_signature):  New static function.
10284         (has_method):  New function.  Uses build_null_signature and lookup_do.
10285         * java-tree.h (has_method):  New declaration.
10286         * parse.y (find_applicable_accessible_methods_list):  Do not search
10287         context of inner classes here.
10288         (patch_method_invocation):  Search scope, ie. current and outer clases,
10289         for method matching simple name, to find class.
10290
10291 2001-04-26  Per Bothner  <per@bothner.com>
10292
10293         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10294         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
10295
10296         * constants.c (find_methodref_with_class_index):  New function.
10297         (find_methodref_index):  Use find_methodref_with_class_index.
10298         * java-tree.h (find_methodref_with_class_index):  New declaration.
10299         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
10300         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10301         If context changed from interface to class, don't use invokeinterface.
10302
10303 2001-04-25  Per Bothner  <per@bothner.com>
10304
10305         * verify.c (verify_jvm_instructions):  For field instructions,
10306         check that field index is valid.  For invoke instructions, check that
10307         method index is valid.
10308
10309 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
10310
10311         * config-lang.in (target_libs): Copy from $libgcj_saved.
10312
10313 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10314
10315         * decl.c (init_decl_processing): Add new class "protectionDomain"
10316         field.
10317         * class.c (make_class_data): Set initial value for "protectionDomain".
10318
10319 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10320
10321         * jvspec.c (lang_specific_driver): Fix memory allocation
10322         deficit, by using concat in lieu of xmalloc/sprintf.
10323
10324 2001-04-20  Per Bothner  <per@bothner.com>
10325
10326         Fixes to compile multiple .class files at once.
10327         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
10328         * java-tree.h (CLASS_PARSED_P):  New macro.
10329         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10330         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
10331         (read_class):  Avoid some code duplication.
10332         Don't call JCF_FINISH for a .class file - might be needed later.
10333         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
10334         rather than CLASS_LOADED_P, since latter implies class laid out.
10335         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
10336         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
10337
10338 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10339
10340         * Make-lang.in (java/boehm.o): Depend on toplev.h.
10341
10342         * boehm.c: Include toplev.h.
10343
10344 2001-04-06  Tom Tromey  <tromey@redhat.com>
10345             Alexandre Petit-Bianco  <apbianco@redhat.com>
10346
10347         Fix for PR gcj/1404 and PR gcj/2332:
10348         * parse.y (build_array_from_name): If we use the type_wfl then
10349         accumulate dimensions from the original type as well.
10350         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10351
10352 2001-04-06  Tom Tromey  <tromey@redhat.com>
10353
10354         * parse.y (analyze_clinit_body): Return true if the second operand
10355         of a METHOD_EXPR is nonzero.
10356
10357 2001-04-06  Tom Tromey  <tromey@redhat.com>
10358
10359         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10360         directory.
10361         ($(srcdir)/java/parse.c): Likewise.
10362
10363 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10364
10365         * gcj.texi: Use `which-gcj' instead of `which-g77.'
10366         (version-gcc): Initialized.
10367         (which-gcj): Likewise.
10368
10369 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10370
10371         * java-tree.h (struct lang_decl): New macro
10372         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10373         * parse.y (build_instance_initializer): New function.
10374         (add_instance_initializer): Use it.
10375         (java_fix_constructors): Set `current_class' before fix pass.
10376         (fix_constructors): Just return if already fixed. Move `super()'
10377         invocation ahead. Use `build_instance_initializer.'
10378         Fixes PR java/1315.
10379
10380 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10381
10382         * parse.y (resolve_qualified_expression_name): Pass field's
10383         DECL_CONTEXT to `not_accessible_p.'
10384         (not_accessible_p): Changed parameters order in `inherits_from_p'
10385         invocation.
10386
10387 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
10388
10389         * lang-options.h: Add flag_check_references.
10390
10391 2001-04-04  Per Bothner  <per@bothner.com>
10392
10393         * java-tree.h (CONSTANT_VALUE_P):  New macro.
10394         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
10395         * parse.y (maybe_build_class_init_for_field):  New static function.
10396         (resolve_expression_name, resolve_field_access):  Use
10397         maybe_build_class_init_for_field instead of build_class_init
10398         This does not do the init if the field is compile-time-constant.
10399         (resolve_field_access):  Simplify.
10400
10401         * parse.y (fold_constant_for_init):  Merge test into switch.
10402
10403 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
10404
10405         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10406         on gansidecl.h.
10407         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10408
10409 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
10410
10411         * expr.c (pop_type_0): Save the result of the first
10412         lang_printable_name call in a scratch buffer, so it
10413         won't be clobbered by the second call.
10414
10415 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10416
10417         * parse-scan.y (array_type:): Rewritten.
10418         (type_declaration:): `empty_statement' replaces `SC_TK.'
10419         (class_member_declaration:): `empty statement' added.
10420         (method_body:): Simplified.
10421         (static_initializer:): Likewise.
10422         (primary_no_new_array:): Use `type_literals.'
10423         (type_literals:): New rule.
10424         (dims:): Set and update `bracket_count.'
10425         Fixes PR java/1074. Fixes PR java/2412.
10426
10427 2001-03-28  Hans Boehm  <boehm@acm.org>
10428
10429         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10430         (get_boehm_type_descriptor): Set type on returned value to be a
10431         pointer length integer.
10432
10433 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10434
10435         * expr.c (pop_type_0): Call `concat' rather than building the
10436         string manually.
10437         (pop_type): Add format specifier in call to `error'.
10438
10439         * parse.y (patch_method_invocation): Avoid casting away
10440         const-ness.
10441
10442 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
10443
10444         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10445
10446 2001-03-28  Richard Henderson  <rth@redhat.com>
10447
10448         IA-64 ABI Exception Handling:
10449         * Make-lang.in (except.o): Don't depend on eh-common.h.
10450         * check-init.c (check_init): Handle EXC_PTR_EXPR.
10451         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10452         [soft_exceptioninfo_call_node]: Remove.
10453         [eh_personality_libfunc, lang_eh_runtime_type]: New.
10454         (end_java_method): No emit_handlers.
10455         * except.c (java_set_exception_lang_code): Remove.
10456         (method_init_exceptions): Don't call it.
10457         (prepare_eh_table_type): No CATCH_ALL_TYPE.
10458         (build_exception_object_ref): New.
10459         (expand_end_java_handler): Update for except.h name changes.
10460         (emit_handlers, expand_resume_after_catch): Remove.
10461         * expr.c (java_lang_expand_expr): Update for except.h name changes.
10462         (process_jvm_instruction): Use build_exception_object_ref.
10463         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10464         (soft_exceptioninfo_call_node): Remove.
10465         (build_exception_object_ref): Declare.
10466         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10467         soft_exceptioninfo_call_node.  Move processing ...
10468         [EXC_PTR_EXPR]: ... here.
10469         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10470         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10471         (source_end_java_method): No java_set_exception_lang_code or
10472         emit_handlers.
10473         (build_dot_class_method): Use build_exception_object_ref.
10474         (try_reference_assignconv): Check EXC_PTR_EXPR not
10475         soft_exceptioninfo_call_node.
10476
10477 2001-03-28  Richard Henderson  <rth@redhat.com>
10478
10479         * java-tree.h (throw_node): Define as a single member of
10480         java_global_trees instead of a separate array.
10481         (JTI_THROW_NODE): New.
10482         * decl.c (throw_node): Don't declare.
10483         (init_decl_processing): Init a scalar throw_node.
10484         Don't register it for gc.
10485         * check-init.c (check_init): Reference scalar throw_node.
10486         * expr.c (build_java_athrow): Likewise.
10487         * jcf-write.c (generate_bytecode_insns): Likewise.
10488         * parse.h (BUILD_THROW): Likewise.
10489
10490 2001-03-28  Richard Henderson  <rth@redhat.com>
10491
10492         * decl.c (end_java_method): Do not save and restore
10493         flag_non_call_exceptions.
10494         * parse.y (source_end_java_method): Likewise.
10495         * lang.c (flag_exceptions): Don't declare.
10496         (java_init_options): Set flag_non_call_exceptions.  Set
10497         flag_exceptions here ...
10498         (java_init): ... not here.
10499
10500 2001-03-27  Richard Henderson  <rth@redhat.com>
10501
10502         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
10503         exceptions_via_longjmp.
10504
10505         * lang.c (flag_new_exceptions): Don't declare it.
10506         (java_init_options): Or set it.
10507
10508 2001-03-27  Richard Henderson  <rth@redhat.com>
10509
10510         * decl.c (end_java_method): Rename asynchronous_exceptions to
10511         flag_non_call_exceptions.
10512         * parse.y (source_end_java_method): Likewise.
10513
10514 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10515
10516         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
10517
10518 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
10519
10520         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
10521
10522 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10523
10524         * parse.y (find_as_inner_class): Follow current package
10525         indications not to mistakingly load an unrelated class.
10526
10527 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10528
10529         * constants.c (PUTN): Use memcpy, not bcopy.
10530
10531         * lex.c (java_read_char): Use memmove, not bcopy.
10532
10533         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
10534
10535 2001-03-23  Per Bothner  <per@bothner.com>
10536
10537         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
10538         macro for better error pin-pointing.
10539         * java-tree.h:  Fix typo in comment.
10540
10541         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
10542         Don't include jsr/goto in exception range.
10543         Check if start and end of exception range are the same (also TRY_EXPR).
10544         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
10545         However, do emit the following goto even if try_block is empty.
10546         Defer freeing exception_decl until after the finalizer, to make
10547         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
10548
10549         * parse.y (java_complete_lhs):  If the try-clause is empty, just
10550         return the finally-clause and vice versa.
10551
10552 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10553
10554         * gcj.texi (Input Options): documented the check for attribute
10555         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
10556         * java-tree.h (flag_force_classes_archive_check): Declared extern.
10557         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
10558         (jcf_parse): Check for the right classes archive if necessary.
10559         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
10560         (jcf_parse_fields): Fixed indentation.
10561         * jcf-write.c (append_gcj_attribute): New function.
10562         (generate_classfile): Compute the attribute count, invoke
10563         `append_gcj_attribute'.
10564         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
10565         turned into bit-fields. New bit-field `right_zip.'
10566         (JCF_ZERO): Set `right_zip' to zero.
10567         * lang-options.h (-fforce-classes-archive-check): Added flag.
10568         * lang.c (flag_force_classes_archive_check): New flag.
10569         (lang_f_options): New entry `force-classes-archive-check.'
10570         Fixes PR java/1213.
10571
10572 2001-02-07  Andrew Haley  <aph@redhat.com>
10573
10574         * gcj.texi (Configure-time Options): Add -fcheck-references.
10575         * expr.c (build_java_indirect_ref): New function.
10576         (java_check_reference): New function.
10577         (build_java_array_length_access): Use build_java_indirect_ref to
10578         check for null references.
10579         (build_java_arrayaccess): Likewise.
10580         (build_get_class): Likewise.
10581         (build_field_ref): Likewise.
10582         (invoke_build_dtable): Likewise.
10583         (build_invokeinterface): Likewise.
10584         * lang.c (lang_f_options): Add flag_check_references.
10585         * jvspec.c (jvgenmain_spec): Add flag_check_references.
10586         * java-tree.h (flag_check_references): New variable.
10587         * lang.c (flag_check_references): Likewise.
10588         * parse.y (patch_invoke): Use java_check_reference.
10589         (patch_assignment): Allow for extra nesting in
10590         _Jv_CheckArrayStore.
10591
10592 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
10593
10594         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
10595         * lex.c (cxx_keywords): Likewise.
10596
10597 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10598
10599         * parse.y (qualify_ambiguous_name): Broaden `length'
10600         recognition. Help MODIFY_EXPR be resolved as expression names.
10601         Fixes PR java/2066. Fixes PR java/2400.
10602
10603 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
10604
10605         * gjavah.c (process_file): Mark interface definitions with
10606         "__attribute__ ((java_interface))".
10607
10608 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
10609
10610         * class.c (layout_class): Fixed push_super_field's second
10611         argument. Fixes PR java/2333.
10612         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
10613         too early to lay innerclasses out.
10614
10615 2001-03-20  Tom Tromey  <tromey@redhat.com>
10616             Alexandre Petit-Bianco <apbianco@redhat.com>
10617
10618         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
10619         inside an array reference. Insertion of the array store check
10620         rewritten. Fixes PR java/2299.
10621
10622 2001-03-20  Tom Tromey  <tromey@redhat.com>
10623
10624         * lex.c (java_read_unicode): Only accept leading `u's.
10625
10626 2001-03-20  Tom Tromey  <tromey@redhat.com>
10627
10628         * jcf-parse.c (read_class): Initialize `class'.
10629
10630 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10631
10632         * jcf_parse.c (jcf_parse): Eliminate unused variable.
10633
10634 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
10635
10636         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
10637         (layout_class): Likewise.
10638         (layout_class_method): Likewise.
10639         (emit_register_classes): Likewise.
10640         * decl.c (builtin_function): Likewise.
10641         (give_name_to_locals): Likewise.
10642
10643 2001-03-19  Per Bothner  <per@bothner.com>
10644
10645         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
10646         before trying to load an inner class.
10647
10648         Fixes to process to command-line .class files in two passes.
10649         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
10650         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
10651         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
10652         * class.c (is_compiled_class):  Fix for renamed flag.
10653         * parse.y (maybe_create_class_interface_decl):  Likewise.
10654         * jcf-parse.c (yyparse):  Also set if compiling .class files.
10655         * jcf-parse.c (read_class);  Read current_class.
10656         (jcf_parse):  Make static.
10657         (load_inner_classes):  New function, with code moved from jcf_parse,
10658         because we need to inner classes after the command-line files are read.
10659         (yyparse):  Set finput to NULL when it doesn't need to be closed.
10660         Reduce use of main_jcf (basically only for archive) and
10661         use finput instead of main_jcf->read_state.
10662         Inline jcf_figure_file_type into yyparse.
10663         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
10664         Defer load_inner_classes and parse_class_file to a second pass,
10665         after we've correctly mapped command-line .clas fiels to classes.
10666         (jcf_figure_file_type):  Removed.
10667         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
10668         (JCF_ZERO):  Also clear zipd field.
10669         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
10670
10671 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10672
10673         * jcf-parse.c (yyparse): Change ch from char * to char.
10674
10675 2001-03-19  Per Bothner  <per@bothner.com>
10676
10677         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
10678         Add constructed filelist-file at end, following -xjava.  Thus any .o
10679         and library files are not affected by the -xjava.  Also wrap
10680         explicit @FILE with -xjava and -xnone.
10681
10682 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
10683
10684         * class.c (build_static_field_ref): Call make_decl_rtl() after
10685         setting the DECL_EXTERNAL flag.
10686
10687 2001-03-17  Per Bothner  <per@bothner.com>
10688
10689         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
10690
10691         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
10692         when result is is needed (target is STACK_TARGET).
10693
10694         * parse.h (JDEP_SOLV):  Removed.
10695         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
10696
10697         * parse.y (incomplete_class_list): Removed.
10698         (obtain_incomplete_type): Don't use or set incomplete_class_list.
10699         It doesn't work if resolve_class changes the name of an array type
10700         that is on the list and then someone else looks for the modified name.
10701         Also, seems liable to break when compiling multiple source files at
10702         once.  So the simplest is to just remove incomplete_class_list -
10703         it is only a minor space win and it is not even clear it saves time.
10704
10705         * parse.y (resolve_class):  Remove unneeded promote_type.
10706
10707 2001-03-15  Per Bothner  <per@bothner.com>
10708
10709         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
10710         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
10711         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
10712         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
10713
10714         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
10715         * parse.y (java_expand_classes):  Likewise.
10716
10717         * parse.y (expand_start_java_method):  Was only called once and had a
10718         misleading name, so inline in caller java_complete_expand_method.
10719         (enter_a_block):  Likewise inline in enter_block and remove.
10720
10721         Remove junk from when gcc/java was created (by copying from C/C++).
10722         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
10723         (struct binding_level):  Remove fields keep, keep_if_subblocks,
10724         more_cleanups_ok, have_cleanups (which have never been used).
10725         (pushlevel, poplevel):  Remove related useless code.
10726
10727         * class.c (make_class_data):  The class_dtable_decl (i.e. the
10728         vtable for Class) should be external, except when compiling Class.
10729
10730         * jvspec.c (lang_specific_driver):  Fix -C handling.
10731         Check -save-temps to see if temp @FILE should be deleted.
10732         Follow-up to/fix for February 16 patch.
10733
10734         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
10735         (type_stack_dup):  Remove no-longer neded error check.
10736
10737 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
10738
10739         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
10740         to 'for_pointer'. If this type is for a pointer (argument) mangling,
10741         don't surround the element with 'N..E' if the type name is
10742         unqualified.
10743
10744 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
10745
10746         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
10747         DECL_RTL_SET_P, etc.
10748         (make_method_value): Likewise.
10749         (get_dispatch_table): Likewise.
10750
10751         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
10752
10753 2001-03-07  Tom Tromey  <tromey@redhat.com>
10754
10755         * config-lang.in (lang_requires): Define.
10756
10757 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
10758
10759         * typeck.c (convert): Check flag_unsafe_math_optimizations,
10760         not flag_fast_math.
10761
10762 2001-03-05  Per Bothner  <per@bothner.com>
10763
10764         Fix a problem where rest_of_decl_compilation applied to
10765         class_dtable_decl causes problems because it was done too early,
10766         before output file was opened.
10767         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
10768         * class.c (class_dtable_decl):  Add macro - element of class_roots.
10769         (make_class_data):  Define class_dtable_decl.
10770         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
10771
10772 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10773
10774         * java/class.c, java/decl.c, java/java-tree.h: Replace all
10775         uses of 'boolean' with 'bool'.
10776
10777 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
10778
10779         * lang-specs.h: Add zero initializer for cpp_spec field to all
10780         array elements.
10781
10782 2001-02-16  Per Bothner  <per@bothner.com>
10783
10784         Handle compiling multiple input files at once, and @FILE syntax.
10785         * gcj.texi:  Updated documentation to match.
10786         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
10787         * jcf-parse.c (parse_source_file):  Split into ...
10788         (parse_source_file_1):  New function - and:
10789         (parse_source_file_2):  New function.
10790         (yyparse):  On -ffilelist-file, open and scan named file.
10791         On first pass over files, only do parse_source_file_1.
10792         A new second pass calls parse_source_file_2 for each file to compile.
10793         (init_jcf_parse):  Call init_src_parse.
10794         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
10795         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
10796         as multiple input file combined in one compilation.
10797         * lang-options.h:  Add -ffilelist-file
10798         * lang.c (flag_filelist_file):  New flag variable.
10799         (lang_f_options):  Handle -ffilelist-file.
10800         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
10801         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
10802         gclass_list - use global fields of src_parse_roots instead.
10803         * parse.y (src_parse_roots):  New array.
10804         (incomplete_class_list, gclass_list):  New macros.
10805         (push_parser_context, java_pop_parser_context,
10806         java_parser_context_resume):  Don't fiddle with deleted fields.
10807         (various):  Use incomplete_class gclass_list and global macros
10808         instead of parse_ctxt fields - the lists are global.
10809         (init_src_parse):  New function.
10810
10811 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10812
10813         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
10814
10815 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10816
10817         * parse.y (check_inner_class_access): Moved declaration of local
10818         `enclosing_decl_type' to the right location.
10819
10820 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
10821
10822         * parse.y (parser_check_super_interface): Don't call
10823         check_pkg_class_access for an inner interface.
10824         (parser_check_super): Don't call check_pkg_class_access for inner
10825         class.
10826         (do_resolve_class): Simplify enclosing type loop. Don't call
10827         check_pkg_class_access if CL and DECL are not set.
10828         (find_in_imports_on_demand): Set DECL if class_type needed to be
10829         loaded. Don't call check_pkg_class_access for an inner class.
10830         (check_inner_class_access): Rewritten to implement member access
10831         rules as per spec 6.6.1.
10832         (check_pkg_class_access): Handle the empty package correctly.
10833         (in_same_package): New function. Determine if two classes are in the
10834         same package.
10835
10836 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
10837
10838         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
10839         method into array types.
10840         * parse.y (patch_method_invocation): Bypass access check on clone call
10841         to array instance.
10842
10843 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10844
10845         * expr.c (build_instanceof): Check for arrays when trying fold to
10846         false.
10847
10848 2001-02-15  Jim Meyering  <meyering@lucent.com>
10849
10850         * Make-lang.in (java.install-common): Depend on `installdirs'.
10851         (java.install-info): Likewise.
10852
10853 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
10854
10855         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
10856
10857 2001-02-14  Tom Tromey  <tromey@redhat.com>
10858             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10859
10860         Fix for PR java/1261.
10861         * typeck.c (build_java_array_type): Add public `clone' method to
10862         arrays.
10863         * parse.y (resolve_qualified_expression_name): Use current_class
10864         when checking for inaccessibility.
10865         (patch_method_invocation): Fixed error message when accessibility
10866         denied.  Added `from_super' argument.
10867
10868 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10869
10870         * parse.y (resolve_class): Don't build a fake decl. Use the one
10871         already built.
10872         * typeck.c (build_java_array_type): Build and assign decl to array
10873         type.
10874
10875 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
10876
10877         * parse.y (not_accessible_p): Changed leading comment. Added extra
10878         `where' argument. Use it to enforce protected access rules.
10879         (resolve_qualified_expression_name): Added extra argument to
10880         not_accessible_p.
10881         (patch_method_invocation): Use argument `primary' to provide
10882         not_accessible_p with an extra argument.
10883         (lookup_method_invoke): Added extra argument to not_accessible_p.
10884         (search_applicable_method_list): Likewise.
10885
10886 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10887
10888         * parse.y (resolve_qualified_expression_name): Try to resolve as
10889         an inner class access only if `decl' is a TYPE_DECL.
10890
10891 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10892
10893         * decl.c (classdollar_identifier_node): Initialize.
10894         * java-tree.h (enum java_tree_index): New entry
10895         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
10896         (classdollar_identifier_node): New macro.
10897         (ID_CLASSDOLLAR_P): Likewise.
10898         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
10899         (build_dot_class_method_invocation): Likewise.
10900         (find_applicable_accessible_methods_list): `class$' can't be
10901         inherited.
10902
10903 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
10904
10905         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
10906
10907 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10908
10909         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
10910         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
10911         gone.
10912
10913 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10914
10915         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
10916         outside of the `__U' sequence too.
10917         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
10918         sequence too.
10919
10920 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10921
10922         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
10923
10924 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10925
10926         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
10927         (JVGENMAIN_OBJS): Likewise.
10928         * java-tree.h (append_gpp_mangled_name): New prototype.
10929         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
10930         Removed cast calling `gcc_add_root.'
10931         * jvgenmain.c (mangle_obstack): New global, initialized.
10932         (main): Use it.
10933         (do_mangle_class): Constify local `ptr.'
10934         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
10935         append_gpp_mangle_name and update `count' if necessary.
10936         Use `mangle_obstack.'
10937         * mangle.c (append_unicode_mangled_name): Removed.
10938         (append_gpp_mangled_name): Likewise.
10939         (unicode_mangling_length): Likewise.
10940         (mangle_member_name): Return type set to `void.'
10941         (mangle_field_decl): Don't append `U' in escaped names.
10942         (mangle_method_decl): Likewise.
10943         (mangle_member_name): Just use `append_gpp_mangled_name.'
10944         * mangle_name.c: New file.
10945
10946 2001-02-07  Per Bothner  <per@bothner.com>
10947
10948         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
10949
10950         * check-init.c (check_init):  Don't call done_alternative after
10951         processing loop code, as a LOOP_EXPR never terminates normally.
10952
10953 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
10954
10955         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
10956
10957 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10958
10959         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
10960         DECLs.
10961
10962 2001-02-06  Tom Tromey  <tromey@redhat.com>
10963
10964         * lex.c (java_new_lexer): Longer error message.
10965
10966 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
10967             Alexandre Petit-Bianco  <apbianco@cygnus.com>
10968
10969         * typeck.c (build_prim_array_type): Added leading comment.
10970         (build_java_array_type): Moved locals out of
10971         block. Always create the `data' field, fixed alignment to match
10972         C++.
10973
10974 2001-02-04  Tom Tromey  <tromey@redhat.com>
10975
10976         * expr.c (java_lang_expand_expr): Don't bother recomputing
10977         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
10978         Fixes PR java/1866.
10979
10980 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
10981
10982         * parse.y (process_imports): Save the original name of the import
10983         for better error report.
10984
10985 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
10986
10987         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
10988         of macros used when compiling jvspec.c.
10989         * jvspec.c (lang_specific_driver): Link with the shared
10990         libgcc by default.
10991
10992 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10993
10994         * check-init.c (check_init): Call internal_error instead of fatal.
10995         * expr.c (java_lang_expand_expr): Likewise.
10996         * jcf-parse.c (get_constant): Likewise.
10997         * mangle.c (java_mangle_decl): Likewise.
10998         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
10999         (operator_string): Likewise.
11000         * check-init.c (check_init): Call abort instead of fatal.
11001         * class.c (build_class_ref): Likewise.
11002         * constants.c (write_constant_pool): Likewise.
11003         * decl.c (start_java_method): Likewise.
11004         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11005         (java_stack_dup, encode_newarray_type): Likewise.
11006         (build_java_array_length_access): Likewise.
11007         (build_java_check_indexed_type, expand_java_pushc): Likewise.
11008         (build_java_soft_divmod, build_invokeinterface): Likewise.
11009         * java-tree.h (INNER_CLASS_P): Likewise.
11010         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11011         (give_name_to_class, get_class_constant): Likewise.
11012         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11013         (find_constant_index, generate_bytecode_conditional): Likewise.
11014         (generate_bytecode_insns, perform_relocations): Likewise.
11015         * lex.c (java_unget_unicode, java_lex): Likewise.
11016         * mangle.c (mangle_type, mangle_record_type): Likewise.
11017         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11018         (finish_mangling): Likewise.
11019         * parse.h (MARK_FINAL_PARMS): Likewise.
11020         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11021         (obtain_incomplete_type, java_complete_class): Likewise.
11022         (java_check_regular_methods, java_complete_expand_method): Likewise.
11023         (cut_identifier_in_qualified, check_deprecation): Likewise.
11024         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11025         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11026         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11027         * typeck.c (set_local_type, parse_signature_type): Likewise.
11028         (parse_signature_string, build_java_signature): Likewise;
11029         (set_java_signature): Likewise.
11030         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11031         * class.c (add_method): Call fatal_error instead of fatal.
11032         (build_static_field_ref): Likewise.
11033         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11034         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11035         * lex.c (java_new_new_lexer): Likewise.
11036         * jv-scan.c (main): Likewise.
11037         (fatal_error): Renamed from fatal.
11038         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11039         pfatal_with_name.
11040         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11041         (yyparse): Likewise.
11042         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11043         * lex.c (java_get_line_col): Likewise.
11044         * jcf-parse.c (load_class): Make errors non-fatal.
11045         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11046
11047 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11048
11049         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11050         (error): Remove unused function.
11051         (main): Don't use "__attribute__ alias" on generated class symbol.
11052
11053 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11054
11055         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11056         argument.
11057         * parse.y (finish_method_declaration): Code accounting for WFLed
11058         method DECL_NAMEs deleted.
11059         (check_abstract_method_definitions): Likewise.
11060         (resolve_type_during_patch): Layout resolved type.
11061         * typeck.c (lookup_do): Removed unused local.
11062
11063 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11064
11065         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11066         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11067         integer_negative_one_node.
11068         * expr.c (build_java_binop): Likewise.
11069
11070 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11071
11072         * zextract.c (read_zip_archive): Read file_offset before writing
11073         zipd and consequently clobbering the header contents.
11074
11075 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11076
11077         * Make-lang.in: Remove all dependencies on defaults.h.
11078         * decl.c: Don't include defaults.h.
11079         * expr.c: Likewise.
11080         * parse.y: Likewise.
11081
11082 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11083
11084         * ChangeLog (2001-01-21): Fixed typo.
11085         * class.c (layout_class_method): Code accounting for WFLed
11086         method DECL_NAMEs deleted.
11087         * constant.c (find_methodref_index): Likewise.
11088         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11089         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11090         (struct lang_decl): New field `wfl'.
11091         (java_get_real_method_name): Prototype deleted.
11092         * mangle.c (mangle_method_decl): Code accounting for WFLed
11093         method DECL_NAMEs deleted.
11094         * parse.h (GET_METHOD_NAME): Macro deleted.
11095         * parse.y (reset_method_name): Deleted.
11096         (method_header): Set DECL_FUNCTION_WFL.
11097         (check_abstract_method_header): Code accounting for WFLed method
11098         DECL_NAMEs deleted.
11099         (java_get_real_method_name): Deleted.
11100         (check_method_redefinition): Code accounting for WFLed method
11101         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11102         (java_check_regular_methods): Likewise.
11103         (java_check_abstract_methods): Likewise.
11104         (java_expand_classes): Don't call `reset_method_name.'
11105         (search_applicable_method_list): Use DECL_NAMEs instead of
11106         GET_METHOD_NAME.
11107         * typeck.c (lookup_do): Code accounting for WFLed method
11108         DECL_NAMEs deleted.
11109
11110 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
11111
11112         * lex.c (java_read_char): Check for EOF from getc first.
11113
11114 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11115
11116         * class.c (layout_class): Don't lay the superclass out if it's
11117         already being laid out.
11118         * jcf-parse.c (handle_innerclass_attribute): New function.
11119         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11120         handle_innerclasses_attribute.
11121         (jcf_parse): Don't load an innerclasses if it's already being
11122         laid out.
11123         * jcf-write.c (append_innerclass_attribute_entry): Static
11124         `anonymous_name' and its initialization deleted. `ocii' and `ini'
11125         to be zero for anonymous classes.
11126
11127 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11128
11129         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11130         necessary.
11131         * jcf-parse.c (set_source_filename): Use
11132         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11133
11134 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11135
11136         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11137         gets a unique asm name.
11138
11139 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11140
11141         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11142         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11143         if necessary.
11144         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11145         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11146         * parse.y (lookup_package_type_and_set_next): Deleted.
11147         (resolve_package): Removed unnecessary code.
11148         (find_applicable_accessible_methods_list): `finit$' can't be
11149         inherited.
11150         * verify.c (pop_argument_types): Added missing prototype.
11151
11152 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
11153
11154         * config-lang.in: Disable java by default.
11155
11156 2001-01-23  Tom Tromey  <tromey@redhat.com>
11157
11158         * gcj.texi (Copying): New node.
11159         Added copyright information.
11160
11161 2001-01-21  Per Bothner  <per@bothner.com>
11162
11163         Various fixes to allow compiling a compressed .jar/.zip archive.
11164         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
11165         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
11166         (struct ZipDirectory):  New field zipf points to owning ZipFile.
11167         * jcf.h (struct ZipDirectory):  Add forward declaration.
11168         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
11169         Remove seen_in_zip and zip_offset fields.
11170         (JCF_SEEN_IN_ZIP):  New macro.
11171         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
11172         * jcf-io.c:  Change all ZipFileCache to ZipFile.
11173         (read_zip_member):  New function.
11174         (open_in_zip):  Call read_zip_member.
11175         * jcf-parse.c (find_in_current_zip):  Remove function.
11176         (read_class):  Merge in find_in_current_zip functionality.
11177         Call read_zip_member if needed.
11178         (parse_zip_file_entries):  Use read_zip_member.
11179         (process_zip_dir):  Update for removed and added JCF fields.
11180         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
11181
11182 2001-01-21  Per Bothner  <per@bothner.com>
11183
11184         Minor optimization of static ggc roots.
11185         * jcf-parse.c (parse_roots):  New static field.
11186         (current_field, current_method, current_file_list):  Replace by macros
11187         naming fields of parse_roots.
11188         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
11189         * class.c (class_roots):  New static field.
11190         (registered_class, fields_ident, info_ident, class_list):
11191         New macros naming fields of parse_roots.
11192         (build_static_field_ref):  Don't register roots here.
11193         (layout_class):  Static field list replaced by macro class_list.
11194         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
11195         Initialize fields_ident and info_ident here.
11196
11197 2001-01-21  Per Bothner  <per@bothner.com>
11198
11199         * jcf-parse.c (ggc_mark_jcf):  New function.
11200         (init_jcf_parse):  Register current_jcf as ggc root.
11201
11202 2001-01-21  Per Bothner  <per@bothner.com>
11203
11204         * lang.c (put_decl_node):  Print method's name.
11205
11206 2001-01-21  Per Bothner  <per@bothner.com>
11207
11208         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
11209         (verify_jvm_instructions):  Use it, for better error messages on loads.
11210
11211 2001-01-21  Per Bothner  <per@bothner.com>
11212
11213         * verify.c (merge_type_state):  Still may have to merge even if
11214         LABEL_VERIFIED (label).
11215
11216 2001-01-21  Per Bothner  <per@bothner.com>
11217
11218         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
11219         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11220
11221 2001-01-19  Per Bothner  <per@bothner.com>
11222
11223         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
11224         if expeting an interface type.  Refines Tom's change of 2000-09-12.
11225
11226 2001-01-18  Per Bothner  <per@bothner.com>
11227
11228         * gcj.texi (Input Options): Mention .java files.
11229
11230 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11231
11232         * lang-options.h (-Wunsupported-jdk11): Removed.
11233         * lang.c (flag_not_overriding): Deleted.
11234         (flag_static_local_jdk1_1): Likewise.
11235         (lang_W_options): Removed "unsupported-jdk11" entry.
11236         * parse.y (java_check_methods): Removed dead code.
11237
11238 2001-01-17  Tom Tromey  <tromey@redhat.com>
11239
11240         Changes suggested by Per Bothner:
11241         * gcj.texi (Input Options): Don't mention input files.
11242         (Code Generation): Updated --main information.
11243         (Invoking jcf-dump): Mention that --javap is incomplete.
11244         From Alexandre Petit-Bianco:
11245         (Warnings): Don't mention -Wunsupported-jdk11.
11246         My stuff:
11247         (Compatibility): Mention JDK 1.2-ness of libraries.
11248         (Resources): Mention resources used when writing gcj.
11249
11250 2001-01-17  Tom Tromey  <tromey@redhat.com>
11251
11252         * gcj.texi: New file.
11253         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11254         (java.info): Depend on gcj.info.
11255         (java/gcj.dvi): New target.
11256         (java.dvi): Depend on gcj.dvi.
11257         (java.install-info): Wrote.
11258
11259 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
11260
11261         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11262         having called make_decl_rtl.
11263
11264 2001-01-14  Per Bothner  <per@bothner.com>
11265
11266         Various patches to emit better messages on verification errors.
11267         * expr.c (push_type_0):  Return error indication on stack overflow,
11268         instead of callinfg fatal.
11269         (push_type):  Now just call push_type_0 (nd fatal on overflow).
11270         (pop_type_0):  Return detailed error message (in a char** argument).
11271         (pop_type):  If pop_type_0 fails, print error message.
11272         (pop_argument_types):  Moved to verify.c.
11273         * verify.c (pop_argument_types):  Moved from expr.c.
11274         Return a (possible) error message, rather than void.
11275         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
11276         (verify_jvm_instruction):  Use new macros, improving error messages.
11277         For case OPCODE_astore use object_ptr_type_node.
11278         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
11279         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
11280
11281         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11282         constant, return body without wrapper.  (Improves constant folding.)
11283         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
11284
11285 2001-01-13  Per Bothner  <per@bothner.com>
11286
11287         * expr.c (expand_java_field_op):  Assigning to a final field outside
11288         an initializer does not violate JVM spec, so should be warning, not
11289         error.  (Sun's verifier does not complain - though MicroSoft's does.)
11290
11291 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
11292
11293         * gjavah.c (version), jcf-dump.c (version): Update copyright year
11294         to 2001.
11295
11296 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
11297
11298         * parse.y (resolve_expression_name): Permit instance variables from
11299         enclosing context in super constructor call.
11300         (resolve_qualified_expression_name): Permit enclosing class's qualified
11301         "this" in super constructor call.
11302
11303 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11304
11305         * class.c (build_utf8_ref): Remove last argument in call to
11306         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11307         (build_class_ref): Likewise.
11308         (build_static_field_ref): Likewise.
11309         (get_dispatch_table): Likewise.
11310         (layout_class_method): Likewise.
11311         (emit_register_classes): Likewise.
11312         * constants.c (build_constant_data_ref): Likewise.
11313         * decl.c (builtin_function): Likewise.
11314         (create_primitive_vtable): Likewise.
11315         * expr.c (build_known_method_def): Likewise.
11316         (build_jni_stub): Likewise.
11317         (java_lang_expand_expr): Likewise.
11318
11319 2001-01-10  Tom Tromey  <tromey@redhat.com>
11320
11321         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11322
11323 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11324
11325         * java-tree.h (lang_printable_name_wls): New prototype.
11326         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11327         rather than `current_class' to print type name. Don't prepend type
11328         names when printing constructor names.
11329         (lang_printable_name_wls): New function.
11330         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11331         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11332         * parse.y (patch_method_invocation): Message tuned for constructors.
11333         (not_accessible_p): Grant `private' access from within
11334         enclosing contexts.
11335
11336 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11337
11338         All files with updated copyright when applicable.
11339         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11340         * class.c (mangle_class_field): Function removed.
11341         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11342         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11343         (build_class_ref): Call `java_mangle_class_field' instead of
11344         `mangle_class_field.'
11345         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11346         (layout_class): Call `java_mangle_decl' instead of
11347         `mangle_static_field.'
11348         (cxx_keywords): Initialized static array moved to `lex.c.'
11349         (layout_class_method): Changed leading comment. Simplified to
11350         call `java_mangle_decl.' Local `ptr' moved in for loop body.
11351         * decl.c (lang_mark_tree): Mark field `package_list.'
11352         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11353         (struct lang_type): New field `package_list.'
11354         (unicode_mangling_length): Prototype removed.
11355         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11356         emit_unicode_mangled_name): Likewise.
11357         (cxx_keyword_p): New prototype.
11358         (java_mangle_decl, java_mangle_class_field,
11359         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11360         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11361         `build_expr_wfl.'
11362         * jvgenmain.c (main_method_prefix): Global variable removed.
11363         (main_method_suffix): Likewise.
11364         (do_mangle_classname): New function.
11365         (main): Call it. Format changed to accommodate new mangling scheme.
11366         * lex.c: (utf8_cmp): Conditionally prototyped.
11367         (cxx_keywords): Moved from class.c, conditionally defined.
11368         (utf8_cmp, cxx_keyword_p): Likewise.
11369         * mangle.c (obstack.h, ggc.h): Included.
11370         (mangle_field_decl): New function.
11371         (mangle_method_decl, mangle_type, mangle_pointer_type,
11372         mangle_array_type, mangle_record_type,
11373         find_compression_pointer_match, find_compression_array_match,
11374         find_compression_record_match,
11375         find_compression_array_template_match, set_type_package_list,
11376         entry_match_pointer_p, emit_compression_string, init_mangling,
11377         finish_mangling, compression_table_add, mangle_member_name): Likewise.
11378         (mangle_obstack): New global.
11379         (MANGLE_RAW_STRING): New macro.
11380         (unicode_mangling_length): Turned static.
11381         (append_unicode_mangled_name): Renamed from
11382         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
11383         replaces `obstack', removed from the parameter list.
11384         (append_gpp_mangled_name): Turned static. `mangle_obstack'
11385         replaces parameter `obstack', removed from the parameter list. Call
11386         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11387         (append_gpp_mangled_classtype): Removed.
11388         (compression_table, compression_next): New static variables.
11389         * parse.y (temporary_obstack): Extern declaration removed.
11390
11391 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11392
11393         * parse.y (patch_binop): Compute missing type in error situations.
11394
11395 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11396
11397         * class.c (make_class_data): Push initial value for "arrayclass".
11398         * decl.c (init_decl_processing): Add new class field "arrayclass".
11399
11400 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11401
11402         From patha@softlab.ericsson.se:
11403         * parse.y (switch_label): Use build, not build1, to construct
11404         DEFAULT_EXPR.
11405
11406 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
11407
11408         * lang.c (lang_decode_option): Change -MA to -MP.
11409         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11410         Update to new prototype; do quote targets.
11411         (jcf_dependency_write): Update.
11412
11413 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
11414
11415         Shorten primitive array allocation path:
11416         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11417         to create new primitive arrays.
11418         * expr.c (build_newarray): If generating native code, call
11419         soft_newarray_node with a reference to the primitive TYPE identifier
11420         instead of type_value.
11421
11422 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
11423
11424         Fix for PRs gcj/312 and gcj/253:
11425         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11426         dest if they arn't already.
11427         * class.c (layout_class): Call maybe_layout_super_class on
11428         superinterfaces also, but only if compiling from bytecode.
11429
11430         Fix for PR gcj/373:
11431         * parse.y (create_class): Set ACC_STATIC if class is declared in an
11432         interface.
11433
11434 2000-12-15  Tom Tromey  <tromey@redhat.com>
11435
11436         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11437         set.
11438
11439 2000-12-14  Andrew Haley  <aph@redhat.com>
11440
11441         * boehm.c (mark_reference_fields): Change test to correctly detect
11442         bitmap overflow.
11443
11444 2000-12-15  Andreas Jaeger  <aj@suse.de>
11445
11446         * config-lang.in (lang_dirs): Added.
11447
11448 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11449
11450         * parse.y (end_artificial_method_body): Fixed undefined behavior.
11451         Credits go to rth for finding it.
11452
11453 2000-12-13  Mike Stump  <mrs@wrs.com>
11454
11455         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11456
11457 2000-11-07  Tom Tromey  <tromey@cygnus.com>
11458
11459         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11460         * lex.c (java_ignorable_control_p): Removed.
11461         (java_letter_or_digit_p): Removed.
11462         (java_start_char_p): New function.
11463         (java_read_char): Return `int', not `unicode_t'.  Changed
11464         callers.
11465         (java_read_unicode): Likewise.
11466         (java_read_unicode_collapsing_terminators): Likewise.
11467         (java_get_unicode): Likewise.
11468         (java_new_lexer): Initialize hit_eof.
11469         (java_parse_end_comment): Take `int' argument.
11470         (java_parse_doc_section): Likewise.
11471         (java_parse_escape_sequence): Don't allow backlash-newline.
11472         Return `int'.
11473         * lex.h (JAVA_DIGIT_P): Removed.
11474         (_JAVA_LETTER_OR_DIGIT_P): Removed.
11475         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11476         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11477         (JAVA_PART_CHAR_P): New macro.
11478         (UEOF): Now -1.
11479         (JAVA_CHAR_ERROR): Now -2.
11480         (java_lexer): New field `hit_eof'.
11481         * chartables.h: New file.
11482         * gen-table.pl: new file.
11483
11484 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11485             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11486
11487         * parse.y (java_complete_lhs): Only allow compound assignment of
11488         reference type if type is String.
11489
11490 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11491
11492         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11493         jcf-path.c: Likewise.
11494
11495 2000-12-09  Anthony Green  <green@redhat.com>
11496
11497         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
11498         filestart and filename_length as int values.
11499
11500 2000-12-07  Mo DeJong  <mdejong@redhat.com>
11501
11502         * jcf-io.c (find_class): Correct the logic that tests to see if a
11503         .java file is newer than its .class file. The compiler was
11504         incorrectly printing a warning when file mod times were equal.
11505
11506 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
11507
11508         * jvgenmain.c: Use ISPRINT not isascii.
11509
11510 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11511
11512         * parse.y (end_artificial_method_body): Fixed typo.
11513
11514 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11515
11516         * parse.y (patch_method_invocation): Pick the correct enclosing
11517         context when creating inner class instances.
11518         Fixes gcj/332.
11519
11520 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
11521
11522         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
11523         Update copyright year to 2000.
11524
11525 2000-11-23  Anthony Green  <green@redhat.com>
11526
11527         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
11528         Move current_file_list out of yyparse and make it static.
11529
11530         * expr.c: Declare quick_stack and tree_list_free_list as static
11531         (init_expr_processing): Register quick_stack and
11532         tree_list_free_list roots.
11533
11534 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11535
11536         * parse.y (build_outer_field_access): New local `decl_ctx', use
11537         it. Check for field's context and current class immediate outer
11538         context inheritance.
11539         (outer_field_access_p): Consider fields inherited from the last
11540         enclosing context.
11541         (build_access_to_thisn): Stop at the last enclosing context if
11542         necessary.
11543         Fixes gcj/367.
11544
11545 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
11546
11547         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
11548
11549 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
11550
11551         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
11552         scratch buffer.
11553
11554 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11555
11556         * jv-scan.c (help): Document --complexity.
11557         (options): Added --complexity.
11558         (flag_complexity): New global.
11559         (main): Call `report'.
11560         * parse-scan.y (complexity): New global.
11561         (if_then_statement, if_then_else_statement,
11562         if_then_else_statement_nsi, switch_block_statement_group,
11563         while_expression, do_statement, for_begin, continue_statement,
11564         throw_statement, catch_clause, finally, method_invocation,
11565         conditional_and_expression, conditional_or_expression,
11566         conditional_expression): Update complexity.
11567         (reset_report): Reset complexity.
11568         (report): New function.
11569
11570 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11571
11572         * lex.c (yylex): Added STRICT_TK case.
11573         * parse.y (STRICT_TK): Added.
11574         * parse-scan.y (STRICT_TK): Added.
11575         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
11576         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
11577         file.
11578         * keyword.h: Rebuilt.
11579         * keyword.gperf (strictfp): Added.
11580
11581 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11582
11583         * lex.c (yylex): Recognize floating point constants with leading
11584         0.
11585
11586 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11587
11588         * java-tree.h (cyclic_inheritance_report): Constify.
11589         * parse.y (cyclic_inheritance_report): Likewise.
11590
11591 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
11592
11593         * parse.y (goal): Remove call to ggc_add_string_root.
11594
11595 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
11596
11597         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
11598         Create string in scratch buffer, then pass to build_string.
11599
11600 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
11601
11602         * parse.y (issue_warning_error_from_context): Add
11603         ATTRIBUTE_PRINTF.
11604
11605 2000-11-11  Anthony Green  <green@redhat.com>
11606
11607         * jcf-parse.c (process_zip_dir): Add finput parameter.
11608         (jcf_figure_file_type): Call process_zip_dir with appropriate
11609         argument.
11610
11611 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11612
11613         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
11614         * jcf-parse.c (jcf_figure_file_type): Likewise.
11615
11616 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
11617
11618         * parse.y (create_new_parser_context): Use memset () instead of
11619         bzero ().
11620
11621 2000-11-08  Tom Tromey  <tromey@cygnus.com>
11622
11623         * gjavah.c (process_file): Only include gcj/cni.h when generating
11624         CNI stubs.
11625
11626 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
11627
11628         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
11629         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
11630         instead of bzero ().
11631
11632 2000-11-05  Tom Tromey  <tromey@cygnus.com>
11633
11634         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
11635         * lex.c (IS_ZERO): New define.
11636         (java_perform_atof): Error on floating point underflow.
11637
11638 2000-11-04  Tom Tromey  <tromey@cygnus.com>
11639
11640         * lex.c (java_parse_escape_sequence): Only read two octal
11641         characters if the first one is greater than 3.  Don't allow
11642         "octal" numbers to include the digits 8 or 9.
11643
11644 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
11645
11646         * Make-lang.in (java.distdir): Remove.
11647
11648 2000-11-03  Tom Tromey  <tromey@cygnus.com>
11649
11650         * Make-lang.in (java.dvi): New target.
11651         Partial fix for PR other/567.
11652
11653         * lang-options.h: Mention -Wout-of-date.
11654         * jcf-dump.c (flag_newer): New global.
11655         * gjavah.c (flag_newer): New global.
11656         * jcf-io.c (find_class): Only warn when flag_newer set.
11657         * lang.c (flag_newer): New global.
11658         (struct string_option): New declaration.
11659         (lang_W_options): New global.
11660         (process_option_with_no): New function.
11661         (lang_decode_option): Use it.
11662
11663         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
11664         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
11665         `$'.
11666
11667         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
11668         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
11669         * lex.c (java_read_unicode): Removed `term_context' argument.
11670         Recognize any number of `u' in `\u'.
11671         (java_read_unicode_collapsing_terminators): New function.
11672         (java_get_unicode): Use it.
11673         (java_lineterminator): Removed.
11674         (yylex): Produce error if character literal is newline or single
11675         quote.  Return if eof found in middle of `//' comment.  EOF in
11676         `//' comment is only an error if pedantic.
11677         (java_ignorable_control_p): New function.
11678         (java_parse_end_comment): Return if eof found in middle of
11679         comment.
11680         Include flags.h.
11681         * jv-scan.c (pedantic): New global.
11682
11683 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11684
11685         * parse.y (outer_field_access_p): Inherited fields aren't
11686         consider outer fields.
11687         (maybe_build_thisn_access_method): Use
11688         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
11689         (resolve_expression_name): Trigger an error if a static field
11690         is being accessed as an outer field.
11691
11692 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11693
11694         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
11695         Fixes gcj/365.
11696
11697 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
11698
11699         * Make-lang.in: Move all build rules here from Makefile.in,
11700         adapt to new context.  Wrap all rules that change the current
11701         directory in parentheses.  Expunge all references to $(P).
11702         When one command depends on another and they're run all at
11703         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
11704         all object-file generation rules.  Delete obsolete variables.
11705
11706         * Makefile.in: Delete.
11707         * config-lang.in: Delete outputs= line.
11708
11709 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11710
11711         * parse.y (patch_method_invocation): NULLify this_arg when already
11712         inserted.
11713         (maybe_use_access_method): Handle call to methods unrelated to the
11714         current class. Fixed comment.
11715         Fixes gcj/361.
11716
11717 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11718
11719         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
11720         scope.
11721
11722 2000-10-24  Tom Tromey  <tromey@cygnus.com>
11723
11724         * lex.c (java_new_lexer): Initialize new fields.  Work around
11725         broken iconv() implementations.
11726         (java_read_char): Swap bytes if required.  Use fallback decoder if
11727         required.
11728         (byteswap_init, need_byteswap): New globals.
11729         (java_destroy_lexer): Only close iconv handle if it is in use.
11730         * lex.h (java_lexer): New fields read_anything, byte_swap,
11731         use_fallback.
11732         Made out_buffer unsigned.
11733
11734 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11735
11736         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
11737         where an enclosing context can be set on the jdep.
11738         (do_resolve_class): Fixed identation.
11739
11740 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11741
11742         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
11743
11744         * jcf-reader.c (peek_attribute, skip_attribute): Only define
11745         when requested.
11746
11747         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
11748
11749         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
11750
11751 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11752
11753         * jcf-write.c (OP1): Update `last_bc'.
11754         (struct jcf_block): Fixed indentation and typo in comments.  New
11755         field `last_bc'.
11756         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
11757         follows `monitorenter'.
11758         * parse.y (patch_synchronized_statement): New local `tmp'. Call
11759         `patch_string'.
11760         Fixes gcj/232.
11761
11762 2000-10-16  Tom Tromey  <tromey@cygnus.com>
11763
11764         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
11765         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
11766         * lang-options.h: Added -MA, -MT, -MF..
11767         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
11768         (DEPEND_TARGET_SET): New macro.
11769         (DEPEND_FILE_ALREADY_SET): Likewise.
11770         (init_parse): Handle new flags.
11771         * jcf.h (jcf_dependency_print_dummies): Declare.
11772         * Make-lang.in (s-java): Added mkdeps.o.
11773         * Makefile.in (BACKEND): Added mkdeps.o.
11774         (../gcjh$(exeext)): Added mkdeps.o.
11775         (../jcf-dump$(exeext)): Added mkdeps.o.
11776         * jcf-depend.c: Include mkdeps.h.
11777         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
11778         add_entry): Removed.
11779         (jcf_dependency_reset): Rewrote.
11780         (dependencies): New global.
11781         (jcf_dependency_set_target): Rewrote.
11782         (jcf_dependency_add_target): Likewise.
11783         (jcf_dependency_add_file): Likewise.
11784         (munge): Removed.
11785         (print_ents): Removed.
11786         (jcf_dependency_write): Rewrote.
11787         (print_dummies): New global.
11788         (jcf_dependency_print_dummies): New function
11789         (jcf_dependency_write): Call deps_dummy_targets if required.
11790
11791 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11792
11793         * gjavah.c (add_class_decl): Removed unused variables `tname',
11794         `tlen' and `name_index'.
11795         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
11796         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
11797         in `wfl_operator' with value.
11798         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
11799         (jcf_figure_file_type): Fixed identation.
11800         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
11801         * parse.y (analyze_clinit_body): New function.
11802         (static_initializer:): Reset `current_static_block'.
11803         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
11804         `wfl_operator' with new value.
11805         (lookup_cl): Use EXPR_WFL_FILENAME.
11806         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
11807         analyze_clinit_body.
11808         (build_outer_field_access): Access to this$<n> built from
11809         current_class, not its outer context.
11810         (build_access_to_thisn): Fixed leading comment. Tidied things up.
11811         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
11812         (patch_method_invocation): Use `is_static_flag' when already
11813         initialized.
11814         (patch_newarray): Removed assignment in ternary operator.
11815
11816 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11817
11818         * except.c (free_eh_ranges): Don't free `whole_range'.
11819
11820 2000-10-15  Anthony Green  <green@redhat.com>
11821
11822         * decl.c (init_decl_processing): Call init_class_processing before
11823         anything else.
11824
11825 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11826
11827         * check-init.c (check_init): Fixed leading comment. Use
11828         LOCAL_FINAL_P.
11829         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11830         (give_name_to_locals): Likewise.
11831         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
11832         fields in lang_decl_var.
11833         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
11834         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
11835         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
11836         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
11837         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
11838         (LOCAL_FINAL): Rewritten.
11839         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
11840         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
11841         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
11842         `init_final' fields.
11843         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
11844         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
11845         (TYPE_HAS_FINAL_VARIABLE): New macro.
11846         (struct lang_type): Added `afv' field.
11847         * parse.y (check_static_final_variable_assignment_flag): New function.
11848         (reset_static_final_variable_assignment_flag): Likewise.
11849         (check_final_variable_local_assignment_flag): Likewise.
11850         (reset_final_variable_local_assignment_flag): Likewise.
11851         (check_final_variable_indirect_assignment): Likewise.
11852         (check_final_variable_global_assignment_flag): Likewise.
11853         (add_inner_class_fields): Use LOCAL_FINAL_P.
11854         (register_fields): Handle local finals and final variables.
11855         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
11856         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11857         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11858         on local finals.
11859         (java_complete_expand_methods): Loop to set
11860         TYPE_HAS_FINAL_VARIABLE. Call
11861         `reset_final_variable_local_assignment_flag' and
11862         `check_final_variable_local_assignment_flag' accordingly before
11863         and after constructor expansion. Call
11864         `reset_static_final_variable_assignment_flag'
11865         before expanding <clinit> and after call
11866         `check_static_final_variable_assignment_flag' if the
11867         current_class isn't an interface. After all methods have been
11868         expanded, call `check_final_variable_global_assignment_flag' and
11869         `check_static_final_variable_assignment_flag' if the current class
11870         is an interface.
11871         (maybe_yank_clinit): Fixed typo in comment.
11872         (build_outer_field_access_methods): Removed old sanity check. Use
11873         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
11874         Don't create access methods for finals.
11875         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
11876         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
11877         existing DECL_INIT has been processed.
11878         (java_complete_lhs): Likewise.
11879         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
11880         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
11881         logic.
11882         (patch_assignment): Use LOCAL_FINAL_P.
11883         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
11884         DECL_INITIAL is nullified.
11885         Fixes gcj/163.
11886
11887 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11888
11889         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
11890
11891         * Makefile.in (parse.c, parse-scan.c): Likewise.
11892
11893 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
11894
11895         * class.c (temporary_obstack): Remove.
11896         (make_class): Don't mess with obstascks.
11897         (push_class): Likewise.
11898         (set_super_info): Likewise.
11899         (add_method_1): Likewise.
11900         (add_method): Likewise.
11901         (add_field): Likewise.
11902         (build_utf8_ref): Likewise.
11903         (build_class_ref): Likewise.
11904         (build_static_field_ref): Likewise.
11905         (finish_class): Likewise.
11906         (push_super_field): Likewise.
11907         (layout_class): Likewise.
11908         (layout_class_methods): Likewise.
11909         (init_class_processing): Likewise.
11910         * constants.c (get_tag_node): Likewise.
11911         (build_constant_data_ref): Likewise.
11912         * decl.c (ggc_p): Remove.
11913         (copy_lang_decl): Use ggc_alloc.
11914         (complete_start_java_method): Don't mess with obstacks.
11915         (start_java_method): Likewise.
11916         (end_java_method): Likewise.
11917         * except.c (link_handler): Use xmalloc.
11918         (free_eh_ranges): New function.
11919         (method_init_exceptions): Use it.
11920         (add_handler): Use xmalloc.
11921         (expand_start_java_handler): Don't mess with obstacks.
11922         (prepare_eh_table_type): Likewise.
11923         (expand_end_java_handler): Likewise.
11924         * expr.c (push_value): Likewise.
11925         (create_label_decl): Likewise.
11926         (build_jni_stub): Likewise.
11927         (java_lang_expand_expr): Likewise.
11928         (note_instructions): Use xrealloc.
11929         (java_push_constant_from_pool): Don't mess with obstacks.
11930         (process_jvm_instruction): Likewise.
11931         * java-tree.h (cyclic_inheritance_report): Remove duplicate
11932         declaration.
11933         * jcf-parse.c (get_constant): Don't mess with obstacks.
11934         (read_class): Likewise.
11935         (jcf_parse): Likewise.
11936         * lex.c (expression_obstack): Remove.
11937         (java_lex): Don't use obstack_free.
11938         * parse.h (exit_java_complete_class): Don't mess with obstacks.
11939         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
11940         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
11941         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
11942         * parse.y (gaol): Add more GC roots.
11943         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
11944         (lookup_field_wrapper): Likewise.
11945         (obtain_incomplete_type): Don't mess with obstacks.
11946         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
11947         macros.
11948         (craft_constructor): Don't mess with obstacks.
11949         (safe_layout_class): Likewise.
11950         (java_complete_class): Likewise.
11951         (source_end_java_method): Likewise.
11952         (build_outer_field_access_methods): Likewise.
11953         (build_outer_method_access_method): Likewise.
11954         (maybe_build_thisn_access_method): Likewise.
11955         (build_dot_class_method_invocation): Likewise.
11956         (java_complete_tree): Likewise.
11957         (java_complete_lhs): Likewise.
11958         (do_merge_string_cste): Likewise.
11959         (patch_string_cst): Likewise.
11960         (array_constructor_check_entry): Likewise.
11961         * typeck.c (build_java_array_type): Likewise.
11962         (parse_signature_string): Likewise.
11963         (build_java_signature): Likewise.
11964
11965 2000-10-12  Tom Tromey  <tromey@cygnus.com>
11966
11967         Fix for PR gcj/356:
11968         * gjavah.c (add_class_decl): Don't special-case inner classes.
11969         (add_namelet): Likewise.
11970
11971 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
11972
11973         * java-tree.h: Constify current_encoding.
11974         * lang.c: Constify current_encoding.
11975
11976 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
11977
11978         * jvgenmain.c (class_mangling_suffix): Omit `.'.
11979         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
11980
11981 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11982
11983         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
11984         patch. Fixes gcj/340.
11985
11986 2000-10-10  Tom Tromey  <tromey@cygnus.com>
11987
11988         * lex.c (java_new_lexer): Initialize out_first and out_last
11989         fields.
11990         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
11991
11992 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11993
11994         * parse.y (pop_current_osb): New function.
11995         (array_type:): Use `dims:', changed actions
11996         accordingly. Suggested by Anthony Green.
11997         (array_creation_expression:): Used pop_current_osb.
11998         (cast_expression:): Likewise.
11999         (search_applicable_method_list): Fixed indentation.
12000
12001 2000-10-08  Anthony Green  <green@redhat.com>
12002
12003         * parse.y (array_type_literal): Remove production.
12004         (type_literals): Refer to array_type, not array_type_literal.
12005
12006 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12007
12008         Patch contributed by Corey Minyard.
12009         * decl.c (check_local_named_variable): New function.
12010         (tree check_local_unnamed_variable): Likewise.
12011         (find_local_variable): Splitted. Call check_local_{un}named_variable.
12012
12013 2000-10-07  Anthony Green  <green@redhat.com>
12014
12015         * class.c (layout_class): Handle case where superclass can't be
12016         layed out yet.
12017
12018 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12019
12020         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12021         gperf.
12022
12023 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12024
12025         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12026         * jvgenmain.c (class_mangling_prefix): Removed.
12027         (class_mangling_suffix): New global.
12028         (main): Use it.
12029         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12030         `$'.
12031         (print_method_info): Handle overrides for static and final
12032         methods.
12033         (process_file): Generate declaration for class object field.
12034         * class.c (cxx_keywords): New array.
12035         (utf8_cmp): New function.
12036         (cxx_keyword_p): New function.
12037         (layout_class_method): Mangle C++ keywords by appending `$'.
12038         (mangle_field): New function.
12039         (mangle_class_field): Use mangle_field.  Mangle class name as
12040         `class$'.
12041         (mangle_static_field): Use mangle_field.
12042
12043 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12044
12045         * decl.c (find_local_variable): Removed uncessary type check and
12046         fixed range check typo. From Corey Minyard.
12047
12048 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12049
12050         * decl.c (give_name_to_locals): New local `code_offset'. Call
12051         `maybe_adjust_start_pc'.
12052         * expr.c (note_instructions): New function.
12053         (expand_byte_code): Don't collect insn starts here.
12054         (peek_opcode_at_pc): New function.
12055         (maybe_adjust_start_pc): Likewise.
12056         * java-tree.h (maybe_adjust_start_pc): Declare.
12057         (note_instructions): Likewise.
12058         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12059
12060 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12061
12062         * parse.y (field_access:): Fixed indentation.
12063         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12064
12065 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12066
12067         Fix for PR gcj/307:
12068         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12069         JPRIMITIVE_TYPE_P, for arithmetic operators.
12070         (patch_method_invocation): Indentation fix.
12071         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12072         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12073         (do_unary_numeric_promotion): Cleaned up code.
12074         (valid_cast_to_p): Handle boolean correctly.
12075
12076 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12077
12078         * lex.c (java_read_unicode): Reset bs_count when finished with
12079         `\u' sequence.
12080
12081 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12082
12083         Convert to GC.
12084         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12085         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12086         (typeck.o): Depend on ggc.h.
12087         * class.c (add_method_1): Use GC functions for allocation.
12088         (init_class_processing): Register roots.
12089         * decl.c (ggc_p): Set to 1.
12090         (pending_local_decls): Make it static.
12091         (push_jvm_slot): Use GC functions for allocation.
12092         (init_decl_processing): Register roots.
12093         (give_name_to_locals): Use GC functions for allocation.
12094         (lang_mark_tree): New function.
12095         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12096         functions for allocation.
12097         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12098         * lex.c (java_lex): Use build_string, rather than replicating it
12099         inline.
12100         * parse.y (goal): Add more roots.
12101         (mark_parser_ctxt): New function.
12102         * typeck.c: Include ggc.h.
12103
12104 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12105
12106         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12107         contains something else than MODIFY_EXPR.
12108
12109 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
12110
12111         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12112         * Makefile.in (parse.o): Depend on ggc.h.
12113         (class.o): Likewise.
12114         (constants.o): Likewise.
12115         (decl.o): Likewise.
12116         (expr.o): Likewise.
12117         (jcf-parse.o): Likewise.
12118         (jcf-write.o): Likewise.
12119         (mangle.o): Likewise.
12120         * class.c: Include ggc.h.
12121         (build_static_field_ref): Register GC roots.
12122         (layout_class): Likewise.
12123         (init_class_processing): Likewise.
12124         * constants.c: Include ggc.h.
12125         (current_constant_pool_data_ref): Remove.
12126         (tag_nodes): Move it to ...
12127         (get_tag_node): ... here.  Register GC roots.
12128         * decl.c: Include ggc.h.  Remove many global tree definitions.
12129         (throw_node): Define.
12130         (java_global_trees): Likewise.
12131         (predef_filenames): Make the size a constant.
12132         (init_decl_processing): Adjust accordingly.
12133         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
12134         * expr.c: Include ggc.h.
12135         (init_expr_processing): Register GC roots.
12136         (build_invokeinterface): Likewise.
12137         * java-tree.h: Replace extern tree declarations with macros.
12138         (java_global_trees): New variable.
12139         (java_tree_index): New enumeration.
12140         (init_jcf_parse): Declare.
12141         * jcf-parse.c: Include ggc.h.
12142         (current_class): Remove declaration.
12143         (main_class): Likewise.
12144         (all_class_list): Likewise.
12145         (predefined_filename_p): Adjust for constant size of
12146         predef_filenames.
12147         (init_jcf_parse): New function.
12148         * jcf-write.c: Include ggc.h.
12149         (generate_classfile): Register GC roots.
12150         (append_synthetic_attribute): Likewise.
12151         (append_innerclass_attribute_entry): Likewise.
12152         * lang.c: Include ggc.h.
12153         (lang_print_error): Register GC roots.
12154         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12155         with macros.
12156         * parse.y: Include ggc.h.
12157         (wfl_operator): Remove.
12158         (goal): Register GC roots.
12159         (java_pop_parser_context): Adjust for new field names.
12160         (java_parser_context_save_global): Likewse.
12161         (java_parser_context_restore_global): Likewise.
12162         (java_parser_context_suspend): Likewise.
12163         (java_parser_context_resume): Likewise.
12164         (verify_constructor_circularity): Register GC roots.
12165         (lookup_cl): Likewise.
12166         (java_reorder_fields): Likewise.
12167         (build_current_this): Likewise.
12168         (class_in_current_package): Likewise.
12169         (argument_types_convertible): Likewise.
12170         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12171
12172 2000-09-14  Tom Tromey  <tromey@cygnus.com>
12173
12174         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12175
12176 2000-09-13  Tom Tromey  <tromey@cygnus.com>
12177
12178         * jcf-parse.c: Include <locale.h>.
12179         * jv-scan.c: Include <locale.h>.
12180
12181 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12182
12183         * expr.c (pop_type_0): Return `Object' if trying to merge two
12184         interface types.
12185         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12186         interface types; `Object' is always a valid supertype.
12187
12188 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12189
12190         Fix for PR gcj/33:
12191         * jv-scan.c (help): Document --encoding.
12192         (options): Added `encoding' entry.
12193         (OPT_ENCODING): New define.
12194         (main): Handle --encoding.
12195         Include <langinfo.h> if nl_langinfo exists.
12196         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12197         --encoding.
12198         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12199         (parse_source_file): Correctly call java_init_lex.  Added `finput'
12200         argument.  Use nl_langinfo to determine default encoding.
12201         * java-tree.h (current_encoding): Declare.
12202         * parse.y (java_parser_context_restore_global): Don't restore
12203         `finput'.
12204         (java_parser_context_save_global): Don't set `finput' field.
12205         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
12206         if required.
12207         * lang.c (current_encoding): New global.
12208         (lang_decode_option): Recognize `-fencoding='.
12209         (finish_parse): Don't close finput.
12210         * parse.h (struct parser_ctxt): Removed `finput' and
12211         `unget_utf8_value' fields.  Added `lexer' field.
12212         (java_init_lex): Fixed declaration.
12213         * lex.c (java_new_lexer): New function.
12214         (java_destroy_lexer): Likewise.
12215         (java_read_char): Added `lex' argument.  Handle iconv case.
12216         (java_read_unicode): Added `lex' argument.  Count backslashes in
12217         lexer structure.
12218         (java_init_lex): Added `finput' and `encoding' arguments.  Set
12219         `lexer' field in ctxp.
12220         (BAD_UTF8_VALUE): Removed.
12221         (java_lex): Handle seeing UEOF in the middle of a string literal.
12222         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12223         (java_lexer): New structure.
12224         (UNGETC): Removed.
12225         (GETC): Removed.
12226         (DEFAULT_ENCODING): New define.
12227         (java_destroy_lexer): Declare.
12228
12229 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12230
12231         Fix for PR gcj/343:
12232         * lex.c (java_init_lex): Initialize java_io_serializable.
12233         * parse.y (java_io_serializable): New global.
12234         (valid_ref_assignconv_cast_p): An array can be cast to
12235         serializable.
12236
12237 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12238
12239         * decl.c, expr.c: Include defaults.h if not already included.
12240         Don't define the *_TYPE_SIZE macros.
12241
12242 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
12243
12244         * typeck.c (build_java_array_type): Correct first parameter
12245         in ADJUST_FIELD_ALIGN invocation.
12246
12247 2000-09-06  Tom Tromey  <tromey@cygnus.com>
12248
12249         * lang-specs.h: Also recognize `-femit-class-files'.
12250
12251 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12252
12253         * verify.c (merge_types): Load the types to merge if necessary.
12254
12255 2000-09-02  Anthony Green  <green@redhat.com>
12256
12257         * jcf-io.c: Include zlib.h.
12258         (open_in_zip): Read compressed class file archives.
12259         * zipfile.h (ZipDirectory): Add uncompressed_size and
12260         compression_method fields.
12261         * zextract.c (read_zip_archive): Collect file compression info.
12262
12263 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
12264
12265         * parse.y (do_resolve_class): Also explore superclasses of
12266         intermediate enclosing contexts when searching for inner classes.
12267
12268 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12269
12270         * parse.y (variable_declarator_id:): Better error message.
12271         (expression_statement:): Use YYNOT_TWICE.
12272         (cast_expression:): Likewise.
12273         (assignment:): Likewise.
12274
12275 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12276
12277         * parse.y (do_merge_string_cste): New locals. Create new
12278         STRING_CSTs each time, use memcpy. Fixes gcj/311.
12279
12280 2000-08-07  Hans Boehm  <boehm@acm.org>
12281
12282         * boehm.c (mark_reference_fields): Set marking bits for all words in
12283         a multiple-word record.
12284         (get_boehm_type_descriptor): Use the procedure marking descriptor for
12285         java.lang.Class.
12286
12287 2000-08-31  Mike Stump  <mrs@wrs.com>
12288
12289         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12290         jcf-dump$(exeext)): Make parallel safe.
12291
12292 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12293
12294         * jcf-parse.c (set_source_filename): Constify a char *.
12295         * jcf-write.c (append_innerclasses_attribute,
12296         make_class_file_name): Constify a char *.  Don't recycle a
12297         variable for an unrelated purpose.
12298         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12299         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12300
12301 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12302
12303         * expr.c (can_widen_reference_to): Fixed indentation.
12304         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12305         * parse.y: `finit$' replaces `$finit$' in comments.
12306         (try_builtin_assignconv): Fixed leading comment.
12307
12308 2000-08-25  Greg McGary  <greg@mcgary.org>
12309
12310         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12311
12312 2000-08-24  Greg McGary  <greg@mcgary.org>
12313
12314         * lang.c (lang_decode_option): Use ARRAY_SIZE.
12315         * parse.y (BINOP_LOOKUP): Likewise.
12316
12317 2000-08-22  Andrew Haley  <aph@cygnus.com>
12318
12319         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12320         sign extending. Fixes gcj/321.
12321         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12322         combining to make a jlong. Fixes gcj/321.
12323
12324 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12325
12326         * lang-specs.h: Do not process -o or run the assembler if
12327         -fsyntax-only.
12328
12329 2000-08-16  Andrew Haley  <aph@cygnus.com>
12330
12331         * typeck.c (build_java_array_type): Rewrite code to do array
12332         alignment.  Take into account back-end macros when aligning array
12333         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12334         user to set alignment. Fixes gcj/252 and 160.
12335
12336 2000-08-09  Tom Tromey  <tromey@cygnus.com>
12337
12338         * parse.y (check_abstract_method_definitions): Now return `int'.
12339         Check implemented interfaces.  Fixes PR gcj/305.
12340
12341         * parse.y (patch_switch_statement): Disallow `long' in switch
12342         expressions.  Fixes PR gcj/310.
12343
12344 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12345
12346         * decl.c (finit_leg_identifier_node): New global.
12347         (init_decl_processing): Use `finit$' to initialize
12348         finit_identifier_node. Use `$finit$' to initialize
12349         finit_leg_identifier_node.
12350         * expr.c (expand_java_field_op): Use ID_FINIT_P.
12351         * java-tree.h (finit_identifier_node): Changed attached comment.
12352         (finit_leg_identifier_node): New declaration.
12353         (ID_FINIT_P): Take finit_identifier_node and
12354         finit_leg_identifier_node into account. This is a backward
12355         compatibility hack.
12356
12357 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12358
12359         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12360         Jan 6 2000 patch.
12361         (generate_bytecode_insns): Check `nargs' before emitting it.
12362         * verify.c (merge_type_state): Fixed typo.
12363         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12364         generate_bytecode_{conditional,insns}.
12365
12366 2000-08-13  Anthony Green  <green@redhat.com>
12367
12368         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12369         for -pg builds).
12370
12371 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12372
12373         * class.c (maybe_layout_super_class): Fixed indentation.
12374         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12375         (java_check_methods): New function declaration.
12376         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12377         instead of `str_ptr'.
12378         * jcf-write.c (generate_bytecode_insns): Emit number the of args
12379         of a `invokeinterface' at the right time.
12380         * parse.h (WFL_STRIP_BRACKET): New macro.
12381         (SET_TYPE_FOR_RESOLUTION): Use it.
12382         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12383         (check_class_interface_creation): Don't check for cross package
12384         innerclass name clashes.
12385         (method_header): Behave properly if MDECL is `error_mark_node'.
12386         (method_declarator): Return `error_mark_node' if bogus current
12387         class.
12388         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12389         (resolve_and_layout): New local `decl_type', set and used. Call
12390         java_check_methods.
12391         (java_check_methods): New method.
12392         (java_layout_classes): Use it.
12393         (resolve_qualified_expression_name): No EH check necessary in
12394         access$<n>.
12395         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12396         `case' statement.
12397         (patch_assignment): Set DECL_INITIAL on integral final local.
12398
12399 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12400
12401         * java-tree.h (flag_extraneous_semicolon): New extern.
12402         * lang-options.h: (-Wextraneous-semicolon): New option.
12403         * lang.c (flag_redundant): Fixed typo in leading comment.
12404         (flag_extraneous_semicolon): New global.
12405         (lang_decode_option): Set `flag_extraneous_semicolon' when
12406         -Wall. Decode `-Wextraneous-semicolon'.
12407         * parse.y (type_declaration:): Removed `SC_TK' hack, added
12408         `empty_statement' rule.
12409         (class_body_declaration): Likewise.
12410         (method_body:): Accept `;' as a method body.
12411         (static_initializer:): Removed `SC_TK' hack.
12412         (constructor_block_end:): Likewise.
12413         (empty_statement:): Report deprecated empty declaration. Fixes
12414         gcj/295
12415
12416 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12417
12418         * parse.y (build_dot_class_method_invocation): Changed parameter
12419         name to `type'. Build signature from `type' and convert it to a
12420         STRING_CST if it's an array.
12421         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12422         to use `ref_type' directly.
12423
12424 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
12425
12426         * lang-options.h: Added a comma after the last element to avoid
12427         syntax errors when other languages define additional options.
12428
12429 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12430
12431         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12432         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12433         (jc1): Link with $(BACKEND).
12434         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12435
12436 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12437
12438         * jvspec.c: Adjust type of second argument to
12439         lang_specific_driver, and update code as necessary.
12440
12441         * class.c (build_dtable_decl): Initialize dummy.
12442
12443 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12444
12445         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12446         method bodies not to rule out discarding `<clinit>'; don't use
12447         <clinit> to initialize static fields with constant initializers.
12448
12449 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12450
12451         * gjavah.c (print_method_info): Added `synth' parameter. Skip
12452         synthetic methods.
12453         (method_synthetic): New global.
12454         (HANDLE_METHOD): Recognize synthetic method and tell
12455         `print_method_info' about it.
12456         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12457         processing a synthetic method.
12458         * jcf-reader.c (skip_attribute): New function.
12459         ( skip_attribute): Likewise.
12460
12461 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12462
12463         * parse.y (build_outer_field_access): Fixed comments.
12464         (fix_constructors): Emit the initialization of this$<n> before
12465         calling $finit$.
12466         (resolve_qualified_expression_name): Build an access to `decl' if
12467         necessary.
12468
12469 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12470
12471         * parse-scan.y (curent_class): Non longer const.
12472         (inner_qualifier, inner_qualifier_length): Deleted.
12473         (current_class_length): New global.
12474         (bracket_count): Fixed typo in leading comment.
12475         (anonymous_count): New global.
12476         (class_instance_creation_expression:): Handle anonymous classes.
12477         (anonymous_class_creation:): New rule.
12478         (push_class_context): Rewritten.
12479         (pop_class_context): Likewise.
12480         (INNER_QUALIFIER): Macro deleted.
12481         (report_class_declaration): call `push_class_context' when
12482         entering the function. `fprintf' format modified not to use
12483         INNER_QUALIFIER.
12484         (report_class_declaration): Assign `package_name' and
12485         `current_class' to NULL separately.
12486
12487 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12488
12489         * expr.c (build_invokeinterface): Call layout_class_methods on
12490         target interface.
12491
12492 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12493             Anthony Green  <green@cygnus.com>
12494             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12495
12496         * class.c (make_class_data): Create vtable for abstract classes.
12497         (get_dispatch_table): Changed to cope with abstract classes.
12498
12499 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12500
12501         * parse.y (patch_method_invocation): Don't reverse the argument
12502         list when dealing with anonymous class constructors. Fixed typo in
12503         comment.
12504
12505 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12506
12507         * parse.y (build_alias_initializer_parameter_list): Reverse
12508         crafted list when building aliases for anonymous class
12509         constructors.
12510
12511 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12512
12513         * parse.y (jdep_resolve_class): Don't bother checking potential
12514         innerclass access if `decl' is NULL.
12515         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
12516         WFL.
12517
12518 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12519
12520         * parse.c: Remove (again.)
12521
12522 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12523
12524         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
12525         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
12526         outside the `if' statement, alias to innerclass removed, `decl'
12527         used to mark the class complete.
12528
12529 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12530
12531         * parse.y (simple_name:): Fixed typo in error message.
12532
12533 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12534
12535         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
12536         or its first operand can be error marks.
12537
12538 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12539
12540         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
12541         * parse.y (method_header): Likewise.
12542
12543 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12544
12545         * parse.y (process_imports): Consider that one might be trying to
12546         import an innerclass. Fixes gcj/254
12547
12548 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12549
12550         * parse.y (find_as_inner_class): Handle the case where the
12551         enclosing context of an innerclass has been loaded as bytecode.
12552
12553 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12554
12555         * parse.y (simple_name:): Reject `$' in type names.
12556         (resolve_type_during_patch): Use `type' as a second
12557         argument to resolve_no_layout. Fixes gcj/257.
12558
12559 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
12560
12561         * parse.y (find_most_specific_methods_list): Select the only
12562         non-abstract method even if max has been set.
12563         Fixes gcj/285, gcj/298.
12564
12565 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
12566
12567         * lang-specs.h: Added %(jc1) to java compiler options.
12568
12569 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
12570
12571         * .cvsignore: New file.
12572
12573 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12574
12575         * parse.y (not_accessible_p): Access granted to innerclasses
12576         (indirectly) extending the reference type. Fixes gcj/249.
12577
12578 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12579
12580         * parse.y (patch_method_invocation): Fixed comment.
12581         (maybe_use_access_method): Build this$<n>s to the context of the
12582         target method, or a type that extends it. Fixes gcj/242.
12583
12584 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
12585
12586         * parse.c: Remove.
12587
12588 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12589
12590         * parse.y (fold_constant_for_init): Avoid bullish conversion.
12591
12592 2000-07-13  Tom Tromey  <tromey@cygnus.com>
12593
12594         * lang-specs.h: Added %{I*}.
12595
12596 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
12597
12598         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
12599
12600 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
12601
12602         * parse-scan.c: Remove.
12603
12604 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12605
12606         * class.c (set_super_info): Handled protected inner classes.
12607         (common_enclosing_context_p): Bail early if arguments aren't both
12608         inner classes.
12609         (get_access_flags_from_decl): Handle private and protected inner
12610         classes.
12611         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
12612         (CLASS_PROTECTED): Likewise.
12613         (struct lang_type): New bitfield `poic'.
12614         * parse.y (jdep_resolve_class): Call check_inner_class_access on
12615         inner classes only.
12616         (check_inner_class_access): Renamed arguments, added
12617         comments. Handles protected inner classes (fixes gcj/225)
12618         (not_accessible_p): Fixed comments. Avoid handling inner classes.
12619
12620 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12621
12622         * parse.y (resolve_qualified_expression_name): Verify qualified
12623         access to `this'. Fixes gcj/239.
12624
12625 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12626
12627         * jcf-write.c (generate_classfile): Don't install ConstantValue
12628         for null pointers.
12629
12630 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12631
12632         * parse.y (resolve_qualified_expression_name): Handle inner class
12633         access. Fixes gcj/256.
12634
12635 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12636
12637         * jcf-write.c (generate_classfile): Properly install the
12638         ConstantValue attribute and the initial value constant pool index
12639         on string constants.
12640         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
12641         class files.
12642
12643 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12644
12645         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
12646         construct.
12647         * parse.y (find_as_inner_class): Fixed typo.
12648         (do_resolve_class): Explore enclosing contexts when searching for
12649         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
12650         (check_inner_class_access): Check `decl' which can be null in case
12651         of previous errors.
12652
12653 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12654
12655         * java-tree.h (java_debug_context): Declared `extern'.
12656         (safe_layout_class): Likewise.
12657         * parse.y (resolve_field_access): Field must be `static' in order
12658         to be replaced by its initial value. Added comments.
12659         (find_applicable_accessible_methods_list): Fixed typo.
12660         (find_most_specific_methods_list): Methods found in innerclasses
12661         take over methods founds in the enclosing contexts.
12662         (java_complete_tree): Loosen restrictions on the type of DECLs
12663         that can be replaced by their initialization values.
12664         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
12665
12666 2000-07-05  Tom Tromey  <tromey@cygnus.com>
12667
12668         * Make-lang.in (PARSE_DIR): New macro.
12669         (PARSE_RELDIR): Likewise.
12670         (PARSE_C): Likewise.
12671         (PARSE_SCAN_C): Likewise.
12672         ($(PARSE_C)): New target.
12673         ($(PARSE_SCAN_C)): Likewise.
12674         (SET_BISON): New macro.
12675         (BISONFLAGS): Likewise.
12676         (JAVABISONFLAGS): Likewise.
12677
12678 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
12679
12680         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
12681         argument on the first pass for CNI as well as JNI.
12682         (print_method_info): Set up method name on the first pass only.
12683
12684 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12685
12686         * parse.y (parser_qualified_classname): Removed parameter
12687         `is_static'.
12688         (create_interface): Removed first passed parameter to
12689         parser_qualified_classname.
12690         (create_class): Likewise. Don't install alias on static
12691         innerclasses. Fixes gcj/275.
12692
12693 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12694
12695         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
12696         debugable statement with empty_stmt_node. Fixes gcj/272
12697
12698 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12699
12700         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
12701         gcj/271.
12702
12703 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12704
12705         * jcf-write.c (push_long_const): Appropriately cast short negative
12706         constant to jword.
12707
12708 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12709
12710         * parse.y (verify_constructor_super): Use loop variable
12711         `m_arg_type' initialized with `mdecl_arg_type'.
12712
12713 2000-06-29  Tom Tromey  <tromey@cygnus.com>
12714
12715         * parse.y (resolve_field_access): Handle case where `type_found'
12716         is NULL.
12717
12718 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12719
12720         * expr.c (lookup_field): The same field can be found through two
12721         different interface. Don't declare it ambiguous in that case.
12722
12723 2000-06-27  Tom Tromey  <tromey@cygnus.com>
12724
12725         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
12726         follows \r, then unget it at a lower level.
12727
12728 2000-06-26  Tom Tromey  <tromey@cygnus.com>
12729
12730         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
12731         java_complete_tree.
12732
12733 2000-06-25  Tom Tromey  <tromey@cygnus.com>
12734
12735         * parse.y (for_statement): Wrap expression in a WFL if it is a
12736         constant.  For PR gcj/268.
12737
12738 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12739
12740         * parse.y (do_resolve_class): Minor optimiztion in the package
12741         list search. Removed unnecessary test and return statement.
12742         (valid_ref_assignconv_cast_p): Order of arguments to
12743         enclosing_context_p fixed.
12744
12745 2000-06-24  Tom Tromey  <tromey@cygnus.com>
12746
12747         * expr.c (lookup_field): Print error and return error_mark_node if
12748         field reference is ambiguous.
12749
12750         * parse.y (check_abstract_method_definitions): Also check if
12751         `other_method' is abstract.
12752
12753 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12754
12755         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
12756         classes.
12757         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
12758         (struct lang_type): New field `pic'.
12759         (CLASS_PRIVATE): New macro.
12760         * parse.y (check_inner_class_access): New function.
12761         (jdep_resolve_class): Call it.
12762
12763 2000-06-23  Tom Tromey  <tromey@cygnus.com>
12764
12765         * parse.y (patch_incomplete_class_ref): Initialize the returned
12766         class.  For PR gcj/260.
12767
12768 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12769
12770         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
12771
12772 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12773
12774         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12775         Java specific checks.
12776         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
12777         screened by DECL_P.
12778         * java-tree.def (CASE_EXPR): Marked 'e'.
12779         (DEFAULT_EXPR): Likewise.
12780         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
12781         screened by DECL_P.
12782         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
12783         Java specific checks.
12784         (generate_bytecode_insns): Test try_block for BLOCK before using
12785         BLOCK_EXPR_BODY.
12786         * parse.y (build_wfl_wrap): Added `location' argument. Set
12787         EXPR_WFL_LINECOL accordingly.
12788         (dim_expr:): Wrap constants with WFLs.
12789         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
12790         (resolve_package): Check for `stmt' not being a BLOCK before
12791         building a debuggable statement with it.
12792         (make_qualified_primary): Added extra parameter to build_wfl_wrap
12793         invocation.
12794         (resolve_field_access): Make sure `decl' is a DECL before treating
12795         it as such.
12796         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
12797         IDENTIFIER_NODE before treating it as such.
12798         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
12799         treating it as such.
12800         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
12801         to be applied only on non array types.
12802
12803 2000-06-16  Per Bothner  <per@bothner.com>
12804
12805         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
12806         define in terms of DECL_RESULT, as that fails when --enable-checking.
12807
12808 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12809
12810         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
12811         types the same in comparison.
12812         (CHECK_OP): Add static prototype.
12813
12814 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
12815
12816         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
12817         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
12818         * parse.c: Rebuilt.
12819
12820 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12821
12822         * decl.c (create_primitive_vtable): Prototype.
12823
12824         * jcf-write.c (generate_bytecode_insns): Initialize variable
12825         `saved_context'.
12826
12827         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
12828
12829 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12830
12831         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
12832         to track searched classes, and do not search the same class more than
12833         once. Call find_applicable_accessible_methods_list on immediate
12834         superclass, instead of search_applicable_method_list on all ancestors.
12835         Fix for PR gcj/238.
12836
12837 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
12838
12839         * parse.y (register_fields): Permit static fields in inner classes
12840         if they are final. Fix for PR gcj/255.
12841
12842 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12843
12844         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
12845         * parse.y (find_in_imports): Returned type changed to void,
12846         leading comment fixed.
12847         (register_package): New function.
12848         (qualify_and_find): Likewise.
12849         (package_declaration:): Use `register_package'.
12850         (single_type_import_declaration:): Removed local variable
12851         `node'. Added missing `;' for consistency.
12852         (type_import_on_demand_declaration:): Use `chainon' to link new
12853         entries.
12854         (lookup_field_wrapper): Lookup local variables defined in outer
12855         contexts first.
12856         (java_complete_class): Don't reverse the list of imported on demand.
12857         (do_resolve_class): Reorganized. Removed local variable
12858         `original_name'. Call `qualify_and_find' with the current package
12859         name, invoke `find_in_imports_on_demand' right after. Call
12860         `qualify_and_find' with the packages we've seen so far. Fixed
12861         operations numbering in comments.
12862         (java_expand_class): Don't reverse `package_list'.
12863         (find_most_specific_methods_list): New local variables `abstract'
12864         and `candidates'. Use them to pick the right method.
12865
12866 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
12867
12868         * parse.y (check_modifiers_consistency): Don't subtract out
12869         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
12870
12871 2000-06-04  Philipp Thomas  <pthomas@suse.de>
12872
12873         * Makefile.in (INTLLIBS): New.
12874         (LIBS): Add above.
12875         (DEPLIBS): Ditto.
12876
12877 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12878
12879         * class.c (get_dispatch_table): Build the vtable dummy entry list
12880         element with a null purpose. Fixed leading comment.
12881         (build_dtable_decl): Build an accurate dtable type when appropriate
12882         and use it.
12883
12884 2000-06-02  Richard Henderson  <rth@cygnus.com>
12885
12886         * lang.c (lang_get_alias_set): New.
12887
12888 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12889
12890         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
12891         before using it as the accessed field.
12892
12893 2000-05-31  Tom Tromey  <tromey@cygnus.com>
12894
12895         * java-tree.h (boolean_array_vtable, byte_array_vtable,
12896         char_array_vtable, short_array_vtable, int_array_vtable,
12897         long_array_vtable, float_array_vtable, double_array_vtable):
12898         Declare.
12899         * expr.c (get_primitive_array_vtable): New function.
12900         (create_primitive_vtable): New function.
12901         (java_lang_expand_expr): Enable code to statically generate
12902         arrays.
12903         * decl.c (init_decl_processing): Create primitive vtables.
12904         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
12905         short_array_vtable, int_array_vtable, long_array_vtable,
12906         float_array_vtable, double_array_vtable): Define.
12907
12908 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
12909
12910         * java/parse.y (find_applicable_accessible_methods_list):
12911         Don't add an uninitialized value to the list.
12912
12913 2000-05-25  Tom Tromey  <tromey@cygnus.com>
12914
12915         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
12916         when trying to see if field's class should be initialized.  Always
12917         initialize field's declaring class, not qualified class.
12918         For PR gcj/162.
12919
12920         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
12921         `wfl_operator', to maybe_build_primttype_type_ref.
12922         Fixes PR gcj/235.
12923
12924 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
12925
12926         * parse.y (patch_method_invocation): Don't try to lookup methods
12927         in primitive types.
12928
12929 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12930
12931         * parse.y (resolve_field_access): Call the appropriate <clinit>
12932         before accessing the length of a static array. Craft a decl for
12933         the field while its time. Fixes PR gcj/129.
12934
12935 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12936
12937         * parse.y (resolve_package): Correctly set `*next' (was off by
12938         one.)
12939         (resolve_qualified_expression_name): Fixed comment.
12940
12941 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12942
12943         * jcf-parse.c (jcf_parse_source): Reset current_class and
12944         current_function_decl to NULL before parsing a new file.
12945
12946 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12947
12948         * parse.y (block_end:): If the collected block doesn't feature a
12949         statement, insert an empty statement.
12950
12951 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12952
12953         * parse.y (maybe_yank_clinit): New function.
12954         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
12955         end of the list of methods belonging to a class.
12956         (java_complete_expand_method): Check whether <clinit> is really
12957         necessary and expand it accordingly.
12958
12959 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12960
12961         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
12962         processed by the method's switch statement.
12963
12964 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12965
12966         * java-tree.h: Added init state enum.
12967         * decl.c (emit_init_test_initialization): Initialize class
12968         initialization check variable by looking at class' state.
12969
12970 2000-05-19  Tom Tromey  <tromey@cygnus.com>
12971
12972         * java-tree.h (build_instanceof): Declare.
12973         (build_get_class): Declare.
12974         * parse.y (patch_binop): Use build_instanceof.
12975         * expr.c (build_instanceof): New function.  If class is final,
12976         don't make a function call.
12977         (expand_java_INSTANCEOF): Use it.
12978         (build_get_class): New function.
12979
12980 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
12981
12982         * jcf-write.c (generate_classfile): Scan the source_file for
12983         slashes with the right pointer variable.
12984
12985 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
12986
12987         * lang.c (lang_decode_option): Update -Wunused flags by calling
12988         set_Wunused.
12989         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
12990
12991 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
12992
12993         * check_init.c (check_init): Constify local char *.
12994         * class.c (push_class): Constify local char *.
12995         * java_tree.h: Update prototypes.
12996         * jcf-io.c (open_class): Constify filename parameter and
12997         return value.
12998         (find_class): Remove redundant string copy.  Cast return from
12999         open_class.
13000         * jcf-parse.c (read_class, parse_class_file, yyparse):
13001         Constify local char *.
13002         * jcf-write.c (generate_bytecode_insns, generate_classfile):
13003         Constify local char *.
13004         * jcf.h (JCF): Constify filename and classname.
13005         (JCF_FINISH): Cast args to FREE to char * when appropriate.
13006         * lang.c (init_parse): Constify parameter and return value.
13007         * lex.c (java_get_line_col): Constify filename parameter.
13008         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
13009         * parse.y (java_parser_context_suspend,
13010         issue_warning_error_from_context, safe_layout_class): Constify
13011         local char *.
13012         * parse.c: Regenerate.
13013
13014 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13015
13016         * expr.c (build_jni_stub): Cache the result of
13017         _Jv_LookupJNIMethod.
13018
13019 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13020
13021         * decl.c (predef_filenames_size): Now 7.
13022         (predef_filenames): New seventh entry.
13023
13024 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13025
13026         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13027         Keep track of when we've seen a reference field after a
13028         non-reference field.
13029         (get_boehm_type_descriptor): Handle case where we see
13030         non-reference fields but no trailing reference field.
13031         * decl.c (rawdata_ptr_type_node): Define.
13032         (init_decl_processing): Initialize rawdata_ptr_type_node.
13033         * java-tree.h (rawdata_ptr_type_node): Declare.
13034
13035 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13036
13037         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13038         specifiers in calls to fprintf.
13039
13040 2000-05-03  Andrew Haley  <aph@cygnus.com>
13041
13042         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13043
13044         * javaop.h (WORD_TO_INT): New function.
13045         (IMMEDIATE_s4): Use WORD_TO_INT.
13046         * jcf.h (JPOOL_INT): Ditto.
13047
13048         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13049         separator.
13050
13051 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13052
13053         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13054         on native function.
13055         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13056         JNI methods.
13057         * expr.c (build_jni_stub): New function.
13058         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13059         * parse.c: Rebuilt.
13060         * parse.y (java_complete_expand_methods): Expand a native method
13061         and call build_jni_stub if -fjni given.
13062         * lang-options.h: Document -fjni.
13063         * lang.c (flag_jni): New global.
13064         (lang_f_options): Added `jni' entry.
13065         * java-tree.h (soft_lookupjnimethod_node,
13066         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13067         Declare.
13068         (flag_jni): Declare.
13069         (build_jni_stub): Declare.
13070         (struct lang_decl): Added `native' flag.
13071         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13072         structure.
13073         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13074         soft_jnipopsystemframe_node): New globals.
13075         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13076         argument.
13077
13078         * java-tree.def: Put into `C' mode.
13079
13080 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13081
13082         Fix for PR gcj/2:
13083         * expr.c (expand_invoke): Generate check to see if object pointer
13084         is null in nonvirtual invocation case.
13085         * java-tree.h (soft_nullpointer_node): Declare.
13086         * decl.c (soft_nullpointer_node): New global.
13087         (init_decl_processing): Initialize soft_nullpointer_node.
13088         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13089         or `private' methods.
13090         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13091
13092 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13093
13094         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13095         from <clinit>
13096
13097 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13098
13099         * zextract.c (find_zip_file_start): New function.
13100         (read_zip_archive): Use it.
13101
13102 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13103
13104         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13105
13106 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13107
13108         * class.c (common_enclosing_context_p): New function.
13109         * java-tree.h (common_enclosing_context_p): Added prototype.
13110         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13111         classes sharing an outer context with the current instance.
13112         * parse.y (build_access_to_thisn): Fixed leading comment.
13113         (verify_constructor_super): New local `supper_inner'. Skip
13114         enclosing context argument in the case of inner class constructors.
13115         (patch_method_invocation): Insert proper context as second
13116         parameter to pure inner class constructor super invocations.
13117
13118 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13119
13120         * parse.y (end_class_declaration): Reset the interface number
13121         counter.
13122
13123 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13124
13125         * parse.y (source_start_java_method): Deleted unnecessary code.
13126         (patch_method_invocation): Fixed comment.
13127
13128 2000-04-24  Robert Lipe <robertlipe@usa.net>
13129
13130         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13131
13132 2000-04-23  Tom Tromey  <tromey@cygnus.com>
13133
13134         * boehm.c (mark_reference_fields): Use int_byte_position.
13135
13136 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13137
13138         * boehm.c (mark_reference_fields): Only call byte_position on
13139         non-static fields.
13140
13141 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13142
13143         * boehm.c (mark_reference_fields): Added `last_view_index'
13144         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
13145
13146 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
13147
13148         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13149         * parse.y (check_class_interface_creation): Fixed comments. Select
13150         permitted modifiers for (inner) interfaces. Changed error message
13151         to report rejected modifiers used with local classes.
13152
13153 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13154
13155         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13156         of directly inherited type considered in scope.
13157         * parse.y (do_resolve_class): Search inherited classes for inner
13158         classes.
13159
13160 2000-04-20  Tom Tromey  <tromey@cygnus.com>
13161
13162         * parse.y (not_accessible_p): Use member's class, not current
13163         class, when doing inheritance check for protected reference.
13164         Fixes PR gcj/124.
13165
13166 2000-04-20  Jason Schroeder  <shrode@subnature.com>
13167
13168         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13169
13170 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13171
13172         * parse.y (lookup_field_wrapper): Search for final local aliases.
13173         (resolve_expression_name): Let lookup_field_wrapper search for
13174         final local aliases. Force the value of `name' if one is found.
13175         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13176         an expression name. Fixed comments.
13177
13178 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13179
13180         * parse.y (yyerror): `msg' can be null, don't use it in that case.
13181
13182 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13183
13184         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13185
13186 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13187
13188         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13189
13190 2000-04-18  Tom Tromey  <tromey@cygnus.com>
13191
13192         PR gcj/211:
13193         * gjavah.c (utf8_cmp): Changed return value.
13194         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
13195         result.
13196         (cxx_keywords): New global.
13197         (get_field_name): Handle new result of cxx_keyword_subst.
13198         (print_method_info): Likewise.
13199
13200 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
13201
13202         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13203         with a newline, for CNI.
13204         (print_stub_or_jni): Print a space or newline before method name for
13205         CNI as well as JNI.
13206         (print_cxx_classname): Don't write leading "::" in CNI stub method.
13207         (process_file): Include gcj/cni.h if generating CNI stubs.
13208
13209 2000-04-16  Tom Tromey  <tromey@cygnus.com>
13210
13211         * gjavah.c (decompile_method): Use print_field_name.
13212         Fixes PR gcj/205.
13213
13214 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13215
13216         * parse.y (java_expand_classes): Reverse the package list once.
13217         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13218         reduction.
13219         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13220         the `==' and `!=' operators.
13221
13222 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13223
13224         * jcf-write.c (generate_bytecode_insns): At invocation time,
13225         always relate an interface method to the type of its selector.
13226
13227 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13228
13229         Fix for PR gcj/2:
13230         * expr.c (expand_invoke): Generate check to see if object pointer
13231         is null in nonvirtual invocation case.
13232         * java-tree.h (soft_nullpointer_node): Declare.
13233         * decl.c (soft_nullpointer_node): New global.
13234         (init_decl_processing): Initialize soft_nullpointer_node.
13235         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13236         or `private' methods.
13237         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13238
13239 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13240
13241         Fix for PR gcj/140:
13242         * parse.y (check_final_assignment): Recognize assignments to the
13243         `length' field of an array when generating class files.
13244
13245 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13246
13247         * class.c (decl_hash): Prototype removed.
13248         (decl_compare): Likewise.
13249
13250 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13251
13252         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13253         * parse.y (check_modifiers_consistency): Check for final/volatile
13254         clash.  Fixes PR gcj/164.
13255
13256 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13257
13258         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13259         made global.
13260         (java_hash_compare_tree_node): Renamed from `decl_compare, made
13261         global.
13262         (add_method_1): Use `java_hash_hash_tree_node' and
13263         `java_hash_compare_tree_node'.
13264         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13265         (java_hash_compare_tree_node): Likewise.
13266         * parse.y (find_applicable_accessible_methods_list): Create,
13267         delete and use a hash table to remember already searched interfaces.
13268
13269 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
13270
13271         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13272         with latest entry.
13273
13274 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13275
13276         * boehm.c (mark_reference_fields, set_bit): Prototype.
13277         (set_bit): Un-ANSI-fy definition.
13278
13279         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13280         Prototype.
13281
13282         * decl.c (emit_init_test_initialization): Likewise.
13283
13284         * gjavah.c (jni_print_char): Likewise.
13285
13286         * parse.y (create_new_parser_context): Likewise.
13287
13288 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13289
13290         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13291         patch missing hunk. Fixed indentation.
13292
13293 2000-03-30  Tom Tromey  <tromey@cygnus.com>
13294
13295         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13296         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13297
13298 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13299
13300         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13301         when negative *before* using it as an array index.
13302         * ChangeLog: Fixed typo.
13303
13304 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13305
13306         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13307         to 0 when it reaches -1.
13308
13309 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13310
13311         * jcf-parse.c (get_constant): Properly cast `num' during the
13312         invocation of `add_double'.
13313         * jcf-write.c (push_long_const): Properly cast `lo' before
13314         comparing it to short bounds.
13315         * parse-scan.y (interface_declaration:): Rule re-arrange so that
13316         `interface_body:' is reduced after the current interface is
13317         pushed.
13318
13319 2000-03-26  Tom Tromey  <tromey@cygnus.com>
13320
13321         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13322         Java-specific `-f' option.
13323
13324 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13325
13326         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13327         Adjust order of making types.
13328         Make bitsize_*_node values.
13329
13330 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13331
13332         * class.c (make_field_value): Use byte_position.
13333         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13334         (java_array_data_offset): Likewise.
13335         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13336         bzero call.
13337
13338 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13339
13340         * parse.y (check_abstract_method_definitions): New local
13341         `end_type_reached'. Make sure we also consider `end_type'.
13342         (java_check_abstract_method_definitions): Make sure we eventually
13343         consider `java.lang.Object'.
13344         (maybe_use_access_method): Don't use access method if not in the
13345         context of a pure inner class or if the method's context is right.
13346         (find_applicable_accessible_methods_list): New static flag
13347         `object_done'. Don't search abstract classes as interfaces. Fixed
13348         indentation. Fixed the `java.lang.Object' only search. Search
13349         class interface(s) first, then fully search enclosing contexts.
13350         (find_most_specific_methods_list): Pick the closest candidate when
13351         they're all abstract.
13352
13353 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13354
13355         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13356         properly initialize `finished_label'. Don't emit gotos for empty
13357         try statements.
13358
13359 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13360
13361         * except.c (emit_handlers): Clear catch_clauses_last.
13362
13363 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13364
13365         * parse.y (check_method_types_complete): New function.
13366         (create_class): Reset anonymous class counter only when seeing an
13367         non inner classe.
13368         (java_complete_class): JDEP_METHOD: Don't recompute signature
13369         if incomplete.
13370
13371 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13372
13373         * class.c (build_static_ref): Fixed indentation in comment.
13374         * java-tree.def (TRY_EXPR): Fixed typo in name.
13375         (CLASS_LITERAL): Likewise.
13376         * java-tree.h: (TYPE_DOT_CLASS): New macro.
13377         (struct lang_type): New field `dot_class'.
13378         * jcf-write.c (generate_bytecode_insns): Fixed error message.
13379         (generate_classfile): Method `class$' is synthetic.
13380         * parse.y (build_do_class_method): New function.
13381         (build_dot_class_method_invocation): Likewise.
13382         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13383         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13384         (qualify_ambiguous_name): Likewise.
13385         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13386         (build_try_statement): Fixed leading comment.
13387
13388 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13389
13390         * class.c (make_field_value): Properly handle sizes.
13391         (get_dispatch_vector): Use tree_low_cst and host_integerp.
13392         (layout_class_method): Count using trees.
13393         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13394         * expr.c (java_array_data_offset): Use int_bit_position.
13395         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13396         (build_invokevirtual): Use tree_low_cst and do computations with trees.
13397
13398 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13399
13400         * lang.c (flag_hash_synchronization): New global.
13401         (lang_f_options): Added `hash-synchronization'.
13402         * lang-options.h: Mention -fhash-synchronization.
13403         * java-tree.h (flag_hash_synchronization): Declare.
13404         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13405         hash table synchronization is disabled.
13406         * decl.c (init_decl_processing): Only push `sync_info' value when
13407         hash table synchronization is disabled.
13408         * class.c (make_class_data): Only push `sync_info' field when hash
13409         table synchronization is disabled.  Removed dead code.
13410
13411 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13412
13413         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13414
13415 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13416
13417         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13418         classes.
13419         * parse.y (patch_method_invocation): Handle anonymous classes
13420         creation in static context.
13421
13422 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13423
13424         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13425         * parse.y (resolve_qualified_expression_name): Use it.
13426         (patch_method_invocation): Likewise.
13427
13428 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13429
13430         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13431         depending on the type of dependency which dictates what the
13432         current class is.
13433         (unresolved_type_p): Resolved types limited to the current class.
13434
13435 2000-03-15  Tom Tromey  <tromey@cygnus.com>
13436
13437         * decl.c (init_decl_processing): Set type of `sync_info' to be
13438         pointer to Object.
13439
13440         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13441         Correctly compute bit number for current slot.  Zero `high' and
13442         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
13443         mark_reference_fields.
13444         (mark_reference_fields): New function.
13445
13446 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13447
13448         * parse.y (register_incomplete_type): Fixed initialization of
13449         JDEP_ENCLOSING.
13450
13451 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13452
13453         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13454         static globals.
13455         (push_class_context, pop_class_context): New function.
13456         (class_body:): Call pop_class_context.
13457         (interface_body:): Likewise.
13458         (INNER_QUALIFIER): New macro.
13459         (report_class_declaration): Changed output format and use
13460         INNER_QUALIFIER. Call push_class_context.
13461
13462 2000-02-14  Andrew Haley  <aph@cygnus.com>
13463
13464         * check-init.c (check_init): Add new cases for unary and binary
13465         tree nodes.
13466
13467 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13468
13469         * parse.y (resolve_package): Set `next' once a type name has been
13470         progressively discovered.
13471         (resolve_qualified_expression_name): Propagate resolution only if
13472         there are remaining qualifiers. Take into account `q' might have
13473         been cleared after re-qualification.
13474         * parse.y (patch_method_invocation): New local `resolved'.
13475         Section dealing with qualified expression rewritten to use
13476         resolve_field_access.
13477
13478 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13479
13480         * parse.h (PUSH_CPC): Fixed indentation.
13481         (DEBUG_CPC): New macro.
13482         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13483         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13484         * parse.y (class_body_declaration:): Use
13485         SET_CPC_INSTANCE_INITIALIZER_STMT.
13486         (method_declaration:): Check for null current_function_decl.
13487         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13488         (java_parser_context_pop_initialized_field): Better handling of
13489         empty lists.
13490         (maybe_make_nested_class_name): Mark nested class name as
13491         qualified when necessary.
13492         (end_class_declaration): Don't call java_parse_context_resume when
13493         one or more error occurred.
13494         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13495         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13496         SET_CPC_INITIALIZER_STMT.
13497         (method_header): Check for inner classes declaring static methods.
13498         (resolve_qualified_expression_name): Handle situation where `this'
13499         is implied.
13500
13501 2000-03-13  Hans Boehm <boehm@acm.org>
13502
13503         * typeck.c (build_prim_array_type): Correctly set the high word too.
13504
13505 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13506
13507         * parse.y (java_complete_expand_methods): Leave <clinit> out of
13508         ordinary methods.
13509         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
13510         list of methods for interfaces.
13511
13512 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13513
13514         * parse.y (qualify_ambiguous_name): Properly handle expressions
13515         using `null'.
13516
13517 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13518
13519         * parse.y (check_final_assignment): Extended to process
13520         COMPOUND_EXPR.
13521         (patch_assignment): Have check_final_assignment called only once.
13522
13523 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13524
13525         * java-tree.h (IS_INIT_CHECKED): New flag.
13526         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
13527         * parse.y (patch_string): Call force_evaluation_order on the
13528         completed string concatenation tree.
13529         * expr.c (force_evaluation_order): Call force_evaluation_order on
13530         function's arguments too.
13531
13532 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13533
13534         * decl.c (emit_init_test_initialization): Mark KEY as unused.
13535         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
13536         (build_anewarray): Likewise.
13537         * parse.y (patch_newarray): Likewise.
13538         * parse.c: Regenerated.
13539
13540 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
13541
13542         * decl.c (init_decl_processing): Added new class fields `depth',
13543         `ancestors', and `idt' to class_type_node. Use
13544         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
13545         * class.c (make_class_data): Push initial values for new fields.
13546         * java-tree.h: Updated prototype for `build_invokeinterface'.
13547         * expr.c (build_invokeinterface): Changed parameters to accept
13548         `method' tree. Calculate index of `method' in its declaring
13549         interface. Build call to _Jv_LookupInterfaceMethodIdx.
13550         (expand_invoke): Call `build_invokeinterface' with new parameters.
13551         * parse.y (patch_invoke): Call `build_invokeinterface' with new
13552         parameters.
13553
13554 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
13555
13556         * typeck.c (lookup_do): Search superinterfaces first
13557         when looking up an interface method. From Godmar Back
13558         <gback@cs.utah.edu>
13559
13560 2000-03-06  Tom Tromey  <tromey@cygnus.com>
13561
13562         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
13563
13564 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13565
13566         * java-tree.h (lookup_argument_method2): Declared.
13567         (safe_layout_class): Prototype moved from parse.h.
13568         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
13569         * parse.y (java_check_regular_methods): Local `super_class' gone.
13570         Call lookup_argument_method2 instead of lookup_argument_method.
13571         Perform modifier match for methods found declared in implemented
13572         interfaces. Fixed indentation problem. Overriding/hiding error
13573         report to take place only for methods found in classes.
13574         * typeck.c (lookup_argument_method): Changed leading
13575         comment. Re-written by calling lookup_do.
13576         (lookup_argument_method2): New function.
13577         (lookup_java_method): Re-written by calling lookup_do.
13578         (lookup_do): New function.
13579
13580 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13581
13582         * check-init.c (check_init): Removed dead code. Handle (blank)
13583         final variables.
13584         * parse.y (declare_local_variables): New local `final_p', set it
13585         and use it to initialize LOCAL_FINAL.
13586         (check_final_assignment): Only check FIELD_DECLs.
13587
13588 2000-02-17  Tom Tromey  <tromey@cygnus.com>
13589
13590         * Makefile.in (JAVA_OBJS): Added boehm.o.
13591         (boehm.o): New target.
13592         * Make-lang.in (JAVA_SRCS): Added boehm.c.
13593         * java-tree.h (flag_use_boehm_gc): Declare.
13594         (get_boehm_type_descriptor): Declare.
13595         * lang.c (lang_f_options): Added `use-boehm-gc'.
13596         (flag_use_boehm_gc): New global.
13597         * lang-options.h: Added -fuse-boehm-gc.
13598         * boehm.c: New file.
13599         * class.c (get_dispatch_table): If class uses a Boehm type
13600         descriptor, put it in the vtable.
13601         (make_class_data): Removed dead code.
13602
13603 2000-03-03  Per Bothner  <per@bothner.com>
13604
13605         * decl.c (init_decl_processing):  Initialize sizetype properly.
13606
13607 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13608
13609         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
13610         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
13611         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13612         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
13613         (jcf_parse): New local `current'. Load innerclasses seen in outer
13614         context being processed.
13615         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
13616         * jcf-write.c (append_innerclasses_attribute): New function.
13617         (append_innerclasses_attribute_entry): Likewise.
13618         (get_access_flags): Handle static classes. Set anonymous and local
13619         classes to be private.
13620         (generate_classfile): Attribute count adjusted. Call
13621         append_innerclasses_attribute.
13622         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
13623         PURE_INNER_CLASS_TYPE_P.
13624         * parse.y (parser_qualified_classname): New parameter `is_static',
13625         produce non qualified name accordingly.
13626         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
13627         (create_interface): Added argument to parser_qualified_classname.
13628         (create_class): Added argument to parser_qualified_classname. Setup
13629         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
13630         (add_inner_class_fields): Fixed indentation.
13631         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
13632         (method_declarator): Fixed typo in comment.
13633         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
13634         (build_current_thisn): Likewise.
13635         (patch_method_invocation): Likewise.
13636
13637 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13638
13639         * decl.c (current_function_decl): Move to toplev.c.
13640
13641 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13642
13643         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
13644         (DECL_BIT_INDEX): Use underlying representation.
13645         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
13646
13647 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13648
13649         * expr.c (build_java_ret): Pass proper type to size_binop.
13650
13651 2000-02-25  Anthony Green  <green@cygnus.com>
13652
13653         * expr.c (build_class_init): Mark the decl to be ignored by
13654         check_init.
13655         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
13656         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
13657         * class.c (init_test_hash_newfunc): New function.
13658         (decl_hash): New function.
13659         (decl_compare): New function.
13660         * decl.c (emit_init_test_initialization): New function.
13661         (complete_start_java_method): Traverse the init test hashtable,
13662         calling emit_init_test_initialization.
13663         (always_initialize_class_p): Define.
13664         * expr.c (build_class_init): Use initialization tests when
13665         emitting class initialization code.
13666         (always_initialize_class_p): Declare.
13667         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
13668         1.
13669         * java-tree.h: Include hash.h.
13670         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
13671         (struct lang_decl): Add init_test_table field.
13672         (init_test_hash_entry): Define.
13673
13674 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13675
13676         * gjavah.c (main): Avoid using `argi' to report unimplemented
13677         options.
13678
13679 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13680
13681         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13682         initialize locals to avoid warnings. Local `exception_type' moved
13683         into if statement.
13684
13685 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13686
13687         * parse.y (resolve_expression_name): Use `orig' as a second
13688         argument to resolve_field_access.
13689         (resolve_field_access): Removed unnecessary code when dealing with
13690         static fields.
13691
13692 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13693
13694         * class.c (push_super_field): Don't push the field twice.
13695         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
13696         * parse.h (java_reorder_fields): Prototyped.
13697         * parse.y (java_reorder_fields): New function.
13698         (java_layout_class): Simplified not to worry about re-ordering.
13699
13700 2000-02-23  Tom Tromey  <tromey@cygnus.com>
13701
13702         * gjavah.c (print_name): In JNI case, correctly quote string.
13703         (print_method_info): Don't handle overrides in JNI mode.
13704
13705 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13706
13707         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
13708         value type set to `boolean_type_node'.
13709
13710 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
13711
13712         * jcf-dump.c (main): Test for correct condition after
13713         output file creation.
13714
13715 2000-02-19  Anthony Green  <green@cygnus.com>
13716
13717         * jcf-depend.c (add_entry): Fix test for first list entry.
13718
13719 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13720
13721         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
13722         * constants.c (build_constants_constructor): Likewise.
13723
13724 2000-02-19  Anthony Green  <green@cygnus.com>
13725
13726         * jcf-depend.c (add_entry): Add entries to the end of the list.
13727
13728 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
13729
13730         * decl.c (INT_TYPE_SIZE): Define if necessary.
13731         (expand_java_return): Handle the case of a native integer smaller
13732         than a JVM integer.
13733
13734 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
13735
13736         * gjavah.c (help): Use GCCBUGURL.
13737         * jv-scan.c (help): Likewise.
13738         * jcf-dump.c (help): Likewise.
13739
13740 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13741
13742         * jcf-write.c (generate_bytecode_insns): Don't generate empty
13743         `finally' clauses.
13744
13745 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13746
13747         * jcf-parse.c (load_class): Call `fatal' if no file containing
13748         the target class are found.
13749
13750 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
13751
13752         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
13753         lex.c, lex.h, and PARSE_H to...
13754         (parse.o, parse-scan.o): ...here, respectively.
13755
13756         * lex.c: Split out code that may trigger SIGFPE from yylex()
13757         to its own function.
13758         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
13759
13760 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13761
13762         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
13763
13764 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13765
13766         * parse.y (outer_field_access_p): Stop in time when outer contexts
13767         are exhausted.
13768         (resolve_qualified_expression_name): Properly qualify *everything*
13769         after a package.type to be resoled as expression names.
13770         (find_applicable_accessible_methods_list): Save/restore `class' to
13771         isolate it from a possible outer context search.
13772
13773 2000-02-15  Tom Tromey  <tromey@cygnus.com>
13774
13775         * gjavah.c (jni_print_char): New function.
13776         (print_full_cxx_name): Use it.
13777         (decode_signature_piece): Likewise.
13778         (print_cxx_classname): Likewise.
13779
13780 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13781
13782         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
13783         version.o.
13784         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
13785
13786         * gjavah.c: Include version.h.
13787
13788         * jcf-dump.c: Likewise.
13789
13790         * jv-scan.c: Likewise.
13791
13792 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13793
13794         * parse.y (outer_field_access_fix): First parameter now a tree
13795         node. Check for assignment to final. First argument to
13796         build_outer_field_access_fix modified to accommodate prototype.
13797         (build_outer_field_access): Don't check for assignment to final
13798         here.
13799         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
13800         possibly returned by outer_field_access_fix. Changed
13801         outer_field_access_fix's first argument.
13802         (check_final_assignment): $finit$'s context is OK.
13803         (patch_unaryop): Use node instead of its line/column value when
13804         calling outer_field_access_fix.
13805
13806 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13807
13808         * parse.y (interface_declaration:): No longer tagged
13809         <node>. Re-installed default action.
13810         (class_member_declaration:): Handle inner interfaces.
13811         (interface_member_declaration): Handle inner interfaces and
13812         classes.
13813         (create_interface): Push error if one seen. Suspend parsing
13814         context when processing an inner interface.
13815         (register_fields): Inner class static field limitations not to
13816         apply to inner interfaces.
13817
13818 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13819
13820         * jcf-parse.c (load_class): Update `java_error_count' when a
13821         class' file can't be found.
13822         (parse.y): Avoid (byte)code generation when errors seen.
13823
13824 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13825
13826         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
13827         decodes a valid node.
13828         (patch_binop): Handle TRUNC_DIV_EXPR.
13829
13830 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13831
13832         * parse.y (resolve_package): New local `acc'. Try to progressively
13833         build and guess a package and type name.
13834
13835 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13836
13837         * parse.y (find_applicable_accessible_methods_list): Load and
13838         layout the search class if necessary.
13839         (java_complete_tree): Keep to original type of the folded initial
13840         value.
13841
13842 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13843
13844         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
13845         Generate error message if circularity is detected. New static
13846         local `list'.
13847         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
13848         * jcf-write.c (generate_bytecode_insns): Very simply handle
13849         SAVE_EXPR.
13850         * parse.y (java_check_circular_reference): Use
13851         `cyclic_inheritance_report' during report, if necessary.
13852         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
13853         walking NEW_ARRAY_INIT twice.
13854
13855 2000-02-09  Tom Tromey  <tromey@cygnus.com>
13856
13857         * parse.y (check_class_interface_creation): Allow inner classes to
13858         be `private' or `protected', check modifiers' consistency. Prevent
13859         block local classes from bearing any modifiers.
13860
13861 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13862
13863         * except.c (check_start_handlers): Re-add prototype lost in last
13864         patch.
13865         (maybe_start_try): Remove excess argument to `check_start_handlers'.
13866
13867 2000-02-09  Andrew Haley  <aph@cygnus.com>
13868
13869         * decl.c (clear_binding_level): Remove excess initializer.
13870         (maybe_poplevels): Remove unused variable.
13871         (force_poplevels): Ditto.
13872         (struct binding_level): Add comment.
13873
13874 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13875
13876         * jcf-write.c (generate_classfile): Don't consider
13877         pre-initialization with reference value (use <clinit> instead.)
13878         * parse.y (java_fix_constructors): No generated constructor for
13879         interfaces.
13880         (build_outer_field_access): Removed debug message.
13881         (outer_field_expanded_access_p): Adapted to bytecode generation.
13882         (build_outer_field_access_method): Use fix_method_argument_names.
13883         (build_outer_method_access_method): Fixed indentation. Added
13884         comment. Handle access method generation for static and also void
13885         methods.
13886         (build_access_to_thisn): Inserted debug message.
13887         (maybe_build_thisn_access_method): Use fix_method_argument_names.
13888         (resolve_qualified_expression_name): Fixed comment.
13889         (not_accessible_p): Adapted to bytecode generation. Added comment.
13890         (patch_method_invocation): Added comment.
13891         (maybe_use_access_method): Fixed leading comment. Handle static
13892         methods.
13893         (java_complete_lhs): Don't shortcut handling of initialized upon
13894         declaration String type static fields when generating bytecode.
13895         (patch_unaryop): Handle outer field access when generating
13896         bytecode.
13897
13898 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13899
13900         * java-tree.h (FIELD_THISN): New macro.
13901         * jcf-write.c (append_synthetic_attribute): New function.
13902         (generate_classfile): Set "Synthetic" attribute on this$<n>,
13903         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
13904         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
13905         this$<n> fields.
13906         (build_outer_field_access): Turned on access functions usage and
13907         generation when compiling to bytecode.
13908         (maybe_use_access_method): Likewise.
13909
13910 2000-01-25  Andrew Haley  <aph@cygnus.com>
13911
13912         * java-except.h (struct eh_range): Add `expanded' field.
13913         (maybe_start_try): Add end_pc arg.
13914         (maybe_end_try): Ditto.
13915         * java-tree.h (force_poplevels): new function.
13916         * expr.c (expand_byte_code): Don't call maybe_start_try or
13917         maybe_end_try.
13918         * except.c (add_handler): Reset expanded.
13919         (expand_start_java_handler): Set expanded.
13920         (check_start_handlers): Don't expand a start handler that's
13921         already been expanded.
13922         (maybe_start_try): Add end_pc arg.  Only expand a handler which
13923         ends after end_pc.
13924         (expand_end_java_handler): call force_poplevels.
13925         (force_poplevels): new function.
13926         * decl.c (binding_level): Add start_pc of binding level.
13927         (maybe_pushlevels): Call maybe_start_try when pushing binding
13928         levels.
13929         (maybe_poplevels): Call maybe_end_try when popping binding levels.
13930         (LARGEST_PC): Define.
13931         (clear_binding_level): Use LARGEST_PC.
13932
13933         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
13934         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
13935         (binding_depth, is_class_level, current_pc): new variables.
13936         (struct binding_level): ditto.
13937         (indent): new function.
13938         (push_jvm_slot): add debugging info.
13939         (maybe_pushlevels): ditto.
13940         (maybe_poplevels): ditto.
13941         (pushlevel): ditto.
13942         (poplevel): ditto.
13943         (start_java_method): ditto.
13944         (give_name_to_locals): comment only.
13945         * except.c (binding_depth, is_class_level, current_pc):
13946         new variables.
13947         (expand_start_java_handler): add debugging info.
13948         (expand_end_java_handler): ditto.
13949
13950 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13951
13952         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
13953         (print_name_for_stub_or_jni, process_file): Constify a char*.
13954
13955 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13956
13957         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
13958
13959 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
13960
13961         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
13962         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
13963         defined to be 1.
13964
13965 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13966
13967         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
13968         * java-tree.h (TYPE_II_STMT_LIST): New macro.
13969         (struct lang_type): New field `ii_block'.
13970         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
13971         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
13972         * parse.h (struct parser_ctxt): New field `instance_initializers'.
13973         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
13974         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
13975         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
13976         macros.
13977         * parse.y (add_instance_initializer): New function.
13978         (in_instance_initializer): New static global.
13979         (class_body_declaration:): Link instance initializer block.
13980         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
13981         (array_creation_expression:): Remove unused local.
13982         (java_parser_context_push_initialized_field): Fixed leading
13983         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
13984         CPC_INSTANCE_INITIALIZER_LIST.
13985         (java_parser_context_pop_initialized_field): Likewise.
13986         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
13987         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
13988         CPC_INITIALIZER_STMT.
13989         (fix_constructors): New local `class_type'. Use it. Call
13990         add_instance_initializer.
13991         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
13992         (patch_return): Forbid return in instance initializers.
13993         (patch_throw_statement): Enforce exception handling in the context
13994         of instance initializers.
13995
13996 2000-02-03  Tom Tromey  <tromey@cygnus.com>
13997
13998         * Make-lang.in (java.mostlyclean): Remove executables in
13999         `mostlyclean'.
14000
14001 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14002
14003         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14004         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14005         (java_float_finite): Convert to use union Word from javaop.h.
14006         (java_double_finite): Convert to use union DWord from javaop.h.
14007
14008 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14009
14010         * gjavah.c (options): Added `jni' entry.
14011         (help): Document -jni.
14012         (flag_jni): New global.
14013         (process_file): Handle JNI output.  Don't print text from
14014         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14015         suffix if it actually exists.
14016         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14017         correct output file name with `--jni'.
14018         (print_include): Mangle header name differently in JNI case.
14019         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14020         method list.
14021         (print_method_info): Handle JNI case.  Put signature info into
14022         method name.  Handle case when STREAM is NULL.
14023         (print_name_for_stub_or_jni): New function.
14024         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14025         (print_cxx_classname): Handle JNI.
14026         (print_full_cxx_name): Likewise.
14027         (decode_signature_piece): Likewise.
14028         (overloaded_jni_method_exists_p): New function.
14029         (struct method_name): Added `signature' and `sig_length' fields.
14030         (HANDLE_END_FIELD): Do nothing in JNI mode.
14031
14032 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14033
14034         * jv-scan.c: Include version.c, <getopt.h>.
14035         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14036         (options): New array.
14037         (usage): New function.
14038         (version): New function.
14039         (main): Use getopt_long to parse command line.
14040         * jcf-dump.c: Include version.c, <getopt.h>.
14041         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14042         OPT_JAVAP): New macros.
14043         (options): New array.
14044         (usage): Return `void'.  Changed message.
14045         (help): New function.
14046         (version): New function.
14047         (main): Use getopt_long_only to parse command line.
14048         * gjavah.c: Include <getopt.h>.
14049         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14050         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14051         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14052         (options): New array.
14053         (java_no_argument): Removed.
14054         (help): Updated with missing options.
14055         (main): Use getopt_long_only to parse command line.
14056         (usage): Changed message.
14057
14058 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14059
14060         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14061         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14062         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14063         * parse.y (array_creation_expression:): Handle anonymous arrays.
14064         (build_array_from_name): Don't set `ret_name' if null.
14065         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14066         (qualify_ambiguous_name): Likewise.
14067         (java_complete_expand_class): Likewise.
14068
14069 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14070
14071         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14072         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14073         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14074         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14075         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14076         AIPL_FUNCTION_COMPLETED_INVOCATION.
14077         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14078         AIPL_FUNCTION_INVOCATION_READY.
14079         (AIPL_FUNCTION_DECLARATION): New enum entry.
14080         * parse.y (reorder_static_initialized): New function.
14081         (java_parser_context_pop_initialized_field): Use it.
14082         (add_inner_class_fields): Use
14083         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14084         augmented. Install marker after last alias initializer, if any.
14085         (generate_finit): Fixed typo. Don't try to retain only the used
14086         fields.
14087         (method_header): Compute and set DECL_FUNCTION_NAP.
14088         (method_declarator): Fixed comment. Insert alias initializer in
14089         parameter list.
14090         (build_alias_initializer_parameter_list): Fixed leading
14091         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14092         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14093         (java_complete_expand_class): Code to retain only used aliases
14094         removed.
14095         (java_complete_expand_methods): New local `first_decl'. Generate
14096         $finit$ first, then expand the constructors, regular methods and
14097         <clinit>.
14098         (java_complete_expand_method): Don't report error on missing
14099         return statement if previously detected bogus.
14100         (fix_constructors): Don't patch constructor parameters list.
14101         (patch_method_invocation): Use new AIPL enum values. Reverse
14102         alias initializer list for anonymous classes.
14103
14104 2000-01-30  Anthony Green  <green@redhat.com>
14105
14106         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14107         determine how many stack slots to pop.
14108
14109 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14110
14111         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14112         error handling/recovery.
14113         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14114
14115 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14116
14117         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14118         FIELD_LOCAL_ALIAS_USED): New macros.
14119         (DECL_FUNCTION_NAP): New macro.
14120         (struct lang_decl): New field `nap'.
14121         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14122         (struct lang_type): New fields `finit_stmt_list' and
14123         `clinit_stmt_list'.
14124         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14125         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14126         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14127         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14128         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14129         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14130         (BUILD_THROW): Macro line separator re-indented.
14131         * parse.y (end_class_declaration): New function.
14132         (maybe_generate_pre_expand_clinit): New name for
14133         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14134         pre-expand static fields.
14135         (maybe_generate_clinit): Function deleted.
14136         (check_for_static_method_reference): Prototype's parameter list
14137         indented.
14138         (generate_finit): New name for maybe_generate_finit. Changed
14139         leading comment. Function rewritten to use
14140         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14141         (build_alias_initializer_parameter_list): New function.
14142         (java_parser_context_pop_initialized_field): Likewise.
14143         (add_inner_class_fields): Likewise.
14144         (type_declaration:): Call end_class_declaration.
14145         (class_member_declaration:): Likewise.
14146         (formal_parameter_list:): Fixed typos.
14147         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14148         element. Improved error handling.
14149         (block_statement:): Call end_class_declaration.
14150         (anonymous_class_creation:): Likewise.
14151         (create_anonymous_class): Fixed comments.
14152         (create_class): Call add_inner_class_fields.
14153         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14154         (method_header): Use MARK_FINAL_PARMS.
14155         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14156         (method_declarator): Propagate final argument flag.
14157         (craft_constructor): New local `artificial'. Call
14158         build_alias_initializer_parameter_list. Use
14159         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14160         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14161         necessary.
14162         (complete_expand_class): Get rid of unused outer context local
14163         alias fields.
14164         (java_complete_expand_methods): Fixed leading
14165         comment. Generate/pre-expand <clinit> first. Changed method
14166         expansion order to regular, $finit$, constructors, <clinit>.
14167         (java_complete_expand_method): Set current_function_decl.
14168         (fix_constructors): Fix constructor parameter list to account for
14169         outer context local alias initializers.
14170         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14171         (resolve_expression_name): Lookup outer context local aliases. New
14172         local `access', use it.
14173         (patch_method_invocation): Patch inner class ctor invocation with
14174         outer context local aliases initialization values. $finit$
14175         invocation patching now includes things generated with
14176         build_alias_initializer_parameter_list.
14177         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14178         (build_super_invocation): Likewise.
14179         (patch_assignment): Changed comment.
14180
14181 2000-01-27  Andrew Haley  <aph@cygnus.com>
14182
14183         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14184         (emit_if): Ditto.
14185         (emit_jsr): Ditto.
14186
14187 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14188
14189         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14190         concatenation.
14191         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14192
14193         * parse.y (register_fields): Don't pass a format specifier to
14194         OBSOLETE_MODIFIER_WARNING.
14195         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14196         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14197         specifier.
14198         (check_modifiers): Change function into a macro.
14199         (check_class_interface_creation): Pass a literal format string.
14200
14201 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14202
14203         * buffer.h: PROTO -> PARAMS.
14204         * check-init.c: Likewise.
14205         * class.c: Likewise.
14206         * constants.c: Likewise.
14207         * convert.h: Likewise.
14208         * decl.c: Likewise.
14209         * except.c: Likewise.
14210         * expr.c: Likewise.
14211         * gjavah.c: Likewise.
14212         * java-except.h: Likewise.
14213         * java-tree.h: Likewise.
14214         * jcf-depend.c: Likewise.
14215         * jcf-dump.c: Likewise.
14216         * jcf-parse.c: Likewise.
14217         * jcf-path.c: Likewise.
14218         * jcf-reader.c: Likewise.
14219         * jcf-write.c: Likewise.
14220         * jcf.h: Likewise.
14221         * jv-scan.c: Likewise.
14222         * jvgenmain.c: Likewise.
14223         * jvspec.c: Likewise.
14224         * lang.c: Likewise.
14225         * lex.c: Likewise.
14226         * lex.h: Likewise.
14227         * parse-scan.y: Likewise.
14228         * parse.h: Likewise.
14229         * parse.y: Likewise.
14230         * typeck.c: Likewise.
14231         * verify.c: Likewise.
14232         * xref.c: Likewise.
14233         * xref.h: Likewise.
14234         * zextract.c: Likewise.
14235         * zipfile.h: Likewise.
14236
14237 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14238
14239         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14240         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14241         * constants.c (build_constant_data_ref): Check for cached
14242         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14243         in TYPE_CPOOL_DATE_REF.
14244         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14245         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14246         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14247         (LOCAL_FINAL): New macro.
14248         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14249         constant pool -- don't try to reuse.
14250         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14251         TYPE_LANG_SPECIFIC.
14252         (find_in_current_zip): Use TYPE_JCF.
14253         * parse.h (java_check_final): Prototype removed.
14254         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14255         (maybe_create_class_interface_decl,
14256         check_class_interface_creation): Likewise.
14257         (java_expand_finals): Function removed.
14258         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14259         (block_statement:): Fixed comment.
14260         (anonymous_class_creation:): Likewise.
14261         (check_class_interface_creation): Reversed Jan 12, 2000 extra
14262         argument patch.
14263         (check_class_interface_creation): Loosened error report on (inner)
14264         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14265         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14266         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14267         argument patch.
14268         (create_interface): Likewise.
14269         (anonymous_class_counter): New static global.
14270         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14271         patch. Fixed comments.
14272         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14273         anonymous_class_counter when declaring a toplevel class.
14274         (craft_constructor): Fixed constructor name when handling
14275         anonymous classes. Anonymous class constructors to feature hidden
14276         this$<n> parameter.
14277         (java_fix_constructors): Added comment.
14278         (java_check_final): Function removed.
14279         (java_complete_expand_methods): Fixed comment. Don't generate
14280         class data, save its outgoing constant pool instead.
14281         (verify_constructor_super): Skip anonymous class constructor
14282         hidden this$<n> parameter.
14283         (java_expand_classes): New local `saved_ctxp'. Removed call to
14284         java_expand_finals and java_check_final. Expand anonymous class
14285         constructors. Generate class data.
14286         (build_super_invocation): Skip anonymous class hidden this$<n>
14287         parameter.
14288         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14289         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14290         (set_java_signature): Likewise.
14291
14292 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14293
14294         * gjavah.c: Delete ACC_VISIBILITY define.
14295         * jcf.h: Add ACC_VISIBILITY define.
14296         * parse.y: final: rule tagged <value>.
14297         (java_check_regular_methods): Use ACC_VISIBILITY define for
14298         default package access check.
14299         (local_variable_declaration_statement): Use final: rule.
14300
14301 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14302
14303         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14304         (final:): New rule.
14305
14306 2000-01-17  Tom Tromey  <tromey@cygnus.com>
14307
14308         * gjavah.c (print_field_info): Allow non-static final fields.
14309
14310 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14311
14312         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14313         * parse.y (patch_anonymous_class): New function.
14314         (create_anonymous_class): Register incomplete type when the
14315         class/interface to extends/implement isn't known yet.
14316         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14317         (verify_constructor_super): Tuned error message.
14318
14319 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14320
14321         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14322         (ANONYMOUS_CLASS_P): New macro.
14323         (TYPE_SIGNATURE, TYPE_JCF): New macros.
14324         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14325         * parse.y (create_class): Added leading argument.
14326         (maybe_create_class_interface_decl,
14327         check_class_interface_creation): Likewise.
14328         (craft_constructor): New function.
14329         (verify_constructor_super): Added argument in prototype.
14330         (class_declaration:): Inserted leading argument.
14331         (for_begin:): Use FOR_LOOP_P.
14332         (anonymous_class_creation): Create WFL of the anonymous class to
14333         instantiate. Call build_new_invocation. Added comments.
14334         (check_class_interface_creation): Handle parameter `anonymous' in
14335         verbose mode class creation announce.
14336         (link_nested_class_to_enclosing): Exclude anonymous classes.
14337         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14338         anonymous class, even though they appear to have an enclosing
14339         context.
14340         (create_interface): Pass extra argument to
14341         check_class_interface_creation.
14342         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14343         (create_class): Call check_class_interface_creation and
14344         maybe_create_class_interface_decl with extra new argument. Don't
14345         add private this$<n> to anonymous classes.
14346         (method_declarator): Insert hidden this$<n> to anonymous class
14347         constructors.
14348         (java_fix_constructors): Deleted code creating default
14349         constructor. Call craft_constructor instead.
14350         (java_check_regular_methods): Set `saw_constructor' to 1 for
14351         anonymous classes.
14352         (fix_constructors): Pass extra argument to verify_constructor_super.
14353         (verify_constructor_super): New local `sdecl', use it. Search for
14354         matching constructor (possibly featuring arguments) in super
14355         class.
14356         (lookup_method_invoke): Craft constructor according to arguments
14357         list when dealing with anonymous class constructors.
14358         (build_super_invocation): Pass arguments to anonymous class super
14359         constructors.
14360         (search_loop): Use FOR_LOOP_P.
14361         (labeled_block_contains_loop_p): Likewise.
14362
14363 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14364
14365         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14366         (enclosing_context_p): New function.
14367         (get_access_flags_from_decl): Handle CLASS_STATIC.
14368         (maybe_layout_super_class): Extra first argument passed to
14369         do_resolve_class.
14370         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14371         ID_INIT_P.
14372         * decl.c (access0_identifier_node): New global.
14373         (init_decl_processing): access0_identifier_node initialized.
14374         (pushdecl): Set DECL_CONTEXT only on non type decls.
14375         * expr.c (lookup_field): Lookup inner class fields in enclosing
14376         contexts.
14377         (expand_invoke): Use ID_INIT_P.
14378         (expand_java_field_op): Use DECL_CLINIT_P.
14379         * java-tree.def (CLASS_LITERAL): New tree code.
14380         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14381         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14382         (struct lang_decl): New field `inner_access'.
14383         (enclosing_context_p): Prototyped.
14384         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14385         ID_CLINIT_P): New macros.
14386         (CLASS_STATIC): New macro.
14387         (CLASS_ACCESS0_GENERATED_P): New macro.
14388         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14389         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14390         INNER_CLASS_P): New macros.
14391         (DECL_INNER_CLASS_LIST): New macro.
14392         * jcf-parse.c (yyparse): Avoid the use of ANSI string
14393         concatenation.
14394         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14395         the shift value to int. Fixed typo in comment.
14396         * lex.c (inst_id, wpv_id): Initialize.
14397         * mangle.c (unicode_mangling_length): Take `$' into account.
14398         * parse.h (DRECOVER, RECOVER): Terminate properly.
14399         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14400         (typedef struct _jdep): New field `enclosing'.
14401         (JDEP_ENCLOSING): New macro.
14402         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14403         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14404         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14405         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14406         GET_ENCLOSING_CPC_CONTEXT): New macros.
14407         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14408         (do_resolve_class): Added extra argument in prototype.
14409         * parse.y (resolve_class): Added extra argument in prototype.
14410         (maybe_create_class_interface_decl): Likewise.
14411         (maybe_use_access_method, build_wfl_wrap): New functions.
14412         (java_complete_expand_classes, java_complete_expand_class):
14413         Likewise.
14414         (java_parser_context_push_initialized_field,
14415         java_parser_context_suspend, java_parser_context_resume):
14416         Likewise.
14417         (maybe_make_nested_class_name, make_nested_class_name,
14418         set_nested_class_simple_name_value,
14419         link_nested_class_to_enclosing, find_as_inner_class,
14420         find_as_inner_class_do, check_inner_class_redefinition,
14421         build_thisn_assign, build_current_thisn, build_access_to_thisn,
14422         maybe_build_thisn_access_method, build_outer_field_access,
14423         build_outer_field_access_methods, build_outer_field_access_expr,
14424         build_outer_method_access_method, build_new_access_id,
14425         build_outer_field_access_method, outer_field_access_p,
14426         outer_field_expanded_access_p, outer_field_access_fix,
14427         build_incomplete_class_ref, patch_incomplete_class_ref,
14428         create_anonymous_class): Likewise.
14429         (inst_id, wpv_id): New static global variables.
14430         (synchronized:): New rule, tagged <node>.
14431         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14432         rules.
14433         (anonymous_class_creation:): New rule, tagged <node>.
14434         (NEW_TK): Tagged <node>.
14435         (type_literals, array_type_literal): New rules, tagged <node>.
14436         (class_declaration:): Removed action when reducing by class_body:
14437         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14438         using GET_CPC in sub-rules.
14439         (class_member_declaration): Handle inner classes.
14440         (method_declaration): When reducing method_header:, reset
14441         current_function_decl when appropriate.
14442         (method_declarator:): Set the number of formal parameter to 0 for
14443         method declared without arguments.
14444         (constructor_declarator:): Likewise.
14445         (static_initializer:): List of elements kept in a list.
14446         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14447         use of the keyword `static' for type declarations.
14448         (block_statement:): Handle inner class declarations.
14449         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14450         type qualified `this'.
14451         (class_instance_creation_expression): Use anonymous_class_creation:
14452         to handle inner class instances creation. Handle qualified `new'.
14453         (something_dot_new): Added appropriate actions.
14454         (create_new_parser_context): New function.
14455         (java_push_parser_context, java_parser_context_save_global,
14456         java_parser_context_suspend): Use create_new_parser_context.
14457         (check_modifiers): Changed leading comment.
14458         (check_class_interface_creation): Handle interclasses.
14459         (add_superinterfaces): Fixed comment.
14460         (create_interface): Build qualified name from the raw_name instead
14461         of its matching WFL. Push the initialized fields list. raw_name added
14462         as an extra argument to maybe_create_class_interface_decl.
14463         (create_class): Build qualified name from the raw_name instead of
14464         its matching WFL. Removed assignment to current_parsed_class_un.
14465         Call PUSH_ERROR before returning an error. Suspend the current
14466         parser context when processing an inner class. Push the
14467         initialized fields list. raw_name added as an extra argument to
14468         maybe_create_class_interface_decl. Add the private this$<n>
14469         field.
14470         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14471         (register_fields): Get the class type from GET_CPC and handle
14472         previous errors.  Added code to handle the creation of static
14473         fields in inner classes. Initialized fields initialization
14474         statements kept in a list of lists.
14475         (maybe_generate_finit): Initialized fields initialization
14476         statements kept in a list of lists. Use GET_CPC.
14477         (maybe_generate_clinit): Likewise.
14478         (method_header): Use GET_CPC and GET_CPC_UN.
14479         (parser_qualified_classname): Handle inner classes.
14480         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14481         (java_fix_constructors): Hide pointer to enclosing context
14482         instance in constructor list when dealing with inner classes.
14483         (jdep_resolve_class): Call resolve_class with extra first argument
14484         JDEP_ENCLOSING.
14485         (resolve_class): Add enclosing context as a first extra argument
14486         to do_resolve_class.
14487         (do_resolve_class): Call find_as_inner_class. Handle WFLs
14488         properly.
14489         (resolve_no_layout): Extra argument added to resolve_class
14490         invocation.
14491         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14492         (java_get_real_method_name): Use GET_CPC_UN.
14493         (check_abstract_method_definitions): Use DECL_CLINIT_P.
14494         (java_check_abstract_methods): Handle static method declared in
14495         inner classes by an error.
14496         (java_check_regular_methods): Use DECL_CLINIT_P.
14497         (source_start_java_method): Also set DECL_MAX_LOCALS.
14498         (create_artificial_method): Call java_parser_context_save_global
14499         and java_parser_context_restore_global instead of saving/restoring
14500         the context by hand.
14501         (expand_start_java_method): Improved verbose mode message.
14502         (java_complete_expand_methods): Fixed leading comment. Use
14503         DECL_CLINIT_P.
14504         (fix_constructors): Added assignment to this$<n> if necessary.
14505         (java_expand_classes): Call java_complete_expand_classes instead
14506         of java_complete_expand_methods.
14507         (make_qualified_primary): Simplified.
14508         (merge_qualified_name): Optimized for missing left or right parts.
14509         (resolve_expression_name): Handle access to outer class fields from
14510         interclasses.
14511         (resolve_qualified_expression_name): New macro
14512         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
14513         classes. Report error on non appropriate qualification of
14514         `new'. Handle qualified `this'.
14515         (not_accessible_p): Allow access to outer class private fields from
14516         inner classes.
14517         (patch_method_invocation): Handle method invocations through
14518         access methods and inner class constructor invocations.
14519         (find_applicable_accessible_methods_list): Search enclosing
14520         contexts of an inner class.
14521         (search_applicable_methods_list): Fixed typo.
14522         (argument_types_convertible): Handle inner class constructors'
14523         hidden outer context reference argument.
14524         (qualify_ambiguous_name): Handle qualified `this'.
14525         (java_complete_lhs): Handle use of field accessed through
14526         artificial access methods in various cases of assignments. Handle
14527         CLASS_LITERAL node.
14528         (check_final_assignment): Use DECL_CLINIT_P.
14529         (valid_ref_assignconv_cast_p): Handle the destination being an
14530         enclosing context of the source.
14531         (patch_unaryop): Handle use of field accessed through artificial
14532         access methods.
14533         (patch_return): Use DECL_CLINIT_P.
14534         (patch_throw_statement): Use DECL_CLINIT_P.
14535         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
14536         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
14537         ID_INIT_P.
14538
14539 2000-01-16  Anthony Green  <green@cygnus.com>
14540
14541         * parse.y (build_string_concatenation): Only use
14542         StringBuffer(String) shortcut if String arg is constant.
14543
14544 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14545
14546         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14547         the shift value to int. Fixed typo in comment.
14548
14549 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
14550
14551         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
14552         * jcf-write.c: Likewise.
14553         * parse.y: Likewise.
14554         * parse.c: Regenerate.
14555
14556 2000-01-09  Anthony Green  <green@cygnus.com>
14557
14558         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
14559         bytecodes in the correct order.
14560
14561 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14562
14563         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
14564
14565 2000-01-06  Anthony Green  <green@cygnus.com>
14566
14567         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14568         before building constant array decl.
14569
14570 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14571
14572         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
14573         method invocation and typo in conditional expression.
14574         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
14575         the appropriate NOTE_POP.
14576         * parse.y (patch_binop): Shift value mask to feature the right
14577         type.
14578
14579 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14580
14581         * class.c (assume_compiled, assume_compiled_node): Add static
14582         prototype.
14583         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
14584
14585         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
14586
14587         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
14588
14589         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
14590         to `__modifier' to avoid stringifying it.
14591
14592         * parse.y (verify_constructor_circularity): Don't call a variadic
14593         function with a non-literal format string.
14594         (java_check_abstract_methods): Move unreachable code inside
14595         `continue' statement.
14596         (lookup_method_invoke): Call xstrdup, not strdup.
14597
14598         * expr.c (expand_java_field_op): Avoid the use of ANSI string
14599         concatenation.
14600
14601         * jcf-parse.c (yyparse): Likewise.
14602
14603         * jv-scan.c (main): Likewise.
14604
14605 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14606
14607         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
14608         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
14609         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
14610         concatenation.
14611
14612         * parse.y (synchronized, variable_redefinition_error,
14613         check_class_interface_creation, create_interface, create_class,
14614         method_header, finish_method_declaration,
14615         check_modifiers_consistency, method_declarator,
14616         complete_class_report_errors, check_abstract_method_definitions,
14617         java_check_regular_methods, check_throws_clauses,
14618         java_check_abstract_methods, read_import_dir,
14619         check_pkg_class_access, declare_local_variables, fix_constructors,
14620         cut_identifier_in_qualified, resolve_expression_name,
14621         resolve_qualified_expression_name, patch_method_invocation,
14622         java_complete_lhs, patch_assignment, try_builtin_assignconv,
14623         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
14624         patch_exit_expr, patch_exit_expr, patch_switch_statement,
14625         patch_try_statement, patch_synchronized_statement,
14626         patch_throw_statement, check_thrown_exceptions,
14627         patch_conditional_expr): Likewise.
14628
14629 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14630
14631         * Makefile.in (LIBDEPS): Added gcc's errors.o
14632         (../jcf-dump$(exeext):): Link with gcc's errors.o
14633         (../gcjh$(exeext):): Likewise.
14634         * expr.c (expand_java_NEW): Layout the entire target type instead of
14635         laying out its methods only.
14636         (lookup_field): Layout the class after having loaded it.
14637         * java-tree.h (java_debug_context): Declared.
14638         * jcf-io.c (toplev.h): Included.
14639         (find_class): Removed assignment to jcf's outofsynch
14640         field. Force source file to be read if newer than its matching
14641         class file. Tweaked debug messages.
14642         * jcf-parse.c (jcf_out_of_synch): Deleted.
14643         (read_class): Call to jcf_out_of_synch removed.
14644         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
14645         (jcf_out_of_synch): Prototype deleted.
14646         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
14647         `deprecated' and `class_err': integer turned into bit-fields.
14648         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
14649         * parse.y (package_list): New global.
14650         (package_declaration:): Record newly parsed package name.
14651         (extra_ctxp_pushed_p): Static global deleted.
14652         (java_parser_context_save_global): Create buffer context for the
14653         purpose of saving globals, if necessary.
14654         (java_parser_context_restore_global): Pop context pushed for the
14655         purpose of saving globals, if necessary.
14656         (java_debug_context_do): New prototype and function.
14657         (java_debug_context): Likewise.
14658         (do_resolve_class): Use already parsed package names to qualify
14659         and lookup class candidate.
14660         (java_pre_expand_clinit): Removed unnecessary local variable.
14661
14662 1999-12-17  Tom Tromey  <tromey@cygnus.com>
14663
14664         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
14665         fixes PR gcj/119.
14666         (process_file): Use `\n\' at end of each line in string.
14667
14668 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14669
14670         * expr.c (expand_invoke): Layout the loaded class before
14671         attempting to use it.
14672         (expand_java_field_op): Allow final field assignments to take
14673         place in $finit$.
14674         * typeck.c (convert): Return error_mark_node if expr is null.
14675
14676 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14677
14678         * class.c (class_depth): Return -1 if the class doesn't load
14679         properly.
14680         * expr.c (can_widen_reference_to): Check for errors during depth
14681         computation and return 0 accordingly.
14682         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
14683         create default constructors and add an other error check.
14684         * parse.h (java_fix_constructors): Prototyped.
14685         * parse.y (java_pre_expand_clinit): Likewise.
14686         (build_super_invocation): Re-prototyped to feature one argument.
14687         (java_check_circular_reference): Directly use `current'.
14688         (java_fix_constructors): New function.
14689         (java_check_regular_methods): Don't create default constructors
14690         here, but abort if none were found.
14691         (java_complete_expand_methods): Pre-process <clinit> calling
14692         java_pre_expand_clinit.
14693         (java_pre_expand_clinit): New function.
14694         (fix_constructors): build_super_invocation invoked with the
14695         current method declaration as an argument.
14696         (build_super_invocation): Use the context of the processed method
14697         decl argument instead of current_class.
14698         * typeck.c (lookup_java_method): Take WFLs in method names into
14699         account.
14700
14701 1999-12-14  Per Bothner  <per@bothner.com>
14702
14703         * class.c (make_class_data): flag_keep_inline_functions to keep
14704         private methods in the method array.
14705
14706 1999-12-15  Anthony Green  <green@cygnus.com>
14707
14708         * check-init.c (check_init): Take into account both types of
14709         `throw's when checking for uninitialized variables.
14710
14711 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14712
14713         * parse.y (java_complete_lhs): Force conversion of array
14714         dimensions to int_type_node, that's what runtime's ABI expects.
14715
14716 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14717
14718         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
14719         operand of a WFL, until the Java front-end gets fixed with regard
14720         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
14721
14722 1999-12-10  Andrew Haley  <aph@cygnus.com>
14723
14724         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
14725         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
14726         expr.c (build_java_athrow): Add support for sjlj-exceptions.
14727         java-tree.h: Ditto.
14728         jcf-write.c: Ditto.
14729
14730 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14731
14732         * expr.c (java_lang_expand_expr): Switch to permanent obstack
14733         before calling expand_eh_region_start and expand_start_all_catch.
14734         * except.c (expand_start_java_handler): Switch to permanent
14735         obstack before calling expand_eh_region_start.
14736         (expand_end_java_handler): Switch to permanent obstack before
14737         calling expand_start_all_catch.
14738
14739 1999-12-5  Anthony Green  <green@cygnus.com>
14740
14741         * decl.c (init_decl_processing): Mark throw_node as a noreturn
14742         function with side effects.
14743         (init_decl_processing): Mark all memory allocating DECLs with
14744         DECL_IS_MALLOC.
14745
14746 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14747
14748         * except.c (expand_end_java_handler): Call
14749         expand_resume_after_catch and end_catch_handler.
14750
14751 1999-11-30  Anthony Green  <green@cygnus.com>
14752
14753         * verify.c (verify_jvm_instructions): Create new return label
14754         chain if non existent (don't rely on the verified state of the jsr
14755         target.)
14756
14757 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14758
14759         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
14760         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
14761
14762         * parse.y (patch_assignment): Removed bogus final class test on
14763         lhs when checking on whether to emit an ArrayStoreException runtime
14764         check.
14765         * expr.c (expand_java_arraystore): Likewise.
14766
14767 1999-11-28 Anthony Green <green@cygnus.com>
14768
14769         * decl.c (find_local_variable): Reuse single slot decls when
14770           appropriate.
14771
14772 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14773
14774         * jcf-parse.c (saw_java_source): Global variable removed.
14775         (read_class): Don't use `saw_java_source'. Added extra braces.
14776         (yyparse): Code setting `saw_java_source' removed.
14777
14778 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
14779
14780         * except.c (emit_handlers): Zero catch_clauses after emitting them.
14781
14782 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14783
14784         * verify.c (merge_type_state): Non verified subroutines being
14785         considered more than once to trigger passive type merge.
14786
14787 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14788
14789         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
14790         in case of error. Error message tuned.
14791
14792 1999-11-21  Anthony Green  <green@cygnus.com>
14793
14794         * constants.c (find_methodref_index): Unwrap method names before
14795         inserting them in the constant pool.
14796
14797         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
14798
14799         * class.c (assume_compiled_node): New typedef.
14800         (assume_compiled_tree): New static data.
14801         (find_assume_compiled_node): New function.
14802         (add_assume_compiled): New function.
14803         (assume_compiled): New function.
14804         * class.c (make_class_data): Use assume_compiled.
14805         (is_compiled_class): Use assume_compiled.
14806
14807         * java-tree.h (add_assume_compiled): Declare.
14808
14809         * lang.c (lang_decode_option): Parse new options.
14810
14811 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14812
14813         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
14814         int_type_node: that's what `_Jv_AllocObject' expects.
14815
14816 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14817
14818         * parse.y (lookup_method_invoke): Use lang_printable_name to
14819         reliably build the type name during error report. Fixes PR gcj/97.
14820
14821 1999-11-09  Tom Tromey  <tromey@cygnus.com>
14822
14823         * jcf-path.c: Include <sys/stat.h>.
14824         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
14825         (DIR_UP): New macro.
14826
14827 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14828
14829         * parse.y (source_end_java_method): Resume permanent allocation,
14830         reversing Apr 27 1998 patch.
14831         (patch_string_cst): Pop obstacks after having pushed the permanent
14832         ones.
14833
14834 1999-11-05  Tom Tromey  <tromey@cygnus.com>
14835
14836         * class.c (finish_class): Emit inlined methods if any native
14837         methods exist in the class.  Fixes PR gcj/85.
14838
14839 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14840
14841         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
14842         (qualify_ambiguous_name): Likewise.
14843
14844 1999-11-03  Godmar Back <gback@cs.utah.edu>
14845
14846         * typeck.c: (lookup_java_method):  search all inherited
14847         interfaces when looking up interface method.
14848
14849 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14850
14851         * parse.y (method_header:): Issue error message for rule `type
14852         error'.
14853         (synchronized:): Error report when not using synchronized.
14854
14855 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14856
14857         * parse.y (resolve_qualified_expression_name): Prevent `this' from
14858         being used before the superclass constructor has been called.
14859         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
14860         instead of `CALL_THIS_CONSTRUCTOR_P'.
14861
14862 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
14863
14864         * check-init.c: Fix typo in comment.
14865
14866 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14867
14868         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
14869         and final method.
14870
14871 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14872
14873         * parse.y (expression_statement:): Call function to report
14874         improper invocation of a constructor.
14875         (parse_ctor_invocation_error): New function.
14876
14877 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
14878
14879         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
14880         remember_end_note.
14881
14882 1999-10-21  Tom Tromey  <tromey@cygnus.com>
14883
14884         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
14885         in generated `main'.
14886
14887 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14888
14889         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
14890         (qualify_ambiguous_name): Likewise.
14891
14892 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14893
14894         * parse.y (java_complete_tree): fold_constant_for_init to work on
14895         permanent_obstack.
14896         (java_complete_lhs): Likewise.
14897         (array_constructor_check_entry): Complete an initializer element
14898         on permanent_obstack.
14899
14900 1999-10-19  Tom Tromey  <tromey@cygnus.com>
14901
14902         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
14903         From Mike Moreton <mike@pillim.demon.co.uk>.
14904
14905 1999-10-15  Greg McGary  <gkm@gnu.org>
14906
14907         * java-tree.h (flag_bounds_check): Remove extern decl.
14908         * lang.c (flag_bounds_check): Remove global variable.
14909         (lang_f_options): Remove "bounds-check" entry.
14910         (lang_init_options): Default flag_bounds_check to "on".
14911
14912 1999-10-14  Tom Tromey  <tromey@cygnus.com>
14913
14914         * jvgenmain.c (usage): New function.
14915         (main): Use it.  Also, handle `-D' options.
14916         * jvspec.c (lang_specific_driver): Recognize -D.
14917         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
14918
14919         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
14920
14921 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14922
14923         * jcf-dump.c (print_constant, disassemble_method): Don't call a
14924         variadic function with a non-literal format string.
14925
14926         * parse-scan.y (report_main_declaration): Likewise.
14927
14928         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
14929
14930         * parse.y (read_import_dir, patch_assignment, patch_binop,
14931         patch_array_ref): Likewise.
14932
14933         * typeck.c (build_java_array_type): Likewise.
14934
14935         * verify.c (verify_jvm_instructions): Likewise.
14936
14937 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14938
14939         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
14940
14941 1999-10-07  Anthony Green  <green@cygnus.com>
14942
14943         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
14944         where CHECK_PUT may fail for valid reasons.
14945
14946         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
14947         UNSAFE_PUTN): New macros.
14948
14949 1999-10-04  Tom Tromey  <tromey@cygnus.com>
14950
14951         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
14952         well.  Fixes Java PR gcj/59.
14953         * parse-scan.y (yyerror): Report errors.
14954
14955 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
14956
14957         * decl.c (insert_block): Remove unconditional `abort'.
14958
14959 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
14960
14961         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
14962         FUNCTION_CODE now of type int.  All callers changed.
14963         Set the builtin's DECL_BUILT_IN_CLASS.
14964
14965 1999-09-23  Tom Tromey  <tromey@cygnus.com>
14966
14967         * jvspec.c (lang_specific_driver): Don't read spec file if
14968         -fsyntax-only given.
14969
14970 1999-09-22  Tom Tromey  <tromey@cygnus.com>
14971
14972         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
14973
14974         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
14975         (WORDS_TO_LONG): Likewise.
14976         (WORDS_TO_DOUBLE): Likewise.
14977
14978 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14979
14980         * jcf-write.c (RELOCATION_VALUE_0): New macro.
14981         (RELOCATION_VALUE_1): Likewise.
14982         (emit_iinc, emit_reloc, push_constant1, push_constant2,
14983         push_in_const, push_long_const): Prototyped.
14984         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
14985         (push_constant2): Likewise.
14986         (push_int_const): Cast find_constant1's integer arguments to `jword'.
14987         (find_constant_wide): Cast find_constant2's integer arguments to
14988         `jword'.
14989         (find_constant_index): Cast find_constant2's and find_constant2's
14990         integer arguments to `jword'.
14991         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
14992         (emit_switch_reloc): Use RELOCATION_VALUE_0.
14993         (emit_if): Use RELOCATION_VALUE_1.
14994         (emit_goto): Likewise.
14995         (emit_jsr): Likewise.
14996         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
14997         argument to push_long_const to HOST_WIDE_INT.
14998
14999 1999-09-15  Andreas Schwab  <schwab@suse.de>
15000
15001         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15002
15003 1999-09-20  Nick Clifton  <nickc@cygnus.com>
15004
15005         * lang.c (lang_decode_option): Extend comment.
15006
15007 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15008
15009         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15010         instead of fndecl.
15011
15012 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15013
15014         * gjavah.c (get_field_name, print_method_info, print_include,
15015         add_namelet): Use xmalloc, not malloc.
15016
15017         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15018         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15019         NULL pointer.
15020
15021         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15022
15023         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15024
15025         * jcf-path.c (add_entry): Likewise.
15026
15027         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15028
15029         * jv-scan.c (xmalloc): Remove definition.
15030
15031         * jvgenmain.c (xmalloc): Likewise.
15032
15033         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15034
15035         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15036
15037         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15038         concat, not xmalloc/sprintf.
15039         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15040         (xstrdup): Remove definition.
15041
15042         * parse.y (duplicate_declaration_error_p,
15043         constructor_circularity_msg, verify_constructor_circularity,
15044         check_abstract_method_definitions, java_check_regular_methods,
15045         java_check_abstract_methods, patch_method_invocation,
15046         check_for_static_method_reference, patch_assignment, patch_binop,
15047         patch_cast, array_constructor_check_entry, patch_return,
15048         patch_conditional_expr): Use xstrdup, not strdup.
15049
15050         * zextract.c (ALLOC): Use xmalloc, not malloc.
15051
15052 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15053
15054         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15055
15056         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15057         (do_spec, lang_specific_pre_link, lang_specific_driver,
15058         input_filename, input_filename_length): Don't declare.
15059         (main_class_name, jvgenmain_spec, lang_specific_driver):
15060         Constify a char*.
15061         (lang_specific_driver): All calls to the function pointer
15062         parameter now explicitly call `fatal'.
15063
15064 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15065
15066         * parse.y (find_applicable_accessible_methods_list): Search
15067         abstract classes as interfaces.
15068
15069 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15070
15071         * class.c (finish_class): We're now outside a valid method
15072         declaration. Tell the rest of gcc so.
15073
15074 1999-09-08  Bruce Korb  autogen@linuxbox.com
15075
15076         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15077
15078 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15079
15080         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15081         java-array.h.
15082         (decode_signature_piece): Don't emit "::" in JArray<>.
15083         (print_namelet): Only print trailing `;' when printing a class.
15084
15085 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15086
15087         * java-tree.h: Delete declarations for all tree nodes now moved to
15088         global_trees.
15089         * decl.c: Delete their definitions.
15090
15091 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15092
15093         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15094         * Makefile.in (OBJS): Add ggc-callbacks.o.
15095         (OBJDEPS): Likewise.
15096
15097 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15098
15099         * parse.y (strip_out_static_field_access_decl): Return operand if
15100         it satisfies JDECL_P.
15101
15102 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15103
15104         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15105         Handle nested arrays, like `[[I'.
15106
15107 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15108
15109         * class.c (finish_class): Remove unused parameter, all callers
15110         changed.
15111
15112         * expr.c (build_java_athrow): Change return type to void.
15113         (java_lang_expand_expr): Make sure each case in switch returns a
15114         value.
15115
15116         * java-tree.h (finish_class): Fix prototype to take void args.
15117
15118         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15119         (main): Issue return from main, not exit.
15120
15121         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15122
15123         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15124
15125         * jv-scan.c (main): Issue return from main, not exit.
15126
15127         * parse.y (check_abstract_method_definitions,
15128         java_check_abstract_method_definitions): Add static prototypes.
15129         (java_complete_expand_methods): Fix call to `finish_class'.
15130
15131         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15132         and `prevpc'.
15133
15134 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15135
15136         * lang.c (language_string): Constify.
15137
15138 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15139
15140         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15141         Remove hacks for stuff which comes from libiberty.
15142
15143         * Make-lang.in: Likewise.
15144
15145 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
15146
15147         * Makefile.in (xref.o): Depend on xref.c explicitly.
15148
15149 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15150
15151         * java-tree.h (lang_printable_name): Constify a char*.
15152
15153         * lang.c (lang_printable_name): Likewise.
15154
15155 1999-08-27  Jeffrey A Law  (law@cygnus.com)
15156
15157         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15158         comments in C code.
15159
15160 1999-08-26  Tom Tromey  <tromey@cygnus.com>
15161
15162         * gjavah.c (print_cxx_classname): Print "::" before qualified
15163         name.
15164
15165 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15166
15167         * parse.y (lookup_cl): Changed leading comment. Now does its best
15168         to set the column number.
15169         (qualify_ambiguous_name): Take WFL wrappers into account.
15170
15171 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
15172
15173         * verify.c (verify_jvm_instructions): Don't check instruction
15174         validity beyond end of method.
15175
15176 1999-08-25  Tom Tromey  <tromey@cygnus.com>
15177
15178         * jvspec.c (lang_specific_driver): Correctly handle --help again.
15179
15180 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15181
15182         * gjavah.c (print_name, print_base_classname, utf8_cmp,
15183         cxx_keyword_subst, generate_access, name_is_method_p,
15184         get_field_name, print_field_name, super_class_name, print_include,
15185         decode_signature_piece, print_class_decls, usage, help,
15186         java_no_argument, version, add_namelet, print_namelet): Add static
15187         prototype.
15188         (print_base_classname, utf8_cmp, cxx_keyword_subst,
15189         name_is_method_p): Constify a char*.
15190         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
15191         Provide a final else clause in an if-else-if.
15192         (print_field_info): Add missing final arg in function call to
15193         `print_field_name'.
15194         (print_method_info, decompile_method, decode_signature_piece,
15195         print_c_decl, print_full_cxx_name, print_stub,
15196         print_mangled_classname, super_class_name, print_include,
15197         add_namelet, add_class_decl, print_class_decls, process_file,
15198         help): Constify a char*.
15199
15200         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15201         push_int_const, find_constant_wide, find_constant_index,
15202         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15203         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15204         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15205         emit_if, emit_goto, emit_jsr, call_cleanups,
15206         make_class_file_name): Add static prototypes.
15207         (generate_bytecode_return, generate_bytecode_insns): Pass a
15208         NULL_PTR, not a NULL_TREE.
15209
15210         * jv-scan.c: Include "jcf.h".
15211         (main): Declare using DEFUN macro.
15212
15213         * jvspec.c (find_spec_file, lang_specific_pre_link,
15214         lang_specific_driver): Add prototypes.
15215         (find_spec_file): Constify a char*.
15216
15217         * keyword.gperf (hash, java_keyword): Add prototypes.
15218
15219         * lang.c (lang_print_error): Add static prototype.
15220         (lang_init): Prefer memcpy over bcopy to avoid casts.
15221
15222         * lex.c (yylex): Add static prototype.
15223
15224         * parse-scan.y: Include "lex.c" earlier.
15225
15226         * parse.h: Remove redundant declaration for `yylex'.
15227
15228         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15229         labeled_block_contains_loop_p): Add static prototypes.
15230         (not_accessible_p): Make static to match prototype.
15231
15232         * verify.c (start_pc_cmp): Don't needlessly cast away const.
15233
15234 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15235
15236         * parse.y (check_method_redefinition): Changed leading comment.
15237         (check_abstract_method_definitions): New function.
15238         (java_check_abstract_method_definitions): New function.
15239         (java_check_regular_methods): Call it.
15240         (verify_constructor_super): Fixed indentation.
15241         (lookup_method_invoke): Likewise.
15242
15243 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15244
15245         * parse.y (method_header): Return a null pointer if the current
15246         class node is null.
15247         (finish_method_declaration): Return if the current function decl
15248         is null.
15249         (source_start_java_method): Likewise.
15250         (java_method_add_stmt): Likewise.
15251
15252 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15253
15254         * class.c (emit_register_class): Removed unnecessary call to
15255         start_sequence.
15256         * parse.y (labeled_block_contains_loop_p): Removed unused local
15257         variable.
15258
15259 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15260
15261         * parse.y (java_refold): Added prototype.
15262
15263 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15264
15265         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15266         (java_stabilize_reference): Removed unnecessary `else'.
15267         (java_complete_lhs): Set flag to remember boolean. Call
15268         java_refold. Added comments.
15269         (java_decl_equiv): New function.
15270         (binop_compound_p): Likewise.
15271         (java_refold): Likewise.
15272         (patch_unaryop): Striped static field access assigned to decl and
15273         op. Changed promotion scheme for ++/-- operators.
15274         (search_loop): New function.
15275         (labeled_block_contains_loop_p): Likewise.
15276         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15277         comment.
15278         (patch_bc_statement): Call search_loop. Fixed comment.
15279
15280 1999-08-14  Anthony Green  <green@cygnus.com>
15281
15282         * expr.c (java_lang_expand_expr): Mark static array data as
15283         referenced.
15284
15285 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
15286
15287         * jvgenmain.c (main): NUL-terminate name_obstack.
15288
15289 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15290
15291         * check-init.c (check_bool2_init, done_alternative): Add static
15292         prototypes.
15293
15294         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15295         (add_method, build_utf8_ref, build_class_ref,
15296         append_gpp_mangled_type, layout_class_method): Constify a char*.
15297
15298         * decl.c (push_promoted_type, make_binding_level): Add static
15299         prototypes.
15300         (push_promoted_type, pushdecl): Constify a char*.
15301
15302         * except.c (find_handler_in_range, link_handler,
15303         check_start_handlers): Add static prototypes.
15304
15305         * expr.c (process_jvm_instruction): Constify a char*.
15306
15307         * gjavah.c (main): Constify a char*.
15308
15309         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15310         Constify a char*.
15311
15312         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15313         static prototypes.
15314         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15315         munge, print_ents): Constify a char*.
15316
15317         * jcf-dump.c (disassemble_method): Constify a char*.
15318         (print_constant_pool, print_exception_table): Add static prototypes.
15319         (print_constant, print_exception_table, main, disassemble_method):
15320         Constify a char*.
15321
15322         * jcf-io.c (find_classfile, find_class): Likewise.
15323
15324         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15325         (set_source_filename, predefined_filename_p): Add static prototypes.
15326         (set_source_filename, get_constant, get_class_constant,
15327         find_in_current_zip): Constify a char*.
15328
15329         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15330         static prototypes.
15331         (add_entry, add_path, jcf_path_classpath_arg,
15332         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15333
15334         * jcf-reader.c (get_attribute, jcf_parse_preamble,
15335         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15336         jcf_parse_one_method, jcf_parse_methods,
15337         jcf_parse_final_attributes): Add static prototypes.
15338         (get_attribute): Constify a char*.
15339
15340         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15341         jcf_dependency_add_target, jcf_path_classpath_arg,
15342         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15343
15344         * jv-scan.c (main): Constify a char*.
15345         (gcc_obstack_init): Add prototype arguments.
15346
15347         * jvgenmain.c (gcc_obstack_init): Likewise.
15348         (main): Constify a char*.
15349
15350         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15351         static prototypes.
15352         (put_decl_string, lang_print_error): Constify a char*.
15353         (lang_init): Remove redundant extern prototype.
15354
15355         * mangle.c (emit_unicode_mangled_name): Constify a char*.
15356
15357         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15358         Add static prototypes.
15359         (get_type_from_signature): Constify a char*.
15360
15361         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15362         Add static prototypes.
15363         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15364         (verify_jvm_instructions): Constify a char*.
15365
15366         * xref.c (xref_flag_value): Likewise.
15367
15368         * xref.h (xref_flag_value): Likewise.
15369
15370         * zextract.c (makeword, makelong): Add static prototypes.
15371         (makeword, makelong): Constify a uch*.
15372
15373 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15374
15375         * lang.c (java_dummy_print): Constify a char*.
15376         (lang_print_error): Likewise.
15377         (lang_init): Remove redundant prototype for `print_error_function'.
15378         (lang_init_source): Likewise.
15379         (lang_identify): Constify a char*.
15380
15381 1999-08-09  Tom Tromey  <tromey@cygnus.com>
15382
15383         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15384         (WORDS_TO_LONG): Likewise.
15385         (WORDS_TO_DOUBLE): Likewise.
15386
15387 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15388
15389         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15390
15391         * expr.c (java_stack_pop, java_array_data_offset,
15392         build_java_throw_out_of_bounds_exception, case_identity,
15393         build_java_check_indexed_type): Add static prototypes.
15394         (linenumber_table, expand_invoke, expand_java_field_op,
15395         build_primtype_type_ref, expand_byte_code): Constify a char*.
15396
15397         * java-tree.h (build_primtype_type_ref, linenumber_table):
15398         Constify a char*.
15399         (java_lang_expand_expr): Add prototype.
15400
15401         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
15402         `java_lang_expand_expr'.
15403
15404         * lex.c (java_lex_error): Constify a char*.
15405         (java_get_unicode, java_read_char, java_allocate_new_line,
15406         java_unget_unicode, java_sneak_unicode): Prototype.
15407
15408         * parse-scan.y (current_class, package_name, method_declarator,
15409         report_class_declaration, yyerror): Constify a char*.
15410
15411         * parse.h (java_report_errors): Prototype.
15412         (yyerror): Constify a char*.
15413
15414         * parse.y (classitf_redefinition_error, check_modifiers,
15415         parse_jdk1_1_error, lookup_package_type,
15416         lookup_package_type_and_set_next, get_printable_method_name,
15417         purify_type_name): Constify a char*.
15418         (build_super_invocation, maybe_generate_finit,
15419         verify_constructor_super, parser_add_interface,
15420         add_superinterfaces, jdep_resolve_class, note_possible_classname,
15421         java_complete_expand_methods, java_expand_finals,
15422         cut_identifier_in_qualified, java_stabilize_reference,
15423         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15424         merge_string_cste): Prototype.
15425         (single_type_import_declaration, yyerror,
15426         variable_redefinition_error, build_array_from_name,
15427         build_unresolved_array_type, check_class_interface_creation,
15428         resolve_class, complete_class_report_errors,
15429         note_possible_classname, read_import_dir,
15430         find_in_imports_on_demand, resolve_package, fix_constructors,
15431         check_deprecation, lookup_method_invoke,
15432         maybe_build_primttype_type_ref, array_constructor_check_entry):
15433         Constify a char*.
15434         (java_complete_expand_methods, java_expand_finals): Make static.
15435         (convert_narrow): Remove static prototype.
15436
15437 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
15438
15439         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15440
15441 1999-08-02  Richard Henderson  <rth@cygnus.com>
15442
15443         * decl.c: Include defaults.h instead of expr.h.
15444         * parse.y: Likewise.
15445
15446 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
15447
15448         * java/decl.c (start_java_method): Change all uses of
15449         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15450         Ensure expr.h is included.
15451         * java/expr.c (pop_arguments): Ditto.
15452         * java/parse.y (expand_start_java_method): Ditto.
15453
15454 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15455
15456         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15457
15458 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
15459
15460         * decl.c: Include "function.h".
15461         * except.c: Likewise.
15462         * parse.y: Likewise.
15463         * Makefile.in: Update dependencies.
15464
15465 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15466
15467         * expr.c (build_java_soft_divmod): Provide a default case in switch.
15468         (java_lang_expand_expr): Mark parameters `target', `tmode' and
15469         `modifier' with ATTRIBUTE_UNUSED.
15470
15471         * gjavah.c (process_file): Add braces around ambiguous `else'.
15472
15473         * jcf-dump.c (print_access_flags, localvar_free): Change return
15474         type to void.
15475
15476         * parse.y (java_complete_expand_method): Initialize variable
15477         `exception_copy'.
15478         (resolve_qualified_expression_name): Likewise for `field_decl'.
15479         (patch_method_invocation): Likewise for `class_to_search'.
15480         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15481         (patch_assignment): Likewise for `lhs_type'.
15482
15483         * verify.c (verify_jvm_instructions): Remove unused variable
15484         `caller'.
15485
15486 1999-07-25  Richard Henderson  <rth@cygnus.com>
15487
15488         * decl.c (va_list_type_node): New.
15489
15490 1999-07-25  Anthony Green  <green@cygnus.com>
15491
15492         * gjavah.c (print_stub): New function.
15493         (METHOD_IS_NATIVE): New macro.
15494         (print_mangled_classname): Make static.
15495         (HANDLE_END_FIELD): Don't emit fields during stub generation.
15496         (process_file): Perform stub generation.
15497         (HANDLE_METHOD): Don't emit class decls during stub
15498         generation.
15499         (HANDLE_END_METHOD): Take into account stub generation.
15500         (print_method_info): Handle stub generation.
15501         (print_stub): New function.
15502         (print_cxx_classname): Make signature consistant with others.
15503         (help): Describe -stubs option.
15504         (main): Create stub file.
15505         (version): Use version.c.
15506         (print_full_cxx_name): New function.
15507         (print_c_decl): Use print_full_cxx_name.
15508
15509 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15510
15511         * check-init.c (check_init): Handle MAX_EXPR.
15512
15513 1999-07-15  Andrew Haley  <aph@cygnus.com>
15514
15515         * lang.c (flag_use_divide_subroutine): New variable.
15516         * typeck.c: (convert_ieee_real_to_integer): Bounds check
15517         fp-to-integer conversion.
15518         (convert): Call convert_ieee_real_to_integer when flag_fast_math
15519         is not set.
15520
15521         * expr.c (build_java_soft_divmod): New function.
15522         (build_java_binop): Call build_java_soft_divmod if
15523         flag_use_divide_subroutine is set.
15524         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15525         soft_lrem_node: new builtin functions.
15526         (init_decl_processing) Initialize the new builtins.
15527         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
15528         soft_lrem_node: new builtin functions.
15529         (build_java_soft_divmod): New function.
15530         * parse.y: Call build_java_soft_divmod if
15531         flag_use_divide_subroutine is set.
15532         * parse.c: Rebuilt.
15533
15534         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
15535         a --specs= arg) even if not linking.
15536         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
15537         -fuse-divide-subroutine
15538
15539 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15540
15541         * parse.y (resolve_and_layout): Check methods only once.
15542         (resolve_qualified_expression_name): Verify thrown exceptions
15543         compatibility.
15544         (check_thrown_exceptions): Reject exceptions thrown in
15545         initializer. Error message tuned.
15546
15547 1999-07-14  Andrew Haley  <aph@cygnus.com>
15548
15549         * expr.c (expand_expr): Do not return the last statement in a
15550         block as the block's value.
15551
15552 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15553
15554         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
15555         CALL_EXPR, to avoid order of evaluation changes.
15556
15557 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15558
15559         * parse.y (qualify_ambiguous_name): Do not use
15560         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
15561
15562 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15563
15564         * check-init.c (check_init): Handle MAX_EXPR.
15565         * expr.c (force_evaluation_order): Force method call arguments to
15566         be evaluated in left-to-right order.
15567         * parse.y (qualify_ambiguous_name): Loop again to qualify
15568         NEW_ARRAY_EXPR properly.
15569
15570 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15571
15572         * parse.y (patch_invoke): Resolve unresolved invoked method
15573         returned type.
15574         (qualify_ambiguous_name): STRING_CST to qualify expression for
15575         type name resolution.
15576
15577 1999-06-24  Andrew Haley  <aph@cygnus.com>
15578
15579         * class.c (finish_class): Whenever a deferred method is
15580         output, rescan the list of methods to see if a new candidate for
15581         output can be found.
15582
15583 1999-06-28  Tom Tromey  <tromey@cygnus.com>
15584
15585         * jvspec.c (lang_specific_driver): Recognize --help.
15586
15587 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15588
15589         * parse.y (resolve_package): Fixed bogus return statement.
15590         (patch_method_invocation): Resolve method invocation beginning with
15591         a package name qualifier.
15592
15593 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15594
15595         * Make-lang.in (java.stage1): Depend on stage1-start.
15596         (java.stage2): Likewise for stage2-start.
15597         (java.stage3): Likewise for stage3-start.
15598         (java.stage4): Likewise for stage4-start.
15599
15600 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15601
15602         * parse.y (java_complete_lhs): When doing cross referencing, don't
15603         try to keep file location on a WFL expanded as a CALL_EXPR.
15604
15605 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15606
15607         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
15608         compiling to class file a void method with an empty method body.
15609         As a side effect, the bytecode backend will generate the
15610         appropriate `return' instruction.
15611
15612 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15613
15614         * parse.y (lookup_package_type_and_set_next): New function prototype.
15615         (resolve_package): Search current and imported packages.
15616         (lookup_package_type_and_set_next): New function.
15617
15618 1999-06-22  Andrew Haley  <aph@cygnus.com>
15619
15620         * verify.c (verify_jvm_instructions): Check for pending blocks
15621         before invalid PC test and opcode switch, not after.
15622
15623 1999-06-21  Andrew Haley  <aph@cygnus.com>
15624
15625         * except.c (find_handler_in_range): The upper limit for exception
15626         ranges is exclusive, not inclusive: (start <= pc < end).
15627         (link_handler): find child pointer which points to outer by
15628         searching sibling list: previous code incorrectly assumed that
15629         outer->outer->first_child must point to outer.
15630         * verify.c (verify_jvm_instructions): FIXME added to code for
15631         `athrow'.
15632         (verify_jvm_instructions): Do not assume that the last block
15633         processed in a subroutine is a block which ends with a `ret'
15634         instruction.  With some control flows it is possible that the last
15635         block ends with an `athrow'.
15636
15637 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15638
15639         * parse.y (qualify_ambiguous_name): Reorganized the post
15640         evaluation of non WFL leading expression nodes.
15641
15642 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15643
15644         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
15645         CONVERT_EXPR.
15646
15647 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15648
15649         * parse.y (qualify_ambiguous_name): Handle qualified expression
15650         beginning with a STRING_CST.
15651
15652 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15653
15654         * parse.y (register_fields): Set DECL_INITIAL on both
15655         pre-initialized static and public fields.
15656         (resolve_field_access): Static field access expressions to always
15657         use pointer types.
15658         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
15659         qualification. CONVERT_EXPR to be resolved as an expression name.
15660         (java_complete_lhs): Identify and access qualified final
15661         initialized field in switch statement case expression.
15662         (fold_constant_for_init): Pre-initialized field decl constant to
15663         be folded.
15664
15665 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15666
15667         * parse.y (note_possible_classname): Mark returned node with
15668         QUALIFIED_P only if the original class name contained a '/'.
15669
15670 1999-06-05  Anthony Green  <green@cygnus.com>
15671
15672         * Make-lang.in (gcjh): More parallel build fixes.
15673
15674 1999-06-03  Mike Stump  <mrs@wrs.com>
15675
15676         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
15677
15678 1999-06-02  Anthony Green  <green@cygnus.com>
15679
15680         * except.c (link_handler): Chain exception handlers in order.
15681
15682 1999-06-02  Anthony Green  <green@cygnus.com>
15683
15684         * expr.c (expand_byte_code): Fill unreachable bytecode regions
15685         with nops and process as usual in order to always set correct EH
15686         ranges.  Emit detailed warnings about unreachable bytecodes.
15687
15688 1999-06-02  Anthony Green  <green@cygnus.com>
15689
15690         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
15691         constant.
15692
15693 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15694
15695         * parse.y (lookup_field_wrapper): Unified returned value to NULL
15696           or the searched field decl.
15697
15698 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15699
15700         * parse.y (fold_constant_for_init): Convert numerical constant
15701         values to the type of the assigned field.
15702
15703 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15704
15705         * expr.c (lookup_field): Relaxed the test on class loading error
15706         detection.
15707         * parse.y (fold_constant_for_init): Enabeled old code.
15708
15709 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15710
15711         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
15712         decide the validity of the cast of a java.lang.Cloneable reference
15713         to an array.
15714         (patch_conditional_expr): Fixed first argument passed to
15715         binary_numeric_promotion.
15716
15717 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15718
15719         * parse.y (qualify_ambiguous_name): Take into account that a
15720         CONVERT_EXPR might specify a type as a WFL.
15721
15722 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15723
15724         * parse.y (patch_assignment): Save the rhs before using it as an
15725         argument to _Jv_CheckArrayStore.
15726
15727 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15728
15729         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
15730
15731 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15732
15733         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
15734         floating point literal only when the exponent indicator has been
15735         parsed.
15736
15737 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15738
15739         * parse.y (formal_parameter:): Construct argument tree list
15740         element even if a yet unsupported final parameter was encountered.
15741
15742 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15743
15744         * parse.y (finish_method_declaration): Issue errors for native or
15745         abstract methods declared with a method body, as well as for non
15746         native or non abstract methods with no method body.
15747
15748 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15749
15750         * class.c (build_utf8_ref): Initialize variable `field'.
15751
15752         * decl.c (init_decl_processing): Initialize variable `field'.
15753
15754         * expr.c (build_known_method_ref): Mark parameters `method_type',
15755         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
15756         (process_jvm_instruction): Likewise for parameter `length'.
15757
15758         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
15759         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
15760         ATTRIBUTE_UNUSED.
15761
15762         * parse.y (maybe_generate_clinit): Remove unused variable
15763         `has_non_primitive_fields'.
15764         (find_in_imports_on_demand): Initialize variables `node_to_use'
15765         and `cl'.
15766         (patch_binop): Likewise for variable `prom_type'.
15767         (patch_unaryop): Likewise for variable `prom_type'.
15768
15769         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
15770
15771         * xref.c (xref_table): Add missing initializer.
15772
15773 1999-05-14  Tom Tromey  <tromey@cygnus.com>
15774
15775         * java-except.h (struct eh_range): Removed unused `next' member.
15776         * verify.c (verify_jvm_instructions): Call check_nested_ranges
15777         after adding all exception handlers.  Sort exception ranges in
15778         order of start PC.
15779         (struct pc_index): New structure.
15780         (start_pc_cmp): New function.
15781         * except.c (add_handler): Return `void'.  Don't call link_handler;
15782         instead construct an ordinary linked list and do range
15783         coalescing.
15784         (check_nested_ranges): New function.
15785         (link_handler): Changed interface to allow merging of eh_ranges.
15786         Split overlapping ranges.  Return `void'.
15787
15788 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15789
15790         * parse.y (constructor_block_end:): New rule, tagged <node>.
15791         (constructor_body:): Use `constructor_block_end' instead of
15792         `block_end'.
15793
15794 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15795
15796         * parse.y (statement_nsi:): Pop `for' statement block.
15797         (java_complete_lhs): Labeled blocks containing no statement are
15798         marked as completing normally.
15799
15800 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15801
15802         * xref.c (xref_set_current_fp): New function, defined.
15803         * xref.h (xref_set_current_fp): New function, prototyped.
15804
15805 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15806
15807         * check-init.c (check_init): Take into account that
15808         LABELED_BLOCK_STMT can be empty.
15809
15810 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15811
15812         * parse.y (java_check_regular_methods): Warning check on not
15813         overriding methods with default access in other packages does not
15814         apply to `<clinit>'.
15815         (java_complete_lhs): If block body is an empty_stmt_node, replace
15816         it by NULL_TREE. This prevents gcc from generating an irrelevant
15817         warning.
15818
15819 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15820
15821         * check-init.c (check_init): Removed code accepting to see things
15822         falling through default:, when doing xrefs.
15823         * java-tree.h (do_not_fold): New global variable, declared.
15824         * parse.y (do_not_fold): New global variable, defined.
15825         (java_complete_expand_method): Set `do_not_fold' to the value of
15826         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
15827         and reinstall them after them have been purged; do not check for
15828         initializations; do not issue missing return errors.
15829         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
15830         when doing xrefs.
15831         (patch_binop): Skip the fold part when doing xrefs.
15832         (build_string_concatenation): Skip the concatenation part when
15833         doing xrefs.
15834         (patch_synchronized_statement): Do not generate a try-finally when
15835         doing xrefs.
15836         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
15837         and keep the location where the throw was seen.
15838         * typeck.c (convert): When `do_not_fold' is set, do not attempt
15839         any treatment on the converted node an simply return a NOP_EXPR of
15840         the targeted type.
15841         * xref.c (xref_get_data): New function, defined.
15842         * xref.h (xref_get_data): New function, declared.
15843         (XREF_GET_DATA): Use xref_get_data.
15844
15845 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15846
15847         * gjavah.c (print_include): Cast the result of `strlen' to int
15848         when comparing against a signed value.
15849         (add_namelet): Likewise.
15850
15851 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15852
15853         * expr.c (expand_invoke): Mark parameter `nargs' with
15854         ATTRIBUTE_UNUSED.
15855         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
15856
15857         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
15858         ATTRIBUTE_UNUSED.
15859
15860         * jcf-reader.c (get_attribute): Cast a value to long
15861         when comparing against a signed expression.  Likewise.
15862
15863         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
15864         HOST_BITS_PER_CHAR.
15865
15866 1999-05-11  Andrew Haley  <aph@cygnus.com>
15867
15868         * parse.y (source_end_java_method): If the current method contains
15869         any exception handlers, force asynchronous_exceptions: this is
15870         necessary because signal handlers in libjava may throw exceptions.
15871         * decl.c (end_java_method): Ditto.
15872
15873 1999-05-11  Tom Tromey  <tromey@cygnus.com>
15874
15875         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
15876         flags.
15877         * jvspec.c (THREAD_NAME): Removed.
15878         (GC_NAME): Likewise.
15879         (MATHLIB): Likewise.
15880         (WITHLIBC): Likewise.
15881         (GCLIB): Likewise.
15882         (THREADLIB): Likewise.
15883         (MATH_LIBRARY): Likewise.
15884         (lang_specific_driver): Don't add `-l' options to command line.
15885         Instead, add a single --specs option.  Recognize `-L' options and
15886         use them to search for spec file.
15887         (find_spec_file): New function.
15888         (SPEC_FILE): New define.
15889
15890 1999-05-11  Dave Brolley  <brolley@cygnus.com>
15891
15892         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
15893         cpplib-enabled build.
15894
15895 1999-05-05  Per Bothner  <bothner@cygnus.com>
15896
15897         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
15898         temporarily zero it while calling rest_of_decl_compilation.
15899
15900         * java-tree.h (string_ptr_type_node):  Add declaration.
15901         * decl.c:  Define and initialize string_ptr_type_node.
15902         * parse.y (patch_string_cst):  Use string_ptr_type_node.
15903
15904         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
15905         * parse.y (for_statement):  Now unconditionally exit_block.
15906         (finish_labeled_statement):  No longer exit_block if for-loop.
15907         (patch_loop_statement):  Check harder if the loop is already labeled.
15908
15909         * parse.y (patch_initialized_static_field):  Removed function.
15910         (maybe_generate_clinit):  Removed special handling for interfaces.
15911         (java_complete_expand_methods):  Do a preliminary java_complete_tree
15912         on <clinit> to determine if it can be removed.
15913         (java_complete_expand_method):  Remove special handling for <clinit>.
15914         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
15915         optimize if we get back empty_stmt_node.
15916         For MODIFY_EXPR, re-do checking of static initializers.
15917         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
15918         For VAR_DECL, pass correct context.
15919
15920         * verify.c (verify_jvm_instructions):  Better error messages.
15921
15922 1999-05-03  Tom Tromey  <tromey@cygnus.com>
15923
15924         * parse-scan.y (interface_declaration): Call
15925         report_class_declaration for interfaces.
15926
15927 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
15928
15929         * Makefile.in: Remove -v from bison command lines.
15930
15931 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15932
15933         * check-init.c (check_init): Exclude a case of error when doing
15934         xrefs.
15935         * class.c (layout_class_method): Don't generate the error message
15936         twice when compiling from source.
15937         * lang-options.h: Added `-Wredundant-modifers' and
15938         `-Wunusupported-jdk11' flags and help text.
15939         * lang.c (lang_decode_option): Added support for
15940         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
15941         flag_static_local_jdk11 and flag_redundant set accordingly.
15942         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
15943         * parse.h (EXPR_WFL_ADD_COL): New macro.
15944         (DECL_END_SOURCE_LINE): Likewise.
15945         (DECL_INHERITED_SOURCE_LINE): Likewise.
15946         * parse.y (static_ref_err): New function, prototyped.
15947         (CCB_TK): Now tagged <operator>.
15948         (class_body:): Remember the location of the closing '}' of a class
15949         definition when doing xrefs.
15950         (block:): Likewise.
15951         (block_end:): Likewise.
15952         (create_class): Remember the location of the inherited class
15953         identifier when doing xrefs.
15954         (register_fields): Added test on first operand of `init' before
15955         testing it TREE_CODE.
15956         (method_header): Store the location of the class identifier in the
15957         class decl when doing xrefs.
15958         (finish_method_declaration): Don't combine first/last method line
15959         when doing xref.
15960         (java_check_regular_methods): Warning check on not overriding
15961         methods with default access on other packages move before check on
15962         static methods. Initialization of `aflags' also moved up.
15963         (resolve_expression_name): Call static_ref_err to report the error.
15964         (static_ref_err): New function, implemented.
15965         (resolve_field_access): Returned simplified static field access
15966         when doing xrefs.
15967         (resolve_qualified_expression_name): Check for illegal use of
15968         static fields in a non static context. Call static_ref_err to
15969         report error in various places.
15970         (java_complete_tree): Do not fold initialized static fields when
15971         doing xrefs.
15972         (java_complete_lhs): Likewise.
15973
15974 1999-04-29  Anthony Green  <green@cygnus.com>
15975
15976         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
15977         create internal labels.
15978         (lookup_label): Ditto.
15979
15980 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15981
15982         * class.c (layout_class_method): Generate <clinit>'s rtl for
15983         interfaces.
15984         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
15985         for interfaces' <clinit>.
15986         * expr.c (lookup_field): Search for fields in interfaces.
15987         (expand_invoke): Fixed indentation.
15988         (expand_java_field_op): Likewise. Use IS_CLINIT.
15989         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
15990         (IS_CLINIT): New macro.
15991         * parse.y (type_declaration:): Call maybe_generate_clinit after an
15992         interface was parsed.
15993         (maybe_generate_clinit): Don't generate if the current class is an
15994         interface with only fields of primitive types.
15995         (reset_method_name): Use IS_CLINIT.
15996         (java_complete_expand_method): Expand <clinit> when it exists for
15997         interfaces. Use IS_CLINIT.
15998         (resolve_expression_name): Use DECL_CONTEXT instead of
15999         current_class to build static field references.
16000         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16001         ARRAY_REF when doing xreferencing.
16002         (check_final_assignment): Fixed typo in leading comment. Use
16003         IS_CLINIT.
16004         (patch_array_ref): Don't fully expand array references when
16005         xreferencing.
16006         (patch_return): Use IS_CLINIT.
16007         (patch_throw_statement): Likewise.
16008
16009 1999-04-22  Tom Tromey  <tromey@cygnus.com>
16010
16011         * Make-lang.in (JAVA_SRCS): Added check-init.c.
16012
16013 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16014
16015         * decl.c (predef_filenames, predef_filenames_size): New globals
16016         (init_decl_processing): predef_filenames and predef_filenames_size
16017         initialized.
16018         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16019         extern.
16020         * jcf-parse.c (predefined_filename_p): New function.
16021         (yyparse): Check that files on the command line are specified only
16022         once and issue a warning otherwise.
16023         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16024         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16025         avoid a gcc warning with -W -Wall turned on.
16026         (java_expand_classes): Abort if errors were encountered.
16027         (java_complete_lhs): If the cross reference flag is set, wrap
16028         field DECL node around a WFL when resolving expression name.
16029
16030 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16031
16032         * lang.c (lang_decode_option): Fixed returned value when parsing
16033         `-fxref=...' and `-Wall'.
16034         * parse.y (source_end_java_method): Do not generate code when
16035         flag_emit_xref is set.
16036         (resolve_expression_name): Do not build static field access when
16037         flag_emit_xref is set.
16038         (resolve_field_access): No special treatment on `length' when
16039         flag_emit_xref is set. Do not build qualified static field access
16040         when flag_emit_xref is set.
16041         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16042         when flag_emit_xref is set.
16043         (patch_assignment): Do not generate array store runtime check when
16044         flag_emit_xref is set.
16045         * xref.c (xref_flag_value): Fixed function declaration
16046         indentation.
16047         (xset_set_data): New function.
16048         * xref.h (xref_set_data): Added prototype for new function.
16049         (typedef struct xref_flag_table): New field data.
16050         (XREF_GET_DATA): New macro.
16051
16052 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16053
16054         * xref.h (enum): Removed trailing comma.
16055
16056         * parse.y (resolve_qualified_expression_name): Added missing
16057         `break'.
16058
16059 1999-04-15  Anthony Green  <green@cygnus.com>
16060
16061         * gjavah.c: New prototypes for java_float_finite and
16062         java_double_finite.
16063
16064 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16065
16066         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16067         references.
16068
16069 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16070
16071         * Makefile.in (TREE_H): Add tree-check.h.
16072         (RTL_H): Add genrtl.h.
16073
16074 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16075
16076         * parse.y (patch_assignment): Added ArrayStoreException runtime
16077         check.
16078
16079 1999-04-06  Per Bothner  <bothner@cygnus.com>
16080
16081         * expr.c (pop_type_0):  New function.
16082         (pop_type):  Use pop_type_0.
16083         * java-tree.h (pop_type_0):  New declaration.
16084         * verify.c (verify_jvm_instructions):  Check return instructions.
16085
16086         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16087         class files.
16088
16089 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16090
16091         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16092
16093         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16094         (main_jcf): Don't define.
16095         (process_file): Don't set `main_jcf'.
16096
16097         * java-tree.h (main_jcf): Don't declare.
16098
16099         * jcf-parse.c (main_jcf): Add static definition.
16100
16101         * lang.c (main_jcf): Don't define.
16102
16103 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16104
16105         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16106
16107         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16108
16109         * jcf-depend.c: Include "config.h", not <config.h>.
16110
16111         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16112         `bcopy' to PTR.
16113
16114         * jcf-path.c: Include "config.h", not <config.h>.
16115
16116         * lex.c: Don't include various system header files.
16117         (java_init_lex): Cast the argument of `bzero' to PTR
16118
16119         * parse-scan.y (java_push_parser_context): Likewise.
16120
16121         * parse.y (java_push_parser_context): Likewise.
16122         (patch_bc_statement): Match format specifier to variable argument.
16123
16124         * xref.c: Don't include <stdio.h>.
16125
16126 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16127
16128         * parse.y (struct parser_ctxt *ctxp): Now global.
16129         (declare_local_variables): Use WFL compound value for the
16130         declaration source line value, when doing cross-referencing.
16131
16132 1999-03-31  Tom Tromey  <tromey@cygnus.com>
16133
16134         * gjavah.c (print_field_info): Allow constants of other types.
16135         (print_include): Generate include when new name is proper prefix
16136         of already printed name.
16137         (add_namelet): Likewise.
16138         (cxx_keyword_subst): New function.
16139         (print_method_info): Use it.
16140         (print_field_name): New function.
16141         (get_field_name): New function.
16142         (print_field_info): Use get_field_name and print_field_name.
16143
16144 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16145
16146         * Makefile.in (keyword.h): Generate using gperf language 'C', not
16147         'KR-C', so gperf uses the `const' keyword on strings.
16148
16149         * keyword.gperf (java_keyword): Const-ify a char*.
16150
16151 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16152
16153         * parse.y (patch_bc_statement): Fixed identation and a bogus
16154         `printf' format.
16155
16156 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16157
16158         * parse.y (patch_assignment): Allow static variables in other
16159         classes to be assigned.
16160
16161 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16162
16163         * class.c (maybe_add_interface): Remove unused variable
16164         `interface_binfo'.
16165         (make_class_data): Use = for assignment, not ==.  Likewise.
16166         (emit_register_classes): Remove unused variable `decl'.
16167
16168         * lex.c: Fix comment so as not to contain an embedded `/*'.
16169
16170         * verify.c (verify_jvm_instructions): Remove unused variable
16171         `self_type'.
16172
16173 1999-03-27  Per Bothner  <bothner@cygnus.com>
16174
16175         * parse.y (complete_loop_body):  Rename to finish_loop_body.
16176         (complete_labeled_statement):  Rename to finish_labeled_statement.
16177         (complete_for_loop):  Rename to finish_for_loop.
16178         (complete_method_declaration):  Rename to finish_method_declaration.
16179
16180         * java-tree.h (continue_identifier_node):  New global node.
16181         * decl.c:  Define and initialize continue_identifier_node.
16182         * parse.y (generate_labeled_block):  Remove - no longer needed.
16183         (build_loop_body):  Use continue_identifier_node for continue block.
16184         (finish_labeled_statement):  Also do pop_labeled_block actions.
16185         (java_complete_lhs):  POP_LOOP even if error.
16186         (build_labeled_block):  Special handling for continue_identifier_node.
16187         (patch_loop_statement):  Re-organize.
16188         (patch_bc_statement):  Re-write.
16189
16190 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16191
16192         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16193         using a WFL compound value.
16194         * parse.y (xref.h): Include.
16195         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16196         WFL compound value.
16197         (register_fields): Set WFL compound value to lineno if doing
16198         xrefs.
16199         (java_complete_expand_method): Call expand_xref if flag_emit_xref
16200         is set.
16201         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16202         * xref.h (expand_xref): Prototype renamed from xref_generate.
16203
16204 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16205
16206         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16207         (GET_CURRENT_BLOCK): New macro.
16208         * parse.y (current_static_block): New global variable.
16209         (method_body:): Define action.
16210         (complete_method_declaration): Set current_function_decl to NULL
16211         when work on the current method is done.
16212         (declare_local_variables): Use GET_CURRENT_BLOCK.
16213         (java_method_add_stmt): Likewise.
16214         (java_complete_expand_method): Disable the use of `this' when
16215         expanding <clinit>.
16216         (enter_a_block): If no current method exist, use
16217         current_static_block to link static initializer blocks.
16218         (exit_block): Rewritten to use current_static_block when no current
16219         method decl exists.
16220         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16221         (patch_return): Forbid the use of `return' in static initializers.
16222         (patch_throw_statement): Fixed indentation. Issue specific error
16223         for uncaught thrown checked exception in static initializer
16224         blocks. Removed FIXME.
16225
16226 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
16227
16228         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16229         Link gcj from gcc.o.
16230
16231 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16232
16233         * parse.y (find_applicable_accessible_methods_list): When dealing
16234         with interface: ensure that a given interface or java.lang.Object
16235         are searched only once.
16236
16237 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16238
16239         * gjavah.c (print_c_decl): Remove unused argument `flags'.
16240
16241         * jcf-dump.c (print_access_flags): Add braces around if-else.
16242
16243         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16244         COMBINE_INPUTS.
16245
16246         * lex.c (build_wfl_node): Add static prototype.
16247
16248         * lex.h (build_wfl_node): Remove static prototype.
16249
16250         * parse.y: Include lex.c early enough to declare everything needed.
16251         Ensure calls to `build_wfl_node' pass the proper arguments.
16252         (create_class): Remove unused variable `super_decl'.
16253         (get_printable_method_name): Initialize variable `name'.
16254
16255 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16256
16257         * Changelog: Fixed 1999-03-22 typos.
16258         * lang.c (lang_decode_option): Fixed typo in error string in the
16259         XARG section.
16260
16261 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16262
16263         * Makefile.in (JAVA_OBJS): Added entry xref.o.
16264         (xref.o): New rule.
16265         * java-tree.h (flag_emit_xref): Declared extern.
16266         * lang.c (xref.h): Included.
16267         (flag_emit_xref): New global variable.
16268         (lang_decode_option): Added support for -fxref.
16269         * xref.c: Created.
16270         * xref.h: Likewise.
16271
16272 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
16273
16274         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16275         linked with.
16276
16277 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16278
16279         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16280         $(srcdir)/../system.h and $(JAVA_TREE_H).
16281         (jcf-io.o): Depend on $(JAVA_TREE_H).
16282         (mangle.o): Likewise.
16283
16284         * check-init.c (check_cond_init): Add static prototype.
16285
16286         * class.c (build_java_method_type, hashUtf8String,
16287         make_field_value, get_dispatch_vector, get_dispatch_table,
16288         append_gpp_mangled_type, mangle_static_field): Likewise.
16289         (strLengthUtf8): Hide unused definition.
16290         (hashUtf8String): Const-ify.
16291         (make_field_value): Un-ANSI-fy.
16292
16293         * constants.c: Move inclusion of jcf.h above java-tree.h.
16294         (set_constant_entry, find_class_or_string_constant,
16295         find_name_and_type_constant, get_tag_node,
16296         build_constant_data_ref): Add static prototype.
16297
16298         * decl.c (push_jvm_slot, builtin_function,
16299         lookup_name_current_level): Likewise.
16300         (builtin_function): Const-ify.
16301
16302         * except.c (expand_start_java_handler, expand_end_java_handler):
16303         Add static prototype.
16304
16305         * expr.c (flush_quick_stack, push_value, pop_value,
16306         java_stack_swap, java_stack_dup, build_java_athrow,
16307         build_java_jsr, build_java_ret, expand_java_multianewarray,
16308         expand_java_arraystore, expand_java_arrayload,
16309         expand_java_array_length, build_java_monitor, expand_java_pushc,
16310         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16311         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16312         expand_compare, expand_test, expand_cond, expand_java_goto,
16313         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16314         expand_java_field_op, java_push_constant_from_pool): Likewise.
16315
16316         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16317         (build_java_arraynull_check): Mark parameters `node' and `type'
16318         with ATTRIBUTE_UNUSED.
16319         (note_label): Likewise for parameter `current_pc'.
16320         (expand_java_call, expand_java_ret): Hide unused definition.
16321
16322         * java-tree.h (make_class, build_constants_constructor,
16323         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16324         init_outgoing_cpool, register_class, emit_register_classes,
16325         java_layout_seen_class_methods): Prototype.
16326         (unicode_mangling_length): Const-ify.
16327         (append_gpp_mangled_name, append_gpp_mangled_classtype,
16328         emit_unicode_mangled_name, format_int, format_uint,
16329         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16330         jcf_print_utf8_replace, open_class): Prototype.
16331
16332         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
16333         <stdio.h>.  Include tree.h/java-tree.h.
16334         (utf8_equal_string usage, process_class): Add static prototype.
16335         (open_class): Don't prototype this here.
16336         (utf8_equal_string): Match arguments to format specifiers.
16337         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16338         TABLE_SWITCH, disassemble_method): Likewise.
16339
16340         * jcf-io.c: Include tree.h/java-tree.h.
16341         (open_class, find_classfile, jcf_print_utf8,
16342         jcf_print_utf8_replace): Const-ify.
16343
16344         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16345         parse_class_file): Add static prototype.
16346         (find_in_current_zip): Match definition to existing static
16347         prototype.
16348
16349         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16350         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16351         finish_jcf_block, define_jcf_label, get_jcf_label_here,
16352         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16353         write_chunks, adjust_typed_op, generate_bytecode_conditional,
16354         generate_bytecode_return, perform_relocations, init_jcf_state,
16355         init_jcf_method, release_jcf_state, generate_classfile):
16356         Add static prototype.
16357         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16358         (make_class_file_name): Const-ify.
16359
16360         * jcf.h (find_classfile): Const-ify.
16361
16362         * jv-scan.c (reset_report): Remove prototype.
16363
16364         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16365         (error): Rewrite to allow varargs.
16366
16367         * lang.c (lang_f_options): Const-ify.
16368
16369         * lex.c (java_parse_escape_sequence): Add static prototype.
16370         (java_allocate_new_line): Match definition to existing static
16371         prototype.
16372
16373         * mangle.c Include tree.h/java-tree.h.
16374         (unicode_mangling_length, emit_unicode_mangled_name,
16375         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16376
16377         * parse.h (jdep_code): Remove trailing comma in enumeration.
16378         (java_get_line_col): Move prototype outside of !JC1_LITE test.
16379         (reset_report): Add prototype.
16380
16381         * verify.c (push_pending_label, merge_types): Add static
16382         prototypes.
16383
16384         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16385
16386 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16387
16388         * parse.y (find_applicable_accessible_methods_list): Extend the
16389         search to superinterfaces when relevant.
16390         (search_applicable_methods_list): New function.
16391
16392 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16393
16394         * class.c (unmangle_classname): Implemented stricter testing
16395         before setting the QUALIFIED_P flag on an identifier.
16396
16397 1999-03-16  Per Bothner  <bothner@cygnus.com>
16398
16399         * parse.y (java_complete_lhs):  Call force_evaluation_order
16400         after patch_newarray.
16401         (patch_binop):  Don't call fold if there are side effects.
16402
16403 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16404
16405         * parse.y (java_stabilize_reference): Use save_expr instead of
16406         building a SAVE_EXPR node.
16407         (java_complete_lhs): Patch the resulting string of the `+='
16408         operator (if necessary) and complete the RHS after having built
16409         the cast.
16410
16411 1999-03-15  Per Bothner  <bothner@cygnus.com>
16412
16413         * class.c (make_class):  Don't set CLASS_P here (because
16414         this function is also called by build_java_array_type).
16415         (push_class):  Set CLASS_P here instead.
16416         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
16417
16418         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
16419         context.  If the context is class, perfer "super" over "synchronized".
16420         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
16421
16422         * parse.y (create_class):  Don't call parser_check_super here;
16423         it is not robust.  Always wait until later.
16424
16425         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
16426         match what JDK 1.2 does), but don't set ACC_PUBLIC.
16427
16428 1999-03-13  Per Bothner  <bothner@cygnus.com>
16429
16430         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
16431         * lex.h (UNGETC):  Change misleading macro.
16432
16433 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16434
16435         * parse.y (java_stabilize_reference): Return NODE when patching a
16436         COMPOUND_EXPR.
16437         (java_complete_lhs): Put parenthesis around truth values.
16438
16439 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16440
16441         * class.c (layout_class_method): Don't make rtl for interface
16442         methods.
16443         * parse.h (GET_TYPE_NAME): New macro.
16444         * parse.y (if_then_statement:): Fixed indentation.
16445         (if_then_else_statement:): Likewise.
16446         (for_statement:): Fixed spacing.
16447         (try_statement:): Fixed indentation.
16448         (create_interface): Don't force interfaces to be abstract.
16449         (method_header): Abstract methods are OK in interfaces.
16450         (declare_local_variables): Fixed typo in comment.
16451         (java_complete_expand_method): Fixed indentation.
16452         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16453         non accessible fields.
16454         (java_stabilize_reference): New function.
16455         (java_complete_lhs): Fixed indentation. Use
16456         java_stabilize_reference in compound assignment. Insert the
16457         cast. If not processing `+' fix string constants before processing
16458         binop.
16459
16460 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16461
16462         * constants.c (find_class_or_string_constant): Cast variable `j'
16463         to a `jword' when comparing against one.
16464
16465         * expr.c (java_lang_expand_expr): Remove unused variables
16466         `has_finally_p' and `op0'.
16467
16468         * gjavah.c (print_field_info): Cast a value to jint when comparing
16469         against one.  Likewise for a jlong.
16470         (add_namelet): Likewise cast a `sizeof' to an int when comparing
16471         against a signed quantity.
16472
16473         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16474         (print_signature): Don't needlessly dereference variable `str'
16475
16476         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16477         `max_locals' with ATTRIBUTE_UNUSED.
16478         (jcf_parse_class): Likewise for variable `index'.
16479
16480         * parse.h (reverse_jdep_list): Remove static prototype.
16481
16482         * parse.y (build_jump_to_finally): Remove prototype and definition.
16483         (reverse_jdep_list): Add static prototype.
16484
16485         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16486         `assignment' and `expr_decl'.
16487
16488         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16489
16490 1999-03-12  Andrew Haley  <aph@cygnus.com>
16491
16492         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16493         we'll need a directory separator and a null character.
16494
16495 1999-03-10  Per Bothner  <bothner@cygnus.com>
16496
16497         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
16498
16499 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16500
16501         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
16502         interfaces.
16503
16504 1999-03-05  Per Bothner  <bothner@cygnus.com>
16505
16506         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
16507
16508         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
16509
16510         * class.c (layout_class_method):  A static method in a base class
16511         is never overridden, so treat it like it doesn't exist.
16512         However, do complain about private non-static method overriding
16513         public static method.
16514
16515         * parse.y:  Don't set unused INITIALIZED_P flag.
16516         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
16517
16518         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
16519         (build_array_from_name):  Re-order &index[string] to &string[index].
16520
16521         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
16522         error_mark (it might catch more errors, but it is more likely to lose).
16523
16524 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16525
16526         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
16527         (parse-scan.o): Depend on toplev.h.
16528
16529         * class.c (make_method_value): Add prototype.  Make it static.
16530         Remove unused second argument, caller changed.
16531
16532         * expr.c (java_lang_expand_expr): Remove unused variable
16533         `return_label'.
16534
16535         * java-tree.h: Don't prototype find_in_current_zip.
16536         Add prototypes for verify_constant_pool, start_java_method,
16537         end_java_method, give_name_to_locals, expand_byte_code,
16538         open_in_zip, set_constant_value, find_constant1, find_constant2,
16539         find_utf8_constant, find_string_constant, find_class_constant,
16540         find_fieldref_index, find_methodref_index, write_constant_pool,
16541         count_constant_pool_bytes and encode_newarray_type.
16542
16543         * jcf-dump.c: Remove unused variable `LONG_temp'.
16544
16545         * jcf-parse.c: Include parse.h.
16546         (jcf_parse_source): Remove unused parameter, all callers changed.
16547         (jcf_figure_file_type): Add static prototype.
16548         (find_in_current_zip): Likewise.  Also remove unused parameter,
16549         all callers changed.
16550         (read_class): Initialize variable `saved_pos'.
16551
16552         * jcf-reader.c (jcf_parse_preamble): Mark variables
16553         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
16554
16555         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
16556         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
16557         (java_parse_doc_section): Initialize variable `seen_star'.
16558         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
16559         (java_lex_error): Mark parameters `msg' and `forward' with
16560         ATTRIBUTE_UNUSED.
16561         (java_get_line_col): Mark parameters `filename' and `line' with
16562         ATTRIBUTE_UNUSED.
16563
16564         * parse-scan.y: Include toplev.h.
16565         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
16566
16567         * parse.h: use `struct JCF', not plain `JCF'.
16568         (java_parser_context_save_global, java_expand_classes
16569         java_parser_context_restore_global, java_parse): Add prototypes.
16570
16571         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
16572         `node'.
16573
16574 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
16575
16576         *  check-init.c (check_init):  COPYN takes word count, not bit count.
16577
16578 1999-02-26  Per Bothner  <bothner@cygnus.com>
16579
16580         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
16581         explicit build_decl.  (Avoids crash in reload when optimizing.)
16582
16583 1999-02-25  Per Bothner  <bothner@cygnus.com>
16584
16585         * decl.c (complete_start_java_method):  Handle synchronized method
16586         even when compiling from bytecode.
16587
16588 1999-02-26  Tom Tromey  <tromey@cygnus.com>
16589
16590         * gjavah.c (add_class_decl): Only generate `#include' if outer
16591         class is not the name of the class we are processing.  Correctly
16592         append `.h' in #include.
16593         (process_file): Clean up newlines around generated `#include's.
16594         (decode_signature_piece): Correctly handle inner classes.
16595         (struct include): New structure.
16596         (all_includes): New global.
16597         (print_include): New function.
16598         (add_class_decl): Use it.
16599         (process_file): Likewise.
16600         (add_class_decl): Generate include for java-array.h if array
16601         seen.
16602         (process_file): Don't generate java-array.h include.
16603
16604         * gjavah.c (add_namelet): Check for standard package names here.
16605         (add_class_decl): Don't check for standard package names here.
16606
16607 1999-02-25  Tom Tromey  <tromey@cygnus.com>
16608
16609         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
16610         When reading a zip file, only use strncmp if both strings are
16611         bigger than the buffer length.  Initialize `k' when looping
16612         through zip file.
16613
16614 1999-02-24  Tom Tromey  <tromey@cygnus.com>
16615
16616         * gjavah.c (struct namelet): New structure.
16617         (add_namelet): New function.
16618         (print_namelet): New function.
16619         (print_class_decls): Use add_namelet and print_namelet to generate
16620         namespaces and not classes.
16621         (method_printed): New global.
16622         (HANDLE_END_METHOD): Examine method_printed.
16623         (print_method_info): Set method_printed when required.  Print
16624         error if function to be ignored is marked virtual.  Handle $finit$
16625         method.
16626         (METHOD_IS_FINAL): New macro.
16627         (print_field_info): Use it.
16628         (HANDLE_METHOD): Clear method_printed.
16629         (method_pass): New global.
16630         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
16631         (process_file): Do two passes over both fields and methods.
16632         (HANDLE_METHOD): Examine method_pass.
16633         (root): New global.
16634         (add_class_decl): New function.
16635         (print_class_decls): Don't scan over entire constant pool.
16636
16637 1999-02-23  Tom Tromey  <tromey@cygnus.com>
16638
16639         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
16640         disable linking in that case.
16641
16642 1999-02-20  Tom Tromey  <tromey@cygnus.com>
16643
16644         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
16645         not 0x1f.
16646
16647 1999-02-21  Per Bothner  <bothner@cygnus.com>
16648
16649         * decl.c (build_result_decl), java-tree.h:  New method.
16650         (complete_start_java_method):  Handle synchronized methods.
16651         Don't build DECL_RESULT here.  (Ordering dependency problem.)
16652         (start_java_method):  Call build_result_decl here instead  ...
16653         * parse.y (java_complete_expand_method):  ... and here.
16654         (expand_start_java_method): Don't call complete_start_java_method here.
16655         (java_complete_expand_method):  Call it here instead.
16656         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
16657         * java-tree.h:  ... here.
16658
16659         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
16660         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
16661         for ARRAY_REF - it doesn't work when array bounds are checked.
16662         (patch_array_ref):  Handle it here instead.
16663
16664         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
16665
16666 1999-02-19  Per Bothner  <bothner@cygnus.com>
16667
16668         Force left-to-right evaluation of binary operations etc.
16669         * expr.c (force_evaluation_order), java-tree.h:  New function.
16670         * parse.y (java_complete_lhs):  Pass binary operations, procedure
16671         calls, and ARRAY_REFs to force_evaluation_order.
16672         (various):  Set TREE_SIDE_EFFECTS more carefully.
16673
16674         Tolerate random (non-UTF8) encoding in comments without complaining.
16675         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
16676         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
16677
16678         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
16679         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
16680
16681         * parse.y (java_complete_lhs):  Ignore an empty statement in a
16682         COMPOUND_EXPR.  Don't complain about empty statement after return.
16683
16684 1999-02-19  Per Bothner  <bothner@cygnus.com>
16685
16686         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
16687         in TREE_LIST - just chain the POINTER_TYPEs together.
16688         (resolve_class):  If type already resolved, return decl.
16689         After resolving, update TREE_TYPE(class_type), and name (if array).
16690         * parse.h (do_resolve_class), parse.y:  Make non-static.
16691         * class.c (maybe_layout_super_class):  Take this_class argument.
16692         Do do_resolve_class if necessary.
16693         (layout_class, layout_class_methods): Adjust calls appropriately.
16694         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
16695         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
16696         * typeck.c (build_java_array_type):  Don't call layout_class.
16697
16698 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16699
16700         * parse.y (check_pkg_class_access): Allow private class access
16701         within the same package.
16702         (strip_out_static_field_access_decl): New function.
16703         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
16704         operator argument before testing its nature.
16705
16706 1999-02-03  Per Bothner  <bothner@cygnus.com>
16707
16708         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
16709         (TRY_EXPR):  Simplify - it no longer has a finally clause.
16710         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
16711         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16712         * expr.c (java_lang_expand_expr):  Likewise.
16713         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
16714         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
16715         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
16716         (build_try_statement):  Remove finally parameter and handling.
16717         (build_try_finally_statement):  New function.
16718         (patch_try_statement):   No longer need to support finally clause.
16719         (try_statement):  Update grammar action rules.
16720         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
16721         Simpler handling of TRY_EXPR, which no longer has a finally clause.
16722
16723 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
16724
16725         * jcf-parse.c (get_constant): Add braces around computation of 'd'
16726         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
16727
16728 1999-02-17  Andrew Haley  <aph@cygnus.com>
16729
16730         * class.c (build_utf8_ref): Back out broken patch which was
16731         intended to to output signatures using '.' as a separator.
16732
16733         * class.c (make_class_data): Output signatures using '.' as a
16734         separator, rather than '/'.
16735         (mangled_classname): Likewise.
16736         (make_field_value): Likewise.
16737         (make_method_value): Likewise.
16738         * constants.c (alloc_class_constant): Likewise.
16739         * expr.c (build_invokeinterface): Likewise.
16740
16741 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16742
16743         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
16744         of an ancient workaround.
16745
16746 1999-02-10  Jeffrey A Law  (law@cygnus.com)
16747
16748         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
16749         here anymore.
16750
16751 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16752
16753         * lex.c (yylex): Encode \0 as UTF8.
16754
16755 1999-02-10  Tom Tromey  <tromey@cygnus.com>
16756
16757         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
16758         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
16759         (libgcj_zip): Renamed.
16760         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
16761         LIBJAVA_ZIP_FILE.
16762         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
16763
16764         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
16765         (GC_NAME): Renamed -lgc to -lgcjgc.
16766
16767 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16768
16769         * lex.c (java_lang_cloneable): Initialize.
16770         * parse.y (java_lang_cloneable): New static variable.
16771         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
16772         doing one more qualification round.
16773         (valid_ref_assignconv_cast_p): Reject null source or
16774         destination. Allow an array to be cast into java.lang.Cloneable.
16775         (patch_cast): Swapped two first arguments to first call to
16776         valid_ref_assignconv_cast_p.
16777
16778 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16779
16780         * parse.h: DECL_P renamed JDECL_P.
16781         * parse.y: DECL_P replaced by JDECL_P.
16782         (build_array_from_name): Always use pointer's type.
16783         (patch_bc_statement): Extra code to search continue target in a
16784         for loop. Fixed comments. Continue target is current loop when
16785         unlabeled.
16786
16787 1999-02-05  Andrew Haley  <aph@cygnus.com>
16788
16789         * class.c (make_class_data): The superclass of an interface should
16790         be null, not class Object.
16791
16792         * lex.c (java_lex): Sign extend hex literals.
16793
16794 1999-02-04  Andrew Haley  <aph@cygnus.com>
16795
16796         * class.c (build_utf8_ref): Output signatures using '.' as a
16797         separator, rather than '/'.
16798         (make_class_data): Likewise.
16799
16800 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
16801
16802         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
16803         mkstemp.o.  Get them from libiberty now.
16804
16805 1999-02-02  Jeffrey A Law  (law@cygnus.com)
16806
16807         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
16808
16809 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16810
16811         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
16812         from libiberty.h
16813
16814 1999-02-02  Per Bothner  <bothner@cygnus.com>
16815
16816         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
16817         * jcf-write.c (generate_bytecode_return):  New function.
16818         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
16819
16820         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
16821         generate special [fd]const_[01] instructions.
16822
16823         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
16824
16825         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
16826         handling OPCODE_lookupswitch or OPCODE_tableswitch.
16827
16828 1999-02-01  Per Bothner  <bothner@cygnus.com>
16829
16830         * parse.y (patch_method_invocation):  Handle calling static methods,
16831         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
16832
16833         * parse.y (java_complete_lhs):  Don't complain about unreachable
16834         exit condition in a do-while statement.
16835
16836 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16837
16838         * lex.c (java_read_char): Fixed utf8 decoding.
16839         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
16840         range.
16841         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
16842         comments. Local variable `all_primitive' is gone. Broadened
16843         acceptance of `0' to floating point targets. `long' can now be
16844         widened to `double' or `float'.
16845         (valid_method_invocation_conversion_p): Added leading
16846         comment. Fixed tabulation.
16847         (build_string_concatenation): Optimize out left or right empty
16848         string constants.
16849
16850 1999-01-28  Per Bothner  <bothner@cygnus.com>
16851
16852         * jcf-write.c (localvar_alloc):  Only emit entry for
16853         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
16854         (generate_bytecode_insns):  Only call put_linenumber if
16855         debug_info_level > DINFO_LEVEL_NONE.
16856         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
16857         is specified, add -g1 (for compatibility wih javac).
16858
16859 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
16860
16861         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
16862         gjavah.o, check-init.o, jv-scan.o
16863
16864 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16865
16866         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
16867
16868         * gjavah.c: Include config.h and system.h.
16869
16870         * javaop.h (inline): Don't define, its handled by system.h.
16871         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
16872         from `inline' to `static inline'.
16873
16874         * jcf.h (inline): Don't define, its handled by system.h.
16875
16876         * lex.c (inline): Likewise.
16877
16878 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
16879
16880         * lang-specs.h: Map -Qn to -fno-ident.
16881
16882 1999-01-29  Richard Henderson  <rth@cygnus.com>
16883
16884         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
16885
16886 1999-01-29  Tom Tromey  <tromey@cygnus.com>
16887
16888         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
16889         then cast it to Object before calling `append' method.
16890
16891 1999-01-28  Per Bothner  <bothner@cygnus.com>
16892
16893         * check-init.c (check_bool2_init, check_bool_init, check_init):
16894         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
16895         * jcf-write.c (generate_bytecode_insns):  Likewise.
16896
16897 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16898
16899         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
16900         * parse.y (patch_cast): Allow a boolean to be cast into a
16901         boolean.
16902
16903 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16904
16905         * parse.y: (class_declaration:): Fixed indentation.
16906         (class_member_declaration:): Extra `;' after field declaration now
16907         accepted.
16908         (interface_declaration:): Removed debug messages in error reports.
16909         (patch_binop): Nodes created and returned inherit the orignal
16910         node's COMPOUND_ASSIGN_P flag value.
16911         (patch_cast): Fix cast from char to floating point.
16912
16913 1999-01-25  Andrew Haley  <aph@cygnus.com>
16914
16915         * except.c, java-except.h (expand_resume_after_catch): new
16916         function.
16917         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
16918         to branch back to main flow of control after a catch block.
16919
16920 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16921
16922         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
16923         $(srcdir)/../system.h.
16924         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
16925         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
16926         (jcf-write.o): Likewise.
16927         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16928         (mangle.o): Depend on $(srcdir)/../toplev.h.
16929         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16930         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
16931
16932         * class.c: Include output.h and parse.h.
16933         (mangled_classname): Add the `const' keyword to a char*.
16934         (find_named_method): Hide unused function definition.
16935         (build_utf8_ref): Change type of variable `c' to unsigned char.
16936         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
16937         (build_class_ref): Add the `const' keyword to a char*.
16938         (layout_class_method): Remove unused variable `buf'.
16939
16940         * decl.c (find_local_variable): Remove unused variable `rtl'.
16941         (pushdecl): Likewise for variables `different_binding_level' and
16942         `oldglobal'.
16943         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
16944         (maybe_build_cleanup): Likewise for parameter `decl'.
16945
16946         * except.c (expand_start_java_handler): Mark parameter `range'
16947         with ATTRIBUTE_UNUSED.
16948
16949         * expr.c: Include except.h.
16950         (pop_type): Remove unused variable `i'.
16951         (pop_value): Likewise for variables `n_words' and `i'.
16952         (expand_java_arrayload): Likewise for variable `convert'.
16953         (java_lang_expand_expr): Likewise for variables `op0', `type',
16954         `mode', `unsignedp', `node' and `elements'.
16955         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
16956         `eh_ranges'.
16957         (process_jvm_instruction): Add a `const' qualifier to a char*.
16958
16959         * gjavah.c (output_directory): Add the `const' keyword to a char*.
16960         (temp_directory): Likewise.
16961         (print_c_decl): Likewise.
16962         (print_method_info): Likewise.
16963         (decode_signature_piece): Likewise.
16964         (print_mangled_classname): Likewise.
16965
16966         * java-except.h: Provide prototypes for maybe_start_try,
16967         maybe_end_try and add_handler.
16968
16969         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
16970         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
16971         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
16972         init_expr_processing, push_super_field, init_class_processing,
16973         can_widen_reference_to, class_depth, verify_jvm_instructions,
16974         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
16975         set_local_type, merge_type_state, push_type, load_type_state,
16976         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
16977         emit_unicode_mangled_name): Add prototypes.
16978
16979         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
16980         (print_signature_type): Use ISDIGIT, not isdigit.
16981         (print_signature): Remove unused variable `j'.
16982
16983         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
16984         int when comparing against one.
16985
16986         * jcf-parse.c: Include toplev.h.
16987
16988         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
16989         (localvar_free): Remove unused variable `i'.
16990         (generate_bytecode_conditional): Likewise for variable `kind'.
16991
16992         * jv-scan.c: Include config.h and system.h.  Remove redundant
16993         OS header and gansidecl.h includes.
16994         (warning): Add the `const' keyword to a char*.  Also add
16995         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
16996         __STDC__, when determining whether to use ANSI-isms.
16997         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
16998         (xmalloc): Don't redundantly prototype here.
16999         (main): Remove unused parameter `envp'.  Also fix the arguments
17000         passed to function `fatal' to match the format specifier.
17001
17002         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17003
17004         * mangle.c: Include toplev.h.
17005         (emit_unicode_mangled_name): Declare parameter `len'.
17006
17007         * parse.y (parse_warning_context): Add the `const' keyword to a
17008         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
17009         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17010         (issue_warning_error_from_context): Add the `const' keyword to
17011         a char*.
17012         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17013         not `__STDC__' for whether to use ANSI-isms.
17014
17015         * typeck.c (incomplete_type_error): Mark parameters `value' and
17016         `type' with ATTRIBUTE_UNUSED.
17017         (parse_signature_type): Use ISDIGIT, not isdigit.
17018
17019         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17020         (verify_jvm_instructions): Likewise.  Remove unused variables
17021         `field_name' and `default_val'.
17022
17023         * zextract.c: Include config.h and system.h.  Remove redundant
17024         OS header includes.
17025
17026         * zipfile.h: Prototype `read_zip_archive'.
17027
17028 1999-01-21  Andrew Haley  <aph@cygnus.com>
17029
17030         * typeck.c (convert): Allow conversions to void type: some
17031         optimizations in gcc do this.
17032
17033 1999-01-21  Andrew Haley  <aph@cygnus.com>
17034
17035         * typeck.c (convert_ieee_real_to_integer): New function.
17036         (convert): When not using fast-math and using hardware fp, convert
17037         an IEEE NaN to zero.
17038
17039 1999-01-18  Andrew Haley  <aph@cygnus.com>
17040
17041         * parse.y (patch_binop): Do a type conversion from signed to
17042         unsigned and then back to signed when a ">>>" is found.
17043
17044 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17045
17046         * java-tree.h: (check_for_initialization): Added prototype.
17047         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17048         * parse.y (do_resolve_class): Removed unused locals.
17049         (read_import_dir): Likewise.
17050         (resolve_qualified_expression_name): Array creation
17051         expressions are valid primary expressions.
17052         (qualify_ambiguous_name): Likewise.
17053         (patch_synchronized_statement): Removed unused local.
17054
17055 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17056
17057         * Makefile.in (zextract.o): Add dependencies.
17058
17059         * Makefile.in: Do not put ^Ls at the start of a line.
17060
17061 1999-01-15  Per Bothner  <bothner@cygnus.com>
17062
17063         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17064         sub-type the result of the call that gets the exception value.
17065
17066         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17067         don't call finish_class.
17068
17069         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17070         clear found before continuing.
17071
17072         * verify.c (verify_jvm_instructions):  On an array load, allow
17073         and handle top of stack to be TYPE_NULL.
17074
17075         * gjavah.c (generate_access):  Translate Java package private or
17076         protected access to C++ public, but with a comment.
17077
17078 1999-01-13  Andrew Haley  <aph@cygnus.com>
17079
17080         * expr.c (generate_name): Name prefix changed to avoid clashes
17081         with assembler temp labels.
17082
17083         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17084         MODIFY_EXPR.  Without this, code for the assignment may not be
17085         generated at all and the synchronized statement will read an
17086         uninitialized variable.
17087
17088 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17089
17090         * class.c (maybe_layout_super_class): Fixed returned value.
17091         * lex.c: Added 1999 to the copyright.
17092         (java_init_lex): Initialize java_lang_imported.
17093         * lex.h: Added 1999 to the copyright.
17094         * parse.h: Added 1999 to the copyright.
17095         (REGISTER_IMPORT): Fixed typo in trailing macro.
17096         (CURRENT_OSB): New macro.
17097         (struct parser_ctxt): New fields osb_depth, osb_limit.
17098         * parse.y (java_lang_id): New global variable.
17099         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17100         (array_creation_expression:): Use CURRENT_OSB.
17101         (dims:): Uses a stack to keep track of array dimensions.
17102         (cast_expression:): Use CURRENT_OSB.
17103         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17104         conditions.
17105         (register_fields): Fixed typos in comment.
17106         (check_method_redefinition): Fixed comment indentation.
17107         (java_check_regular_methods): Set saved found wfl to NULL after
17108         having reinstalled it in the previously found DECL_NAME.
17109
17110 1999-01-10  Richard Henderson  <rth@cygnus.com>
17111
17112         * gjavah.c (java_float_finite): Use a union to do type punning.
17113         (java_double_finite): Likewise.
17114
17115 1999-01-09  Per Bothner  <bothner@cygnus.com>
17116
17117         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
17118         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17119         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
17120         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
17121         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17122         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
17123
17124 1999-01-08  Per Bothner  <bothner@cygnus.com>
17125
17126         * check-init.c (check_init):  If compiling to native, we don't
17127         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
17128
17129 1999-01-08  Tom Tromey  <tromey@cygnus.com>
17130
17131         * parse-scan.y (variable_declarator_id): Set or increment
17132         bracket_count.
17133         (bracket_count): New global.
17134         (formal_parameter): Handle case where bracket pairs trail variable
17135         declarator id.
17136
17137 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
17138
17139         * jcf-parse.c (yyparse): variable len changed from a char to an
17140         int to prevent overflow.
17141
17142 1999-01-06  Per Bothner  <bothner@cygnus.com>
17143
17144         * java-tree.h:  Declare read_class.
17145         * jcf-parse.c (read_class):  New function.
17146         (load_class):  Now just call read_class.
17147
17148         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
17149         * jcf-parse.c (parse_source_file):  Declare save_error_count,
17150         which is needed by java_parse_abort_on_error macro,
17151         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
17152
17153         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
17154         constructor, if initializing a static field.
17155         (patch_new_array_init):  Set TREE_CONSTANT if it is.
17156         * expr.c (java_lang_expand_expr):  For a static array constructor
17157         of primitive elements, allocate the array itself statically.
17158         Disabled until we can set the vtable field statically.
17159
17160         * check-init.c:  New file.  Checks for definite assignment.
17161         * Makefile.in (JAVA_OBJS):  Add check-init.o.
17162         * parse.y (java_complete_expand_method): Call check_for_initialization.
17163         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
17164
17165 1999-01-06  Graham <grahams@rcp.co.uk>
17166
17167         * parse.y : include system.h instead of including
17168         standard headers directly with the exception of <dirent.h>.
17169
17170 1999-01-06  Per Bothner  <bothner@cygnus.com>
17171
17172         * lex.h:  Moved static function declarations to lex.c,
17173         to shut up some -Wall warnings.
17174         * lex.c:  Static function declarations moved here.
17175         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
17176
17177 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17178
17179         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17180
17181 1998-12-22  Per Bothner  <bothner@cygnus.com>
17182
17183         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
17184         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
17185
17186         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
17187         (localvar_alloc):  Change return type to void,
17188         (emit_unop):  Remove unused variable size.
17189
17190         * jcf-write.c (struct jcf_block):  Add new union.
17191         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
17192         (call_cleanups):  New functions.
17193         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
17194         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
17195         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17196         * lang.c (lang_init):  Call using_eh_for_cleanups.
17197         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
17198         completing operands to patch_synchronized_statement.
17199         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17200         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17201         WITH_CLEANUP_EXPR instead of TRY_EXPR.
17202
17203 1998-12-20  John F. Carr  <jfc@mit.edu>
17204
17205         * Make-lang.in: Comment out control-Ls; they upset some makes.
17206
17207 1998-12-18  Tom Tromey  <tromey@cygnus.com>
17208
17209         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17210         consistently.
17211
17212 1998-12-17  Tom Tromey  <tromey@cygnus.com>
17213
17214         * parse.y (DIR_SEPARATOR): New define.
17215         (check_class_interface_creation): Use it.
17216
17217         * parse-scan.y (report_main_declaration): Recognize
17218         `java.lang.String' in argument to main.
17219
17220 1998-12-16  Per Bothner  <bothner@cygnus.com>
17221
17222         * parse.y (create_interface):  Remove bogus test.
17223
17224 1998-12-16  Per Bothner  <bothner@cygnus.com>
17225
17226         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
17227         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
17228
17229 1998-12-16  Tom Tromey  <tromey@cygnus.com>
17230
17231         * parse-scan.y (qualified_name): Use correct sprintf format.
17232
17233 1998-12-15  Tom Tromey  <tromey@cygnus.com>
17234
17235         * gjavah.c (print_field_info): Changed how most negative number is
17236         printed.
17237
17238 1998-12-14  Per Bothner  <bothner@cygnus.com>
17239
17240         * parse.y (fold_constant_for_init):  New function.
17241         (resolve_expression_name):  Don't replace static final
17242         constant-initialized fields by its value.
17243         (java_complete_lhs):  New.  Same as java_complete_tree, except does
17244         not replace static final constant-initialized fields by their values.
17245         (register_fields):  If there is an initializer, set DECL_INITIAL and
17246         MODIFY_EXPR_FROM_INITIALIZATION_P.
17247         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
17248         Only call patch_initialized_static_field if
17249         MODIFY_EXPR_FROM_INITIALIZATION_P.
17250         (patch_initialized_static_field):  If not valid constant, clear
17251         DECL_INITIAL.
17252
17253         * parse.y (lookup_field_wrapper):  Fix thinko.
17254
17255         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
17256         set and restore global lineno.
17257
17258 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17259
17260         * gjavah.c (print_field_info): If value to print is the smallest
17261         value of its size, then print as hex to avoid later warnings from
17262         C++ compiler.
17263
17264 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17265
17266         * gjavah.c (decompile_method): Decompile `return null'.
17267         (process_file): Generate `#pragma interface'.
17268         (method_declared): New global.
17269         (print_method_info): Set it.
17270         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17271         (print_method_info): Handle abstract methods.
17272
17273 1998-12-13  Per Bothner  <bothner@cygnus.com>
17274
17275         * parse.y (patch_method_invocation):  If class_decl is null
17276         (e.g. an array type), use original type.
17277
17278         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
17279         errors about uncaught exception from clone (of array, specifically).
17280
17281 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17282
17283         * gjavah.c (decompile_method): Handle all types of `return'
17284         opcode.  Decompile `return this' and `return'.
17285         (method_access): New global.
17286         (print_method_info): Set it.
17287         (decompile_method): Don't decompile a synchronized method.
17288
17289 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17290
17291         * jcf-reader.c (jcf_parse_one_method): Recognize
17292         HANDLE_END_METHOD.
17293         * gjavah.c (HANDLE_END_METHOD): New macro.
17294         (HANDLE_CODE_ATTRIBUTE): New macro.
17295         (decompile_method): New function.
17296         (print_method_info): Don't print `;\n' at end of function decl.
17297         Include java-opcodes.h.
17298         (decompiled): New global.
17299
17300 1998-12-12  Per Bothner  <bothner@cygnus.com>
17301
17302         * class.c (build_class_ref):  Handle PRIMTYPE.class if
17303         flag_emit_class_files.
17304         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
17305         if flag_emit_class_files.
17306         * parse.y (java_complete_tree):  Pre-liminary support for
17307         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17308
17309         * parse.y (patch_synchronized_statement):   Don't call monitorexit
17310         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
17311
17312         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
17313
17314         * zipfile.h (opendir_in_zip):  New declaration.
17315         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
17316         (opendir_in_zip):  New function, using code from open_in_zip.
17317         (open_in_zip):  Call opendir_in_zip.
17318         (find_class):  Remove no-longer-used do_class_file parameter,
17319         but add source_ok parameter.  Change logic so if we find a .java file,
17320         we don't look for .class in later classpath emtries.
17321         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
17322         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
17323         * gjavah.c: Update call to find_class.
17324         * jcf-dump.c:  Likewise.
17325
17326         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
17327         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
17328         nothing if body is empty_stmt_node.
17329         Various little fixes so SP gets correctly adjusted.
17330         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17331         For CALL_EXPR, test if static first.
17332         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
17333         such as the ones we create for Object and Class.
17334         Set and restore current_function_decl.
17335         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17336         (note_possible_classname):  New function.
17337         (read_import_entry):  Removed.  Merged with read_import_dir.
17338         (read_import_dir):  Don't call find_class - that only gives us
17339         the first classpath entry having the needed package.
17340         Use the struct buffer data structure from buffer.h.
17341         (read_import_dir, find_in_imports_on_demand):  The remembered
17342         class names now use '.' (not '/') as package separator.
17343
17344         * parse.y (java_complete_expand_methods):  Call write_classfile
17345         here, and not in java_expand_classes (which only gets first class).
17346
17347 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17348
17349         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
17350         (register_fields):  If a static fields has an initializer, just
17351         chain it on ctxp->static_initialized, and handle later.
17352         (java_complete_expand_methods):  Force <clinit> first.
17353         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
17354         - it's already been completed.
17355         (patch_initialized_static_field):  New function.
17356         (java_complete_field):  Call it.
17357
17358 1998-12-12  Per Bothner  <bothner@cygnus.com>
17359
17360         * expr.c (encode_newarray_type, build_new_array):  New functions.
17361         * java-tree.h:  Declare build_new_array.
17362         * jcf-write.c (patch_newarray):  Use build_new_array.
17363
17364         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
17365         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
17366
17367         * parse.y (patch_new_array_init):  Re-organize.
17368         Now is passed the actual array (pointer) type of the value.
17369         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17370         (patch_array_constructor):  Removed - merged into patch_new_array_init.
17371         (java_complete_tree):  Update patch_new_array_init.
17372
17373         * jcf-write.c (find_constant_index):  New function.
17374         (generate_bytecode_insns):  Use find_constant_index.
17375         (generate_classfile):  Use find_constant_index for ConstantValue.
17376
17377 1998-12-11  Tom Tromey  <tromey@cygnus.com>
17378
17379         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17380         * decl.c (init_decl_processing): Renamed dtable -> vtable.
17381         * class.c (make_class_data): Renamed dtable -> vtable, and
17382         dtable_method_count -> vtable_method_count.
17383
17384 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17385
17386         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17387         global variables, initialized.
17388         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17389         Declared new global variables.
17390         * lex.c (java_lex): Return long_zero_node, float_zero_node,
17391         double_zero_node, integer_zero_node upon direct matching.
17392         * parse.y (purify_type_name): Added function prototype.
17393         (duplicate_declaration_error_p): Consider new_type as potentially
17394         being a incomplete type. Use purify_type_name on type string.
17395         (method_header): saved_type: unused variable removed. Don't figure
17396         return type if method name is invalid.
17397         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17398         processed by patch_unaryop.
17399         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17400         increment/decrement node into its original type after binary
17401         numeric promotion on its operands.
17402
17403 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17404
17405         * parse.y (array_initializer:): Array init operand is NULL_TREE
17406         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17407         now an error. Fixed indentation problems.
17408         (patch_string): Handle error_mark_node as an argument.
17409         (patch_new_array_init): Fixed indentation problems.
17410         (array_constructor_check_entry): Removed check on null wfl_value.
17411         Return an error if wfl_value's walk returns an error.
17412
17413 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17414
17415         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17416         * lex.c (java_lex): Remember column position before advancing one
17417         token. Retain location information on OCB_TK.
17418         * lex.h (typedef struct java_lc): Added new field.
17419         * parse.h (GET_SKIP_TYPE): New macro.
17420         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17421         * parse.y (build_new_array_init, patch_new_array_init,
17422         patch_array_constructor, maybe_build_array_element_wfl,
17423         array_constructor_check_entry): New function prototypes.
17424         (switch_block:): Tagged <node>.
17425         (OCB_TK): Tagged <operator>.
17426         (array_initializer:): Installed actions.
17427         (variable_initializer): Build location information on element if
17428         necessary.
17429         (switch_statement:): Fixed indentation typo.
17430         (switch_block:): Redefined default action.
17431         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17432         (patch_assignment): Removed duplicate code.
17433         (maybe_build_array_element_wfl, build_new_array_init,
17434         patch_new_array_init, patch_array_constructor,
17435         array_constructor_check_entry): New functions.
17436
17437 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17438
17439         * parse.y (array_initializer): Tagged <node>.
17440         (variable_initializer:): Use default rule.
17441         (array_initializer:): Defined actions.
17442         (variable_initializers:): Likewise.
17443         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17444         non-static field accesses.
17445         (patch_invoke): Fixed indentation typo.
17446         (java_complete_tree): Likewise.
17447         (build_labeled_block): Changed leading comment. Generate an error
17448         in case of duplicate loop labels.
17449         (patch_conditional_expr): Patch results of string concatenation
17450         operations.
17451
17452 1998-12-06  Per Bothner  <bothner@cygnus.com>
17453
17454         * constants.c (find_methodref_index):  When the class is an interface,
17455         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17456
17457         * decl.c (finit_identifier_node):  Use "$finit$", rather than
17458         "<finit>" (which Sun's verifier rejects).
17459         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
17460         (generate_field_initialization_code):  Removed.
17461         (fix_constructors)  Don't add call to $finit$ here (wrong order).
17462         (patch_method_invocation):  Add $finit$ call here.
17463
17464         * java-tree.h (CALL_USING_SUPER):  New macro.
17465         * parse.y (patch_invoke):  Remove im local variable.
17466         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
17467         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
17468         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
17469
17470         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
17471
17472         * parse.y (java_complete_tree):  Don't complain about unreachable
17473         statement if it is empty_stmt_node.
17474
17475         * jcf-write.c (find_constant_wide):  New function.
17476         (push_long_const):  Use find_constant_wide.
17477
17478         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
17479         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
17480         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17481         Emit invokeinterface when calling an interface method.
17482         Emit invokespecial also when calling super or private methods.
17483
17484         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
17485
17486 1998-12-06  Per Bothner  <bothner@cygnus.com>
17487
17488         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
17489
17490 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17491
17492         * java-tree.h (java_layout_seen_class_methods): New function
17493         prototype.
17494         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17495         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17496         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17497         * parse.y (method_declarator:): Defined action.
17498         (issue_warning_error_from_context): input_filename saved, set to
17499         the appropriate value and restored after java_error is called.
17500         (build_unresolved_array_type): Fixed comment.
17501         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
17502         (method_header): Deal with return type the same way type are
17503         handled for fields and method's parameters and local variables
17504         types are handled.
17505         (check_method_redefinition): Removed extra CR.
17506         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
17507         (java_layout_seen_class_methods): New function.
17508         (java_layout_classes): Call java_layout_seen_class_methods.
17509
17510 1998-12-03  Per Bothner  <bothner@cygnus.com>
17511
17512         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
17513
17514 1998-12-03  Per Bothner  <bothner@cygnus.com>
17515
17516         * jcf-dump.c (main):  Fix error message.
17517         * jcf-path.c (add_entry):  Style fix.
17518
17519 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17520
17521         * class.c (layout_class_method): Call build_java_argument_signature
17522         on constructors too.
17523         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
17524         (patch_method_invocation): Define a primary when resolving an
17525         expression name. Augmented comment on code checking illegal `this'
17526         usage. Loosened it test by accepting NEW_CLASS_EXPR.
17527
17528 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17529
17530         * class.c (layout_class_method): Don't report error on non-static
17531         overriding static if the method is private.
17532         * java-tree.h (finish_class): Prototype added.
17533         * lex.c (java_get_line_col): Handle col argument -2 value.
17534         * parse.h: All static method declarations moved to parse.y.
17535         * parse.y: Now contains all static method declarations previously
17536         found in parse.h.
17537         (find_expr_with_wfl, missing_return_error,
17538         unreachable_stmt_error): New functions.
17539         (java_get_real_method_name): Identify constructors bearing class
17540         names in source code compiled classes only.
17541         (java_complete_expand_methods): Call missing_return_error.
17542         (invocation_mode): Private methods invoked as static methods.
17543         (java_complete_tree): Call unreachable_stmt_error.
17544
17545 1998-12-01  Tom Tromey  <tromey@cygnus.com>
17546
17547         * Makefile.in (+target): Removed.
17548         (+xmake_file): Likewise.
17549         (+tmake_file): Likewise.
17550         (.NOEXPORT): Removed duplicate.
17551
17552 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17553
17554         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
17555
17556         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
17557
17558         * jvgenmain.c: Remove the xmalloc prototype, we get it from
17559         libiberty.h.  Provide an xmalloc definition.
17560
17561         * jvspec.c: Remove the xmalloc prototype.
17562
17563         * parse-scan.y: Include config.h and system.h.  Don't include
17564         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
17565         Provide an xstrdup definition.
17566
17567 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
17568
17569         * jcf-path.c (add_entry): Recognize ".jar" too.
17570         * lang-specs.h: Likewise.
17571
17572 1998-11-26  Per Bothner  <bothner@cygnus.com>
17573
17574         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
17575         soft_monitorenter_node, soft_monitorexit_node, throw_node.
17576
17577         * jcf-write.c (generate_bytecode_insns):
17578         Handle pre/post-increment/decrement of long.
17579
17580         * jcf-write.c (generate_bytecode_insns):
17581         Handle missing exception handler (finally for synchronized).
17582
17583 1998-11-25  Per Bothner  <bothner@cygnus.com>
17584
17585         * java-tree.h (end_params_node):  Declare global.
17586         * decl.c (end_params_node):  New global.
17587         (init_decl_processing, start_java_method):  Use end_params_node for
17588         end of list of parameter types.  Follows correct gcc conventions.
17589         * expr.c (pop_argument_types, pop_arguments):  Likewise.
17590         * lang.c (put_decl_node):  Likewise.
17591         * typeck.c (various places):  Likewise.
17592         * class.y (various places):  Likewise.
17593         * parse.y (various places):  Likewise.
17594
17595         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
17596         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
17597
17598         * class.c:  Add #include flags.h, remove no-longer needed declaration.
17599
17600         * class.c (layout_class_method):  Remove commented-out code, re-format.
17601         Don't add vtable entry (or index) for private methods.
17602         * expr.c (expand_invoke):  A private method is implicitly final.
17603         * class.c (make_class_data):  If inlining or optimizing,
17604         skip private methods.
17605
17606         * class.c (finish_class):  New function.  Calls existing methods,
17607         but alls emits deferred inline functions.
17608         * jcf-parse.c (parse_class_file):  Call finish_class.
17609         * parse.y (java_complete_expand_methods):  Likewise.
17610
17611         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
17612
17613         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
17614
17615 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
17616
17617         * jcf-write.c (generate_bytecode_conditional): Fix typo.
17618
17619 1998-11-24  Per Bothner  <bothner@cygnus.com>
17620
17621         * (generate_classfile): Always write class access flag with
17622         ACC_SUPER set.
17623
17624 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17625
17626         * class.c (maybe_layout_super_class): New function.
17627         (layout_class): Reorganized. Loop on class methods dispatched into
17628         a new function. Call maybe_layout_super_class.
17629         (layout_class_methods, layout_class_method): New functions.
17630         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
17631         class.
17632         (expand_invoke): Likewise.
17633         * java-tree.h (all_class_list): New global variable declared.
17634         (layout_class_methods, layout_class_method): New function
17635         prototypes.
17636         (LAYOUT_SEEN_CLASS_METHODS): New macro.
17637         * jcf-parse.c (all_class_list): New global variable.
17638         (load_class): Extended what class_or_name can be. Use parser
17639         context mechanism to save globals before calling jcf_parse.
17640         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
17641         is set on the file name.
17642         (jcf_parse): Layout class methods when Object is loaded, otherwise
17643         record class in all_class_list for delayed method layout.
17644         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
17645         * lang.c (put_decl_node): Decode <init> into the decl context
17646         class name.
17647         * lex.c (java_allocate_new_line): Use xmalloc.
17648         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
17649         pointers, not TREE_LIST elements.
17650         (struct parser_ctxt): Fixed comment indentations, added comments
17651         and reordered some fields.
17652         (java_check_methods): Function prototype removed.
17653         * parse.y (java_push_parser_context): Use xmalloc.
17654         (java_parser_context_restore_global): Pop extra pushed ctxp only
17655         when there's nothing next.
17656         (maybe_create_class_interface_decl): Fixed comment, add new
17657         created class decl to all_class_list.
17658         (method_header): Use GET_REAL_TYPE on argument's types.
17659         (method_declarator): Use GET_REAL_TYPE, change type to the real
17660         type in TREE_LIST dependency node. Build argument list with the
17661         real type.
17662         (create_jdep_list): Use xmalloc. Removed allocation error message.
17663         (obtain_incomplete_type): Fixed leading comment. Broadened
17664         incoming argument meaning.
17665         (register_incomplete_type): Use xmalloc. Removed allocation error
17666         message.
17667         (safe_layout_class): Fixed leading comment.
17668         (jdep_resolve_class): Reversed if statement condition and switch
17669         if and else bodies.
17670         (resolve_and_layout): Fixed leading comment. Broadened incoming
17671         argument meaning.
17672         (complete_class_report_errors): New local variable name, for
17673         clarity. purify_type_name used for all error cases.
17674         (java_get_real_method_name): Stricter check on constructors.
17675         (java_check_regular_methods): Reverse methods list only if not
17676         already laid out. Layout artificial constructor.
17677         (java_check_methods): Deleted.
17678         (source_start_java_method): Obtain incomplete type for patchable
17679         method arguments.
17680         (java_layout_classes): Fixed leading comment. Use
17681         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
17682         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
17683         before returning. Fixed comments.
17684         (java_expand_classes): Check for errors up front.
17685         (patch_method_invocation): Class to search is resolved and laid
17686         out.
17687
17688 1998-11-24  Per Bothner  <bothner@cygnus.com>
17689
17690         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
17691
17692         * javaop.h (int8):  Removed - not used.
17693         (jbyte):  Redefine portably with correct signedness.
17694
17695         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
17696
17697         * jcf-write.c (generate_bytecode_insns):  Fix typo
17698         OPCODE_getstatic to OPCODE_getfield.
17699
17700         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
17701         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
17702         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
17703
17704 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17705
17706         * jcf-parse.c (jcf_parse_source): Function returned type is
17707         void. Added prototype.
17708         (jcf_parse): Function returned type is void.
17709         (yyparse): Remove call to fclose on the last parsed file.
17710
17711         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
17712
17713 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17714
17715         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
17716         (layout_class): Cope with methods featuring WFL in decl names.
17717         * decl.c (unqualified_object_id_node): New global variable,
17718         initialized.
17719         (build_decl_no_layout): Removed.
17720         * expr.c (build_primtype_type_ref): Handle Double.
17721         (java_lang_expand_expr): Fixed indentations.
17722         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
17723         (flag_wall, flag_redundant, flag_not_overriding,
17724         flag_static_local_jdk1_1, unqualified_object_id_node): Global
17725         variable declarations.
17726         (build_decl_no_layout): Removed prototype.
17727         (java_get_real_method_name): Added prototype.
17728         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
17729         (java_parse_abort_on_error): Macro now just returns.
17730         * jcf-parse.c (jcf_parse_source): Check fclose returned
17731         value. Call emit_register_classes if java_report_errors returns
17732         zero.
17733         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
17734         flag_static_local_jdk1_1): New integer flags.
17735         (lang_decode_option): New flags set here.
17736         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
17737         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
17738         the flag_redundant variable.
17739         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
17740         when parsing java.lang.Object class.
17741         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
17742         NULL_TREE to build.
17743         (resolve_qualified_expression_name): Fixed indentation.
17744         (patch_array_ref): Changed prototype.
17745         (not_initialized_as_it_should_p): Prototype removed.
17746         (java_report_errors): Added function prototype.
17747         * parse.y (formal_parameter:): Changed error message for not yet
17748         supported final parameters.
17749         (class_type_list:): Set both PURPOSE and VALUE of created
17750         TREE_LIST to be class_type.
17751         (primary_no_new_array:): Handle class literals on primitive types.
17752         (parse_warning_context): Reinstalled correct force_error and
17753         do_warning flags setups.
17754         (java_report_errors): Changed prototype. Return java_error_count
17755         value.
17756         (variable_redefinition_error): Consider treating variable type as
17757         a fake pointer.
17758         (create_interface): Warn about redundant abstract modifier if
17759         flag_redundant is set. Changed error message.
17760         (lookup_field_wrapper): Save/restore globals before/after looking
17761         up field.
17762         (duplicate_declaration_error_p): Consider treating declaration
17763         type as a fake pointer.
17764         (register_fields): Extract real type from dependency node. Check
17765         for duplicate field declaration after type adjustment. Use
17766         DECL_INITIAL to store static final initialized values.
17767         (method_header): Extract real function type from dependency node.
17768         (check_abstract_method_header): Use GET_METHOD_NAME.
17769         (obtain_incomplete_type): Layout fake pointer type.
17770         (safe_layout_class): Don't try to check for methods before layout.
17771         (java_complete_class): Don't check for correct throws clause
17772         elements inheritance here.
17773         (resolve_and_layout): Broadened name parameter meaning.
17774         (reset_method_name): Use GET_METHOD_NAME.
17775         (java_get_real_method_name): New function.
17776         (java_check_regular_methods): Don't check methods in
17777         java.lang.Object.  Verify lineage of throws clause elements. Use
17778         flag_no_overriding in warning report.
17779         (check_throws_clauses): Don't check if class was from
17780         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
17781         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
17782         (declare_local_variables): Use flag_static_local_jdk1_1 to report
17783         warning on unsupported final local variables. Use build_decl
17784         instead of build_decl_no_layout. Get real local variable type from
17785         dependency node.
17786         (source_start_java_method): Get real parameter type from
17787         dependency node. Call build_decl instead of build_decl_no_layout.
17788         (java_layout_classes): Reverse tree and layout type and class as
17789         required. Mark class as loaded when done.
17790         (resolve_field_access): Fixed indentation. Restricted condition
17791         leading to static field access code generation. Set field_type
17792         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
17793         (resolve_qualified_expression_name): Initialize type_found to
17794         null. Handle static field resolved during qualification. Fixed
17795         layout on non primitive field decl types.
17796         (not_accessible_p): Fixed typo in comment.
17797         (patch_method_invocation): Resolve and layout class to search from
17798         type.
17799         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
17800         layout non primitive type, if necessary. Make method node only to
17801         report errors.
17802         (find_applicable_accessible_methods_list): Consider WFL'ed method
17803         decl names. Fixed indentation.
17804         (argument_types_convertible): Resolve and layout target type if
17805         necessary.
17806         (java_complete_tree): Fixed indentation problems. Rewrote
17807         CALL_EXPR thrown exceptions check. Re-installed further processing
17808         of the assignment in certain cases.
17809         (patch_assignment): Call maybe_build_primttype_type_ref to perform
17810         inlining on class literals.
17811         (valid_builtin_assignconv_identity_widening_p): Cope with constant
17812         0 literal.
17813         (valid_method_invocation_conversion_p): Likewise.
17814         (patch_string): Temporary disable forbidden use of `this' in
17815         explicit constructor invocations when doing string concatenation
17816         within their scope.
17817         (patch_unaryop): Added comment. Reinstalled code to disable
17818         further check on assignment operation with cast expression RHS.
17819         (patch_switch_statement): Fixed indentation.
17820         (build_try_statement): Call build_decl instead of
17821         build_decl_no_layout.
17822         (patch_synchronized_statement): Likewise.
17823         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
17824         IS_UNCHECKED_EXPRESSION_P.
17825         (check_thrown_exceptions_do): Changed leading comment. Resolve and
17826         layout argument exception type.
17827         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
17828         of IS_UNCHECKED_EXPRESSION_P.
17829
17830 1998-11-18  Anthony Green  <green@cygnus.com>
17831
17832         * jcf-parse.c (yyparse): Open class file in binary mode.
17833
17834 1998-11-15  Per Bothner  <bothner@cygnus.com>
17835
17836         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
17837
17838         * jcf-write.c (perform_relocations):  Move check out one loop.
17839
17840 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
17841
17842         * Make-lang.in: Fix reference to srcdir.
17843         * jv-scan.c: Add missing xmalloc prototype.
17844         * jvgenmain.c: Ditto.
17845
17846 1998-11-15  Per Bothner  <bothner@cygnus.com>
17847
17848         * decl.c (error_mark_node), java-tree.h:  New global.
17849         * parse.y:  Use empty_stmt_node instead of size_zero_node.
17850         (build_if_else_statement):  If missing else, use empty_stmt_node.
17851
17852         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
17853         (java_complete_expand_method):  Complain if return is missing.
17854         (java_check_regular_methods):  Comment out incorrect error check.
17855         (not_accessible_p):  Fix incorrect handling of protected methods.
17856         (patch_method_invocation):  Pass correct context to not_accessible_p.
17857         (find_applicable_accessible_methods_list):  Likewise.
17858         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
17859         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
17860         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
17861         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
17862
17863         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
17864         (push_int_const):  Remove reundant NOTE_PUSH.
17865         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
17866         (- case SWITCH_EXPR):  Fix code generation bug.
17867         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
17868         (generate_classfile):  More robust for abstract methods.
17869
17870 1998-11-15  Anthony Green  <green@cygnus.com>
17871
17872         * Makefile.in: jv-scan and jvgenmain all require libiberty.
17873         * Make-lang.in: Ditto.
17874
17875         * jv-scan.c: Remove xmalloc and xstrdup definitions.
17876         * jvgenmain: Ditto.
17877
17878 1998-11-15  Per Bothner  <bothner@cygnus.com>
17879
17880         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
17881
17882         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
17883
17884 1998-11-14  Per Bothner  <bothner@cygnus.com>
17885
17886         Allow uses of interface types to verify.  This is not really
17887         type-safe, but it matches what Sun does, and is OK as long as
17888         there are appropriate run-time checks.
17889         * verify.c (merge_types):  If merging two interface types,
17890         just set the result to java.lang.Object.
17891         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
17892
17893 1998-11-13  Tom Tromey  <tromey@cygnus.com>
17894
17895         * gjavah.c (main): Handle --output-class-directory argument.
17896         * jvspec.c (lang_specific_driver): Translate `-d' into
17897         -foutput-class-dir.
17898         * jcf.h (jcf_write_base_directory): Declare.
17899         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
17900         * lang-options.h: Mention -foutput-class-dir.
17901         * jcf-write.c (jcf_write_base_directory): New global.
17902         (make_class_file_name): Put generated .class file into `-d'
17903         directory, or into source directory if -d not given.  Function now
17904         static.
17905         (write_classfile): Free class file name.  Handle case where class
17906         file name is NULL.
17907         (DIR_SEPARATOR): New macro.
17908         Include <sys/stat.h>
17909
17910         * Makefile.in (prefix): New macro.
17911
17912 1998-11-12  Per Bothner  <bothner@cygnus.com>
17913
17914         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
17915         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
17916         here (done in patch_invoke instead).
17917         (case_identity):  Moved here from parse.y.
17918
17919         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
17920         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
17921         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
17922         so they can be efficiently scanned without recursion.
17923         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
17924         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
17925         in BLOCK iteratively, rather than recursively.
17926
17927         * parse.y (do_unary_numeric_promotion):  New function.
17928         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
17929
17930         * parse.y (patch_newarray):  Various fixes.
17931
17932         Re-do handling of switch statements (for proper block scoping).
17933         * parse.y:  Add just a single block for the enture switch block,
17934         but don't create any "case blocks".
17935         (group_of_labels):  Rmeoved unneeded non-terminal.
17936         CASE_EXPR and DEFAULT_EXPR are added to current block.
17937         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
17938         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
17939         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
17940         * parse.y (wfl_operator, print_int_node): Make non-static.
17941         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
17942         as part of recursive scan of block.
17943         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
17944         (patch_switch_statement):  Most tests move dinto java_complete_tree.
17945
17946         * parse.y:  Make various production be non-typed (void).
17947         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
17948         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
17949         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
17950
17951         * jcf-write.c (struct jcf_handler):  New type.
17952         (struct jcf_switch_state):  New type.
17953         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
17954         (alloc_handler, emit_unop, emit_reloc):  New functions.
17955         (adjust_typed_op):  Add extra parameter ("max type" offset).
17956         (emit_switch_reloc, emit_case-reloc):  New function.
17957         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
17958         (generate_bytecode_insns):  Support REAL_CST, switch statements,
17959         exception handling, method calls, object/array creation, and more.
17960
17961         * class.c:  Remove some unused variables.
17962         * constants.c (find_string_constant):  New function.
17963         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
17964         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
17965         if flag_emit_class_files.
17966
17967 1998-11-12  Tom Tromey  <tromey@cygnus.com>
17968
17969         * jcf-io.c (find_class): Added explanatory comment.
17970
17971         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
17972         trailing slash to `.zip' entries.
17973
17974         * jvspec.c (lang_specific_driver): Correctly handle case where
17975         GC_NAME not defined.
17976
17977 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17978
17979         * jvspec.c (GC_NAME): New define.
17980         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
17981         if required.
17982         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
17983
17984 1998-11-11  Per Bothner  <bothner@cygnus.com>
17985
17986         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
17987
17988 1998-11-11  Tom Tromey  <tromey@cygnus.com>
17989
17990         * jcf-dump.c (main): Correctly recognize `--'-style long options.
17991
17992 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17993
17994         * class.c (is_compiled_class): Call safe_layout_class for class
17995         compiled from source.
17996         * conver.h (convert_to_integer, convert_to_real,
17997         convert_to_pointer): Added prototypes.
17998         * decl.c (init_decl_processing): Non longer push the decls of
17999         `methodtable', `constants', `Class', `Field', `dispatchTable'
18000         `jexception' and `Method'.
18001         * expr.c (build_invokeinterface): New function.
18002         (expand_invoke): static variable CLASS_IDENT now in
18003         build_invokeinterface. Use build_invokeinterface.
18004         (expand_java_field_op): Moved code to inline
18005         java.lang.PRIMTYPE.TYPE into a function.
18006         (build_primtype_type_ref): New function.
18007         * java-tree.def (INSTANCEOF_EXPR): New tree code.
18008         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18009         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18010         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18011         (DECL_LOCAL_STATIC_VALUE): New macro.
18012         (build_invokeinterface, build_primtype_type_ref): New function
18013         prototypes.
18014         (java_parse_abort_on_error): Macro rewritten.
18015         * jcf-parse.c (current_method): Add comment to declaration.
18016         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18017         Function prototypes fixed.
18018         (jcf_parse_source): push/pop parser context. save/restore global.
18019         (parse_source_file): Fixed leading comment. Now take a
18020         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18021         classes and pop the parser context anymore.
18022         (yyparse): Push parser context, save globals, parse the source
18023         file, restore globals and pop the parser context when processing a
18024         source file.
18025         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18026         * lex.c (java_parse_doc_section): New function.
18027         (java_lex): Call java_parse_doc_section when appropriate. Build an
18028         operator around INSTANCEOF_TK.
18029         * lex.h (java_lineterminator, java_sprint_unicode,
18030         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18031         Prototypes rewritten.
18032         (java_parse_escape_sequence, java_letter_or_digit_p,
18033         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18034         java_read_unicode, java_store_unicode, java_read_char,
18035         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18036         Added function prototypes.
18037         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18038         define.
18039         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18040         New macros
18041         (struct parser_ctxt): New fields: deprecated,
18042         current_parsed_class_un, gclass_list.
18043         (fix_method_argument_names, issue_warning_error_from_context,
18044         resolve_package, lookup_package_type): New function prototypes.
18045         (resolve_expression_name): Fixed function prototype.
18046         (find_applicable_accessible_methods_list): Fixed indentation, added
18047         extra argument in prototype.
18048         (check_final_assignment, build_null_of_type, check_deprecation,
18049         check_method_redefinition, reset_method_name,
18050         java_check_regular_methods, java_check_abstract_methods,
18051         maybe_build_primttype_type_ref): New function prototype.
18052         * parse.y (conver.h): Include.
18053         (INSTANCEOF_TK): Tagged <operator>.
18054         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18055         (relational_expression:): Build binop for instanceof.
18056         (java_push_parser_context): Remember ctxp->gclass_list across
18057         contexts.
18058         (java_pop_parser_context): Simply return if no context
18059         exists. Remember gclass_list across contexts.
18060         (issue_warning_error_from_context): New function.
18061         (parse_error_context): Don't setup ctxp->elc here. Call
18062         issue_warning_error_from_context instead.
18063         (parse_warning_context): Likewise.
18064         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18065         setup. Link new class/interface to ctxp->gclass_list.
18066         (add_superinterfaces): Register interface as incomplete if not
18067         loaded.
18068         (create_class): Remember class unqualified name in
18069         ctxp->current_parsed_class_un. Check class deprecation.
18070         (register_fields): Check field deprecation. Remember static final
18071         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18072         processing INIT.
18073         (method_header): New local variable ORIG_ARG. Use unqualified
18074         current class name for check on constructor errors. Promote return
18075         type if of record type. Argument list fix moved in
18076         fix_method_argument_names, called here. Check method deprecation.
18077         (fix_method_argument_names): New function.
18078         (method_declarator): Promote record typed arguments.
18079         (safe_layout_class): Check class methods before layout.
18080         (java_complete_class): Compute field layout when patched.
18081         (do_resolve_class): Try to load class after having it renamed
18082         after the package name.
18083         (get_printable_method_name): Use DECL_CONTEXT.
18084         (reset_method_name): New function.
18085         (check_method_redefinition): Use reset_method_name.
18086         (java_check_regular_methods): New local variable
18087         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18088         names for error report. Check for compile-time error when method
18089         found has default (package) access.
18090         (java_check_abstract_methods): Now takes an interface DECL node as
18091         an argument. Also reinstall real name on unchecked
18092         overriding/hiding methods for error report.
18093         (java_check_methods): Fixed leading comment. Get classes to verify
18094         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18095         CLASS_METHOD_CHECKED_P on class verification.
18096         (lookup_java_method2): Get real method name if necessary.
18097         (find_in_imports): Don't check package class access here.
18098         (resolve_package, lookup_package_type): New functions.
18099         (java_layout_classes): Fixed leading comment. Take classes to be
18100         laid out from ctxp->gclass_list.
18101         (java_complete_expand_methods): Don't expand native and abstract
18102         methods.
18103         (java_expand_classes): New function.
18104         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18105         values of static final field of primitive types.
18106         (resolve_field_access): Handles static final field of promotive
18107         type.
18108         (resolve_qualified_expression_name): Handle STRING_CST as
18109         primaries and package name resolution. Check deprecation on found
18110         decls. Set where_found and type_found on non static field resolved
18111         during qualification. Layout non primitive field decl types.
18112         (check_deprecation): New function.
18113         (maybe_access_field): Simplified.
18114         (patch_method_invocation_stmt): Local variable CLASS_TYPE
18115         removed. Reverse method's argument when primary is a type. Don't
18116         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18117         instead. Include abstract class in the list of class searchable
18118         for constructors. Use DECL_CONTEXT of found method for access
18119         checks. Check method deprecation.
18120         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18121         converting arguments. Handle INVOKE_INTERFACE.
18122         (lookup_method_invoke): Search constructor using existing
18123         infrastructure (don't rely on lookup_java_constructor anymore).
18124         (find_applicable_accessible_methods_list): Extra argument flag
18125         LC. Now include constructor in the search.
18126         (qualify_ambiguous_name): Conditional expression are primaries.
18127         (not_initialized_as_it_should_p): static final are always
18128         initialized.
18129         (java_complete_tree): Pass extra NULL argument to
18130         resolve_expression_name. Stricter test to carry on patching
18131         assignments. New case for INSTANCEOF_EXPR.
18132         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18133         (check_final_assignment, maybe_build_primttype_type_ref): New
18134         functions.
18135         (patch_assignment): Detect resolved static finals and carry normal
18136         assignment error check on them. Inline PRIMTYPE.TYPE read access.
18137         (try_builtin_assignconv): Access constant 0 on all primitive
18138         types.
18139         (valid_builtin_assignconv_identity_widening_p): Accept identical
18140         types. Accept all promoted type on int type.
18141         (valid_ref_assignconv_cast_p): Accept a null pointer to be
18142         assigned to a reference.
18143         (valid_method_invocation_conversion_p): Accept to check null
18144         pointers.
18145         (build_binop): Merge declaration and initialization of local
18146         variable BINOP.
18147         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18148         numeric types. Improved validity test for qualify operators on
18149         references.
18150         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18151         and PREINCREMENT_EXPR. Also detect resolved static finals of a
18152         primitive type and issue the appropriate error message.
18153         (resolve_type_during_patch): Mark class loaded when resolved.
18154         (patch_cast): Allow null to be cased to reference types.
18155         (build_null_of_type): New function.
18156         (patch_array_ref): Handle array on references correctly.
18157         (patch_return): Removed unused local variable MODIFY. Force
18158         boolean to be returned as integers. Allows null to be returned by
18159         a function returning a reference.
18160         * typeck.c (convert_to_integer, convert_to_real,
18161         convert_to_pointer): Prototypes moved to convert.h
18162         (lookup_argument_method): Use method real name, if necessary.
18163
18164 1998-10-30  Tom Tromey  <tromey@cygnus.com>
18165
18166         * class.c (build_class_ref): Changed name of primitive classes to
18167         start with `_Jv_'.
18168
18169         * class.c (make_class_data): Renamed fields: nmethods to
18170         method_count, method_count to dtable_method_count.  Always set
18171         `state' field to 0.
18172         * decl.c (init_decl_processing): Likewise.
18173
18174 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18175
18176         * class.c (layout_class): Don't mangle <finit>, produce
18177         __finit<class> instead. Don't verify artificial methods.
18178         * decl.c (finit_identifier_node): New declared global.
18179         (init_decl_processing): finit_identifier_node initialized.
18180         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18181         * java-tree.h (finit_identifier_node): Declared as extern.
18182         (struct lang_decl): New field called_constructor.
18183         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18184         (CLASS_HAS_FINIT_P): New macro.
18185         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18186         explicit constructor invocation.
18187         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18188         CALL_SUPER_CONSTRUCTOR_P): New macros.
18189         (write_classfile): Added prototype.
18190         * jcf-parse.c (jcf_parse_source): Parse and remember for
18191         generation if the file was seen on the command line.
18192         (parse_source_file): Don't write the class file here.
18193         (yyparse): Loop on files rewritten. Set current_jcf.
18194         (parse_zip_file_entries): Parse class file only if it was found.
18195         * lang.c (init_parse): Don't open command line provided filename
18196         here.
18197         (lang_parse): Don't set main_jcf anymore.
18198         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18199         (JCONSTRUCTOR_CHECK): New macro.
18200         (JBSC_TYPE_P): New macro.
18201         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18202         (COMPLETE_CHECK_OP_2): New macro.
18203         (struct parse_ctxt): New field explicit_constructor_p.
18204         (check_class_interface_creation): Fixed prototype indentation.
18205         (patch_method_invocation_stmt): Prototype reflects added argument.
18206         (patch_invoke): Likewise.
18207         (complete_method_declaration, build_super_invocation,
18208         verify_constructor_circularity,
18209         build_this_super_qualified_invocation, get_printable_method_name,
18210         patch_conditional_expr, maybe_generate_finit, fix_constructors,
18211         verify_constructor_super, create_artificial_method,
18212         start_artificial_method_body, end_artificial_method_body,
18213         generate_field_initialization_code): New function prototypes.
18214         * parse.y: Fixed leading comment
18215         (constructor_header:, constructor_body:, block_end:): Rules tagged
18216         <node>.
18217         (type_declaration:): Call maybe_generate_finit.
18218         (method_declaration:): Action for method_body: placed in new
18219         function complete_method_declaration, called here.
18220         (constructor_declaration:): Defined actions. Removed leading
18221         FIXME.
18222         (constructor_header:): New rule with action.
18223         (constructor_body:): Rule rewritten using block_begin: and
18224         block_end:. Defined actions.
18225         (constructor_declarator:, explicit_constructor_invocation:):
18226         Defined actions.
18227         (block:): Use new rules block_begin: block_end:.
18228         (block_begin:, block_end:): New rules and actions.
18229         (block_statements:): Fixed error message for explicit
18230         constructors.
18231         (method_invocation:): Call build_this_super_qualified_invocation
18232         if primary is `this' or `super' was seen.
18233         (conditional_expression:): Action defined.
18234         (extra_ctxp_pushed_p): New static global flag.
18235         (java_parser_context_save_global): Create parser context if
18236         necessary. Use extra_ctxp_pushed_p to remember it.
18237         (java_parser_context_restore_global): Pop extra parser context if
18238         one exists.
18239         (build_array_from_name): Array on primitive types are marked
18240         loaded.
18241         (register_fields): Restore new name in field initializer
18242         expression if type was altered. Non static fields initialized upon
18243         declaration marked initialized.
18244         (maybe_generate_finit): New function.
18245         (maybe_generate_clinit): Use create_artificial_method,
18246         start_artificial_method_body, end_artificial_method_body. Generate
18247         debug info for enclosed initialization statements.
18248         (method_header): Fixed leading comment. Check constructor
18249         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18250         accordingly.
18251         (complete_method_declaration, constructor_circularity_msg,
18252         verify_constructor_circularity): New functions.
18253         (get_printable_method_name): New function.
18254         (check_method_redefinition): Don't rename <finit> methods. Fix
18255         declared constructor names. Error message for
18256         constructors modified.
18257         (java_check_regular_methods): Local variable seen_constructor
18258         renamed saw_constructor. Skip verification on constructors. Create
18259         default constructor with create_artificial_method.
18260         (java_check_methods): Removed unnecessary empty line.
18261         (create_artificial_method, start_artificial_method_body,
18262         end_artificial_method_body): New functions.
18263         (java_layout_classes): Changed leading comment. Reverse fields
18264         list if necessary. Always layout java.lang.Object if being
18265         defined.
18266         (java_complete_expand_methods): Verify constructor circularity.
18267         (java_complete_expand_method): Call fix_constructor on
18268         constructors.  Local variable no_ac_found removed. Restore
18269         bindings if method body expansion failed.
18270         (fix_constructors, verify_constructor_super,
18271         generate_field_initialization_code): New function.
18272         (java_expand_classes): Fixed leading comment. Write class file
18273         here.
18274         (resolve_expression_name): Check for illegal instance variable
18275         usage within the argument scope of an explicit constructor
18276         invocation.
18277         (resolve_qualified_expression_name): Pass extra from_super flag
18278         when invoking patch_method_invocation_stmt. New case for
18279         conditional expression when used as a primary. Check for error
18280         when acquiring super.
18281         (patch_method_invocation_stmt): Added extra argument super. New
18282         local variable is_static_flag. Set class_to_search according to
18283         the nature of the constructor invocation. Don't add `this'
18284         argument when expanding NEW_CLASS_EXPR. Check for illegal method
18285         invocation within the argument scope of explicit constructor
18286         invocation. Set is_static according to is_static_flag. Provide
18287         extra `super' argument to patch_invoke invocation.
18288         (patch_invoke): New argument from_super. Loop on arguments
18289         indentation fixed. Pass from_super to invocation_mode. New switch
18290         case INVOKE_SUPER. Fixed error message in switch default case.
18291         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18292         value.
18293         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18294         (lookup_method_invoke): Fixed prototypes in candidates list. Error
18295         message takes constructors into account.
18296         (find_applicable_accessible_methods_list): Fixed indentation.
18297         (qualify_ambiguous_name): Take explicit constructor invocation
18298         into account. Deal with a conditional expression as a primary to
18299         a method call.
18300         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18301         case. Added extra argument to patch_method_invocation_stmt.
18302         Register calls made to explicit constructor `this'. Don't call
18303         save_expr in ARRAY_REF case when emitting class files. Check for
18304         illegal use of this when expanding explicit constructor invocation
18305         arguments.
18306         (complete_function_arguments): Set and reset parser context
18307         explicit_constructor_p field value when appropriate.
18308         (build_super_invocation, build_this_super_qualified_invocation):
18309         New functions.
18310         (patch_assignment): Fixed typo.
18311         (patch_unaryop): Check on final fields occurs only when a decl
18312         exits.
18313         (patch_return): Take constructors into account.
18314         (patch_conditional_expr): New function.
18315         * typeck.c (build_java_signature): Removed unnecessary empty line.
18316
18317 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18318
18319         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18320
18321 1998-10-28  Tom Tromey  <tromey@cygnus.com>
18322
18323         * decl.c (init_decl_processing): Renamed fields.
18324         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18325         interface_len, msize fields.
18326
18327         * class.c (make_class_data): Removed subclass_head and
18328         subclass_next fields.
18329         * decl.c (init_decl_processing): Removed subclass_head and
18330         subclass_next fields.
18331
18332 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18333
18334         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18335         * mangle.c (emit_unicode_mangled_name): Similarly.
18336
18337 1998-10-26  Nick Clifton  <nickc@cygnus.com>
18338
18339         * jcf-parse.c (get_constant): Place braces around code to compute
18340         'd' when REAL_ARITHMETIC is not defined.
18341
18342 1998-10-25  H.J. Lu  (hjl@gnu.org)
18343
18344         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18345         dependency.
18346
18347 1998-10-23  Tom Tromey  <tromey@cygnus.com>
18348
18349         * lang-specs.h: `.zip' files are input to jc1.
18350
18351 1998-10-22  Per Bothner  <bothner@cygnus.com>
18352
18353         * jvspecs.c:  Add (but don't enable) support for combining multiple
18354         .class and .java input filenames to a single jc1 invocation.
18355         Add support for -C flag (copile to .class files).
18356         Translate -classpath and -CLASSPATH arguments.
18357         * lang-specs.h:  Don't set %2 spec.
18358
18359 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18360
18361         * jcf-path.c (add_entry): Don't add trailing separator if entry is
18362         a .zip file.
18363         (add_path): Don't add trailing separator to non-empty path
18364         elements.
18365
18366         * lang.c (lang_decode_option): Check for -fclasspath and
18367         -fCLASSPATH before examining other `-f' options.
18368
18369         * java-tree.h (finalize_identifier_node): Don't declare.
18370         * class.c (make_class_data): Don't push "final" field.
18371         * decl.c (init_decl_processing): Don't push "final" field.
18372         (finalize_identifier_node): Removed.
18373         (init_decl_processing): Don't set finalize_identifier_node.
18374
18375         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18376
18377 1998-10-11  Anthony Green  <green@cygnus.com>
18378
18379         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18380         (JV_SCAN_SOURCES): New macro.
18381         (JCF_DUMP_SOURCES): Likewise.
18382         (jcf-dump$(exeext)): New target.
18383         (jv-scan$(exeext)): New target.
18384
18385 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18386
18387         * Makefile.in (LEX): Removed.
18388         (LEXFLAGS): Likewise.
18389         (SET_BISON): New macro.
18390         (BISON): Removed.
18391         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
18392         spurious diffs in parse.c.
18393         ($(PARSE_SCAN_C)): Likewise.
18394         (PARSE_DIR): New macro.
18395         (PARSE_C): Use it.
18396         (PARSE_SCAN_C): Likewise.
18397         (PARSE_RELDIR): New macro.
18398
18399         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18400
18401         * jcf-io.c (find_class): Use saw_java_source to determine when to
18402         look for `.java' file.
18403         * jcf-parse.c (saw_java_source): New global.
18404         (yyparse): Set it if `.java' file seen.
18405
18406         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18407         (GCJH_SOURCES): Likewise.
18408         * Makefile.in (datadir): New macro.
18409         (libjava_zip): Likewise.
18410         (JAVA_OBJS): Added jcf-path.o.
18411         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18412         (../gcjh$(exeext)): Likewise.
18413         (jcf-path.o): New target.
18414         * java-tree.h (fix_classpath): Removed decl.
18415         * jcf-parse.c (fix_classpath): Removed.
18416         (load_class): Don't call fix_classpath.
18417         * parse.y (read_import_dir): Don't call fix_classpath.
18418         * lex.h: Don't mention classpath.
18419         * lex.c (java_init_lex): Don't initialize classpath.
18420         * jcf-io.c (classpath): Removed global.
18421         (find_class): Use jcf_path iteration functions.  Correctly search
18422         class path for .java file.
18423         (open_in_zip): New argument `is_system'.
18424         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
18425         classpath-related options.
18426         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18427         and -I.
18428         (lang_init): Call jcf_path_init.
18429         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18430         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
18431         Correctly put braces around second string in each entry.
18432         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
18433         classpath-related options.
18434         (help): Updated for new options.
18435         * jcf.h: Declare functions from jcf-path.c.  Don't mention
18436         `classpath' global.
18437         * jcf-path.c: New file.
18438
18439         * jcf-depend.c: Include jcf.h.
18440
18441         * jcf-write.c (localvar_alloc): Returns `void'.
18442         (localvar_free): Removed unused variable.
18443
18444         * lang.c (OBJECT_SUFFIX): Define if not already defined.
18445         (init_parse): Use OBJECT_SUFFIX, not ".o".
18446
18447 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18448
18449         * class.c (emit_register_classes): Renamed from
18450         emit_register_class.
18451         * java-tree.h (emit_register_classes): Prototype renamed from
18452         emit_register_class.
18453         * jcf-parse.c (yyparse): Call emit_register_classes once before
18454         returning.
18455         * parse.y (java_expand_classes): No longer register classes.
18456
18457 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18458
18459         * class.c (is_compiled_class): New local variable
18460         seen_in_zip. Identify classes found in currently compiled source
18461         file(s).
18462         * decl.c (complete_start_java_method): Fixed typo.
18463         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18464         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18465         (CLASS_P): Moved around.
18466         (java_parse_abort_on_error): Macro moved from jcf-parse.c
18467         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18468         java-tree.h
18469         (jcf_parse_source): Changed leading comment. Removed unnecessary
18470         fclose and CLASS_FROM_SOURCE_P marking.
18471         (parse_source_file): New local variables remember_for_generation
18472         and filename. Mark parsed file name identifier node. Removed block
18473         executed when parse_only was null. Set remember_for_generation.
18474         Use it as an argument to java_pop_parser_context.
18475         (yyparse): New local variables several_files, list, next node and
18476         current_file_list. Split ampersand separated file names into
18477         current_file_list. Iterate through the list and parse accordingly.
18478         * parse.h (java_pop_parser_context): New function prototype.
18479         * parse.y (ctxp_for_generation): New static global variable.
18480         (java_pop_parser_context): New argument generate. Link popped ctxp
18481         to ctxp_for_generation list accordingly.
18482         (java_complete_expand_methods): Fixed indentation.
18483         (java_expand_classes): New function.
18484
18485 1998-10-17  Per Bothner  <bothner@cygnus.com>
18486
18487         * Makefile.in:  Link with libiberty.a instead of memmove.o.
18488
18489 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18490
18491         * lex.c (setjmp.h): No longer included.
18492         * lex.h (setjmp.h): Included.
18493         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18494         (duplicate_declaration_error_p): Renamed from
18495         duplicate_declaration_error.
18496         (build_array_from_name): New function prototype.
18497         * parse.y (setjmp.h): No longer included.
18498         (variable_declarator_id): Define action.
18499         (build_array_from_name): New function.
18500         (duplicate_declaration_error_p): Renamed from
18501         duplicate_declaration_error.  Fixed leading comment.
18502         (register_fields): Main `for' loop reorganized. Uses
18503         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
18504         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
18505         build_array_from_name.
18506         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
18507         types.
18508         (read_import_dir): Don't try to skip `.' and `..'.
18509         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
18510         build_array_from_name. Main `for' loop reorganized.
18511         (resolve_qualified_expression_name): When building access to a
18512         field, use the type where the field was found, not its own type.
18513         (maybe_access_field): Use field DECL_CONTEXT if the type where the
18514         field was found is null.
18515         (qualify_ambiguous_name): Sweep through all successive array
18516         dimensions.
18517
18518 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18519
18520         * java-tree.h (pop_labeled_block, lang_printable_name,
18521         maybe_add_interface, set_super_info, get_access_flags_from_decl,
18522         interface_of_p, inherits_from_p, fix_classpath,
18523         complete_start_java_method, emit_handlers, init_outgoing_cpool,
18524         make_class_data, register_class, alloc_name_constant): New
18525         function prototypes.
18526         * lang.c (lang_decode_option): Set argc argument unused. Fixed
18527         indentation. Added cast to remove warning.
18528         (lang_printable_name): Set v argument unused.
18529         (lang_print_error): Added argument to lang_printable_name call.
18530         (java_dummy_print, print_lang_decl, print_lang_type,
18531         print_lang_identifier, lang_print_xnode): All argument marked
18532         unused.
18533         * lex.c (java_unget_unicode): Removed unnecessary argument.
18534         (java_allocate_new_line): Unused local variable is gone.
18535         (java_read_char): Added parenthesis in expressions to remove
18536         warnings.  Added final return statement.
18537         (java_read_unicode): Added parenthesis in expression to remove
18538         warning.
18539         (java_parse_end_comment): Fixed java_unget_unicode invocation.
18540         (java_parse_escape_sequence): Likewise.
18541         (java_lex): Unused local variables are gone. Fixed
18542         java_unget_unicode invocation.
18543         * lex.h (set_float_handler): Prototype added when JC1_LITE not
18544         defined.
18545         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
18546         lang_printable_name invocation in macro.
18547         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
18548         Likewise.
18549         (duplicate_declaration_error): Suppressed unused argument in
18550         prototype.
18551         (identical_subpath_p): Function declaration is gone.
18552         (patch_invoke): Suppressed unused argument in prototype.
18553         (patch_cast, build_labeled_block, check_thrown_exceptions):
18554         Likewise.
18555         * parse.y (setjmp.h): Included
18556         (toplev.h): Likewise.
18557         (field_declaration:): Suppressed unused local
18558         (label_decl:): Fixed build_labeled_block invocation.
18559         (java_pop_parser_context): Put extra parenthesis around assignment
18560         in if.
18561         (yyerror): Suppressed unused local variables.
18562         (variable_redefinition_error): Fixed lang_printable_name
18563         invocation.
18564         (create_interface): Suppressed unused local variables.
18565         (create_class): Likewise.
18566         (duplicate_declaration_error): Suppressed unused argument. Fixed
18567         lang_printable_name invocation.
18568         (register_fields): Suppressed unused local variable. Fixed
18569         duplicate_declaration_error invocation.
18570         (method_header): Suppressed unused local variable.
18571         (method_declarator, parser_check_super): Likewise.
18572         (java_complete_class): Suppressed unused local variable. Fixed
18573         fatal error message.
18574         (complete_class_report_errors): Added default: in switch.
18575         (java_check_regular_methods): Fixed lang_printable_name
18576         invocations.
18577         (check_throws_clauses): Likewise.
18578         (java_check_abstract_methods): Suppressed unused local
18579         variable. Fixed lang_printable_name invocation.
18580         (read_import_entry): Added supplemental return statement.
18581         (read_import_dir): Suppressed unused local variables.
18582         (check_pkg_class_access, declare_local_variables): Likewise.
18583         (source_start_java_method): Suppressed unused extern variable
18584         declarations
18585         (expand_start_java_method): Suppressed unused extern and local
18586         variable declarations.
18587         (java_complete_expand_methods): Likewise.
18588         (java_complete_expand_method): Suppressed unused local variables.
18589         (make_qualified_name): Likewise.
18590         (resolve_qualified_expression_name): Added default: in
18591         switch. Fixed lang_printable_name invocation.
18592         (class_instance_creation_expression): Added parenthesis around
18593         expressions.
18594         (patch_method_invocation_stmt): Fixed lang_printable_name and
18595         patch_invoke invocations.
18596         (check_for_static_method_reference): Fixed lang_printable_name
18597         invocation.
18598         (patch_invoke): Suppressed unused arguments and local variables.
18599         (lookup_method_invoke): Suppressed unused local variables.
18600         (qualify_ambiguous_name): Added default: in switch.
18601         (identical_subpath_p): Function removed.
18602         (patch_assignment): Suppressed unused local variables. Suppressed
18603         unnecessary if statement. Fixed lang_printable_name invocations.
18604         (try_builtin_assignconv): Fixed lang_printable_name invocations.
18605         (valid_ref_assignconv_cast_p): Parenthesis around
18606         expression. Suppressed unused local variables.
18607         (build_binop): Suppressed unused local variables. fixed
18608         lang_printable_name invocations.
18609         (string_constant_concatenation): Suppressed unused local
18610         variables.
18611         (patch_unaryop): Fixed lang_printable_name invocation.
18612         (patch_cast): Suppressed unnecessary argument. Fixed
18613         lang_printable_name invocation.
18614         (patch_array_ref): Fixed lang_printable_name invocation.
18615         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
18616         (build_labeled_block): Suppressed unused argument.
18617         (generate_labeled_block): Fixed build_labeled_block invocation.
18618         (build_loop_body): Suppressed unused local variables.
18619         (patch_loop_statement): Likewise.
18620         (patch_exit): Fixed lang_printable_name invocation.
18621         (patch_switch_statement): Likewise.
18622         (case_identity): First argument marked unused.
18623         (patch_try_statement): Fixed lang_printable_name invocations.
18624         (patch_synchronized_statement, patch_throw_statement): Likewise.
18625         (check_thrown_exceptions): Fixed check_thrown_exceptions and
18626         lang_printable_name invocations.
18627         (check_thrown_exceptions_do): Suppressed unused argument.
18628
18629 1998-10-14  Tom Tromey  <tromey@cygnus.com>
18630
18631         * jcf-write.c (write_classfile): Add output class file as target.
18632         * lang-options.h: Added -MD, -MMD, -M, and -MM.
18633         * jcf.h: Added declarations for dependency-tracking functions.
18634         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
18635         * lang.c (lang_decode_option): Recognize -MD and -MMD.
18636         (finish_parse): Call jcf_dependency_write.
18637         (dependency_tracking): New global.
18638         (DEPEND_SET_FILE): New define.
18639         (DEPEND_ENABLE): New define.
18640         (init_parse): Enable dependency tracking if required.
18641         Include "flags.h".
18642         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
18643         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18644         (../gcjh$(exeext)): Likewise.
18645         (jcf-depend.o): New target.
18646         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
18647         (GCJH_SOURCES): Likewise.
18648         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
18649         dep_name argument.
18650         (find_classfile): Added dep_name argument.
18651         (find_class): Compute name of dependency.
18652         (open_in_zip): Call jcf_dependency_add_file.
18653         * gjavah.c (output_file): No longer global.
18654         (usage): Don't mention "gjavah".
18655         (help): Likewise.
18656         (java_no_argument): Likewise.
18657         (version): Likewise.
18658         (main): Recognize and handle -M family of options.
18659         (print_mangled_classname): Return is void.
18660         (process_file): Handle case where output is suppressed.
18661         (HANDLE_END_FIELD): Likewise.
18662         (HANDLE_METHOD): Likewise.
18663         * jcf-depend.c: New file.
18664
18665 1998-10-13  Jeffrey A Law  (law@cygnus.com)
18666
18667         * java-tree.def: Add missing newline at EOF.
18668
18669 1998-10-13  Tom Tromey  <tromey@cygnus.com>
18670
18671         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
18672         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
18673         function.
18674         Include <config.h> and "system.h".
18675         (disassemble_method): Undefine RET to avoid clash with
18676         config/i386/i386.h.
18677
18678 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18679
18680         * decl.c (runtime_exception_type_node, error_exception_type_node):
18681         New global variables.
18682         (init_decl_processing): Initialized.
18683         * expr.c (java_lang_expand_expr): Set caught exception type to
18684         null if catch handler argument doesn't exit.
18685         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
18686         tree codes.
18687         * java-tree.h (runtime_exception_type_node,
18688         error_exception_type_node): Global variables declared.
18689         (DECL_FUNCTION_THROWS): New macro.
18690         (DECL_FUNCTION_BODY): Modified comment.
18691         (DECL_SPECIFIC_COUNT): Likewise.
18692         (struct lang_decl): New field throws_list.
18693         (IS_UNCHECKED_EXPRESSION_P): New macro.
18694         * lex.c (java_lex): Generate location information for THROW_TK.
18695         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
18696         EXCEPTIONS_P): New macros.
18697         (enum jdep_code): New value JDEP_EXCEPTION.
18698         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
18699         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
18700         PATCH_METHOD_RETURN_ERROR): New macros.
18701         (patch_method_invocation_stmt): Added new argument to prototype.
18702         (patch_synchronized_statement, patch_throw_statement,
18703         check_thrown_exceptions, check_thrown_exceptions_do,
18704         purge_unchecked_exceptions, check_throws_clauses): New function
18705         prototypes.
18706         * parse.y Fixed typo in keyword section.
18707         (throw:): Rule tagged <node>.
18708         (THROW_TK): Keyword tagged <operator>.
18709         (method_header:): Last argument to call to method_header passed
18710         from throws: rule.
18711         (throws:, class_type_list:, throw_statement:,
18712         synchronized_statement:, synchronized:): Defined actions.
18713         (method_header): New local variable current. Register exceptions
18714         from throws clause.
18715         (java_complete_tree): Complete and verify exceptions from throws
18716         clause.
18717         (complete_class_report_errors): Error message on exceptions not
18718         found
18719         (java_check_regular_methods): Fixed typo. Shortcut on private
18720         overriding methods. Changed error message on method
18721         redefinition. Check for throws clause compatibility.
18722         (check_throws_clauses): New function.
18723         (java_check_abstract_methods): Use DECL_NAME for wfl or current
18724         method. Changed error message on method redefinition.
18725         (currently_caught_type_list): New static variable.
18726         (java_complete_expand_methods): Purge unchecked exceptions from
18727         throws clause list. Call PUSH_EXCEPTIONS before walk and
18728         POP_EXCEPTIONS after.
18729         (resolve_qualified_expression_name): Pass new argument as NULL to
18730         patch_method_invocation_stmt.
18731         (patch_method_invocation_stmt): New argument ref_decl. Invoke
18732         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
18733         argument list when appropriate. Use new argument if non null to
18734         store selected method decl.
18735         (patch_invoke): Convert if necessary args of builtin types before
18736         forming CALL_EXPR. Argument list no longer reversed here.
18737         (invocation_mode): Treat final methods as static methods.
18738         (java_complete_tree): New cases for THROW_EXPR: and
18739         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
18740         function call.
18741         (complete_function_arguments): No more RECORD_TYPE
18742         conversion. Function parameter nodes no longer saved.
18743         (valid_ref_assignconv_cast_p): Avoid handling null type.
18744         (patch_binop): Fixed null constant reference handling.
18745         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
18746         BUILD_THROW macros.
18747         (patch_try_statement): Fixed comments. Record caught types in
18748         list, push the list, expand try block and pop the list.
18749         (patch_synchronized_statement, patch_throw_statement,
18750         check_thrown_exceptions, check_thrown_exceptions_do,
18751         purge_unchecked_exceptions): New functions.
18752         * typeck.c (lookup_argument_method): Allow WFL in place of method
18753         DECL_NAME during method definition check
18754
18755 1998-10-09  Tom Tromey  <tromey@cygnus.com>
18756
18757         * gjavah.c (decode_signature_piece): New function.
18758         (print_c_decl): Use it.  Added `name_override' argument.
18759         (print_method_info): Use name_override argument to print_c_decl.
18760         (seen_fields): Removed.
18761         (print_field_info): Don't update seen_fields.
18762         (struct method_name): New structure.
18763         (method_name_list): New global.
18764         (print_method_info): Add new method to list of methods.
18765         (name_is_method_p): New function.
18766         (print_field_info): If field name has same name as method, then
18767         change field name.
18768         (process_file): Parse methods before fields.
18769         (field_pass): New global.
18770         (HANDLE_END_FIELD): Take field_pass into account.
18771
18772 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18773
18774         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
18775         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
18776
18777 1998-10-03  Anthony Green  <green@cygnus.com>
18778
18779         * jvspec.c: Fix bug in jvgenmain_spec patch.
18780
18781 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18782
18783         * Makefile.in (lang.o:): Install dependency on java-tree.def.
18784         * decl.c (soft_exceptioninfo_call_node): New global variable.
18785         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
18786         takes extra integer argument. soft_exceptioninfo_call_node
18787         initialized.
18788         * except.c (java_set_exception_lang_code): New function
18789         (method_init_exceptions): Called here.
18790         (prepare_eh_table_type): New function.
18791         (expand_end_java_handler): Called here.
18792         * expr.c (build_java_throw_out_of_bounds_exception): Now features
18793         one argument. Modified generation of call to
18794         soft_badarrayindex_node to use new argument.
18795         (build_java_arrayaccess): Pass faulty index value to
18796         build_java_throw_out_of_bounds_exception.
18797         (generate_name): New function.
18798         (java_lang_expand_expr): New local variables node, current,
18799         has_finally_p. Expand TRY_EXPR node.
18800         (process_jvm_instruction): Replace top of the stack with thrown
18801         object reference when entering exception handler.
18802         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
18803         specific tree codes.
18804         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
18805         global.
18806         (DECL_SPECIFIC_COUNT): New macro.
18807         (prepare_eh_table_type, java_set_exception_lang_code,
18808         generate_name): New function declarations.
18809         (match_java_method): Declaration deleted.
18810         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
18811         macros.
18812         * lex.c (TRY_TK, CATCH_TK): Generate location information.
18813         * parse.h (redefinition_error, refine_accessible_methods_list,
18814         can_cast_to_p): Function declaration removed.
18815         (classitf_redefinition_error, variable_redefinition_error,
18816         parse_jdk1_1_error, find_applicable_accessible_methods_list,
18817         find_most_specific_methods_list, argument_types_convertible,
18818         enter_a_block, valid_builtin_assignconv_identity_widening_p,
18819         valid_cast_to_p, valid_method_invocation_conversion_p,
18820         try_reference_assignconv, add_stmt_to_compound,
18821         build_jump_to_finally, build_tree_list, patch_try_statement,
18822         java_get_catch_block): New function declarations.
18823         * parse.y (string_buffer_type): Global variable deleted.
18824         (group_of_labels, catches, catch_clause, catch_clause_parameter,
18825         finally): Rules tagged <node>.
18826         (TRY_TK, CATCH_TK): Token tagged <operator>.
18827         (class_body_declaration:, class_member_declaration:,
18828         formal_parameter:, explicit_constructor_invocation:,
18829         interface_member_declaration:, constant_declaration:,
18830         primary_no_new_array:, class_instance_creation_expression:,
18831         array_creation_expression:): Issue error on unsuported JDK1.1
18832         features.
18833         (try_statement:, catches:, finally:): Define actions.
18834         (catch_clause_parameter): New rule.
18835         (catch_clause:): Use new rule catch_clause_parameter.
18836         (parse_jdk1_1_error): New function.
18837         (redefinition_error): Renamed classitf_redefinition_error.
18838         (variable_redefinition_error): New function.
18839         (check_class_interface_creation): Call
18840         classitf_redefinition_error.
18841         (java_complete_tree): Added error message on JDEP_TYPE: case.
18842         (complete_class_report_errors): Fixed indentation.
18843         (declare_local_variables): Call variable_redefinition_error.
18844         (source_end_java_method): Call java_set_exception_lang_code and
18845         emit_handlers where appropriate.
18846         (java_method_add_stmt): Call add_stmt_to_block.
18847         (add_stmt_to_block): New function.
18848         (lookup_method_invoke): Fixed outside comment. new local variable
18849         candicates.  Call find_applicable_accessible_methods_list and
18850         find_most_specific_methods_list when searching for a
18851         method. Modified error report to list possible candidates when
18852         applicable.
18853         (find_applicable_accessible_methods_list,
18854         find_most_specific_methods_list, argument_types_convertible): New
18855         function.
18856         (refine_accessible_methods_list): Function deleted.
18857         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
18858         expr (if applicable) before calling patch_array_ref.
18859         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
18860         (enter_block): Fixed comment.
18861         (enter_a_block): New function.
18862         (patch_assignment): Reorganized. Call try_reference_assignconv for
18863         references. Call valid_cast_to_p instead of can_cast_to_p.
18864         (try_reference_assignconv,
18865         valid_builtin_assignconv_identity_widening_p): New functions.
18866         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
18867         (valid_cast_to_p, valid_method_invocation_conversion_p): New
18868         functions.
18869         (build_string_concatenation): Don't resolve StringBuffer.
18870         (patch_cast): Fixed inverted arguments.
18871         (patch_array_ref): Code to save array expr deleted. Call
18872         valid_cast_to_p instead of can_cast_to_p.
18873         (generate_labeled_block): Call generate_name.
18874         (build_jump_to_finally, build_try_statement, java_get_catch_block,
18875         patch_try_statement): New functions.
18876         * typeck.c (match_java_method): Function deleted.
18877
18878 1998-10-02  Anthony Green  <green@cygnus.com>
18879
18880         * jvspec.c: jvgenmain_spec uses different temporary file names.
18881
18882 1998-10-02  Anthony Green  <green@cygnus.com>
18883
18884         * jvspec.c (lang_specific_driver): Fail if user specifies
18885         --main= when not linking.
18886
18887 1998-09-28  Tom Tromey  <tromey@cygnus.com>
18888
18889         * class.c (make_class_data): Push value for `thread' field.
18890         * decl.c (init_decl_processing): Added `thread' field to class.
18891
18892         * class.c (add_field): Always make static fields externally
18893         visible.
18894
18895 1998-09-26  Anthony Green  <green@cygnus.com>
18896
18897         * expr.c (build_java_athrow,
18898         build_java_throw_out_of_bounds_exception, expand_invoke,
18899         build_newarray, expand_java_multianewarray, build_java_monitor):
18900         Update comments to reflect _Jv_* function names.
18901
18902 1998-09-25  Per Bothner  <bothner@cygnus.com>
18903
18904         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
18905         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
18906         * parse.y (expand_start_java_method):  Likewise.
18907
18908 1998-09-24  Per Bothner  <bothner@cygnus.com>
18909
18910         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
18911
18912         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
18913         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
18914         * expr.c:  Remove no-longer-needed calls to promote_type.
18915         * decl.c (give_name_to_locals):  Liekwise.
18916         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
18917         * parse.y:  Add/remove promote_type calls as appropriate.
18918         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
18919         (parse_signature_string):  Likewise.
18920         (build_java_array_type):  Fix for now signature convenions.
18921
18922         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
18923
18924 1998-09-23  Tom Tromey  <tromey@cygnus.com>
18925
18926         * class.c (init_class_processing): libjava function renamed to
18927         _Jv_RegisterClass.
18928
18929 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18930
18931         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
18932         * java-tree.def: Fixed DEFTREECODE third argument.
18933         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
18934         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
18935         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
18936         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
18937         JAVA_THIS_EXPR): Now replaced by tree code definitions.
18938         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
18939         * lang.c (java_tree_code_type, java_tree_code_length,
18940         java_tree_code_name): New arrays.
18941         (lang_init): Append Java tree node definitions to Gcc ones.
18942         * lex.c (expression_obstack): Declared as extern when JC1_LITE
18943         defined.
18944         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
18945         wfl_to_string.
18946         (java_lex): Allow declaration of empty string constants. Retain
18947         location information on CASE_TK and DEFAULT_TK.
18948         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
18949         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
18950         Modified to be more robust.
18951         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
18952         (build_new_invocation, try_builtin_assignconv,
18953         patch_switch_statement, string_constant_concatenation,
18954         build_string_concatenation, patch_string_cst, patch_string,
18955         java_expand_switch): New function declarations.
18956         * parse.y: Rules related to switch and EH tagged <node>.
18957         (label_id): Set to NULL_TREE
18958         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
18959         tree nodes.
18960         (this_or_super:): Fixed indentation.
18961         (statement:, statement_nsi:, statement_without_trailing_substatement:,
18962         statement_expression:): Removed call to RULE on all sub-rules.
18963         (switch_expression:, switch_labels:): New rules.
18964         (switch_statement:, switch_block:, switch_block_statement_groups:,
18965         switch_block_statement_group:, switch_labels:, switch_label:):
18966         Defined actions.
18967         (throw_statement:, synchronized_statement:, try_statement:):
18968         Defined temporary actions.
18969         (class_instance_creation_expression:): Call
18970         build_new_invocation. Fixed indentation.
18971         (field_access): Fixed indentation.
18972         (method_invocation): Likewise.
18973         (make_qualified_primary): Use THIS_EXPR.
18974         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
18975         resolving from SUPER, set *type_found.
18976         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
18977         (java_complete_tree): Removed unused local variable `location'. Case
18978         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
18979         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
18980         on MODIFY_EXPR: and all binary operator tree code cases. Removed
18981         STRING_CST: case. default: checks for patchable strings.
18982         (complete_function_arguments): Transform string constant or
18983         crafted StringBuffer if necessary.
18984         (build_method_invocation): Fixed comments.
18985         (build_new_invocation): New function.
18986         (patch_assignment): Call try_builtin_assignconv to figure a valid
18987         assignment conversion between builtin types.
18988         (try_builtin_assignconv): New function.
18989         (build_binop): Use URSHIFT_EXPR directly to call build.
18990         (operator_string): Use UNARY_PLUS_EXPR.
18991         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
18992         operator.
18993         (do_merge_string_cste, merge_string_cste,
18994         string_constant_concatenation, build_string_concatenation,
18995         patch_string, patch_string_cst): New function.
18996         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
18997         (patch_unaryop): Likewise. New test of valid ++/-- operands.
18998         (build_newarray_node): Use NEW_ARRAY_EXPR.
18999         (build_this): Use THIS_EXPR.
19000         (build_return): Enable debug information on return statement.
19001         (build_if_else_statement): Likewise.
19002         (complete_labeled_statement): Fixed related comment.
19003         (build_loop_body): Fixed comment.
19004         (build_bc_statement): Enable debug information on break/continue
19005         statements.
19006         (patch_bc_statement): Fixed typos. Handle SWITCH statement
19007         context.
19008         (patch_switch_statement, case_identity, java_expand_switch): New
19009         functions.
19010
19011 1998-09-21  Per Bothner  <bothner@cygnus.com>
19012
19013         * buffer.h (BUFFER_INIT):  New macro.
19014         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19015         Pass (struct jcf_partial *state) to most functions.
19016         (jcf_block, jcf_relocation):  New types.
19017         Support labels, branches, conditionals, loops.
19018
19019 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19020
19021         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19022
19023 1998-09-21  Per Bothner  <bothner@cygnus.com>
19024
19025         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19026         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19027         not integer_type_node (INT_TYPE_SIZ bits).
19028
19029         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19030
19031         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19032         * jcf-dump.c (print_exception_table):  New function.
19033         (disassemble_method):  Better handling of wide instructions.
19034         Make more robust for bad input.
19035
19036 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19037
19038         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19039         FreeBSD.
19040
19041 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19042
19043         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19044
19045 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19046
19047         * Makefile.in ($(PARSE_H)): Removed target.
19048
19049 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19050
19051         * Makefile.in (JAVA_OBJS): Add memmove.o
19052         (memmove.o): New target & rules.
19053
19054 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19055
19056         * expr.c (expand_invoke): Don't generate a call to the class init
19057         code.
19058
19059 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19060
19061         * Makefile.in: Add many missing dependencies.
19062         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19063         as appropriate.
19064         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19065         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19066
19067 1998-09-11  Per Bothner  <bothner@cygnus.com>
19068
19069         * decl.c (complete_start_java_method):  If method is static (and
19070         not private) call _Jv_InitClass.
19071         * expr.c (expand_invoke):  Don't call build_class_init.
19072
19073         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19074
19075 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19076
19077         * Make-lang.in (GCJ): Define before using.
19078
19079 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19080
19081         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19082         losing due to namespace pollution in GNU getopt.h
19083
19084 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19085
19086         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19087         (java.all.cross): Likewise.
19088         (java.rest.encap): Likewise.
19089
19090 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19091
19092         * gjavah.c (print_class_decls): Fix thinko in arglist
19093         * jcv-io.c (find_classfile): Similarly.
19094
19095 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19096
19097         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19098
19099 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19100
19101         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19102         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19103         * Makefile.in (PARSE_C): New macro.
19104         (PARSE_H): Likewise.
19105         (PARSE_SCAN_C): Likewise.
19106         ($(PARSE_C)): Target renamed from parse.c.
19107         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19108         (clean): Remove parse-scan.c as well.
19109         (parse.o): Depend on $(PARSE_C).
19110
19111 1998-09-05  Anthony Green  <green@cygnus.com>
19112
19113         * README, license.terms: Removed.
19114
19115         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19116         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19117         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19118         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19119         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19120         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19121         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19122         and Java trademark attribution.
19123
19124 1998-09-04  Tom Tromey  <tromey@cygnus.com>
19125
19126         * Makefile.in: Use gcjh, not gjavah.
19127         * config-lang.in (stagestuff): Use gcjh, not gjavah.
19128         * Make-lang.in: Changed gjavah to gcjh everywhere.
19129
19130 1998-09-03  Per Bothner  <bothner@cygnus.com>
19131
19132         * gjavah.c:  Support new -prepend -add -append flags.
19133         (print_method_info):  Method is not virtual if class is final.
19134
19135 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19136
19137         * jv-scan.c: Fixed copyright assignment.
19138         * keyword.gperf: Likewise.
19139         * keyword.h: Likewise.
19140         * lex.c: Fixed copyright assignment.
19141         (java_lex): Push unicode back when parsing '<'.
19142         * lex.h: Fixed copyright assignment.
19143         * parse-scan.y: Likewise.
19144         * parse.h: Fixed copyright assignment.
19145         (build_debugable_stmt, complete_for_loop): New function prototypes.
19146         * parse.y: Fixed copyright assignment.
19147         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19148         size_zero_node when completing a loop with no exit condition.
19149         (for_statement_nsi:): Define action.
19150         (for_init:, for_update:): Return size_zero_node when empty.
19151         (declare_local_variables): Call build_debugable_stmt.
19152         (build_debugable_stmt): New function.
19153         (build_loop_body): Build debugable statement around loop
19154         condition part.
19155         (complete_loop_body): Take into account the debugable statement
19156         around the EXIT_EXPR.
19157         (complete_loop_body): New function.
19158         (patch_exit_expr): Fixed condition inversion.
19159
19160 1998-09-02  Tom Tromey  <tromey@cygnus.com>
19161
19162         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19163         name of thread define.
19164         * jvspec.c (THREAD_NAME): New macro.
19165         (GCLIB): Likewise.
19166         (THREADLIB): Likewise.
19167         (lang_specific_driver): Recognize attempt to link with thread
19168         library or gc library.  Recognize -ljava on command line so it
19169         isn't linked against more than once.
19170
19171 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19172
19173         * parse-scan.y (report_main_declaration): Name of the class
19174         containing `main' can be a qualified name.
19175
19176 1998-08-31  Tom Tromey  <tromey@cygnus.com>
19177
19178         * config-lang.in: Changed gjavac to gjc everywhere.
19179         * Make-lang.in: Changed gjavac to gjc everywhere.
19180
19181 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19182
19183         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19184         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19185         and install the files.
19186         * Makefile.in (JAVA_OBJS_LITE): New variable.
19187         (compiler:): Now include jv-scan as a dependency.
19188         (../jv-scan$(exeext), parse-scan.c): New targets.
19189         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19190         * config-lang.in (compilers): Removed gcj, gjavah from the list.
19191         * jcf-parse.c (parse_source_file): Call java_layout_classes and
19192         check for errors even if parse_only.
19193         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19194         defined.
19195         (yylex): New function. Uses java_lex body.
19196         (java_lex): Removed commented out statement. Remove local variable
19197         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19198         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19199         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19200         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19201         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19202         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19203         where appropriate.
19204         (java_lex_error): Empty if JC1_LITE is defined.
19205         (java_get_line_col): Return 0 if JC1_LITE is defined.
19206         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19207         SET_MODIFIER_CTX): Moved into the section containing the macros
19208         conditionally defined by JC1_LITE.
19209         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19210         argument if JC1_LITE is defined.
19211         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19212         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19213         is defined.
19214         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19215         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19216         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19217         to different values according to JC1_LITE.
19218         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19219         declared if JC1_LITE set.
19220         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19221         defined if JC1_LITE not set.
19222         (struct parser_ctx): Reorganized and skip the jc1 front end part
19223         if JC1_LITE set.
19224         (java_layout_classes): New function definition.
19225         (java_push_parser_context, java_init_lex, yyparse, yylex,
19226         yyerror): Prototype always declared. All other static function
19227         prototypes declared only if JC1_LITE is not set.
19228         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19229         declared in parse.h.
19230         (java_layout_classes): New function.
19231         (java_complete_expand_methods): No longer layout the class here.
19232         * parse-scan.y: New file.
19233         * jv-scan.c: New file.
19234
19235 1998-08-25  Tom Tromey  <tromey@cygnus.com>
19236
19237         * gjavah.c (main): Handle -friend option.
19238         (friend_specs): New global.
19239         (generate_access): Handle friend_specs.
19240         (process_file): Likewise.
19241         (MAX_FRIENDS): New macro.
19242         (friend_count): New global.
19243         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
19244         Changed all callers.
19245
19246 1998-08-24  Per Bothner  <bothner@cygnus.com>
19247
19248         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
19249         (main):  Handle processing all the entries of a named .zip archive.
19250         * jcf-io.c (jcf_trim_old_input):  New function.
19251         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
19252
19253 1998-08-24  Per Bothner  <bothner@cygnus.com>
19254
19255         * lang.c (flag_assume_compiled):  Make default be on.
19256
19257 1998-08-21  Per Bothner  <bothner@cygnus.com>
19258
19259         * jcf-dump.c:  Add bunches of flags to control output more.
19260         (process_class):  New function;  support printing more than one class.
19261         (main): Support new --print-main and --javap flags.
19262         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
19263         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
19264
19265 1998-08-20  Per Bothner  <bothner@cygnus.com>
19266
19267         Change mangling of dispatch table to match C++ vtable (w/thunks).
19268         * class.c (build_dtable_decl), java-tree.h:  New function.
19269         (make_class_data):  Call it.
19270         * decl.c (init_decl_processing):  Likewise.
19271
19272 1998-08-19  Warren Levy  <warrenl@cygnus.com>
19273
19274         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19275         soft_anewarray; adjust args passed.
19276         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19277         match _Jv_NewObjectArray.
19278
19279 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19280
19281         * decl.c (push_labeled_block, pop_labeled_block): New functions.
19282         * expr.c (loopup_label): Call create_label_decl.
19283         (create_label_decl): New function.
19284         (java_lang_expand_expr): Call expand_start_bindings with argument
19285         set to zero.
19286         * java-tree.h Added space after PROTO in function declarations
19287         when necessary.
19288         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19289         (create_label_decl, push_labeled_block): New function
19290         declarations.
19291         * lex.c (label_id): Initialize.
19292         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19293         switch.
19294         * parse.h Added space after PROTO in function declarations when
19295         necessary.
19296         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19297         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19298         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19299         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19300         macros.
19301         (struct parser_ctxt): New fields current_loop,
19302         current_labeled_block.
19303         (build_if_else_statement, patch_if_else_statement,
19304         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19305         generate_labeled_block, complete_labeled_statement,
19306         build_bc_statement, patch_bc_statement, patch_loop_statement,
19307         build_new_loop, build_loop_body, complete_loop_body): New function
19308         declarations.
19309         * parse.y (java_warning_count): New global variable.
19310         (label_id): New static variable.
19311         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19312         (block:): Return size_zero_node when block is empty.
19313         (empty_statement:): Return size_zero_node.
19314         (statement:): Implement supplemental action when for_statement: is
19315         reduced.
19316         (label_decl:): New rule.
19317         (labeled_statement:): Rewritten using label_decl. Actions
19318         implemented.
19319         (labeled_statement_nsi:): Likewise.
19320         (if_then_statement): Actions implemented.
19321         (while_expression): New rule.
19322         (while_statement:): Rewritten using while_expression. Actions
19323         implemented.
19324         (while_statement_nsi:): Likewise.
19325         (do_statement_begin:): New rule.
19326         (do_statement:): Rewritten using do_statement_begin. Actions
19327         implemented.
19328         (for_statement:): Rewritten using for_begin. Actions implemented.
19329         (for_statement_nsi:): Likewise.
19330         (for_header:, for_begin:): New rules.
19331         (for_init:): Actions implemented.
19332         (statement_expression_list:, break_statement:,
19333         continue_statement:): Likewise.
19334         (yyerror): Count number of issued warning(s).
19335         (java_report_errors): Report error(s) and/or warning(s).
19336         (java_complete_class): Use build_java_argument_signature to
19337         recompute completed method signature.
19338         (java_check_regular_methods): New locals method_wfl and aflags.
19339         Use method_wfl instead of lookup_cl during error reports. Fixed
19340         indentation and modified some error messages. Use
19341         lang_printable_name in method instead of the DECL_NAME. New code
19342         to issue warnings on methods not overriding corresponding methods
19343         private to a different package.
19344         (java_method_add_stmt): Call add_stmt_to_compound.
19345         (add_stmt_to_compound): New function.
19346         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19347         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19348         (build_if_else_statement, patch_if_else_statement,
19349         build_labeled_block, generate_labeled_block,
19350         complete_labeled_statement, build_new_loop, build_loop_body,
19351         complete_loop_body, patch_loop_statement, build_bc_statement,
19352         patch_bc_statement, patch_exit_expr): New functions.
19353         * typeck.c (build_java_signature): Build argument signature before
19354         enclosing it in between parenthesis.
19355
19356 1998-08-17  Warren Levy  <warrenl@cygnus.com>
19357
19358         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19359         (JAVA_OBJS): Added reminder comment
19360
19361 1998-08-13  Nick Clifton  <nickc@cygnus.com>
19362
19363         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19364         be interpreted as a long long.
19365
19366 1998-08-13  Warren Levy  <warrenl@cygnus.com>
19367
19368         * decl.c (init_decl_processing): Use _Jv_InitClass, not
19369         soft_initialise_class.  Use _Jv_NewMultiArray, not
19370         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
19371         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
19372         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
19373         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19374
19375 1998-08-12  Per Bothner  <bothner@cygnus.com>
19376
19377         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19378         length_identifier_node):  New global tree node constants.
19379         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
19380         Replace uses by super_identifier_node etc.
19381         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
19382
19383         * parse.y (resolve_field_access):  Don't special-case ".length" if
19384         flag_emit_class_files.
19385         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
19386         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
19387         and ARRAY.length.
19388
19389 1998-08-11  Per Bothner  <bothner@cygnus.com>
19390
19391         * decl.c (init_decl_processing): Remove unused method_type_node fields.
19392         * class.c (make_method_value):  Remove init for removed fields.
19393
19394         * class.c (layout_class):  Use build_java_argument_signature.
19395         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
19396
19397         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
19398         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
19399         (build_java_signature):  Don't use push_java_argument_signature.
19400
19401         * typeck.c (lookup_argument_method):  New function.
19402         * parse.y (java_check_regular_methods):  Use lookup_argument_method
19403         instead of lookup_java_method2 followed by lookup_java_method.
19404
19405         * parse.y (check_method_redefinition):  Minor optimization.
19406
19407         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
19408         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19409
19410 1998-08-10  Tom Tromey  <tromey@cygnus.com>
19411
19412         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19413         c-pragma.o.
19414
19415         * gjavah.c (java_float_finite): Use K&R-style definition.
19416         (java_double_finite): Likewise.
19417         (generate_access): Now returns void.  Changed all callers.
19418         (last_access_generated): Removed.
19419         (process_file): Only make a single pass over the .class file.
19420
19421 1998-07-29  Per Bothner  <bothner@cygnus.com>
19422
19423         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
19424         for compatibility for G++ (with -fvtable-thunks).
19425         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
19426
19427         * gjavah.c (process_file):  Use public inheritance for super-class.
19428
19429 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19430
19431         * lex.c (java_init_lex): Initialize ctxp->package.
19432         * parse.h (struct parser_ctxt): package and package_len replaced
19433         by tree package, an identifier node. Field method_decl_list is
19434         gone. Fixed comments.
19435         (lookup_field_wrapper, merge_qualified_name, not_accessible,
19436         class_in_current_package): New function prototypes.
19437         * parse.y (array_type:): Set class loaded flag on primitive type
19438         arrays.
19439         (package_declaration:): Assign ctxp->package to the
19440         identifier node.
19441         (method_invocation:): Handle invocation of method qualified by
19442         `super'.
19443         (single_type_import_declaration:): Removed ambiguity check.
19444         (java_pop_parser_context): New local variable `next'. Reset and
19445         set IMPORT_CLASSFILE_NAME flags on current and previous import
19446         list.
19447         (java_accstring_lookup): Use new local macro COPY_RETURN.
19448         (lookup_field_wrapper): New function.
19449         (parser_qualified_classname): Use merge_qualified_name.
19450         (parser_check_super_interface): Broaden error message.
19451         (do_resolve_class): Check for qualified class name in the current
19452         compilation unit if appropriate.
19453         (process_imports): Check for already defined classes.
19454         (check_pkg_class_access): Got rid of call to
19455         get_access_flags_from_decl.
19456         (java_complete_expand_methods): Call safe_layout_class based on
19457         the current class size.
19458         (make_qualified_primary): Build a WFL qualification on primary if
19459         none exists.
19460         (merge_qualified_name): New function.
19461         (make_qualified_name): Use merge_qualified_name.
19462         (resolve_expression_name): Use safe_lookup_field.
19463         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19464         (resolve_qualified_expression_name): Likewise. Check on resolved
19465         element accessibility.
19466         (not_accessible_p, class_in_current_package): New functions.
19467         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19468         (patch_method_invocation_stmt): Merged common pieces. Check
19469         accessibility of invoked method.
19470         (check_for_static_method_reference): Add returned type in error
19471         message.
19472         (invocation_mode): Get rid of bogus check on PRIVATE methods.
19473         (refine_accessible_methods_list): Merged two conditions in test.
19474         (java_complete_class): Sanity check on stabilize_ref gone.
19475         * zextract.c (read_zip_archive): Cast lseek second argument to long.
19476
19477 1998-07-28  Per Bothner  <bothner@cygnus.com>
19478
19479         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
19480
19481 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19482
19483         * gjavah.c (F_NAN): Removed.
19484         (F_NAN_MASK): New macro.
19485         (F_POSITIVE_INFINITY): Removed.
19486         (F_NEGATIVE_INFINITY): Likewise.
19487         (java_float_finite): Rewrote.
19488         (D_NAN_MASK): Renamed.
19489         (java_double_finite): Rewrote.
19490         (D_POSITIVE_INFINITY): Removed.
19491         (D_NEGATIVE_INFINITY): Likewise.
19492
19493         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19494         If verbose, print underlying representation of value in hex.
19495
19496 1998-07-24  Per Bothner  <bothner@cygnus.com>
19497
19498         * buffer.h, buffer.c:  New files.
19499         * Makefile.in (JAVA_OBJS):  Add buffer.o.
19500
19501         Support locals variables and writing their debug entries to .class.
19502         * jcf-write.c:  Simplify some by user new buffer type.
19503         (vode_buffer_grow):  Removed.
19504         (struct localvar_info):  New type.
19505         (localsvars, localvartable):  New buffers.
19506         (localvar_alloc, localvar_free):  New functions.
19507         (generate_bytecode_insns):  Handle local variables.
19508         (generate_classfile):  Write LocalVariableTable attribute.
19509
19510 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19511
19512         * jcf-io.c (open_in_zip): Check the zipfile magic number.
19513         * zipfile.h (ZIPMAGIC): New macro.
19514
19515 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19516
19517         * Makefile.in (gjavah.o): Updated dependencies.
19518         (jcf-dump.o): Likewise.
19519         (all.indirect): Use ../gjavah.
19520         (../gjavah$(exeext)): Likewise.
19521         (clean): Don't remove gjavah.
19522         (clean): Remove parse.c, not java/parse.c.
19523         * Make-lang.in (java): Added gjavah.
19524         (gjavah$(exeext)): New target.
19525         (GJAVAH_SOURCES): New macro.
19526         (java.all.build): Added gjavah.
19527         (java.all.cross): Likewise.
19528         (java.rest.encap): Likewise.
19529         * config-lang.in (compilers, stagestuff): Added gjavah.
19530
19531 1998-07-23  Tom Tromey  <tromey@cygnus.com>
19532
19533         * gjavah.c (java_float_finite): New function.
19534         (java_double_finite): Likewise.
19535         (F_POSITIVE_INFINITY): New macro.
19536         (F_NEGATIVE_INFINITY): Likewise.
19537         (F_NAN): Likewise.
19538         (D_POSITIVE_INFINITY): Likewise.
19539         (D_NEGATIVE_INFINITY): Likewise.
19540         (D_NAN): Likewise.
19541         (print_field_info): Use java_float_finite and java_double_finite.
19542
19543 1998-07-23  Per Bothner  <bothner@cygnus.com>
19544
19545         * parse.y (method_header):  Name "this" implicit argument.
19546
19547 1998-07-22  Per Bothner  <bothner@cygnus.com>
19548
19549         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
19550         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
19551         (put_linenumber):  New function.
19552         (generate_bytecode_insns, generate_classfile):  Write line numbers.
19553
19554 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19555
19556         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
19557         (lookup_name, build_known_method_ref, build_class_init,
19558         build_invokevirtual, invoke_build_dtable, match_java_method,
19559         build_field_ref, pushdecl_force_head, build_java_binop,
19560         binary_numeric_promotion, build_decl_no_layout,
19561         build_java_arrayaccess, build_newarray, build_anewarray,
19562         build_java_array_length_access, build_java_arraynull_check): New
19563         extern function prototypes.
19564         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19565         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
19566         java-tree.h.
19567         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
19568         to NULL
19569         * jcf.h (jcf_out_of_synch): New extern function prototype.
19570         * parse.h: Static/global function implemented in parse.y
19571         prototyped and declarations moved at the end of the file.
19572         (DECL_P): Check that the argument isn't null.
19573         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19574         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
19575         (QUAL_DECL_TYPE): New macro.
19576         (PARAMS): Macro definition removed.
19577         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
19578         (return_statement:): Call build_return.
19579         (field_access:): Call make_qualified_primary in sub rule.
19580         (method_invocation:): Build method invocation and call
19581         make_qualified_primary when processing primaries.
19582         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
19583         get_type_from_signature.
19584         (java_check_regular_method): Extra integer 0 argument when calling
19585         lookup_java_method2.
19586         (lookup_java_interface_method2): Extra method DECL argument when
19587         calling lookup_java_interface_method2.
19588         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
19589         COMPOUND_EXPR node.
19590         (java_complete_expand_method): Layout current class iff not
19591         already done. Don't process interface's methods.
19592         (java_complete_expand_method): Use super class only if it
19593         exists. Use current class otherwise.
19594         (make_qualified_primary): New function.
19595         (resolve_expression_name): Process qualified expression or
19596         expression from primary the same way.
19597         (resolve_expression_name): Two last arguments to
19598         resolve_field_access are now NULL_TREEs.
19599         (resolve_field_access): New variable is_static. Local field must
19600         be DECLs. is_static computed on field DECLs only. Append code in
19601         where_found to the field access if necessary. Use QUAL_DECL_TYPE
19602         to initialize field_type.
19603         (resolve_qualified_expression_name): New local variable,
19604         previous_call_static and is_static. Handle primaries with function
19605         calls, casts, array references and `this'. `super' now handled as
19606         `(super_class)this'. Use is_static to clarify boolean expressions.
19607         Added code to handle case where a proper handle is required to
19608         access a field. Use QUAL_DECL_TYPE where applicable.
19609         (maybe_access_field): New function.
19610         (patch_method_invocation_stmt): New arguments primary, where,
19611         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
19612         deleted. Use `where' as a type to search from if specified. Check
19613         for static method reference where forbidden. Append primary or
19614         current_this to the argument list if not calling constructor nor
19615         static methods.
19616         (check_for_static_method_reference): New function.
19617         (patch_invoke): Layout the class on which new is done if
19618         necessary.
19619         (lookup_method_invoke): Changed format to report errors on
19620         methods.
19621         (qualify_ambiguous_name): New local variable this_found. Now
19622         handle things from primaries. Method call are considered
19623         expression names.
19624         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
19625         changed into NULLs.
19626         (not_initialized_as_it_should_p): Comply with the new DECL_P.
19627         (java_complete_tree): New case fo RETURN_EXPR. Process function
19628         call arguments in separate function.
19629         (complete_function_arguments): New function.
19630         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
19631         anymore.
19632         (patch_assignment): Take the return function slot into account as
19633         a RHS. Distinguish assignment from a return.
19634         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
19635         when checking methods in interfaces.
19636         (resolve_type_during_patch): NULL argument to unresolve_type_p
19637         instead of NULL_TREE.
19638         (patch_newarray): Fixed typo in comment.
19639         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
19640         (build_return, patch_return): New functions.
19641         * typeck.c (lookup_java_constructor): Fixed typo in comment.
19642
19643 1998-07-21  Per Bothner  <bothner@cygnus.com>
19644
19645         * constants.c (find_name_and_type_constant, find_fieldref_index,
19646         find_methodref_index):  New methods.
19647         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
19648         just return given method.  Also, rename to build_known_method_ref.
19649         (expand_invoke):  Rename call to build_invoke_non_interface.
19650         * java-tree.h, parse.h:  Update prototype.
19651         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
19652         (such as expand_expr_stmt) if flag_emit_class_files.
19653         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
19654         STACK_TARGET, IGNORE_TARGET):  New macros.
19655         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
19656         (generate_bytecode_insn):  New function to generate method's bytecode.
19657         (generate_classfile):  Node generate Code attribute for a method.
19658         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
19659         push_long_const, field_op, adjust_typed_op, maybe_wide):
19660         New functions used by generate_bytecode_insn.
19661
19662         * typeck.c (signature_include_return):  Remove variable.
19663         (push_java_argument_signature, build_java_argument_signature):  New.
19664         (build_java_signature):  Use push_java_argument_signature.
19665         * parse.y:  Use build_java_argument_signature instead of fiddling
19666         with signature_include_return.
19667
19668 1998-07-17  Tom Tromey  <tromey@cygnus.com>
19669
19670         * gjavah.c (print_c_decl): Always generate JArray<>* for array
19671         types.
19672
19673         * Makefile.in (all.indirect): Added gjavah$(exeext).
19674         (gjavah$(exeext)): Added $(exeext).
19675         (clean): Likewise.
19676
19677 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19678
19679         * class.c (layout_class): Call to java_layout_parsed_class replace
19680         by safe_layout_class.
19681         * expr.c (build_java_array_length_access): Removed static storage
19682         class in the function definition.
19683         (build_java_arraynull_check): Likewise.
19684         Also fixed typos in two comments.
19685         * lex.c (java_init_lex): Initialize static global kw_length.
19686         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
19687         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
19688         java_lex_error.
19689         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
19690         * parse.h (resolve_no_layout): New static function declaration.
19691         (get_identifier_in_static): Declaration removed.
19692         (java_layout_parsed_class): Function name declaration changed to
19693         safe_layout_class.
19694         (build_newarray_node, patch_newarray, resolve_type_during_patch,
19695         not_initialized_as_it_should_p, build_this): New static function
19696         declarations.
19697         (pushdecl_force_head, build_java_binop, int_fits_type_p,
19698         binary_numeric_promotion, stabilize_reference,
19699         build_decl_no_layout, build_java_arrayaccess): Extern function
19700         declarations moved into their own section.
19701         (build_newarray, build_anewarray, build_java_array_length_access,
19702         build_java_arraynull_check): New extern function declarations.
19703         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
19704         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
19705         fake tree codes.
19706         (CALL_CONSTRUCTOR_P): New macro.
19707         * parse.y (kw_length): New static global tree node.
19708         (return_statement): Tagged <node>.
19709         (RETURN_TK): Tagged <operator>.
19710         (variable_declarator_id:): Build variable declaration with an
19711         empty initialization value if a syntax error was found in the
19712         initialization part of the variable declaration.
19713         (statement_without_trailing_substatement:): return_statement: now
19714         uses the default rule.
19715         (return_statement:): Temporarily fixed to return NULL_TREE.
19716         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
19717         (class_instance_creation_expression:): Class creation rules now
19718         call build_method_invocation upon reduction.
19719         (array_creation_expression:): Rules call build_newarray_node upon
19720         reduction.
19721         (dim_exprs:): Build a list of dimension expressions.
19722         (dim_expr:): Store location of the OSB_TK in the dimension
19723         expression node.
19724         (method_invocation:): Added a new error rule.
19725         (build_unresolved_array_type): WFL argument may also be an array
19726         on a primitive type. Name of the argument changed to reflect this.
19727         (method_declarator): Insert argument type at the beginning of the
19728         argument type list and later reverse the list.
19729         (unresolved_type_p): Argument 'returned' may be optionally
19730         NULL_TREE.
19731         (java_layout_class_from_source): Function renamed
19732         safe_layout_class.
19733         (resolve_and_layout): Now call resolve_no_layout and
19734         safe_layout_class.
19735         (resolve_no_layout): New function.
19736         (purify_type_name): New function.
19737         (complete_class_report_errors): Call purify_type_name during error
19738         report on a type not found.
19739         (process_imports): error_found local variable doesn't need to be
19740         initialized to zero.
19741         (declare_local_variables): New local type_wfl. Fixed typo in error
19742         message. type_wfl assigned to unresolved type and used to register
19743         incomplete type. Build a WFL around the variable initialization
19744         statement so that debug info can be generated on it.
19745         (source_start_java_method): Reverse argument list after they've
19746         been processed.
19747         (current_this): New static global variable.
19748         (java_complete_expand_methods): Set current_this when appropriate.
19749         (resolve_expression_name): Build correct static and non static
19750         field access bearing a simple name.
19751         (resolve_field_access): Resolve the length field of arrays. Handle
19752         f.m() cases.
19753         (patch_method_invocation_stmt): Set the type of the method
19754         invocation to error_mark_node. This value is later overridden by a
19755         valid type, if any. Don't handle qualified constructor invocation
19756         as qualified method invocation. Call lookup_method_invoke with its
19757         new flag. It's no longer necessary to access the selected method
19758         as the value of a tree list. Handle constructor invocation.
19759         (patch_invoke): Reverse argument list when invoking non interface
19760         methods. Insert call to new as the first argument of the
19761         constructor.
19762         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
19763         defined within a final class. Return INVOKE_STATIC if the invoked
19764         method is a constructor.
19765         (lookup_method_invoke): New lc argument is a flag to indicate a
19766         constructor lookup. Now handle constructor lookup. Choose the most
19767         specific method in case several were matching the invocation
19768         requirements. Return a method decl instead of a tree list featuring
19769         one single method decl element.
19770         (refine_accessible_methods_list): New lc flag argument to
19771         indicate that a constructor is being looked up.
19772         (not_initialized_as_it_should_p): New function.
19773         (java_complete_tree): Now process fake tree codes
19774         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
19775         save_expr on resolved function call arguments. Case on
19776         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
19777         (patch_assignment): LHS can be a field access expression. When
19778         dealing with reference, lhs_type is the promoted type of the
19779         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
19780         applicable.
19781         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19782         (patch_binop): Use not_initialized_as_it_should_p where
19783         applicable.
19784         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
19785         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
19786         where applicable.
19787         (resolve_type_during_patch): New function.
19788         (patch_cast): Call resolve_type_during_patch to resolve type and
19789         report error accordingly.
19790         (patch_array_ref): Use not_initialized_as_it_should_p where
19791         applicable. Array base expression is saved before being
19792         used. Promote the type of an array elements if it contains non
19793         builtin types.
19794         (build_newarray_node, patch_newarray, build_this): New functions.
19795
19796 1998-07-16  Tom Tromey  <tromey@cygnus.com>
19797
19798         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
19799         increment it in `for' statement.
19800         (print_field_info): If number is inf or nan, don't print it.
19801         (print_method_info): If method name is `delete', just ignore it.
19802         (print_c_decl): Special-case jstringArray.
19803
19804         * gjavah.c (help): New function.
19805         (no_argument): New function.
19806         (usage): Changed text.
19807         (main): Rewrote argument handling.  Now handles -v, --help,
19808         --version.
19809         (version): New function.
19810         (found_error): New global.
19811         (main): Return found_error.
19812         (generate_access): Set found_error.
19813         (print_c_decl): Likewise.
19814
19815 1998-07-15  Tom Tromey  <tromey@cygnus.com>
19816
19817         * gjavah.c (print_c_decl): Don't print "," when examining field.
19818         Skip type name when looking at "[L" types.
19819         (process_file): Now static.
19820         (generate_access): Now returns int.
19821         (last_access_generated): New global.
19822         (process_file): Clear last_access_generated; make multiple passes
19823         over the class.
19824         (print_field_info): Just return if generate_access returns true.
19825         (print_method_info): Likewise.  Also, allow <init> functions to
19826         pass through.
19827         (print_c_decl): Added is_init argument.  Print constructors
19828         properly.
19829         (print_cxx_classname): Use UTF8_GET to extract characters from
19830         string.
19831         (print_base_classname): New function.
19832         (print_class_decls): New function.
19833         (process_file): Use it.
19834         (utf8_cmp): New function.
19835
19836 1998-07-13  Nick Clifton  <nickc@cygnus.com>
19837
19838         * lang-options.h: Format changed to match changes in gcc/toplev.c
19839         to implement a --help option.
19840
19841 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
19842
19843         * decl.c (init_decl_processing): Revert change to dtable_type.
19844
19845 1998-07-09  Per Bothner  <bothner@cygnus.com>
19846
19847         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
19848
19849 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
19850
19851         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
19852
19853         * lang.c (lang_init): Default flag_exceptions to 1, without
19854         checking to see if it's 2 first.
19855
19856 1998-07-08  Jeffrey A Law  (law@cygnus.com)
19857
19858         * constants.c: Include "system.h".
19859         * decl.c: Likewise.
19860         * lang.c (flag_new_exceptions): Get via extern now.
19861         (lang_init_options): New functions.  Turn on flag_new_exceptions.
19862
19863 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19864
19865         * lex.c (java_lex): Return 0 when we see an invalid character in
19866         the input.
19867
19868         * lex.c (java_read_char): Specify extra argument when calling
19869         java_lex_error.
19870         (java_read_unicode, java_parse_end_comment,
19871         java_parse_escape_sequence): Likewise,
19872         (java_lex): Specify extra argument when calling
19873         java_lex_error. Test that IDs are beginning with a legal character
19874         for IDs. Handle invalid characters with an error message and a
19875         call to java_lex_error.
19876         (java_lex_error): Adjust column position by new argument
19877         `forward'. Issue an error even if in the middle of reporting an
19878         other error.
19879
19880 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
19881
19882         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
19883         we don't explicitly put a null pointer when we're copying it.
19884
19885 1998-07-07  Tom Tromey  <tromey@cygnus.com>
19886
19887         * gjavah.c (print_cxx_classname): New function.
19888         (super_class_name): Likewise.
19889         (print_super_fields): Removed.
19890         (in_super): Removed.
19891         (print_field_info): Never generate #defines.
19892         (print_c_decl): Changed generated types to match JNI.  No longer
19893         print class name before method name.
19894         (print_method_info): Print "static" before static methods.
19895         Print "virtual" before non-final methods.
19896         (usage): Use exit(1), not exit(-1).
19897         (main): Likewise.
19898         (print_field_info): Use %.17g to print a double.
19899         (last_access): New globals.
19900         (process_file): Initialize last_access.
19901         (usage): Now static.
19902         (ACC_VISIBILITY): New define.
19903         (generate_access): New function.
19904         (print_field_info): Call it.
19905         (print_method_info): Likewise.  Also, generate information for all
19906         methods, not just native methods.  Return void.
19907         (print_c_decl): Return void.
19908         (print_field_info): Return void.
19909
19910 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19911
19912         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
19913         processing the jc1 grammar file. Prefix bison functions and
19914         variables with java_.
19915         (parse.c): Dependencies on parse.h and lex.h
19916         * expr.c (build_java_arrayaccess): Function now global.
19917         * java-tree.h: Comment reorganized to carry on previous
19918         classification effort.
19919         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
19920         RESOLVE_TYPE_NAME_P): New flags on WFLs.
19921         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
19922         java_parse (new prefix java_ generated by bison).
19923         (java_layout_parsed_class, java_register_parsed_class): Function
19924         call removed.
19925         (yyparse): Removed unnecessary call to init_outgoing_cpool.
19926         * lex.c (static tree wfl_op): Variable deleted.
19927         (java_init_lex): Initialize kw_super and kw_this. Initialize more
19928         ctxp fields to NULL_TREE.
19929         (java_lex): No longer create WFL for operators. Filename caching
19930         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
19931         created as STRING_CST and later expanded. Removed extra argument
19932         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
19933         and SUPER.
19934         (build_wfl_node): Removed code in comments.
19935         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
19936         store token and location data in the current bison token.
19937         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
19938         static/extern function declaration at the beginning of the file.
19939         (struct qualification): Data structure definition deleted.
19940         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
19941         (qualify_ambiguous_name): Function declaration modified. Function
19942         now returns nothing.
19943         (build_array_ref, patch_array_ref, make_qualified_name,
19944         resolve_qualified_expression_name, maybe_generate_clinit,
19945         resolve_field_access): New static function declarations.
19946         (build_java_arrayaccess): New extern function declaration.
19947         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
19948         (CALL_EXPR_PRIMARY): Macro deleted.
19949         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
19950         (struct parser_ctxt): Field initialized_final
19951         removed. non_static_initialized, static_initialized: New fields.
19952         * parse.y (static tree kw_super, static tree kw_this): New global
19953         static.
19954         (%union): tree wfl field of operator member replaced by int
19955         location. WFLs are non longer created for operators.
19956         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
19957         (qualified_name:): Now calls make_qualified_name to build the
19958         identifier.
19959         (type_declaration:): Consider generating <clinit> when class
19960         parsing completed.
19961         (variable_declarator:): Directly build an assignment node when the
19962         variable is initialized when declared.
19963         (this_or_super:): Build a WFL and set current location when THIS
19964         or SUPER are parsed.
19965         (expression_statement:): Wrap statement around a WFL.
19966         (primary_no_new_array:): Fixed typo. Changed value returned by
19967         THIS_TK because of its new type (temporary).
19968         (dim_exprs:): Temporary fix because of OSB_TK's new type.
19969         (field_access:): Build qualified name with SUPER.
19970         (method_invocation:): Fixed returned value because of SUPER's new
19971         type.
19972         (array_access:): Use OSB_TK location information.
19973         (post_increment_expression:, post_decrement_expression:,
19974         unary_expression:, pre_increment_expression:,
19975         pre_decrement_expression:, unary_expression_not_plus_minus:,
19976         cast_expression:, multiplicative_expression:,
19977         additive_expression:, shift_expression:, relational_expression:,
19978         equality_expression:, and_expression:, exclusive_or_expression:,
19979         inclusive_or_expression:, conditional_and_expression:,
19980         conditional_or_expression:, assignment:): Use new location/token
19981         information available on operators.
19982         (create_class): Set super_decl_type to NULL_TREE when processing
19983         java.lang.Object.
19984         (register_fields): Field initialization is now a MODIFY_EXPR
19985         node. Chain initialization code to the matching lists (according
19986         to the field declaration modifiers).
19987         (maybe_generate_clinit): New function.
19988         (method_header): Don't set method's DECL_NAME to a WFL when adding
19989         methods to java.lang.Object.
19990         (resolve_and_layout): Now can return NULL_TREE if the type
19991         resolution fails. Otherwise, return the class DECL instead of its
19992         TYPE.
19993         (check_method_redefinition): Don't patch method DECL_NAME if it
19994         belongs to java.lang.Object.
19995         (process_imports): Simply assign error_found to the value returned
19996         by check_pkg_class_access.
19997         (declare_local_variables): Don't use their init statements (if
19998         any) when parsing error were previously found. Reuse MODIFY_EXPR
19999         build during parsing as an init statement.
20000         (java_method_add_stmt): Now return the current method body.
20001         (java_layout_parsed_class, java_register_parsed_class): Functions
20002         removed.
20003         (java_complete_expand_methods): Initialize the constant pool on a
20004         per class basis. Layout the classes before expanding their method
20005         bodies. Don't try expand artificial constructor code if error were
20006         found. Make the classes data and register them if no error were
20007         found.
20008         (java_complete_expand_method): Retrieve an artificial constructor
20009         argument list before entering its body. Assign the top block to
20010         the artificial constructor function body and set types of declared
20011         blocks and compound statements to void. Walk method body if not an
20012         artificial constructor.
20013         (make_qualified_name, cut_identifier_in_qualified): New functions.
20014         (resolve_expression_name): Fixed comments. Save/restore the
20015         current class CLASS_LOADED_P flag value. Build non qualified
20016         static field access and handle qualified expression names.
20017         (resolve_field_access, resolve_qualified_expression_name): New
20018         functions.
20019         (patch_method_invocation_stmt): Use the new expression resolution
20020         scheme, calling resolve_field_access when the function call is
20021         resolved as an expression.
20022         (qualify_ambiguous_name): Function rewritten to work on qualified
20023         expression produced by make_qualified_name.
20024         (java_complete_tree): Promote type when function's argument are
20025         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20026         the assignment to discover further errors if RHS is a expression
20027         name that fails to evaluate. Declare LHS initialized even though
20028         the assignment failed. Don't use the location variable and removed
20029         extra argument in patch function calls. Now handle the ARRAY_REF
20030         case and build internal string representation when STRING_CSTs are
20031         walked.
20032         (build_method_invocation): Don't wrap function call around a WFL.
20033         (build_assignment): Likewise. Use the operator location
20034         information.
20035         (patch_assignment): Handle array access LHSs. Handle error
20036         provenance, resulting in a better error report.
20037         (build_binop): Use op_location from operator as binop location
20038         information.
20039         (build_unaryop, build_incdec, build_cast): Likewise.
20040         (patch_binop): Extract location information from the node. Fixed
20041         typo in error message.
20042         (patch_unary_op): Extract location information from the node.
20043         (build_array_ref, patch_array_ref): New functions.
20044
20045 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20046
20047         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20048         match _Jv_IsInstanceOf.
20049         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20050         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20051
20052 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20053
20054         * decl.c (init_decl_processing): Functions are now named
20055         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20056
20057 1998-06-29  Per Bothner  <bothner@cygnus.com>
20058
20059         * java-tree.h (load_class):  Add prototype.
20060         * class.c (is_compiled_class):  Add missing arg to load_class.
20061         * expr.c (expand_java_NEW):  Call load_class.
20062         * parse.y (process_import):  Removed bogus use of void return value.
20063
20064 1998-06-25  Per Bothner  <bothner@cygnus.com>
20065
20066         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20067         Function name is "_Jv_Throw" instead of "soft_athrow".
20068         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20069         Function name is "_Jv_AllocObject" instead of "soft_new".
20070         Takes an extra parameter (object size).
20071         * expr.c:  Update calls.
20072
20073 1998-06-24  Per Bothner  <bothner@cygnus.com>
20074
20075         * lex.c (java_get_line_col):  Handle end-of-file.
20076         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20077
20078 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20079
20080         * lang.c (lang_init): Make -fexceptions the default.
20081         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20082         exception handling is not turned on.
20083
20084 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20085
20086         * lang.c (flag_new_exceptions): Make this this default.
20087         * decl.c (end_java_method): Call emit_handlers.
20088         * except.c (method_init_exceptions): Set language code and version.
20089         (expand_start_java_handler): Enable exception, and call
20090         expand_eh_region_start.
20091         (expand_end_java_handler): Enable exception, and set up catch blocks.
20092         (emit_handlers): New routine to generate the saved handlers.
20093         * java-except.h (emit_handlers): Add prototype.
20094
20095 1998-06-12  Per Bothner  <bothner@cygnus.com>
20096
20097         We used to have three different representations of the constant pool:
20098         the CPool structure, the tree_constant_pool, and the constructures
20099         used to build the Class object (which may need class and string
20100         constants) in compiled code.  None were appropriate for compiling
20101         to .class files, so I did a major overhaul.
20102
20103         First, the tree_constant_pool array was removed.  Things were
20104         modified to the CPool structure in the JCF could be used.
20105         Second, a "capacity" field was added to the CPool, and functions
20106         written to search for a matching constant, adding one if not found.
20107         The code that generated the Class object was changed to use a CPool.
20108         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20109         the static Class object are now only in build_constants_constructor.
20110         Finally, I wrote code which can generate a .class file (including its
20111         constant pool) from the RECORD_TYPE of a class.  This is a big step
20112         on the way to compiling Java source into .class files.
20113
20114         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
20115         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
20116
20117         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20118         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
20119         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20120         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20121         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
20122         (lang_type):  Removed constant_pool field.
20123         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
20124         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20125         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
20126         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20127
20128         * constants.c (current_constant_pool_tags, current_constant_pool_data,
20129         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20130         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
20131         (set_constant_entry, find_constant1, find_constant2,
20132         find_class_constant, count_constant_pool_bytes, write_constant_pool,
20133         find_utf8_constant, find_class_or_string_constant):  New functions.
20134
20135         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
20136         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
20137         (give_name_to_class, get_class_constant):  Likewise.
20138         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
20139         (get_name_and_type_constant, get_ref_constant):  Removed.
20140         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
20141         * parse.y:  Don't save/restore tree_constant_pool.
20142         * verify.c (verify_jvm_instructions):  Update for new approach.
20143         * expr.c (expand_invoke, expand_java_field_op): Likewise.
20144
20145         * lang-options.h:  Added -femit-class-file, -femit-class-files.
20146         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
20147         (lang_f_options):  Added "emit-class-file(s)".
20148
20149         * expr.c (build_java_arrayaccess):  Generate more efficient array
20150         bounds checking, by using unsigned compare.
20151
20152         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
20153
20154 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20155
20156         * parse.h: New comment on the handling of unresolved type
20157         identifiers. JDEPs are now part of the jdep_code enum.
20158         (typedef struct jdep): Now use enum jdep_code or int, depending on
20159         availability. Both are narrowed down to an 8 bits bitfield.
20160         (CALL_EXPR_PRIMARY): Fixed comment.
20161
20162 1998-06-10  Tom Tromey  <tromey@cygnus.com>
20163
20164         * Make-lang.in (java): Added gjavac and jvgenmain.
20165         (java.start.encap): Depend on gjavac.
20166         (java.rest.encap): Depend on jvgenmain.
20167
20168         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20169         (JAVA_CROSS_NAME): Likewise.
20170         (java.all.build): Depend on jvgenmain and gjavac.
20171         (java.all.cross): Depend on jvgenmain and gjavac-cross.
20172         (jvgenmain$(exeext)): New target.
20173         (java.install-common): Wrote.
20174         * config-lang.in (compilers, stagestuff): Added gjavac and
20175         jvgenmain.
20176
20177 1998-06-10  Dave Brolley  <brolley@cygnus.com>
20178
20179         * lang.c (lang_decode_option): New argc/argv interface.
20180
20181 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20182
20183         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20184         * decl.c (build_decl_no_layout): New function.
20185         * expr.c (java_lang_expand_expr): Layout declarations found in
20186         blocks before they're pushed.
20187         * jcf-parse.c (load_class): Save current line when parsing class
20188         file.
20189         (parse_source_file): Register class before expanding their
20190         methods.
20191         * lang.c (put_decl_node): Produce `null' when `void *' is
20192         processed.
20193         * lex.c (static tree wfl_op): New static global, for error report
20194         on casts.
20195         (java_init_lex): wfl_operator and wfl_op initialized
20196         here. Filename caching added for wfl_op. Return wfl_op when `(' is
20197         parsed.
20198         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20199         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20200         build_unresolved_array_type): New static function definitions.
20201         (build_decl_no_layout): New extern function declared.
20202         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20203         faulty modifier exists.
20204         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20205         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20206         (UNARY_PLUS_EXPR): New fake operator.
20207         (struct parser_ctxt): New field osb_number.
20208         * parse.y (static tree wfl_operator): New static WFL for operator
20209         bound error messages.
20210         (DECR_TK, INCR_TK): Moved.
20211         (OP_TK): Tagged <operator>.
20212         (array_type:): Now call build_unresolved_array_type.
20213         (dim_expr:): Count the number of '[' seen.
20214         (post_increment_expression, post_decrement_expression,
20215         pre_increment_expression, pre_decrement_expression,
20216         unary_expression_not_plus_minus, unary_expression:): Actions are
20217         now building the corresponding unary expressions.
20218         (cast_expression:): Actions are now building cast expressions.
20219         (build_unresolved_array_type): New function.
20220         (create_interface): Reset the number of declared interfaces.
20221         (create_class): Likewise.
20222         (method_header): Methods declared within the scope of an interface
20223         are now implicitly set public and abstract.
20224         (java_complete_class): Variable's and parameter's type are patched
20225         with a promoted type.
20226         (declare_local_variables): Resolved non builtin types are promoted
20227         before being used to build a variable decl. Removed type patch
20228         posted on variable initialization statement.
20229         (source_start_java_method): Use build_decl_no_layout to build the
20230         decl of a parameter of incomplete type.
20231         (java_register_parsed_class): Process interfaces too. Call
20232         rest_of_decl_compilation on each processed class declarations.
20233         (java_complete_expand_methods): Don't attempt to expand things in
20234         interfaces.
20235         (java_complete_tree): Process CONVERT_EXPR, even though it always
20236         has a type. Propagate error_mark_node to node's type too. Promote
20237         method's call argument type and return error_mark_node if
20238         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20239         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20240         handle unary operator nodes.
20241         (build_assignment): Added comment.
20242         (print_int_node): New function.
20243         (patch_assignment): New second argument. New error handling. Use
20244         print_int_node. Handle references. Use can_cast_to_p to issue
20245         different error message according to the context and check upon
20246         the initialization of the RHS.
20247         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20248         (operator_string): Handle more operators.
20249         (patch_binop): No longer use a function static
20250         wfl_operator. Improved error message on shift distance.
20251         (build_unaryop, build_incdec, build_cast, patch_unaryop,
20252         patch_cast): New functions.
20253
20254 1998-06-05  Per Bothner  <bothner@cygnus.com>
20255
20256         * jvspec.c:  New file.
20257         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
20258
20259         * java-tree.h (identifier_subst):  Add declaration.
20260
20261 1998-06-04  Tom Tromey  <tromey@cygnus.com>
20262
20263         * jvgenmain.c (main): Generate call to JvRunMain.
20264
20265         * class.c (make_class_data): Push value for "sync_info" field.
20266         * decl.c (init_decl_processing): Push "sync_info" field.
20267
20268 1998-06-03  Per Bothner  <bothner@cygnus.com>
20269
20270         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
20271         Java (source) name, not signature.
20272         Set TYPE_ALIGN to (at least) that of element_type.
20273
20274 1998-06-02  Per Bothner  <bothner@cygnus.com>
20275
20276         * class.c:  Moved classname-mangling-rekated code to ...
20277         * mangle.c:  ... this new file.
20278         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
20279         * Makefile.in:  Update for above changes.
20280
20281 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20282
20283         * expr.c (truthvalue_conversion): Convert integer and floating
20284         point value to their truth value.
20285         * lex.c (java_lex): Handle the `null' literal.
20286         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20287         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20288         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20289         New macros.
20290
20291         * parse.y: Reorganization/documentation on token declaration.
20292         (binop_lookup[]): New added new tree codes.
20293         (relational_expression): Build corresponding binary operators.
20294         (equality_expression, conditional_and_expression,
20295         conditional_or_expression): Likewise.
20296         (java_complete_class): Fix crash in debug message.
20297         (java_complete_tree): Check initialization of method call
20298         arguments. Further bogus node evaluation to detect more error
20299         during assignments. Handles more binary operators.
20300         (patch_assignment): Use DECL_P.
20301         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20302         code.
20303         (operator_string): Handle more case. Compacted source.
20304         (patch_binop): Changed function comment. Checking for
20305         uninitialized first operand takes the compound assignment into
20306         account and uses DECL_P. Checking for uninitialized second operand
20307         delayed to routine's end. Use macros to issue type bound error
20308         messages and issue messages on both operands if their types are
20309         different. Force fixed type into node. Handle all binary
20310         operators.
20311
20312 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20313
20314         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20315         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20316         build operator node and return tokens.
20317         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20318         * parse.h (java_complete_tree): Changed returned type in prototype.
20319         (build_method_invocation, build_assignment, patch_assignment,
20320         patch_binop): New static function declarations.
20321         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20322         BUILD_EXPR_WFL): New macros.
20323         * parse.y (enum tree_code binop_lookup[]): New static for token to
20324         TREE_CODE lookup.
20325         (%union): Parser union has new sub-structure `operator'.
20326         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20327         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20328         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20329         ASSIGN_ANY_TK): Tokens tagged `operator'.
20330         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20331         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20332         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20333         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20334         (assignment_operator:): Rule tagged `operator'.
20335         (expression_statement:): Re-installed default rule.
20336         (method_invocation:): Sub rules call build_method_invocation.
20337         (postfix_expression:): Don't attempt to resolve name here. Just
20338         return an ID.
20339         (multiplicative_expression:): Sub-rules build corresponding binop
20340         expression node.
20341         (additive_expression:, shift_expression:, and_expression:,
20342         exclusive_or_expression:, inclusive_or_expression:): Likewise.
20343         (assignment:): Sub rule invoke build_assignment.
20344         (assignment_operator:): Default rules on sub rules.
20345         (force_error): Added documentation on this variable.
20346         (declare_local_variables): Build initialization calling
20347         build_assignment.
20348         (expand_start_java_method): Removed unused rtx declaration. Mark
20349         arguments as already initialized.
20350         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20351         (java_complete_expand_methods): Don't process next method if
20352         completion of the previous one triggered errors.
20353         (java_complete_expand_method): Call source_end_java_method if no
20354         error were found during completion.
20355         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20356         locals declaratilon. Handle names found within a class. Return
20357         error_mark_node when things aren't found.
20358         (patch_method_invocation_stmt): Return error_mark_node on failures.
20359         (patch_invoke): Removed unused local. Return the correct node.
20360         (java_complete_tree): Now returns a value. The BLOCK section binds
20361         local identifiers and the type of a BLOCK is now void. Assign the
20362         result of operand completion on COMPOUND_EXPR. Assign the
20363         encapsulated node of a WFL to the result of its completion, except
20364         when the node is an identifier. Now handle MODIFY_EXPR and several
20365         binary operators. Return error_mark_node on errors.
20366         (build_method_invocation, build_assignment, patch_assignment,
20367         build_binop, operator_string, patch_binop): New functions.
20368         * typeck.c (binary_numeric_promotion): New function.
20369
20370 1998-05-21  Per Bothner  <bothner@cygnus.com>
20371
20372         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
20373         Replace most uses of ident_subst by identifier_subst.
20374
20375         * class.c (push_class_static_dummy_field):  Removed function.
20376         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
20377         instead of looking got "class" static field.  Create that decl here.
20378         (class_identifier_node):  Removed;  no longer needed.
20379         (init_class_processing):  Don't init class_identifier_node.
20380         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
20381         Do nreverse 0 times (instead of twice) for Object and Class.
20382         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20383
20384 1998-05-20  Per Bothner  <bothner@cygnus.com>
20385
20386         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
20387         while initializing linenumber_count and linenumber_table.
20388         Do it before init_function_start (which calls emit_line_note).
20389         * expr.c (expand_byte_code):  Don't need to clear lineno here.
20390
20391 1998-05-18  Tom Tromey  <tromey@cygnus.com>
20392
20393         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20394         then mangle number as _N_.
20395
20396         * class.c (mangle_class_field): New function.
20397         (build_class_ref): Set assembler name of class reference using
20398         mangle_class_field.
20399         (push_class_static_dummy_field): Likewise.
20400
20401 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
20402
20403         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20404         of assigning to TREE_CODE.  The latter method exploits a feature
20405         of GCC that is not ANSI compliant.
20406
20407 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20408
20409         * decl.c (pushdecl_force_head): New function.
20410         (pushlevel): Removed conditional printf.
20411         (complete_start_java_method): Don't enter local variable scope if
20412         function is compiled from source code.
20413         * expr.c: parse.h now included
20414         (java_lang_expand_expr): New function.
20415         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20416         printf. Terminate buffer when doing directories.
20417         * jcf-parse.c (parse_source_file): Call lang_init_source before
20418         parsing and before code generation.
20419         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20420         use printf if the macro is defined.
20421         * lang.c (lang_init): Install lang_expand_expr hook on
20422         java_lang_expand_expr.
20423         (java_dummy_print): New function.
20424         (lang_init_source): New function.
20425         * lex.c (java_lex): Remember location of an opening brace at the
20426         second nesting level.
20427         (java_is_eol): Unget character seen after a CR if it is EOF.
20428         * parse.h: Now includes lex.h
20429         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20430         printf if the macro is defined.
20431         (expand_start_java_method, build_expr_block, enter_block,
20432         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20433         New static function declarations.
20434         (pushdecl_force_head): New extern function declaration.
20435         (INCOMPLETE_TYPE_P): New macro.
20436         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20437         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20438         BLOCK_EXPR_ORIGIN): New macros.
20439         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20440         DECL_SOURCE_LINE_LAST): New macros.
20441         (struct parser_ctxt): Removed field current_method_decl, redundant
20442         with the field current_function_decl. Added fields
20443         first_ccb_indent1 and pending_block.
20444         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20445         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20446         tagged <node>
20447         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20448         (compilation_unit:): Cosmetic on sub rule.
20449         (type_declaration:): Cosmetic on sub rules. Added an error rule.
20450         (variable_initializer:): Installed default rule on expression:.
20451         (method_declaration:): method_header: starts a new
20452         method. method_body: installs the function body, absorbs blocks
20453         emitted for temporary variable scopings, pops function's body block
20454         and merges function's last statement lineno in DECL_SOURCE_LINE.
20455         (method_body:): Installed default rules.
20456         (block:): Call enter_block when an opening brace is seen.  Absorb
20457         scoping blocks and call exit_block when a closing brace is seen.
20458         (block_statement:): Cosmetic changes.
20459         (method_invocation:): Create WFL around CALL_EXPR node.
20460         (patch_stage): Added comment around definition.
20461         (method_header): Try to use first_ccb_indent1 as the first line of
20462         the method, so BP debug info are emitted at the first opening
20463         brace of the function. If the function has no body, use the
20464         location of the function's name. Override currently defined method
20465         name with the matching WFL so we can point redefinition errors
20466         using the location where the function's name was declared.
20467         (check_abstract_method_header): Interprets DECL_NAME as an
20468         identifier or as a WFL, accordingly.
20469         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20470         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20471         location and name information out of it and reinstall DECL_NAME to
20472         its original identifier node value.
20473         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20474         function's source code).
20475         (read_import_dir): Test the value returned by find_class and issue
20476         a fatal accordingly.
20477         (declare_local_variables): Push a new block for the scope of the
20478         new variable(s) if code has been already generated at that nesting
20479         level. Pinpoint redefinition errors using the variable id
20480         WFLs. Generate initialization code if necessary. If the variable
20481         type is incomplete, register a patch on its decl.
20482         (source_start_java_method): Rewritten. Define a new block for the
20483         function's parameters. Build parameter decl out of function's
20484         arguments and register them for a patch if their types are
20485         incomplete.
20486         (expand_start_java_method): Includes the part of
20487         source_start_java_method that was pushing the parameter decls and
20488         completing the method start code.
20489         (source_end_java_method): Removed call the expand_end_bindings and
20490         poplevel (already taken care of). Reinstall function's arguments
20491         and get function's last line of code before calling
20492         expand_function_end.
20493         (java_method_add_stmt): New comment before the function's
20494         code. Complement the second operand of the current COMPOUND_EXPR
20495         if necessary.
20496         (java_complete_expand_methods): Don't generate debug info on line
20497         zero when expanding a generated constructor.
20498         (java_complete_expand_method): Set start and end line numbers for
20499         a artificially generated constructor to one and manually call
20500         enter_block and exit_block when defining it. For all methods:
20501         expand function's start calling the new expand_start_java_method
20502         and invoke java_complete_tree on the effective method's body, if
20503         any.
20504         (resolve_expression_name): Now use lookup_name_in_blocks to search
20505         local variable decls and print out an error when variables are
20506         undefined.
20507         (patch_method_invocation_stmt): Inserted comment before the
20508         function's code.
20509         (lookup_method_invoke): Chain method's arguments using chainon
20510         with the current arg list as a second argument. Inserted missing
20511         IDENTIFIER_POINTER when reporting an error on methods not found.
20512         (refine_accessible_methods_list): Don't retain constructors.
20513         (patch_arguments): Function removed.
20514         (java_complete_tree): Inserted comment before the function's
20515         code. New case for BLOCKs. Moved the WFL case a bit
20516         further. Complete function's arguments.
20517         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
20518         maybe_absorb_scoping_blocks): New functions.
20519
20520 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20521
20522         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
20523         previously set.
20524         * jcf-parse.c (parse_source_file, java_error_count): New forward
20525         and extern declarations.
20526         (java_parse_abort_on_error): Macro moved.
20527         (jcf_parse_source): fatal called if fopen fails. Now calls
20528         parse_source_file.
20529         (parse_source_file): New parse_only parameter. Reflects the
20530         elimination of the second pass.
20531         (yyparse): parse_source_file called with argument set to 0.
20532         * jcf.h (JCF_ZERO): Sets java_source to zero.
20533         * lex.c (java_init_lex): pass argument is gone. Function modified
20534         to be called once during the analysis of a file.
20535         (java_unget_unicode): Fixed typo in fatal message.
20536         (java_get_line_col): Likewise.
20537         (java_lval): Likewise. String literals no longer built during
20538         second pass.
20539         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
20540         account.
20541         * parse.h (MODIFIER_WFL): New macro.
20542         (parse_check_super, parser_check_super_interface): Now return int.
20543         (parser_chain_incomplete_item, not_builtin_p,
20544         complete_method_decl): Declarations removed.
20545         (build_method_invocation_stmt, build_invoke): Renamed using the
20546         `patch' instead of `build'
20547         (register-incomplete_type, obtain_incomplete_type,
20548         java_complete_tree, java_complete_expand_method,
20549         unresolved_type_p, create_jdep_list): New function declarations.
20550         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
20551         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
20552         (jdep): New typedef on new struct _jdep.
20553         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
20554         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
20555         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
20556         JDEP_RESOLVED_P): New macros.
20557         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
20558         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
20559         JDEP_VARIABLE): New enum values and jdep kinds.
20560         (jdeplist): New typedef on struct _jdeplist.
20561         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
20562         macros.
20563         (CALL_EXPR_PRIMARY): New macro.
20564         (struct parser_ctxt): Fields java_pass, current_method_decl,
20565         method_decl_list deleted. New field jdeplist.
20566         (INCOMPLETE_P): Macro deleted.
20567         * parse.y (single_type_import_declaration:): Removed pass switch.
20568         (type_import_on_demand_declaration): Likewise.
20569         (field_declaration:): Removed pass switch on all sub rules.
20570         (class_declaration:): Call the complete_class_decl removed on
20571         class_body rules.
20572         (method_declaration:): Removed second pass switch. No longer chain
20573         methods decl when method_header reduced.
20574         (method_header:): Sub rules no longer depend on pass switch.
20575         (method_declarator:): Likewise.
20576         (method_body:): Likewise.
20577         (abstract_method_declaration:): Likewise.
20578         (block_statement:): Likewise.
20579         (local_variable_declaration:): Likewise.
20580         (argument_list:): Likewise.
20581         (method_invocation:): Likewise. Call to build_method_invocation_stmt
20582         removed. Partial CLASS_EXPR tree node built instead.
20583         (postfix_expression:): Removed pass switch on all sub rules.
20584         (java_pop_parser_context): Free classd_list content.
20585         (yyerror): Call obstrack_grow0 to finalize error message.
20586         (check_class_interface_creation): Comment modified to reflect new
20587         returned value meaning. Removed second pass switch. Return 1 if an
20588         error was found, 0 otherwise. Adjust pointer on filename if a
20589         leading path separator was found.
20590         (maybe_create_class_interface_decl): Removed first pass switch
20591         when linking the class decl to the class_list. Install a new
20592         jdep_list for the class.
20593         (add_superinterfaces): List of unresolved interfaces is
20594         gone. Unresolved interfaces are directly added to the current
20595         dependencies list.
20596         (create_interface): Second pass shortcut removed.
20597         ctpx->modifier_ctx access through MODIFIER_WFL.
20598         (create_class): Second pass shortcut removed. Call to
20599         register_incomplete_type replaces the call to
20600         parser_chain_incomplete_item.
20601         (complete_class_decl): Function removed.
20602         (duplicate_declaration_error): New way of retrieving redeclared
20603         item type.
20604         (register_fields): Call to lookup_modifier_cl replaced by
20605         MODIFIER_WFL. New way of handling unresolved type, using
20606         unresolved_type_p and obtain_incomplete_type.
20607         register_incomplete_type replaces call to parser_chain_incomplete_item.
20608         (patch_stage): New static global variable.
20609         (method_header): New way of handling unresolved type, using
20610         unresolved_type_p and obtain_incomplete_type. patch_stage used to
20611         indicates that the method decl needs to be patched.
20612         (check_abstract_method_header): Call to lookup_modifier_cl
20613         replaced by MODIFIER_WFL.
20614         (method_declarator): Incomplete argument type are registered
20615         calling register_incomplete_type. Patch on the declared method is
20616         issued in that case.
20617         (unresolved_type_p): New function.
20618         (parser_check_super_interface): New comment to reflect function's
20619         modified returned type (int). Function and has a new argument
20620         this_wfl. Call to parse_error_context uses this_wfl instead of
20621         relying on lookup_cl.
20622         (parser_check_super): Comment reflects function's new returned
20623         type (int). Function returns nonzero value on error.
20624         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
20625         register_incomplete_type, jdep_resolve_class): New functions to
20626         handle incomplete types in declarations.
20627         (java_complete_class): Rewritten to work with the new incomplete
20628         type handling scheme.
20629         (complete_class_report_errors): Likewise.
20630         (complete_method_decl): Removed: it jobs is now handled by
20631         java_complete_class.
20632         (do_resolve_class): Class loaded in not already loaded and not
20633         found in Java source code.
20634         (java_check_regular_methods, java_check_abstract_methods): Don't
20635         call complete_method_decl anymore.
20636         (lookup_modifier_cl, not_builtin_p): Functions deleted.
20637         (read_import_dir): Got rid of the pass number dependency.
20638         (declare_local_variables): New handling of unresolved types (patch
20639         issued).
20640         (source_start_java_method): New parameter level. Function called
20641         with level set to 1 when argument types are potentially
20642         unresolved.  Called to complete the job with level set to 2 once
20643         types are complete.
20644         (source_end_java_method): Call to permanent_allocation
20645         removed. Waiting to be replaced by a more suitable obstack
20646         management.
20647         (java_complete_expand_methods, java_complete_expand_method,
20648         java_expand_finals): New functions.
20649         (build_method_invocation_stmt): Renamed
20650         patch_method_invocation_stmt. Extracts function call expression
20651         (wfl) and arguments (args) from CALL_EXPR tree operands.
20652         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
20653         call. Patch the function and argument operand of the CALL_EXPR
20654         tree argument.
20655         (patch_argument, java_complete_tree): New functions.
20656
20657 1998-04-20  Per Bothner  <bothner@cygnus.com>
20658
20659         Recover from missing fields and methods (i.e. error instead of fatal).
20660         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
20661         * expr.c (expand_invoke):  Recover from missing method.
20662         (expand_java_field_op):  Recover from missing field.
20663         Inline references to java.lang.{Integer,Char,...}.TYPE.
20664         * typeck.c (get_type_from_signature), java-tree.h:  New function.
20665         * class.c (add_method):  Use get_type_from_signature.
20666         (build_class_ref):  Handle a class that was not found.
20667         * typeck.c (convert):  Handle conversion to pointers (for convenience).
20668         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
20669         instead of lookup_field to handle missing fields.
20670
20671         * jcf-parse.c (process_zip_dir):  Set java_source.
20672
20673 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
20674
20675         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
20676
20677 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20678
20679         * jcf-parse.c (load_class): Don't change input_filename before
20680         calling jcf_parse_source (but still do it before calling
20681         jcf_parse).
20682         (jcf_parse_source): Assign input_filename after having saved the
20683         parser context.
20684         * lex.c (java_init_lex): Chain a WFL node to the import on demand
20685         list. ctxp->modifier_ctx zeroed according to its new
20686         definition. ctxp->filename initialized. Removed
20687         JAVA_MODIFIER_CTX_UNMARK.
20688         (java_unget_unicode): Update the character based column position.
20689         (java_allocate_new_line): ref_count not used anymore. Always free
20690         ctxp->p_line. Initialize c_line->char_col to 0.
20691         (java_get_unicode): Update the character based column position.
20692         (java_lex): Use ctxp->elc to store current position in source
20693         file, at the beginning of the parsed token. Set modifier_ctx entry
20694         corresponding to the parse modifier to a WFL node. Return a WFL
20695         node when an identifier is parsed.
20696         (java_lex_error): Now uses ctxp->elc to store current position in
20697         source.
20698         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
20699         * lex.h (build_wfl_node): New function definitions.
20700         (struct java_line): ref_count and next fields are gone. New field
20701         char_col.
20702         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
20703         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
20704         (JAVA_COLUMN_DELTA): New macro.
20705         (java_lc): New typedef on new struct _java_lc.
20706         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
20707         (parse_error_context, parse_warning_context): Changed prototypes.
20708         (java_get_line_col): Added as an available global function.
20709         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
20710         (IC_DECL): Replaced by macro IC_TYPE
20711         (DEPEND_WFL): New macro.
20712         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
20713         wrong modifier.
20714         (exit_java_complete_class): Removed a commented out statement.
20715         (struct parser_ctxt): Added comments on fields. modifier_ctx is
20716         now an array of tree nodes. Deleted fields line_list and
20717         e_line. New field elc, to replace e_line.
20718         * parse.y (array_type:): Build WFL node.
20719         (qualified_name:): Build a single WFL node out of two. Retain
20720         the location information of the first node in the resulting node.
20721         (package_declaration:): Use package name as a WFL node
20722         (single_type_import_declaration:): Use imported name as a WFL node.
20723         (type_import_on_demand_declaration:): Use root of the imported
20724         packages as a WFL node.
20725         (field_declaration:): Removed unused local variable cl.
20726         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
20727         (yyerror): New static elc. Removed static error_line, error_pos.
20728         New local code_from_source. Save ctxp->elc into elc at the first
20729         pass. Call java_get_line_col to get a string of the line where
20730         the error occurred.
20731         (debug_line): Removed static function.
20732         (parse_error_context, parse_warning_context): Parameter cl is now
20733         a WFL node. Use its value to initialize ctxp->elc.
20734         (redefinition_error): Parameter cl is now a WFL node.
20735         (parse_add_interface): New parameter wfl. No longer call
20736         lookup_cl, use wfl instead.
20737         (check_class_interface_creation): Parameter cl is now a WFL node.
20738         (maybe_create_class_interface_decl): Likewise.
20739         (add_superinterfaces): New function.
20740         (create_interface): Removed local cl, node, super_decl,
20741         super_decl_type.  Function now uses id as a WFL node. Better
20742         warning/error report on obsolete or forbidden mix of
20743         modifiers. Now calls add_superinterfaces to register interfaces.
20744         (create_class): Removed local cl, node. Local variable id is used
20745         as a WFL node. Better error report on forbidden modifier
20746         mix. Uses add_superinterfaces to register interfaces.
20747         (find_field): Argument cl is now a WFL node. Now store the WFL
20748         node of a fields that needs to be checked for their
20749         initialization.
20750         (method_header): Local variable node non longer used. Local
20751         variable id replaces cl.
20752         (check_modifiers_consistency): Local variable cl is now a WFL
20753         node.
20754         (method_declarator): Local variable cl replaced by parameter id.
20755         (parser_qualified_name): Now uses parameter name as a WFL node.
20756         (parser_check_super_interface): New parameter wfl, for achieve
20757         greater accuracy during error reports.
20758         (parser_chain_incomplete_item): New parameter named location. Used,
20759         along the decl, to construct the incomplete item node.
20760         (java_complete_class): resolve_class now uses WFL node extracted
20761         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
20762         where appropriate.
20763         (complete_method_decl): Unresolved function's argument types are WFL.
20764         (resolve_class): Parameter cl is now a WFL node.
20765         (resolve_and_layout): Likewise.
20766         (do_resolve_class): Likewise. Try first to use cl and then do the
20767         lookup on the decl when calling check_pkg_class_access.
20768         (complete_class_report_errors): Use IC_TYPE in place of
20769         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
20770         instead of doing a lookup over the decl.
20771         (java_check_final): Use WFL info from field tree list.
20772         (lookup_cl): Rewritten and returns a statically defined WFL node.
20773         (lookup_modifier_cl): Now uses information from WFL nodes.
20774         (process_imports): Likewise.
20775         (read_import_dir): name and cl arguments replaced by a single WFL
20776         node. Function modified accordingly.
20777         (find_in_imports_on_demand): Now uses WFL node.
20778         (check_pkg_class_access): cl argument is now a WFL node.
20779         (declare_local_variables): Fixed to use WFL nodes.
20780         (resolve_expression_name): Likewise.
20781         (build_method_invocation_stmt): name_combo argument renamed
20782         wfl. Function modified to use WFL nodes.
20783         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
20784         (lookup_method_invoke): cl is now a WFL node. Added missing
20785         IDENTIFIER_POINTER to class type decl name.
20786
20787 1998-04-14  Dave Brolley  <brolley@cygnus.com>
20788
20789         * lang.c (init_parse): Now returns char* containing the filename.
20790
20791 1998-04-10  Per Bothner  <bothner@cygnus.com>
20792
20793         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
20794
20795         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
20796         * class.c (make_class_data):  If flag_assume_compiled, initial class
20797         state is CSTATE_PREPARED; make superclass and interfaces direct
20798         references, rather than constant pool indexes.
20799
20800 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20801
20802         * parser.y: Include flags.h. Removed debug variable pl.
20803         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
20804         (block:): Likewise.
20805         (labeled_statement_nsi:): Generate debug info when reducing
20806         expression_statement:.
20807         (check_pkg_class_access): get_access_flags_from_decl invocation
20808         fixed for new CLASS_* flags location.
20809         (source_end_java_method): Save/restore parser context when
20810         entering/leaving this routine. Restore lineno to its right value
20811         before calling expand_end_bindings.
20812         (build_method_invocation_stmt): build_invoke called with the
20813         current line information.
20814         (build_invoke): New argument cl. Wrap the function call around a
20815         wfl node.
20816         (refine_accessible_methods_list): Changed comment, removed
20817         unnecessary code.
20818         * parse.h: Fixed typo in comments.
20819         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
20820         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
20821         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
20822         parser_ccb_indent.
20823         * lex.c (java_lex): Record the last closing curly bracket of a
20824         function.
20825         * jcf-parse.c (jcf_parse_source): Now calls
20826         java_check_methods. Clarified comment, fixed typo.
20827
20828 1998-04-09  Dave Brolley  <brolley@cygnus.com>
20829
20830         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
20831         (finish_parse): Expose for non USE_CPPLIB builds.
20832
20833 1998-04-08  Jeffrey A Law  (law@cygnus.com)
20834
20835         * lang.c (lang_print_xnode): New function.
20836
20837 1998-04-03  Per Bothner  <bothner@cygnus.com>
20838
20839         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
20840         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
20841         used to build a class's dispatch table.
20842         (make_class_data):  Generate dispatch table if flag_assume_compiled.
20843         Set dtable of class object to address of class_dtable_decl.
20844
20845         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
20846         be volatile and have side effects - generates better code.
20847
20848         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
20849         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
20850
20851         * expr.c (expand_invoke):  If class is final, method is
20852         effectively final, so can call it directly.
20853
20854         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
20855
20856         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
20857
20858 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20859
20860         * parse.y (build_method_invocation_stmt): Removed extra argument
20861         to build_invoke.
20862
20863 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20864
20865         * expr.c (dtable_indent): Now static global.
20866         (expand_invoke): Now call invoke_build_dtable and
20867         build_invokevirtual.
20868         (invoke_build_dtable, build_invokevirtual): New functions.
20869         * jcf-io.c (find_class): Defer issuing a warning by setting
20870         jcf->outofsynch to 1.
20871         * jcf-parse.c (jcf_out_of_synch): New function.
20872         (load_class): Test this_jcf.outofsynch flag and call
20873         jcf_out_of_synch accordingly.
20874         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
20875         comment indentation.
20876         * lex.c (java_get_unicode): Fixed code indentation.
20877         (java_lex): Create string literal. Fixed typo. Removed several
20878         premature obstack_free.
20879         * parse.h: New enums for name resolution and invocation mode.
20880         (struct qualification): New data structure.
20881         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
20882         (do_resolve_class, build_method_invocation_stmt,
20883         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
20884         debug_line, identical_subpath_p, invocation_mode,
20885         refine_accessible_methods_list, build_invoke,
20886         lookup_method_invoke): New functions declared.
20887         (build_invokevirtual, invoke_build_dtable, match_java_method,
20888         build_field_ref, jcf_out_of_synch): New references to external
20889         functions.
20890         (struct parse_ctxt): Removed artificial_constructor field.
20891         * parse.y: (array_type:): Type defined for this rule.
20892         (class_type:): Installed default rule for interface_type:.
20893         (array_type:): Now build Java array type.
20894         (qualified_name:): Now use obstack_grow0.
20895         (method_declaration:): Skip the artificial constructor added to
20896         the list, if any.
20897         (abstract_method_declaration:): Execute the code only during pass 1.
20898         (block:): Installed default rule in block_statements:.
20899         (block_statement:): Add the statement to the method during pass 2.
20900         (statement_expression): Installed default rule for
20901         method_invocation:.
20902         (argument_list:): Added code to build the argument list.
20903         (method_invocation:): Added call to create the method invocation
20904         node.
20905         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
20906         (debug_line): New function for debug.
20907         (complete_class_decl): No longer do something during pass 1.
20908         (method_header): Use BUILD_PTR_FROM_NAME.
20909         (parser_qualified_classname): Use obstack_grow0. Removed bogus
20910         obstack_free.
20911         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
20912         function's main comment.
20913         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
20914         classes.
20915         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
20916         (resolve_class): Now works with arrays.
20917         (do_resolve_class, resolve_and_layout): New functions.
20918         (java_check_regular_methods): Reverse method list before and after
20919         having processed it. No longer set ctxp->artificial_constructor.
20920         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
20921         accordingly. Fixed typo in issued error message. Now use
20922         obstack_grow0.
20923         (find_in_imports_on_demand): Now use obstack_grow0.
20924         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
20925         (source_end_java_method): Call expand_expr_stmt instead of
20926         expand_expr. Calls it before calling expand_function_end.
20927         (java_method_add_stmt): Do nothing if errors were found during
20928         parsing.
20929         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
20930         (build_method_invocation_stmt, build_invoke, invocation_mode,
20931         lookup_method_invoke, refine_accessible_methods_list,
20932         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
20933         New functions.
20934         * typeck.c (build_java_signature): Properly end method signature
20935         if return type skipped.
20936         (match_java_method): New function.
20937
20938 1998-03-16  Per Bothner  <bothner@cygnus.com>
20939
20940         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
20941
20942 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20943
20944         * expr.c (build_invoke_non_interface): New function.
20945         (methods_ident, ncode_ident): Now static globals.
20946         (expand_invoke): Use build_invoke_non_interface.
20947         * java-tree.h (struct lang_decl): New field function_decl_body.
20948         (DECL_FUNCTION_BODY): New macro.
20949         * jcf-parse.c (jcf_parse_source): Deeper check before setting
20950         CLASS_FROM_SOURCE_P.
20951         (parse_source_file): Fixed typos. Call java_layout_parsed_class
20952         before starting pass 2. Call to java_generate_parsed_class replaced
20953         by java_register_parsed_class.
20954         * lex.c: Fixed typo in header. Some line width related formating.
20955         * lex.h: Some line width related formating.
20956         * parse.h (source_end_java_method, resolve_expression_name,
20957         complete_class_decl, maybe_create_class_interface_decl,
20958         check_class_interface_creation): New static function declarations.
20959         (java_layout_parsed_class, java_method_add_stmt): New function
20960         declarations.
20961         (struct parser_ctxt): Field mark_class_generate removed. New
20962         fields class_list and artificial_constructor.
20963         * parse.y: Fixed typo in header.
20964         (class_declaration:): Call complete_class_decl when class body
20965         parsed.
20966         (method_declaration:): Call source_end_java_method in pass 2 when
20967         the method body is defined.
20968         (postfix_expression:): Do expression name resolution on sub-rule
20969         name during pass 2.
20970         (create_class, create_interface): Merged common pieces.
20971         (check_class_interface_creation, maybe_create_class_interface_decl):
20972         New functions.
20973         (complete_class_decl): New function.
20974         (register_fields): Fixed line width related typo.
20975         (method_header): Correctly skip first argument when fixing
20976         argument line. Changed the loop.
20977         (java_check_circular_reference): Now use ctxp->class_list.
20978         (java_complete_class): Removed start/stop marking.
20979         (java_check_regular_methods): Now takes a class decl as an
20980         argument.  Add default constructor if none were encountered.
20981         (java_check_methods): Now use ctxp->class_list. Changed call to
20982         java_check_regular_methods.
20983         (source_start_java_method): Set DECL_ARG_TYPE for each function
20984         arguments.
20985         (source_end_java_method, java_method_add_stmt): New functions.
20986         (java_generate_parsed_class): No longer exists.
20987         (java_layout_parsed_class, java_register_parsed_class): New functions.
20988         (resolve_expression_name): New function.
20989
20990 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20991
20992         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
20993         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
20994         until pass initializations are done. Call read_import_dir with
20995         pass set to 0.
20996         * parse.h: (lookup_modifier_cl): New function declared.
20997         (INTERFACE_FIELD_MODIFIERS): New macro.
20998         (OBSOLETE_MODIFIER_WARNING): New macro.
20999         * parse.y: (register_fields): Class type and current field name in
21000         local variables. Check modifier(s) if adding field(s) to an interface.
21001         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21002         and report errors using the faulty modifier line context.
21003         (lookup_modifier_cl): New function.
21004         (read_import_dir): Detect and report default import processing
21005         failure.
21006
21007 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
21008
21009         Add a pair of -fassume-compiled/-fno-assume-compiled options.
21010         * class.c (is_compiled_class): Return 1 after making sure it
21011         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21012         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21013         * java-tree.h (flag_assume_compiled): Add decl.
21014         * lang.c (lang_f_options): Add the flag.
21015         (flag_assume_compiled): Add decl, default to 0.
21016
21017 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21018
21019         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21020         (is_compiled_class): Likewise.
21021         (layout_class): Likewise.
21022         (layout_class): Detect and lay out classes defined in source code.
21023         (interface_of_p, add_interface_do, may_add_interface): New
21024         function.
21025         (add_interface): Now use add_interface_do.
21026         (add_method_1): New function.
21027         (add_method): Now use add_method_1.
21028         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21029         (complete_start_java_method): New function.
21030         (start_java_mehod): Now call complete_start_java_method.
21031         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21032         (expand_invoke): Likewise and fixed typo.
21033         *gjava.c: (print_super_field): Use new argument to find_class
21034         DO_CLASS_FILE.
21035         (main): Likewise.
21036         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21037         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21038         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21039         IDENTIFIER_NODE.
21040         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21041         (add_method_1, push_class): New prototypes.
21042         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21043         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21044         directory where the class was found.
21045         (find_class): New argument DO_CLASS_FILE. Function find_class
21046         modified accordingly.
21047         *jcf-parse.c: (fix_class_path): New function.
21048         (load_class): Use new VERBOSE argument. load_class now finds and
21049         loads/parses .class/.java files. Save read_state of current_jcf
21050         if necessary.
21051         (java_parser_abort_on_error): New macro.
21052         (jcf_parse_source, parse_source_file): New function.
21053         (jcf_parse): Fixed typo.
21054         (yyparse): Call parse_source_file () only.
21055         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21056         writing the real class name back in the zip directory entry.
21057         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21058         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21059         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21060         (find_class): Prototype fixed.
21061         *lex.c: Added 1998 time stamp.
21062         Removed all static global variables, moved into the parser
21063         context data structure.. Now include unistd.h if SEEK_SET not
21064         defined.
21065         (java_init_lex): Rewritten.
21066         (java_sneak_unicode): Modified current unicode access in current line.
21067         (java_unget_unicode): Likewise.
21068         (java_allocate_new_line): New allocation management.
21069         (java_read_char): Modified access and storage of unget_utf8_value.
21070         New way of processing current unicode.
21071         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21072         (java_get_unicode): Now use the parser context.
21073         (java_lineterminator): Likewise.
21074         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21075         of the reentrant parser implementation. Function now use the
21076         parser context data structure and java_lval. Fixed production of
21077         the float and double constant "out of range" error message. Fixed
21078         obstack use. Return integer value when hitting a modifier. Now
21079         return type for TRUE, FALSE and other predefined types. Return
21080         identifier as a TREE_LIST list containing the current line context
21081         as the TREE_VALUE sub-node.
21082         (java_unicode_2_utf8): Fixed typo in declaration.
21083         (java_lex_error): Now use the parser context data structure.
21084         *lex.h: Added 1998 time stamp.
21085         (struct java_line): New fields ref_count and next.
21086         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21087         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21088         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21089         *parse.h: Added 1998 time stamp.
21090         (java_parse_source_file): Renamed from parse_source_file.
21091         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21092         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21093         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21094         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21095         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21096         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21097         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21098         (struct parser_ctxt): New data structure to keep the parser context.
21099         *parse.y: Added 1998 time stamp, got rid of static global variables.
21100         (java_error_count, ctxp): New global variables.
21101         (%union): New value field.
21102         (numeric_type, integral_type): Rules removed.
21103         (primitive_type): Rule defined to handle integral, float, double and
21104         boolean types.
21105         (qualified_name, package_declaration,
21106         single_type_import_declaration, type_import_on_demand_declaration,
21107         modifiers, class_declaration, super, interfaces,
21108         interface_type_list, class_body, field_declaration,
21109         field_declaration, variable_declarators, variable_declarator,
21110         variable_declarator_id, method_declaration, method_header,
21111         formal_parameter_list, formal_parameter, method_body, block,
21112         static, interface_declaration, extends_interfaces,
21113         abstract_method_declaration, local_variable_declarators): Rules now
21114         define actions.
21115         (force_error, do_warning): New global statics.
21116         (push_parser_context, parser_context_save_global,
21117         parser_context_restore_global, pop_parser_context): New functions.
21118         (yyerror): Now uses the global parser context. Fixed use of obstack.
21119         (parse_error, parse_error_context, parse_warning_context,
21120         java_accstring_lookup, redefinition_error, check_modifiers,
21121         parser_add_interface, create_interface, create_class, find_field,
21122         duplicate_declaration_error, register_fields, method_header,
21123         check_modifiers_consistency, check_abstract_method_header,
21124         method_declarator, parser_qualified_classname,
21125         parser_check_super_interface, parser_check_super,
21126         parser_chain_incomplete_item, java_check_circular_reference,
21127         layout_class_from_source, java_complete_class,
21128         complete_method_decl, resolve_class, complete_class_report_errors,
21129         java_check_final, check_method_redefinition,
21130         java_check_regular_methods, java_check_abstract_methods,
21131         java_check_methods, lookup_java_interface_method2,
21132         lookup_java_method2, lookup_cl, find_name_in_single_imports,
21133         process_imports, find_in_imports, read_import_entry,
21134         read_import_dir, find_in_imports_on_demand,
21135         check_pkg_class_access, not_builtin_p, declare_local_variables,
21136         source_start_java_method, java_generate_parsed_class): New
21137         functions.
21138         *typeck.c: (signature_include_return): New global variable.
21139         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21140         to add the function returned type in the signature.
21141
21142 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
21143
21144         * jcf-io.c (open_in_zip): Use strncmp and LEN.
21145
21146 1998-01-29  Dave Brolley  <brolley@cygnus.com>
21147
21148         * Make-lang.in (java.info): Added.
21149         (java.install-info): Added
21150
21151 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
21152
21153         * Makefile.in (clean): Also remove java/parse.c.
21154
21155 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
21156
21157         Add a pair of -fbounds-check/-fno-bounds-check options.
21158         * lang.c (lang_decode_option): Add code to grok arguments.
21159         (flag_bounds_check): Add decl.
21160         (lang_f_options): New array w/ the option in it.
21161         * java-tree.h (flag_bounds_check): Add decl.
21162         * lang-options.h: New file.
21163         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21164         of a static macro value.
21165         (JAVA_ARRAY_EXCEPTION): Delete macro.
21166
21167 1998-01-23  Per Bothner  <bothner@cygnus.com>
21168
21169         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
21170         * expr.c (build_anewarray):  Add missing promote_type.
21171
21172 1998-01-22  Per Bothner  <bothner@cygnus.com>
21173
21174         Add array types with known length to optimize bounds checking.
21175         * typeck.c (build_java_array_type):  Take length parameter.
21176         (java_array_type_length, build_prim_array_type):  New functions.
21177         * java-tree.h:  Update for new functions.
21178         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21179         * class.c:  Use build_prim_array_type.
21180         * expr.c (can_widen_reference_to):  Handle known-length array types.
21181         (verify_jvm_instructions):  Keep track of integer push instructions
21182         followed by newarray/anewarray, so we can build known-length arrays.
21183         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
21184         (java_array_data_offset):  New function.
21185         (build_java_array_length_access):  New function.  Optimize if constant.
21186         (build_java_arrayaccess):  Constant fold bounds check.
21187         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
21188         (build_newarray, build_anewarray):  New functions.
21189         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
21190         * verify.c (merge_types):  Handle known-lengh array types.
21191
21192 1998-01-19  Per Bothner  <bothner@cygnus.com>
21193
21194         * expr.c (expand_byte_code):  Fix performace bug, which caused
21195         searching linenumber_table to be linear rather than constant.
21196
21197 1997-12-12  Per Bothner  <bothner@cygnus.com>
21198
21199         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
21200
21201         * decl.c, java-tree.h (soft_fmod_node):  New global.
21202         * decl.c (init_decl_processing):  Define __builtin_fmod.
21203         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
21204         using __builtin_fmod.
21205
21206 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21207
21208         * keyword.h: New file, output of keyword.gperf as processed by
21209         gperf.
21210         * lex.c (java_lex_init): Initialize java_error_flag.
21211         * parse.c (YYERROR_NOW): Uses java_error_flag.
21212         * parse.y: New static java_error_flag. Useless definition of
21213         buffer_error gone.
21214         * parse.y (java_error): Portable error recovery using
21215         java_error_flag (not yet completely tuned).
21216
21217 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
21218
21219         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21220
21221 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21222
21223         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21224         (parse.c, lex.c, keyword.h): New rules for Java source code
21225         front-end.
21226         * parse.c: Renamed into jcf-parse.c.
21227         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21228         * keyword.gperf: New file, Java keywords.
21229         * parse.y: New file, Java language grammar.
21230         * parse.h: New file, Java language grammar definitions.
21231         * lex.c: New file, Java language lexer.
21232         * lex.h: New file, Java language lexer definitions.
21233
21234 1997-12-03  Per Bothner  <bothner@cygnus.com>
21235
21236         * decl.c (clinit_identifier_node), java-tree.h:  New global.
21237         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
21238         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
21239         * expr.c (expand_java_field_op):  Check for invalid assignment
21240         to final field.
21241
21242         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
21243
21244 1997-10-27  Per Bothner  <bothner@cygnus.com>
21245
21246         * verify.c (verify_jvm_instructions):  When processing a handler,
21247         attempt to set the current_subr to the right value.
21248         (More complicated code combines Sep 17 and Oct 22 versions.)
21249
21250 1997-10-24  Per Bothner  <bothner@cygnus.com>
21251
21252         * class.c (push_class):  Figure out (guess) name of source file.
21253         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
21254         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
21255         (parse_class_file):  Change return type from int to void.
21256         Call debug_start_source_file/debug_end_source_file.
21257
21258         * expr.c (build_java_binop):  Fix masking 2nd operand.
21259         * decl.c (init_decl_processing):  Set sizetype first.
21260
21261 1997-10-22  Per Bothner  <bothner@cygnus.com>
21262
21263         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
21264         (Revert Sep 17 change.)
21265
21266 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21267
21268         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21269         .class extension in their name and fix thing so we don't process
21270         them parse_zip_file_entries().
21271         (parse_zip_file_entries): Cleaned unused local variables.
21272
21273 1997-10-20  Per Bothner  <bothner@cygnus.com>
21274
21275         * expr.c (can_widen_reference_to):  Allows equal array element types.
21276         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
21277         * jcf-dump.c (RET):  Get (and print) index.
21278
21279         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21280         Promote element type to POINTER_TYPE.
21281
21282 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21283
21284         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21285         find_in_current_zip, jcf_figure_file_type): Moved from
21286         jcf-reader.c to parse.c.
21287         * zextract.c: (read_zip_archive): takes file_comment_length possible
21288         field into account.
21289
21290 1997-10-20  Per Bothner  <bothner@cygnus.com>
21291
21292         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
21293
21294         * verify.c (merge_types):  Handle array types even better ...
21295
21296 1997-10-17  Per Bothner  <bothner@cygnus.com>
21297
21298         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
21299
21300         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
21301         * class.c (make_class_data):  Don't build fields_decl if no fields.
21302         When building fields_decl, skip if DECL_ARTIFICIAL.
21303
21304         * expr.c (java_stack_swap):  Update stack_type_map.
21305         * verify.c (merge_types):  Handle array types better.
21306
21307 1997-10-15  Per Bothner  <bothner@cygnus.com>
21308
21309         * class.c (add_field):  Don't promote short integral fields to
21310         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21311         * expr.c (push_value):  Promote and convert short integral values.
21312
21313         * decl.c, java-tree.h (integer_two_node):  New constant node.
21314         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
21315
21316 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21317
21318         * class.c (append_gpp_mangled_type): Use function argument
21319         unpromoted type to generate mangled name.
21320
21321 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21322
21323         * constants.c (build_constant_data_ref): Now uses current_class
21324         instead of main_class.
21325         (build_constants_constructor): Now uses current_class instead of
21326         main_class.
21327         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21328         of the global variable SeepZipFiles done here.
21329         * zextract.c (read_zip_archive): extra_field optional field taken
21330         into account while computing the position of the class file in the
21331         archive.
21332         * verify.c (verify_jvm_instructions): Use current_jcf to search
21333         the constant pool.
21334         * parse.c (load_class): First search for the class to load in the
21335         current zip file. Saves current_jcf (restored before returning
21336         from that function). Don't call JCF_FINISH in the class was found
21337         in the current ZIP file.
21338         (jcf_parse): If the class was found in the current ZIP file, save
21339         its tree_constant_pool (for later reuse).
21340         (parse_class_file): New function. Process each method defined in
21341         the current class and record the class as to be later registered.
21342         (yyparse): Rewritten. Figure the type of the current file and switch
21343         accordingly.
21344         * lang.c: New global variable current_jcf.
21345         (lang_init): Removed compiling_from_source test (done later, in
21346         yyparse). Removed call the jcf_parse ().
21347         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21348         (typedef struct JCF): New fields seen_in_zip (to mark a class found
21349         in the current ZIP file) and zip_offset (offset to the class data in
21350         the current zip file).
21351         * jcf-reader.c: zipfile.h included.
21352         localToFile: New ZipFileCache static global variable
21353         (parse_zip_file_entries): New function. Browse the current ZIP
21354         file directory and process each class found.
21355         (process_zip_dir): New function. Register each class found in the
21356         ZIP file directory. The class aren't parsed but a valid JCF is
21357         link to each of them.
21358         (find_in_current_zip): New function. Search for a class in the
21359         current ZIP file directory. If found, prepare the class so that it
21360         can be loaded.
21361         (jcf_figure_file_type): New function. Examine the file structure
21362         to figure a class file, a ZIP file. If none of these categories are
21363         matched, a source file is assumed.
21364         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21365         SeenZipFile: New global variable.
21366         (open_in_zip): Use zipmember's length to accelerate the search for
21367         a member. If zipmember was NULL and zip file successfully read,
21368         return 0.
21369         * java-tree.h: New global variable current_jcf declared.  Added
21370         declaration for current_constant_pool_tags, current_constant_pool_data,
21371         current_constant_pool_length, current_constant_pool_data_ref.
21372         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21373         store the JCF of classes seen in a zip file) and tree *constant_pool
21374         (to save a loaded class constant pool). current_class declared here.
21375         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21376         retrieve method_ref_constant.
21377         (PUSHC): java_push_constant_from_pool now uses current_jcf.
21378         (OBJECT): get_class_constant now uses current_jcf.
21379         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21380         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21381         (expand_invoke): Now uses current_class instead of main_class
21382         (build_class_init): Now uses current_class instead of main_class
21383         * class.c: New static global variable registered_class.
21384         (register_class): New function.
21385         (emit_register_class): Modified to use registered_class instead of
21386         main_class
21387         (is_compiled_class): Now take into account class seen in the archive.
21388
21389 1997-10-06  Per Bothner  <bothner@cygnus.com>
21390
21391         * except.h:  Renamed to: java-except.h.
21392         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
21393         * except.c:  Add semi-working (commented out) implementation.
21394
21395         * expr.c (expand_iinc):  Add needed flush_quick_stack.
21396         * parse.c (set_source_filename):  New function.
21397         (give_name_to_class):  Set input_filename from package.classname.java.
21398
21399         * jcf-io.c (find_class):  Don't look first in ".".
21400
21401 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21402
21403         * zextract.c (read_zip_archive): Now takes into account the
21404         extra_field field.
21405         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21406
21407 1997-09-20  Per Bothner  <bothner@cygnus.com>
21408
21409         * constants.c, java-tree.h (build_internal_class_name):  New function.
21410         (alloc_class_constant):  Re-implement using build_internal_class_name.
21411         * class.c (make_class_data):  Likewise.
21412         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
21413
21414 1997-09-17  Per Bothner  <bothner@cygnus.com>
21415
21416         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
21417         to NULL before pushing an exception handler target.
21418
21419         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
21420         (java_stack_swap, java_stack_dup):  Re-write to be safe from
21421         clobbering registers.
21422         (build_class_init):  New function.
21423
21424 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21425
21426         * typeck.c (build_java_array_type): Temporary use
21427         permanent_obstack to create the array 'length' field.
21428         * expr.c (lookup_label): Temporay use permanent_obstack to create
21429         label if not found.
21430         * class.c (push_super_field): Tempory use permanent_obstack.
21431
21432 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21433
21434         * typeck.c (type_for_mode): Now handles double_type_node and
21435         float_type_node.
21436         * verify.c (verify_jvm_instructions): The instruction following
21437         the wide bytecode is checked. OPCODE_ret added to the list of
21438         wide.
21439
21440 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21441
21442         * class.c (make_class): Temporary use permanent_obstack. Set the
21443         class CLASS_P field to 1.
21444         (push_class): Temporary use permanent_obstack.
21445         (set_super_info): Temporary use permanent_obstack.
21446         (add_method): Temporary use permanent_obstack, set
21447         METHOD_TRANSIENT().
21448         (add_field): Temporary use permanent_obstack. Sets
21449         FIELD_VOLATILE() and FIELD_TRANSIENT().
21450         (build_class_ref): Temporary use permanent_obstack if the class
21451         isn't compiled.
21452         (build_static_field_ref): Temporary use permanent_obstack when
21453         creating field's rtl.
21454         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21455         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21456         and fields. Function finalized, as far as flag handling.
21457         (push_class_static_dummy_field): Temporary use permanent_obstack.
21458         (emit_register_class): Force generation of class registration at
21459         -O3 or deeper.
21460         * decl.c (end_java_method): Call permanent_allocation() before
21461         returning.
21462         * expr.c (can_widen_reference_to): Added comment to interface
21463         handling, fixed typo.
21464         (lookup_field): Now uses CLASS_P() to correct FIXME
21465         (expand_invoke): Verification on public && !static &&
21466         !abstract moved into soft_lookupinterfacemethod (kaffe).
21467         Use Object class dtable if objectref is an array when expanding
21468         invokeinterface.
21469         (java_push_constant_from_pool): Temporary use permanent_obstack
21470         for CONSTANT_string
21471         * parse.c (get_ref_constant): Temporary use permanent_obstack to
21472         create constant references.
21473         (get_constant): Temporary use permanent_obstack to create constant.
21474         (load_class): Temporary use permanent_obstack to load class.
21475         (jcf_parse): Temporary use permanent_obstack to perform class
21476         layout.
21477         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21478         (build_java_signature): Temporary use permanent_obstack.
21479         * verify.c: (verify_jvm_instruction): removed unnecessary verification
21480         on ACC_SUPER flag.
21481         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21482         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21483         (CLASS_P): Defined
21484
21485 1997-09-11  Per Bothner  <bothner@cygnus.com>
21486
21487         * class.c (append_gpp_mangled_type):  Fix typo.
21488         (emit_register_class):  Use main_class to get class object, rather
21489         than looking for no-longer-existing static decl starting with _CL.
21490         * typeck.c (parse_signature_type):  Promote array element type
21491         if it is a RECORD_TYPE.
21492
21493 1997-09-10  Per Bothner  <bothner@cygnus.com>
21494
21495         * class.c (push_class_static_dummy_field):  New function.
21496         (mangle_static_field):  New. Do G++-style mangling of static fields.
21497         (layout_class):  Mandle static fields here, not in add_field.
21498         (build_class_ref):  The class object is now a dummy static field.
21499         * decl.c (find_local_variable):  Look for best, instead of first match.
21500         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
21501         (build_java_athrow):  Don't check here if exception is Throwable.
21502         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
21503         (TYPE_USED):  Removed.  No longer used ...
21504         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
21505         * verify.c (push_pending_label):  New function.
21506         (push_pending_block):  Renamed to check_pending_block.
21507         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
21508         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
21509         re-checking possible handlers) after a store (less wasted work).
21510         Check for null handler (finally) before calling add_handler.
21511         Various changes to (finally?) correctly handle try/finally.
21512
21513 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
21514
21515         * class.c: Include stdio.h.
21516
21517 1997-09-04  Per Bothner  <bothner@cygnus.com>
21518
21519         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
21520         to make sure class is initialized before static/special invoke.
21521
21522         * verify.c (verify_jvm_instructions):  On a store instruction,
21523         call find_local_variable to force pre-allocation of decl and rtx.
21524         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
21525
21526 1997-09-03  Per Bothner  <bothner@cygnus.com>
21527
21528         * class.c (build_class_ref):   Strip off "promoted_" if need be.
21529         (make_field_value): Call build_java_signature when needed.
21530         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
21531         * expr.c (build_java_athrow):  Don't push_value of exception.
21532         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
21533         match specification of [fd]cmp[lg] for NaNs.
21534         (expand_byte_code):  Add support for exception handler ranges.
21535         * except.c:  Add skeleton for EH code-generation.
21536         * verify.c (merge_types):  Treat all promoted integral types as equal.
21537         * constants.c (build_constants_constructor):  To force creation of
21538         current_constant_pool_data_ref, call build_constant_data_ref.
21539
21540         * javaop.def (lload):  Fix typo.
21541         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
21542
21543 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
21544
21545         * parse.c: Don't include function.h.
21546
21547 1997-08-27  Per Bothner  <bothner@cygnus.com>
21548
21549         * except.[ch]:  New files.
21550         * Makefile.in (JAVA_OBJS):  Add except.o
21551         * expr.c:  Temporary warning about unimplemented exceptions.
21552         * verify.c:  Verify exception handlers.
21553
21554         * jcf-dump.c (disassemble_method):  Print exception table.
21555
21556 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21557
21558         * expr.c (verify_jvm_instructions): Started a thorough
21559         verification of invoke* bytecodes.
21560         (expand_byte_code): flush quick stack if PC is the target of a
21561         branch.  and undef RET (conflicting with config/i386/i386.h).
21562         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
21563         used.
21564         (expand_invoke): Now handles invokeinterface and do more
21565         verification according to the bytecode.
21566         (lookup_field): Don't try to load the class if processing
21567         dtable_type.
21568         (can_widen_reference_to): Now handles interfaces.
21569         * decl.c (init_decl_processing): New global variable
21570         soft_lookupinterfacemethod_node, declared in java-tree.h.
21571         Call set_super_info on string_type_node.
21572         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
21573         defined.
21574         * class.c (set_super_info): Fills the CLASS_* flags according to
21575         access_flags.
21576         (get_access_flags_from_decl): Handles all class flags.
21577
21578 1997-08-26  Per Bothner  <bothner@cygnus.com>
21579
21580         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
21581         * parse.c (yyparse):  Check for abstract method, and missing code.
21582         * expr.c (expand_byte_code):  Change interface.
21583         * lang.c (put_decl_node):  Print promoted types prettier.
21584         * verify.c (verify_jvm_instruction):  Change interface.
21585         Partial support for scanning exception table.
21586         For load instructions, handle promoted integral types.
21587
21588 1997-08-21  Per Bothner  <bothner@cygnus.com>
21589
21590         * verify.c:  New file, with contents moved from expr.c.
21591         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
21592         * typeck.c (is_array_type_p):  Moved here from expr.c.
21593         * java-tree.h:  Add some now-needed function declarations.
21594         * Makefile.in (JAVA_OBJS): Added verify.o.
21595
21596 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21597
21598         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
21599         METHOD_ABSTRACT flag.
21600
21601         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
21602         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
21603         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
21604
21605         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
21606         variables.
21607         (start_java_method): Hook for SYNCHRONIZED methods.
21608
21609         * expr.c (build_java_jsr, build_java_ret): New functions
21610         (JSR,PRE): New macros
21611         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
21612         (verify_jvm_instructions): tableswitch, lookupswitch,
21613         monitorenter, monitorexit, goto_w: verified.
21614         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
21615         (build_java_monitor): New function.
21616         (MONITOR_OPERATION): Modified to call build_java_monitor()
21617         (verify_jvm_instructions): Started a thorough verification of
21618         invoke* bytecodes.
21619
21620 1997-08-19  Per Bothner  <bothner@cygnus.com>
21621
21622         Support verification of jsr/ret subroutines (used for try/finally).
21623         * decl.c (return_address_type_node):  New type node.
21624         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
21625         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
21626         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
21627         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
21628         TYPE_USED):  New macros for special types in type_map.
21629
21630         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
21631         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
21632         BCODE_JUMP_TARGET.
21633         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
21634
21635         * expr.c (can_widen_reference_to):  New function.
21636         (pop_type):  Use it.
21637         (merge_type_state):  Support handling start of subroutine.
21638         (push_pending_block):  Return char* error message, instead of calling
21639         fatal on an error.  Also handle subroutines.
21640         (verify_jvm_instructions):  Handle errors from push_poending_block.
21641         Support jsr and ret instructions.
21642
21643 1997-08-19  Per Bothner  <bothner@cygnus.com>
21644
21645         * jcf-io.c (find_classfile):  Fix thinko.
21646         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
21647
21648 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
21649
21650         * Makefile.in (BISON): Remove.
21651
21652 1997-08-07  Per Bothner  <bothner@cygnus.com>
21653
21654         * Makefile.in:  Convert to autoconf.
21655         * config-lang.in (outputs):  Added java/Makefile.
21656
21657         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
21658         Rename cc1java to jc1.
21659
21660         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
21661         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
21662
21663         * class.c (class_depth):  Do load_class if needed.
21664
21665         Mostly better verification.
21666         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
21667         (init_decl_processing):  Change return type of soft_checkcast.
21668         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
21669         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
21670         lang_print_error):  New functions.
21671         (lang_init):  Set global hook print_error_function to lang_print_error.
21672         * expr.c:  In the type_map ptr_type_node is only used for null now.
21673         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
21674         (merge_types):  Dererence pointer to record types before comparing.
21675         (decode_newarray_type, merge_types):  On error just return NULL.
21676         (build_java_binop):  Add preliminary implementation (with warning)
21677         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
21678         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
21679         (expand_compare, expand_java_goto, expand_java_call):  Don't
21680         push_pending_block, since that only makes sense when verifying.
21681         (merge_type_state):  Different return codes.
21682         (push_pending_block):  A block may need to be verified more than once.
21683         (expand_byte_code):  Warn about unused code at code generation time.
21684         (verify_jvm_instruction):  Changed logic, since code may need to be
21685         re-verified if type-state has changed.  Also, better error handling.
21686         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
21687         Improve newarray, anewarray, ?aload, athrow,
21688         * java-tree.h (LABEL_CHANGED):  New macro.
21689
21690 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21691
21692         * decl.c (soft_athrow_node): New global variable initialized.
21693         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
21694         * typeck.c (convert): Added support for REAL_TYPE.
21695         (convert_to_char): New function.
21696         (convert): Handle CHAR_TYPE.
21697         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
21698         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
21699         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
21700         promoted type.
21701         (verify_jvm_instructions): Added break a the end of bogus unop: label.
21702         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
21703         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
21704         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
21705         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
21706         to Use The Right Things.
21707         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
21708         compatible with INT. BOOLEAN is made equivalent to BYTE.
21709         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
21710         OPCODE_ifnonnull): Now supported.
21711         (build_java_athrow): New function.
21712
21713 1997-08-04  Per Bothner  <bothner@cygnus.com>
21714
21715         Rename method name <init> to match G++ (and fix mangling).
21716         * class.c (layout_class):  Replace method name of <init> by class name.
21717         (make_method_value):  Do inverse renaming of constructor from <init>.
21718         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
21719         * typeck.c (lookup_java_constructor):  New function.
21720         * expr.c (expand_invoke):  If method_name is <init>, call
21721         lookup_java_constructor to find constructor.
21722
21723         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
21724
21725 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21726
21727         * parse.c (get_class_constant): Modified to handle array "classes"
21728         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
21729         wide type.
21730         (convert): Modified to handle real type.
21731         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
21732         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
21733         variables declared.
21734         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
21735         soft_multianewarray, soft_newarray_node, soft_throw_node): New
21736         global variables initialized.
21737         (find_local_variable): Handles the case of a pointer
21738         (end_java_method): Restore the use of one more scope
21739         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
21740         build_java_array_length_access, expand_java_arrayload,
21741         expand_java_arraystore, expand_java_array_length,
21742         expand_java_multianewarray, expand_java_anewarray,
21743         build_java_check_indexed_type, is_array_type_p,
21744         build_java_throw_out_of_bound_exception): New functions.
21745         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
21746         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
21747         OPCODE_<t>aload): Implemented code for verification.
21748         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
21749         ARRAY_NEW_MULTI): Macro defined.
21750         (CONVERT): Modified to invoke convert().
21751         (case OPCODE_aload2): Fixed index typo from 2 to 1.
21752
21753 1997-07-31  Per Bothner  <bothner@cygnus.com>
21754
21755         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
21756         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
21757         (make_class_data):  Field name needs '/' as package prefix.
21758         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
21759
21760 1997-07-25  Per Bothner  <bothner@cygnus.com>
21761
21762         Implement debug information for local variables.
21763         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
21764         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
21765         DECL_LOCAL_SLOT_CHAIN):  New macros.
21766         (struct lang_decl_var):  New type.
21767         * parse.c (give_name_to_locals):  Move to decl.c.
21768         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
21769         (start_java_method):  Re-write parameter handling.
21770         (pending_local_decls):  New global variable.
21771         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
21772         (find_local_variable):  Accept pc so we can skips decls not in range.
21773         (struct binding_level):  Add end_pc field.
21774         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
21775         (various):  Change so current pc gets passed to find_local_variable.
21776
21777         * decl.c (init_decl_processing):  Re-arrange fields in
21778         class_type_node and and method_type_node to match kaffe 0.9.1.
21779         * class.c (make_method_value, make_class_data):  Update
21780         initializations to match.
21781
21782 1997-07-16  Per Bothner  <bothner@cygnus.com>
21783
21784         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
21785         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
21786         (push_super_field):  New function.
21787         (make_class_data):  Handle inheritance of class static initializer.
21788         (layout_class):  New name mangling.
21789         * constants.c (build_constant_data_ref):  Init type of data array
21790         to a one-element array.
21791         (build_constants_constructor):  Set DECL_SIZE from complete array type.
21792         * decl.c:  Rename class_type, object_type etc to class_type_node,
21793         object_type_node etc.  Make former inherit from latter.
21794         * expr.c (expand_invoke):  Add cast of function address.
21795         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
21796         * parse.c (yyparse):  Don't call layout_class here.
21797         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
21798
21799 1997-06-14  Per Bothner  <bothner@cygnus.com>
21800
21801         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
21802         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
21803         (alloc_class_constant):  New.
21804         * expr.c (expand_invoke):  Make sure method's class is initialized.
21805         * class.c (interits_from_p, emit_register_class):  New functions.
21806         * parse.c (yyparse):  Call emit_register_class.
21807
21808 1997-06-09  Per Bothner  <bothner@cygnus.com>
21809
21810         * constants.c:  New file, to handle constant pool.
21811         * Makefile.in (JAVA_OBJS):  Add constants.o.
21812         * decl.c (init_decl_processing):  Update, fix, finish various structs.
21813         (pushdecl_top_level):  New.
21814         * parse.c (layout_class):  Moved to class.c.
21815         * expr.c (java_push_constant_from_pool):  New function.
21816         * class.c (build_class_ref):  Make work fully
21817         (make_class_data):  Emit super-class, constant pool, interface vector.
21818
21819 1997-06-03  Per Bothner  <bothner@cygnus.com>
21820
21821         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
21822         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
21823         * class.c (class_depth):  New function.
21824         (lookup_named_class):  Replaced by new function lookup_class.
21825         * decl.c (object_type_node, string_type_node):  New.
21826         Remove various types that we no longer need.
21827         * expr.c (verify_jvm_instructions):  New separate verifier pass.
21828         (push_type, pop_type):  New functions for verifier.
21829         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
21830         (expand_byte_code):  Simplify, since we assume already verified.
21831         (expand_invoke):  Now mostly works.
21832         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
21833         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
21834         * parse.c:  Wait to allocate class object until we know its name.
21835         (layout_class):  Calculate DECL_VINDEX for each virtual method.
21836         * typeck.c (get_array_type):  Rename to ...
21837         (build_java_array_type):  ... and provide working implementation.
21838         (build_java_signature):  New function - build Java signature of type.
21839         (set_java_signature):  New function - cache signature with type.
21840         (lookup_java_method):  New function.
21841
21842 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
21843
21844         * class.c (ident_subst):  Take extra SUFFIX parameter.
21845         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
21846         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
21847         (build_class_ref):  Actually implement.
21848         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
21849         * decl.c (builtin_function):  New.
21850         (init_decl_processing):  Update for current Kaffe.  Declare some
21851         builtin Kaffe functions.
21852         * expr.c (build_address_of):  New.
21853         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
21854         Renamed (from expand_java_new etc), and added working implementations.
21855         (build_field_ref):  Now also handle static fields.
21856         (expand_invoke):  Implement invokestatic, and start implement rest.
21857         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
21858         * javaop.def:  Rename invokevirt -> invokevirtual.
21859         * lang.c (use_handles):  Removed.
21860         * parse.c:  Add support for ConstantValue attribute.
21861         Handle nested loading of a class.  (JPOOL_UTF):  New.
21862
21863 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
21864
21865         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
21866
21867 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
21868
21869         * Make-lang.in (java.install-man):  New empty rule.
21870         * typeck.c (set_local_type):  New function.
21871         * expr.c (STORE_INTERNAL):  Call find_local_variable,
21872         not find_stack_slot.  Call set_local_type.
21873
21874 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
21875
21876         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
21877         and building RECORD_TYPE CONSTRUCTORs.
21878         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
21879
21880         * lang.c (use_handles):  Change the default to 0.
21881         * decl.c:  Define and build class_type, field_type, utf8const_type.
21882         * class.c (make_class_data, make_field_value,
21883         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
21884         hashUtf8String, strLengthUtf8, mangled_classname:
21885         Functions to build reflective data structures.
21886         * parse.c (yyparse):  Call make_class_data.
21887
21888         * jcf-io.c (open_class, find_classfile):  New functions.
21889         * jcf-dump.c:  Support reading classfile from explicitly-named
21890         class file (without CLASSPATH searching).
21891
21892 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21893
21894         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
21895         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
21896         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
21897         (get_constant):  Now trivial for CONSTANT_Utf8.
21898
21899         * jcf.h:  Make NEW_CPOOL the default.
21900         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
21901
21902 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
21903
21904         New directory.
21905
21906 \f
21907 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
21908 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
21909
21910 Copying and distribution of this file, with or without modification,
21911 are permitted in any medium without royalty provided the copyright
21912 notice and this notice are preserved.