OSDN Git Service

* config/mcore/mcore.c Don't include assert.h.
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
2
3         * jcf-parse.c: Don't include assert.h.
4         (java_parse_file): Use gcc_assert.
5
6 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
7
8         * lang.opt (static-libgcj): New option.
9
10 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
11
12         * jcf-parse.c: Don't include toplev.h.
13         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
14
15 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
16
17         * boehm.c: Don't include toplev.h.
18         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
19
20 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
21
22         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
23         verify-glue.c: Don't include toplev.h.
24         * Make-lang.in: Dependencies for above files changed to remove
25         toplev.h.
26
27 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
28
29         * boehm.c: Include "config.h" instead of <config.h>.
30         * builtins.c: Don't include <stdarg.h>.
31         * class.c: Don't include "stdio.h".
32         (O_BINARY): Don't define here.
33         * jcf-depend.c: Don't include <assert.h>.
34         (jcf_dependency_set_dep_file, jcf_dependency_init,
35         jcf_dependency_write): Use gcc_assert.
36         * jcf-io.c (O_BINARY): Don't define here.
37         * jcf-path.c: Don't include "tm.h".
38         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
39         * resource.c: Don't include "stdio.h".
40         (O_BINARY): Don't define here.
41         * verify-impl.c: Don't include <stdio.h>.
42
43 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
44
45         * jcf-parse.c (java_parse_file): Take no arguments.
46         * java-tree.h (java_parse_file): Update prototype.
47
48 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
49             Andrew Haley  <aph@redhat.com>
50
51         PR java/46386
52         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
53
54 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
55
56         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
57         * lang.c (java_handle_option): Take location_t parameter.
58
59 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
60
61         * expr.c (expand_java_field_op): Use %' in diagnostic.
62         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
63         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
64         * lang.c (java_post_options): Use %' in diagnostics.
65
66 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
67
68         PR middle-end/46314
69         * class.c: Include target.h.
70         (make_local_function_alias):
71         Use targetm.asm_out.generate_internal_label.
72         * expr.c (lookup_label, generate_name): Likewise.
73
74 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
75
76         PR bootstrap/44335
77         * jfc-parse.c (target.h): Include.
78         (handle_constant): Use targetm.words_big_endian and
79         targetm.float_words_big_endian.
80         (get_constant): Use targetm.float_words_big_endian.
81
82 2010-10-13  Richard Henderson  <rth@redhat.com>
83
84         * lang.c (java_eh_personality): Update call to
85         build_personality_function.
86
87 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
88
89         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
90         options.h.
91
92 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
93
94         * decl.c (java_init_decl_processing): Use build_function_type_list
95         instead of build_function_type.
96         * jcf-parse.c (java_emit_static_constructor): Likewise.
97         * builtins.c (initialize_builtins): Likewise.
98
99 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
100
101         * lang.c (java_init_options_struct): New.  Split out from
102         java_init_options.
103         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
104
105 2010-10-04  Andi Kleen <ak@linux.intel.com>
106
107         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
108         Add + to build rule.
109
110 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
111
112         * lang.opt: Don't use VarExists.
113
114 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
115
116         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
117         flag_force_classes_archive_check, flag_redundant, flag_newer,
118         flag_use_divide_subroutine, flag_use_atomic_builtins,
119         flag_use_boehm_gc, flag_hash_synchronization,
120         flag_check_references, flag_optimize_sci, flag_indirect_classes,
121         flag_indirect_dispatch, flag_store_check,
122         flag_reduced_reflection): Remove.
123         * jcf-dump.c (flag_newer): Remove.
124         * jcf.h (quiet_flag): Remove.
125         * parse.h (quiet_flag): Remove.
126
127 2010-09-28  Richard Henderson  <rth@redhat.com>
128
129         * lang.c: Include "target.h".
130         (java_eh_personality): Use targetm.except_unwind_info.
131         * Make-lang.in (lang.o): Update deps.
132
133 2010-09-27  Andrew Haley  <aph@redhat.com>
134
135         PR java/45773
136         * jvgenmain.c (main): Fix arg processing.
137
138 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
139
140         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
141         OPT_fhelp.
142         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
143         -dependencies, -encoding, -extdirs, -include-directory,
144         -include-directory=, -output-class-directory,
145         -output-class-directory=, -resource, -resource=,
146         -user-dependencies): New.
147
148 2010-09-16  Richard Guenther  <rguenther@suse.de>
149
150         * jcf-parse.c (current_file_list): Remove.
151         (java_parse_file): Use build_translation_unit_decl.  Adjust.
152
153 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
154
155         * lang.opt (d): New.
156
157 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
158
159         PR java/45504
160         * jvgenmain.c (main): Check "-D XXX=YYY".
161
162 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
163
164         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
165
166 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
167
168         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
169         fCLASSPATH=): Mark as Java options and as aliases.
170         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
171         (lang_specific_driver): Don't handle options marked as aliases.
172         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
173
174 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
175
176         * Make-lang.in (jvspec.o): Update dependencies.
177         * jvspec.c: Include opts.h.
178         (PARAM_ARG): Remove.
179         (find_spec_file): Do not add leading -specs=.
180         (lang_specific_driver): Use cl_decoded_option structures.
181         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
182         extdirs, fmain=, s-bc-abi): New options.
183
184 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
185
186         * class.c: Use FOR_EACH_VEC_ELT.
187         * expr.c: Likewise.
188         * jcf-parse.c: Likewise.
189         * resource.c: Likewise.
190
191 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
192
193         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
194
195 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
196
197         * class.c (build_utf8_ref): Fix code formatting from previous commit.
198
199 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
200
201         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
202
203 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
204
205         * lang.c (java_handle_option): Update prototype and return value
206         type.
207
208 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
209
210         * lang.c (java_option_lang_mask): New.
211         (java_init_options): Update prototype.
212         (LANG_HOOKS_OPTION_LANG_MASK): Define.
213
214 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
215
216         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
217         * boehm.c: Likewise.
218         * class.c: Likewise.
219         * decl.c: Likewise.
220         * expr.c: Likewise.
221         * jcf-parse.c: Likewise.
222         * typeck.c: Likewise.
223         * verify-glue.c: Likewise.
224
225 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
226
227         * boehm.c: Include diagnostic-core.h in every file that includes
228         toplev.h.
229         * class.c: Likewise.
230         * constants.c: Likewise.
231         * decl.c: Likewise.
232         * except.c: Likewise.
233         * expr.c: Likewise.
234         * jcf-parse.c: Likewise.
235         * mangle.c: Likewise.
236         * mangle_name.c: Likewise.
237         * resource.c: Likewise.
238         * typeck.c: Likewise.
239         * verify-glue.c: Likewise.
240
241 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
242
243         PR bootstrap/44825
244         * class.c (make_class_data): Cast result of VEC_length calls to int.
245
246 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
247
248         * constants.c (build_constants_constructor): Use build_constructor
249         instead of build_constructor_from_list.
250         * class.c (make_method_value): Likewise.
251         (get_dispatch_table): Likewise.
252         (make_class_data): Likewise.
253         (emit_indirect_register_classes): Likewise.
254         (emit_symbol_table): Likewise.
255         (add_assertion_table_entry): Likewise.
256         (emit_assertion_table): Likewise.
257         (make_field_value): Use build_constructor_single instead of
258         build_constructor_from_list.
259
260 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
261
262         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
263         VEC.
264         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
265         instead of tree_cons.
266         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
267         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
268
269 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
270
271         * lang.c: Do not include except.h
272         * except.c: Likewise.
273         (doing_eh): New, moved from except.c (in gcc/) but removed the
274         do_warning flag.
275         (maybe_start_try): Update doing_eh call.
276         * Make-lang.in: Update dependencies.
277
278 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
279
280         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
281         of build_int_cst_wide.
282         * boehm.c (set_bit): Remove.
283         (mark_reference_fields): Use double_int type for 'mask' argument.
284         Use double_int_setbit instead of set_bit.
285         (get_boehm_type_descriptor): Use double_int_setbit instead of
286         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
287
288 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
289
290         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
291
292 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
293
294         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
295
296         * jcf-parse.c (java_parse_file): Likewise.
297         (process_zip_dir): Likewise.
298
299         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
300         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
301
302         * expr.c (add_type_assertion): Likewise.
303
304         * decl.c (make_binding_level): Likewise.
305         (java_dup_lang_specific_decl): Likewise.
306
307         * constants.c (set_constant_entry): Likewise.
308         (cpool_for_class): Likewise.
309
310         * class.c (add_method_1): Likewise.
311         (java_treetreehash_new): Likewise.
312
313         * java-tree.h (struct lang_type): Add variable_size GTY option.
314         (struct lang_decl): Likewise.
315
316         * jch.h (struct cpool_entry): Likewise.
317
318         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
319
320         * except.c (prepare_eh_table_type): Update
321         java_treetreehash_create call.
322
323         * class.c (add_method_1): Update java_treetreehash_create call.
324         (java_treetreehash_create): Remove parameter gc.  Use
325         htab_create_ggc.
326
327 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
328
329         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
330         diagnostics.
331
332 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
333
334         * except.c: Include tm.h.
335
336 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
337
338         * jvspec.c (lang_specific_driver): Use fatal_error instead of
339         fatal.  Use warning instead of error for warnings.
340
341 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
342
343         * expr.c (get_symbol_table_index): Add spaces in expression.
344
345 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
346
347         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
348         (struct lang_type): Change type of otable_methods, atable_methods, and
349         itable_methods to VECs.  Fix comment for atable_methods.
350         (emit_symbol_table): Take a VEC instead of a tree.
351         (get_symbol_table_index): Take a VEC * instead of a tree *.
352         * class.c (add_table_and_syms): Take a VEC instead of a tree.
353         (emit_symbol_table): Update for changed parameter type.
354         * expr.c (get_symbol_table_index): Likewise.
355
356 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
357
358         * buildings.c: Pretend to be a backend file by undefining
359         IN_GCC_FRONTEND (still need rtl.h here).
360
361 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
362
363         * java-tree.h (struct lang_decl_func): Change type of throws_list
364         field to a VEC.
365         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
366         of DECL_FUNCTION_THROWS.
367         * class.c (make_method_value): Likewise.
368
369 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
370
371         * class.c (utf8_decl_list): Delete.
372         (build_utf8_ref): Remove references to it.
373         * java-tree.h (all_class_list): Delete.
374         (predef_filenames): Delete.
375         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
376         Delete.
377         * jcf-parse.c (parse_roots): Decrease size to 2.
378         (current_file_list): Convert to a VEC.
379         (all_class_list): Declare.
380         (jcf_parse): Adjust for new type of all_class_list.
381         (java_layout_seen_class_methods): Likewise.
382         (predefined_filenames): Declare.
383         (add_predefined_file): Use it.
384         (predefined_filename_p): Likewise.
385         (java_parse_file): Adjust for new type of current_file_list.                                                                                                                                                     *
386
387 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
388
389         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
390         for interfaces.
391
392         PR debug/43260
393         * java-tree.h (pending_static_fields): New extern declaration.
394         (java_write_globals): New prototype.
395         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
396         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
397         of a static field push it into pending_static_fields vector.
398         * class.c (pending_static_fields): New variable.
399         (add_field): If static field is not DECL_EXTERNAL, push it into
400         pending_static_fields vector.
401         (java_write_globals): New function.
402
403 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
404
405         * expr.c (quick_stack): Change type to a VEC.  Update comment.
406         (tree_list_free_list): Delete.
407         (flush_quick_stack): Update for quick_stack type change.
408         (push_value): Likewise.
409         (pop_value): Likewise.
410
411 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
412
413         * java-gimplify.c: Do not include tm.h, toplev.h.
414         * typeck.c: Do not include tm.h.
415         * mangle_name.c: Do not include tm.h.
416         * jcf-dump.c: Do not include tm.h, ggc.h.
417         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
418         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
419         and timevar.h.
420         * jcf-parse.c: Do not include tm.h and tm_p.h.
421         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
422         target.h, and expr.h.
423         * except.c: Do not include tm.h, rtl.h, function.h.
424         * builtins.c: Do not include convert.h.  Explain why RTL headers
425         have to be included here.
426         * verify-glue.c: Do not include tm.h.
427         * jcf-depend.c: Do not include tm.h.
428         * jcf-reader.c: Include ggc.h.
429         * jcf-io.c: Do not include tm.h, toplev.h.
430         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
431         gimple.h.
432         * lang.c: Do not include rtl.h, expr.h.
433         * Make-lang.in: Update dependencies.
434
435 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
436
437         * jcf-parse.c: Include bitmap.h.
438         * Make-lang.in: Update dependencies.
439
440 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
441
442         PR debug/43521
443         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
444         PARM_DECL.
445
446 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
447
448         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
449         build_int_cst_wide_type.
450
451 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
452
453         * expr.c (pop_arguments): Fix use of undeclared variable.
454
455 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
456
457         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
458         build_call_list.
459         (pop_arguments): Return a VEC instead of a tree.  Take a method type
460         rather than a list of argument types.
461         (rewrite_rule): Change signature. of rewrite_arglist member.
462         (rewrite_arglist_getcaller): Update signature.
463         (rewrite_arglist_getclass): Likewise.
464         (maybe_rewrite_invocation): Update for rewrite_arglist change.
465         (build_known_method_ref): Take a VEC instead of a tree.
466         (invoke_build_dtable): Likewise.
467         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
468         instead of build_call_list.
469         (build_jni_stub): Use build_call_vec instead of build_call_list.
470         * java-tree.h (maybe_rewrite_invocation): Update declaration.
471         (build_known_method_ref): Likewise.
472         (invoke_build_dtable): Likewise.
473
474 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
475
476         PR 44103
477         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
478         vector.  Move call to build_constructor...
479         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
480         TREE_CONSTANT on the constructor.
481         (PUSH_SUPER_VALUE): Change first argument to a vector.
482         (PUSH_FIELD_VALUE): Likewise.
483         * resource.c (compile_resource_data): Update calls to above macros.
484         * constants.c (build_constants_constructor): Likewise.
485         * class.c (build_utf8_ref): Likewise.
486         (make_field_value): Likewise.
487         (make_method_value): Likewise.
488         (add_table_and_syms): New function.
489         (make_class_data): Call it.  Update calls to above macros.
490         (build_symbol_table_entry): New function.
491         (build_symbol_entry): Call it.  Update calls to above macros.
492         (emit_symbol_table): Likewise.
493         (make_catch_class_record): Update calls to above macros.
494         (build_assertion_table_entry): New function.
495         (add_assertion_table_entry): Call it.
496         (emit_assertion_table): Likewise.
497
498 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
499
500         PR 40989
501         * lang.c (java_handle_option): Add argument kind.
502
503 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
504
505         * decl.c (java_init_decl_processing): Remove argument in call to
506         initialize_sizetypes
507
508 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
509
510         * exception.cc (_Jv_Throw): Avoid set but not used warning.
511         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
512         sizeof to avoid set but not used warnings.
513
514 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
515
516         * lang.c (java_post_options): Constify variable "dot".
517
518         * jcf-parse.c (set_source_filename): Constify variable "dot".
519         (load_class): Constify variable "separator".
520         Use get_identifier_with_length.
521
522         * jvspec.c (lang_specific_driver): Constify two variables named "p".
523
524 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
525
526         * jcf-dump.c (version): Update copyright notice dates.
527
528 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
529
530         * jvspec.c (lang_specific_driver): Remove unused
531         saw_verbose_flag variable.
532         * jcf-dump.c (main): Remove unused general_purpose_bits
533         variable.
534         * builtins.c (initialize_builtins): Remove unused float_ftype_float
535         variable.
536         * expr.c (java_stack_pop): Remove unused val variable.
537         (build_jni_stub): Remove unused res_type variable.
538         * verify-impl.c (check_field_constant): Remove unused len variable.
539
540 2009-10-20  Joel Dice <dicej@mailsnare.net>
541
542         PR java/28474
543         * mangle_name.c (append_unicode_mangled_name): Fix mangling
544         of names with multiple underscores and "U".
545         (unicode_mangling_length): Likewise.
546
547 2009-10-03  Simon Baldwin  <simonb@google.com>
548
549         * config-lang.in (lang_dirs): Remove zlib.
550
551 2009-09-28  Richard Henderson  <rth@redhat.com>
552
553         * builtins.c (initialize_builtins): Update call to
554         build_common_builtin_nodes.
555         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
556
557 2009-09-14  Richard Henderson  <rth@redhat.com>
558
559         * builtins.c (initialize_builtins): Update call to
560         build_common_builtin_nodes.
561         * decl.c (java_init_decl_processing): Don't call
562         default_init_unwind_resume_libfunc.
563         * except.c: Include tree-iterator.h.
564         (build_exception_object_var): New.
565         (build_exception_object_ref): Use it.
566         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
567         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
568         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
569
570 2009-09-13  Richard Guenther  <rguenther@suse.de>
571         Rafael Avila de Espindola  <espindola@google.com>
572
573         * decl.c (do_nothing): Remove.
574         (java_init_decl_processing): Do not set lang_eh_runtime_type.
575         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
576         * lang.c (java_eh_personality): New.
577         (java_eh_personality_decl): Likewise.
578         (LANG_HOOKS_EH_PERSONALITY): Define.
579
580 2009-09-03  Diego Novillo  <dnovillo@google.com>
581
582         * lang.c (lang_hooks): Remove const qualifier.
583
584 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
585
586         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
587         type.
588
589 2009-09-01  Richard Guenther  <rguenther@suse.de>
590
591         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
592         * java-tree.h (java_mark_addressable): Likewise.
593         * typeck.c (java_mark_addressable): Likewise.
594
595 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
596
597         * Make-lang.in (java.install-pdf): Install gcj.pdf in
598         $(pdfdir)/gcc, alongside the other manuals.
599
600 2009-08-12  Andrew Haley  <aph@redhat.com>
601
602         * builtins.c (compareAndSwapInt_builtin): Use
603         flag_use_atomic_builtins.
604         (compareAndSwapLong_builtin): Likewise.
605         (compareAndSwapObject_builtin): Likewise.
606         * jvspec.c: Add flag_use_atomic_builtins.
607         * gcj.texi: Likewise.
608         * java-tree.h: Likewise.
609         * lang.opt: Likewise.
610
611 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
612
613         PR debug/40990
614         * lang.c (put_decl_node): Outputs different level of information
615         depending on the verbosity level.
616
617 2009-07-31  Andrew Haley  <aph@redhat.com>
618
619         PR java/40867
620         * decl.c (java_replace_references): Set EXPR_LOCATION on all
621         generated expressions.
622         (binding_level.loc): new field.
623         (clear_binding_level): Initialize loc.
624         (set_input_location): New function.
625         (pushlevel): Set new binding_level.loc.
626         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
627         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
628         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
629
630 2009-07-17  Richard Guenther  <rguenther@suse.de>
631
632         PR c/40401
633         * java-gimplify.c (java_genericize): Do not gimplify here.
634         But replace all local references.
635         (java_gimplify_expr): Do not replace local references here.
636         (java_gimplify_modify_expr): Likewise.
637         * jcf-parse.c (java_parse_file): Do not finalize the CU or
638         optimize the cgraph here.
639         * decl.c (java_replace_reference): Make static.
640         (java_replace_references): New function.
641         (end_java_method): Clear base_decl_map.
642         * java-tree.h (java_replace_references): Declare.
643         (java_replace_reference): Remove.
644
645 2009-07-14  Taras Glek  <tglek@mozilla.com>
646             Rafael Espindola  <espindola@google.com>
647
648         * Make-lang.in (java.install-plugin): New target for
649         installing plugin headers.
650
651 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
652
653         * class.c: Replace %J by an explicit location. Update all calls.
654         
655 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
656
657         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
658
659 2009-06-29  Andrew Haley  <aph@redhat.com>
660
661         PR java/40590
662         * java-tree.h (cxx_keyword_p): New declaration.
663         * mangle_name.c (utf8_cmp): Move here from mangle.c.
664         (cxx_keywords): Likewise.
665         (cxx_keyword_p): Likewise.
666         (MANGLE_CXX_KEYWORDS): New macro.
667         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
668         (append_gpp_mangled_name): Likewise.
669         * mangle.c: Move code to mangle_name.c. 
670         (mangle_member_name): Don't call cxx_keyword_p.
671
672 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
673
674         * java-gimplify.c (java_gimplify_block): New argument to
675         build_empty_stmt.
676         * expr.c (force_evaluation_order): Same.
677         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
678         * class.c: Same.
679         * decl.c: Same.
680         * jcf-parse.c: Same.
681         * constants.c: Same.
682         * resource.c: Same.
683         * except.c: Same.
684         * builtins.c: Same.
685         * expr.c: Same.
686         * java-tree.h (PUSH_FIELD): Add location field.
687         
688 2009-06-09  Ian Lance Taylor  <iant@google.com>
689
690         * verify.h: Remove extern "C".
691
692 2009-06-07  Ian Lance Taylor  <iant@google.com>
693
694         * jcf-parse.c (handle_constant): Change local variable 'kind' to
695         unsigned int.
696
697 2009-06-01  Ian Lance Taylor  <iant@google.com>
698
699         * jcf-io.c (find_class): Use CONST_CAST.
700
701 2009-05-27  Ian Lance Taylor  <iant@google.com>
702
703         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
704         $(LINKER).
705         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
706
707 2009-05-26  Ian Lance Taylor  <iant@google.com>
708
709         * Make-lang.in (jvspec.o): Use $(COMPILER).
710         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
711         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
712
713 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
714
715         * Make-lang.in (GCJ): Renamed to...
716         (XGCJ): ... this.
717
718 2009-04-27  Ian Lance Taylor  <iant@google.com>
719
720         * builtins.c (java_builtins): Add casts to enum type.
721         * verify-impl.c (check_class_constant): Add cast to enum type.
722         (check_constant, check_wide_constant): Likewise.
723
724 2009-04-27  Richard Guenther  <rguenther@suse.de>
725
726         PR java/38374
727         * constants.c (build_constants_constructor): Retain the old
728         pointer type as valid TYPE_POINTER_TO after patching the
729         type of the constant pool decl.
730
731 2009-04-24  Ian Lance Taylor  <iant@google.com>
732
733         * jcf-parse.c (handle_constant): Add cast to enum type.
734
735 2009-04-21  Taras Glek <tglek@mozilla.com>
736
737         * builtins.c: Update GTY annotations to new syntax
738         * decl.c: Likewise
739         * java-tree.h: Likewise
740         * jcf.h: Likewise
741         * lang.c: Likewise
742
743 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
744
745         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
746         license notices.
747
748 2009-04-18  Ian Lance Taylor  <iant@google.com>
749
750         * verify-impl.c (verify_instructions_0): Add cast to enum type.
751
752 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
753
754         * builtins.c (compareAndSwapLong_builtin,
755         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
756         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
757
758 2009-03-31  Richard Guenther  <rguenther@suse.de>
759
760         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
761         the first operand of binary and comaprison expressions.
762
763 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
764
765         PR rtl-optimization/323
766         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
767         Give an error for -fexcess-precision=standard for processors where
768         the option is significant.
769
770 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
771
772         * lang.opt: Unify help text for -Wdeprecated.
773
774 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
775
776         * jcf-dump.c (version): Update copyright notice dates.
777
778 2009-01-16  Richard Guenther  <rguenther@suse.de>
779
780         PR tree-optimization/38835
781         PR middle-end/36227
782         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
783
784 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
785
786         PR bootstrap/38262
787         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
788
789 2008-11-04  Andrew Haley  <aph@redhat.com>
790
791         PR java/37068
792         * jcf-parse.c (java_emit_static_constructor): Don't call
793         cgraph_build_static_cdtor.  Rewrite.
794
795 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
796
797         * Make-lang.in (check-java-subtargets): New target.
798
799 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
800
801         PR target/35483
802         * Make-lang.in (class.o): Depend on $(TM_P_H).
803         (expr.o): Same.
804         * class.c: Include tm_p.h.
805         * expr.c: Include tm_p.h.
806
807 2008-10-14  Andrew Haley  <aph@redhat.com>
808
809         * constants.c (build_constant_data_ref): Make sure we only build
810         one copy of the decl for the constant pool.
811
812 2008-09-22  Andrew Haley  <aph@redhat.com>
813
814         * expr.c (rules): Add new rule for
815         gnu.java.lang.VMCPStringBuilder.toString.
816         (rewrite_rule.new_classname): New field.
817         (maybe_rewrite_invocation): Use new_classname field instead of
818         DECL_CONTEXT (*method_p).
819         Allow rewrite_arglist to be NULL.
820
821 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
822
823         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
824         (java_get_callee_fndecl): Kill.
825
826 2008-09-17  Jan Hubicka  <jh@suse.cz>
827
828         PR c++/18071
829         * class.c (add_method_1): Do not initialize DECL_INLINE.
830         (make_local_function_alias): Likewise.
831         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
832         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
833
834 2008-09-09  Richard Guenther  <rguenther@suse.de>
835
836         * decl.c (build_result_decl): Remove no longer applicable
837         promotion.
838
839 2008-09-05  David Daney  <ddaney@avtrex.com>
840
841         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
842
843 2008-08-21  David Daney  <ddaney@avtrex.com>
844
845         * class.c (make_class_data): Don't add field_index when
846         flag_reduced_reflection set.
847
848 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
849
850         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
851
852 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
853
854         PR 28875
855         * lang.c (java_handle_option): Replace set_Wunused with
856         warn_unused.
857
858 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
859
860         * gcj.texi: Update copyright years.  Do not list GPL as
861         Invariant Section.
862
863 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
864
865         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
866         from ctype's sizes.
867
868         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
869         alignment.
870
871 2008-07-29  Jan Hubicka  <jh@suse.cz>
872
873         * lang.c (java_post_options): Remove handling of flag_no_inline.
874
875 2008-07-28  Richard Guenther  <rguenther@suse.de>
876
877         Merge from gimple-tuples-branch.
878
879         2008-07-18  Richard Guenther  <rguenther@suse.de>
880
881         * expr.c: Include tree-iterator.h.
882         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
883
884         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
885
886         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
887         * expr.c: Same.
888
889         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
890
891         * java-gimplify.c (java_gimplify_expr): Same.
892         (java_gimplify_modify_expr): Same.
893         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
894
895         2008-05-02  Diego Novillo  <dnovillo@google.com>
896
897         * expr.c (build_java_throw_out_of_bounds_exception): Fix
898         mixed declarations and code.
899
900         2008-05-02  Doug Kwan  <dougkwan@google.com>
901         
902         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
903         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
904
905         2008-02-19  Diego Novillo  <dnovillo@google.com>
906
907         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
908
909         * java-gimplify.c (java_gimplify_self_mod_expr): Change
910         gimple_seq arguments to gimple_seq *.  Update all users.
911
912         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
913
914         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
915         sequences.
916         (java_gimplify_self_mod_expr): Same.                                    
917         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
918         sequences.
919
920 2008-07-24  Jan Hubicka  <jh@suse.cz>
921
922         * java/decl.c: Include cgraph.h
923         (end_java_method): Remove non-unit-at-a-time code.
924         (java_mark_decl_local): Likewise; sanity check that we don't touch
925         finalized nodes.
926
927 2008-07-15  Jan Hubicka  <jh@suse.cz>
928
929         * lang.c (java_init_options): Enable unit-at-a-time by default.
930
931 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
932
933         * Make-lang.in (jvspec.o): Fix dependencies.
934
935 2008-07-06  Tom Tromey  <tromey@redhat.com>
936
937         * Make-lang.in (java/parse.o-warn): Remove.
938         (java/jcf-io.o-warn): Remove.
939
940 2008-07-05  Tom Tromey  <tromey@redhat.com>
941
942         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
943         (compare_path): Remove.
944         (java_or_class_file): Likewise.
945         (memoized_dirlist_entry): Likewise.
946         (memoized_dirlist_hash): Likewise.
947         (memoized_dirlist_lookup_eq): Likewise.
948         (memoized_dirlists): Likewise.
949         (caching_stat): Likewise.
950         (find_class): Use stat.
951         * jcf.h (JCF_USE_SCANDIR): Remove.
952
953 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
954
955         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
956         doc/rebuild-gcj-db.1
957         (java.uninstall): Likewise.
958         (java.maintainer-clean): Likewise.
959         (aot-compile.pod): New rule.
960         (rebuild-gcj-db.pod): New rule.
961         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
962         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
963
964 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
965
966         * Make-lang.in (java/jcf-io.o-warn): New.
967
968 2008-06-24  Tom Tromey  <tromey@redhat.com>
969
970         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
971         * expr.c (add_type_assertion): Rename argument.
972         (build_java_arrayaccess): Don't name variable 'throw'.
973         (ARRAY_NEW_MULTI): Don't name variable 'class'.
974         * jcf-io.c (find_class): Don't name variable 'class'.
975         * mangle.c (compression_table_add): Don't name variable 'new'.
976         * constants.c (cpool_for_class): Rename argument.
977         (alloc_constant_fieldref): Likewise.
978         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
979         'class'.
980         (read_class): Likewise.
981         (parse_zip_file_entries): Likewise.
982         (process_zip_dir): Likewise.
983         * decl.c (java_mark_class_local): Rename argument.
984         * class.c (GEN_TABLE): Use type_name, not typename.
985         (gen_indirect_dispatch_tables): Likewise.
986         (add_field): Rename argument.
987         (is_compiled_class): Likewise.
988         (safe_layout_class): Likewise.
989         (emit_assertion_table): Likewise.
990         * typeck.c (has_method): Rename argument.
991
992 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
993
994         * class.c (ident_subst, mangled_classname, unmangle_classname,
995         gen_indirect_dispatch_tables, add_method_1,
996         build_fieldref_cache_entry, make_local_function_alias,
997         layout_class, java_treetreehash_find, java_treetreehash_new,
998         split_qualified_name): Fix for -Wc++-compat.
999         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1000         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1001         start_java_method): Likewise.
1002         * except.c (prepare_eh_table_type): Likewise.
1003         * expr.c (type_assertion_hash, note_instructions): Likewise.
1004         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1005         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1006         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1007         Likewise.
1008         * jcf-parse.c (reverse, java_read_sourcefilenames,
1009         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1010         process_zip_dir): Likewise.
1011         * jcf-path.c (add_entry, add_path, jcf_path_init,
1012         jcf_path_extdirs_arg): Likewise.
1013         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1014         * jvgenmain.c (do_mangle_classname): Likewise.
1015         * lang.c (put_decl_string): Likewise.
1016         * verify-impl.c (make_state_copy, make_state, add_new_state):
1017         Likewise.
1018
1019 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1020
1021         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1022
1023 2008-06-14  Tom Tromey  <tromey@redhat.com>
1024
1025         PR java/36247:
1026         * class.c (build_class_ref): Initialize this_classdollar when
1027         needed.
1028
1029 2008-05-23  Andrew Haley  <aph@redhat.com>
1030
1031         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1032         pathname of source file.
1033
1034 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1035
1036         * jcf-dump.c (print_constant): Use
1037         HOST_LONG_LONG_FORMAT.
1038
1039 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1040
1041         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1042         DECL_PURE_P.
1043
1044 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1045
1046         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1047         (build_classdollar_field): Don't set TREE_INVARIANT.
1048         (get_dispatch_table): Don't set TREE_INVARIANT.
1049         (make_class_data): Don't set TREE_INVARIANT.
1050         (build_symbol_entry): Don't set TREE_INVARIANT.
1051         (emit_symbol_table): Don't set TREE_INVARIANT.
1052         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1053         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1054         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1055         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1056
1057 2008-04-03  Tom Tromey  <tromey@redhat.com>
1058
1059         * Make-lang.in (java_OBJS): New variable.
1060
1061 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1062
1063         * java-tree.h (insert_block): Kill.
1064         * decl.c (insert_block): Kill.
1065                 
1066 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1067
1068         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1069         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1070         gpl.texi.
1071
1072 2008-03-27  Tom Tromey  <tromey@redhat.com>
1073
1074         * Make-lang.in: Revert automatic dependency patch.
1075
1076 2008-03-25  Tom Tromey  <tromey@redhat.com>
1077
1078         * Make-lang.in: Removed most explicit .o targets.
1079         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1080         ($(GCJ)$(exeext)): Update.
1081         (JAVA_OBJS): New variable.
1082         (JCFDUMP_OBJS): Reformat.
1083         (java_OBJS): New variable.
1084         (java/jvspec.o-warn): Update.
1085         (java/parse.o-warn): Remove.
1086         (JAVA_TREE_H): Remove.
1087         (java/jcf-io.o): Reduce to variable setting.
1088         (ALL_CPPFLAGS): Likewise.
1089
1090 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1091
1092         * mangle.c (java_mangle_decl): Remove dead check.
1093
1094 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1095
1096         * jcf-parse.c (java_parse_file): Assert binding levels are
1097         left in order.
1098         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1099         Delete.
1100
1101 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1102
1103         * jcf-dump.c (version): Update copyright notice dates.
1104
1105 2008-02-29  Tom Tromey  <tromey@redhat.com>
1106
1107         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1108         method.
1109         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1110
1111 2008-02-26  Tom Tromey  <tromey@redhat.com>
1112
1113         * lang.c (java_post_options): Remove conditional.
1114         * expr.c (expand_byte_code): Remove old location code.
1115         * jcf-parse.c (set_source_filename): Remove old location code.
1116         (give_name_to_class): Likewise.
1117         (jcf_parse): Likewise.
1118         (duplicate_class_warning): Likewise.
1119         (parse_class_file): Likewise.
1120         (java_parse_file): Likewise.
1121         * decl.c (finish_method): Remove old location code.
1122         * class.c (push_class): Remove old location code.
1123
1124 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1125
1126         PR other/35107
1127         * Make-lang.in (jc1): Add $(GMPLIBS).
1128
1129 2008-01-23  David Daney  <ddaney@avtrex.com>
1130
1131         * class.c (hide)  Rename to...
1132         (java_hide_decl) ... this throughout, and make public.
1133         * resource.c (Jr_count): Remove.
1134         (compile_resource_data): Call java_mangle_resource_name to generate
1135         decl name.  Make resource decl public and hidden.
1136         * mangle.c (java_mangle_resource_name): New function.
1137         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1138         functions.
1139
1140 2008-01-04  Andrew Haley  <aph@redhat.com>
1141
1142         PR java/17779
1143         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1144         C90.
1145
1146 2008-01-03  Andrew Haley  <aph@redhat.com>
1147
1148         PR java/17779
1149         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1150         we're about to re-layout the type.
1151
1152 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1153
1154         * lang.c (java_classify_record): Don't return
1155         RECORD_IS_INTERFACE for now.
1156
1157 2007-12-18  Andrew Haley  <aph@redhat.com>
1158
1159         PR java/27643
1160         * jcf-parse.c (java_parse_file): Remove call to
1161         java_mark_class_local.
1162         (parse_class_file): Reinstate call to java_mark_class_local here.
1163         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1164         already set, call java_mangle_decl() and make_decl_rtl() to
1165         rewrite its name as a hidden alias.
1166
1167 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1168
1169         PR debug/7081
1170         * lang.c (java_classify_record): New.
1171         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1172
1173 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1174
1175         PR 34081/C++
1176         * decl.c (finish_method): Pass 'false' for the new
1177         allocate_struct_function parameter.
1178
1179 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1180
1181         * expr.c (build_jni_stub): Use the computed jni func type for
1182         variable meth.
1183
1184 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1185
1186         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1187
1188 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1189
1190         * expr.c (type_assertion_hash): Hash type uids rather than
1191         tree pointers.
1192
1193 2007-11-17  David Daney  <ddaney@avtrex.com>
1194             Andrew Haley  <aph@redhat.com>
1195
1196         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1197         insead of BITS_PER_WORD in big-endian work around.
1198
1199 2007-11-07  Tom Tromey  <tromey@redhat.com>
1200
1201         PR java/34019:
1202         * gcj.texi (Input Options): Add missing noun.
1203
1204 2007-11-02  Tom Tromey  <tromey@redhat.com>
1205
1206         PR java/33765:
1207         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1208         * zipfile.h (ZIPEMPTYMAGIC): New define.
1209
1210 2007-11-01  Tom Tromey  <tromey@redhat.com>
1211
1212         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1213         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1214         (java/jcf-io.o): Depend on zipfile.h.
1215
1216 2007-10-17  Richard Guenther  <rguenther@suse.de>
1217
1218         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1219         dependencies.
1220
1221 2007-10-03  Andrew Haley  <aph@redhat.com>
1222
1223         PR java/33639
1224         * class.c (mangled_classname): Detect and replace illegal
1225         characters in assembly language symbols.
1226         (gen_indirect_dispatch_tables): Call mangled_classname() on
1227         the type.
1228
1229 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1230
1231         * lang.c (java_print_error_function): Add third argument.
1232
1233 2007-09-15  Tom Tromey  <tromey@redhat.com>
1234
1235         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1236         Remove.
1237         <init_final>: Likewise.
1238         * lang.c (java_dump_tree): Update.
1239         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1240
1241 2007-09-11  Jan Hubicka <jh@suse.cz>
1242
1243         * decl.c (java_expand_body): Kill.
1244         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1245
1246 2007-09-06  Tom Tromey  <tromey@redhat.com>
1247
1248         * jcf-parse.c (parse_class_file): Re-enter the current file.
1249
1250 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1251
1252         * boehm.c (mark_reference_fields): Move misaligned pointer check
1253         after JREFERENCE_TYPE_P test
1254
1255 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1256
1257         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1258         if pointer is misaligned.
1259
1260 2007-09-06  Tom Tromey  <tromey@redhat.com>
1261
1262         * lang.c (java_post_options): Update.
1263         * jcf-parse.c (set_source_filename): Update.
1264         (give_name_to_class): Update.
1265         (jcf_parse): Update.
1266         (duplicate_class_warning): Update.
1267         (parse_class_file): Update.
1268         (java_parse_file): Update.
1269         * expr.c (expand_byte_code): Update.
1270
1271 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1272
1273         * decl.c (finish_method): Use set_cfun.
1274
1275 2007-09-04  Andrew Haley  <aph@redhat.com>
1276
1277         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1278         when using the ARM EABI.
1279
1280 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1281
1282         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1283
1284 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1285
1286         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1287         CONST_CAST.
1288         * jcf.h (JCF_FINISH): Likewise.
1289
1290 2007-08-28  Tom Tromey  <tromey@redhat.com>
1291
1292         * Make-lang.in (java.tags): Don't tag '*.y' files.
1293
1294 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1295
1296         * lang.c (java_decl_ok_for_sibcall): Likewise.
1297
1298 2007-08-21  Paul Brook  <paul@codesourcery.com>
1299             Nathan Sidwell  <nathan@codesourcery.com>
1300             Mark Mitchell  <mark@codesourcery.com>
1301             Joseph Myers  <joseph@codesourcery.com>
1302
1303         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1304         date.
1305
1306 2007-08-20  Richard Guenther  <rguenther@suse.de>
1307
1308         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1309         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1310
1311 2007-08-17  Tom Tromey  <tromey@redhat.com>
1312
1313         * typeck.c (find_method_in_interfaces): Update.
1314         * jcf-parse.c (load_class): Update.
1315         * java-gimplify.c (java_gimplify_component_ref): Removed.
1316         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1317         arguments.
1318         (java_gimplify_expr): Update.
1319         * decl.c (java_init_decl_processing): Update.
1320         * class.c (set_constant_value): Update.
1321         (make_class_data): Update.
1322         (finish_class): Update.
1323         (build_static_field_ref): Update.
1324         (is_compiled_class): Update.
1325         (maybe_layout_super_class): Update.
1326         (layout_class): Update.
1327         (layout_class_method): Update.
1328         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1329         (lang_decl_var) <am, final_iud, cif>: Removed fields.
1330         (lang_decl_func) <init_calls_this>: Removed field.
1331         (lang_type) <dot_class, verify_method>: Removed fields.
1332         (FIELD_NESTED_ACCESS): Removed.
1333         (FIELD_NESTED_ACCESS_P): Removed.
1334         (DECL_FIELD_FINAL_IUD): Removed.
1335         (DECL_LOCAL_FINAL_IUD): Removed
1336         (LOCAL_FINAL_P): Removed.
1337         (FINAL_VARIABLE_P): Removed.
1338         (CLASS_FINAL_VARIABLE_P): Removed.
1339         (DECL_BIT_INDEX): Removed.
1340         (DECL_INIT_CALLS_THIS): Removed.
1341         (FIELD_LOCAL_ALIAS): Removed.
1342         (FIELD_LOCAL_ALIAS_USED): Removed.
1343         (FIELD_THISN): Removed.
1344         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1345         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1346         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1347         (TYPE_DOT_CLASS): Removed.
1348         (TYPE_VERIFY_METHOD): Removed.
1349         (ID_CLASSDOLLAR_P): Removed.
1350         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1351         Removed.
1352         (classdollar_identifier_node): Removed.
1353         (TYPE_UNKNOWN): Removed.
1354         (CLASS_FROM_SOURCE_P): Removed.
1355         * expr.c (build_jni_stub): Update.
1356         (force_evaluation_order): Update.
1357         (build_java_empty_stmt): Update.
1358         (build_class_init): Update.
1359         (java_stack_swap): Update.
1360         (build_jni_stub): Update.
1361
1362 2007-08-17  Tom Tromey  <tromey@redhat.com>
1363
1364         * java-tree.h (LABEL_TYPE_STATE): Removed.
1365         (load_type_state): Removed.
1366         (LABEL_PC): Removed.
1367         (LABEL_VERIFIED): Removed.
1368         (type_states): Declare.
1369         * expr.c (type_states): New global.
1370         (load_type_state): Now static.  Use type_states.  Changed
1371         argument.
1372         (lookup_label): Don't set LABEL_PC.
1373         (expand_byte_code): Don't use LABEL_VERIFIED.
1374         (note_instructions): Initialize type_states.
1375         * verify-glue.c (vfy_note_stack_depth): Rewrote.
1376         (vfy_note_stack_type): Use type_states.
1377         (vfy_note_local_type): Likewise.
1378
1379 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1380
1381         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1382         * jcf.h (JCF_FINISH): Likewise.
1383
1384 2007-07-31  Nick Clifton  <nickc@redhat.com>
1385
1386         * java-gimplify.c: Change copyright header to refer to version 3
1387         of the GNU General Public License and to point readers at the
1388         COPYING3 file and the FSF's license web page.
1389         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1390         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1391         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1392         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1393         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1394         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1395         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1396
1397 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1398
1399         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1400
1401 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1402
1403         * lang.c (java_get_callee_fndecl): Constify.
1404
1405 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1406
1407         * mangle.c (set_type_package_list): Constify.
1408         * verify-glue.c (vfy_make_string): Delete.
1409         * verify.h (vfy_make_string): Likewise.
1410
1411 2007-07-26  Tom Tromey  <tromey@redhat.com>
1412
1413         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1414         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1415         EXIT_BLOCK_LABELED_BLOCK): Likewise.
1416         * lang.c (java_tree_inlining_walk_subtrees): Update.
1417         (java_dump_tree): Likewise.
1418         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1419         Remove.
1420         * decl.c (push_labeled_block, pop_labeled_block): Remove.
1421         * java-gimplify.c (java_gimplify_labeled_block_expr,
1422         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1423         (java_gimplify_expr): Update.
1424
1425 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1426
1427         * class.c (java_treetreehash_hash, java_treetreehash_compare):
1428         Constify. 
1429         * expr.c (type_assertion_eq): Likewise.
1430         * jcf-io.c (compare_path): Likewise.
1431         * jcf-parse.c (cmpstringp): Likewise.
1432         * verify-impl.c (get_one_type, compute_argument_types,
1433         compute_return_type): Likewise. 
1434
1435 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1436
1437         PR target/32462
1438         PR libgcj/32465
1439         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1440
1441 2007-07-12  Richard Guenther  <rguenther@suse.de>
1442
1443         * expr.c (expand_java_return): RETURN_EXPR has void type.
1444         (build_jni_stub): Likewise.  Use a comparison against zero
1445         for null-pointer test in COND_EXPR.
1446         (build_field_ref): Build POINTER_PLUS_EXPR with correct
1447         type.  Convert result instead.
1448         (build_invokevirtual): Likewise.
1449
1450 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1451
1452         PR 32617
1453         * lang.c (java_init): Remove setting of force_align_functions_log.
1454         * class.c (add_method_1): Set DECL_ALIGN of non-static method
1455         to cope with ptrmemfunc_vbit_in_pfn.
1456
1457 2007-07-03  David Daney  <ddaney@avtrex.com>
1458
1459         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
1460         include path.
1461         (doc/gcj.dvi): Same.
1462         (doc/gcj.pdf): Same.
1463         (java/index.html): Same.
1464
1465 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
1466
1467         * class.c (make_class_data): Build the index in sizetype.
1468         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1469         adding to a pointer type.
1470         (build_symbol_entry): Likewise.
1471         * expr.c (build_java_arrayaccess): Likewise.
1472         (build_field_ref): Likewise.
1473         (build_known_method_ref): Likewise.
1474         (build_invokevirtual): Likewise.
1475         * except.c (build_exception_object_ref): Do a
1476         NEGATIVE and then a POINTER_PLUS_EXPR instead
1477         of a MINUS_EXPR.
1478
1479 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
1480
1481         * typeck.c (java_signed_type): Remove.
1482         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1483         * java-tree.h (java_signed_type): Remove.
1484
1485 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1486
1487         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1488         (print_constant): Likewise.
1489
1490 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
1491
1492         * expr.c (build_java_binop): Use unsigned_type_for instead of
1493         java_unsigned_type.
1494         * java-tree.h (java_unsigned_type): Remove.
1495         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1496         * typeck.c (java_unsigned_type): Remove.
1497
1498 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1499
1500         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1501         instead of checking GIMPLE_STMT_P in chain_next.
1502
1503 2007-04-06  Colin Walters  <walters@redhat.com>
1504
1505         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1506         * jcf-io.c (open_class): Copy 'filename'.
1507
1508 2007-04-03  Andrew Haley  <aph@redhat.com>
1509
1510         * jvgenmain.c (main): Change main to use class$, not class$$.
1511         (do_mangle_classname): Likewise.
1512         * class.c (hide): New function.
1513         (add_field): Hide everything that shouldn't be visible outside a
1514         DSO.
1515         (build_static_class_ref): Likewise.
1516         (build_classdollar_field): Likewise.
1517         (make_class_data): Likewise.
1518         (layout_class_method): Likewise.
1519         * expr.c (special_method_p): New function.
1520
1521         * class.c (push_class): Don't bogusly guess the source filename.
1522         * jcf-parse.c (give_name_to_class): Don't set input_location from
1523         DECL_ARTIFICIAL decls.
1524
1525 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1526
1527         * typeck.c (java_signed_or_unsigned_type): Removed.
1528         (java_signed_type): use get_signed_or_unsigned_type instead of
1529         java_signed_or_unsigned_type.
1530         (java_unsigned_type): Ditto.
1531         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1532         * java-tree.h (java_signed_or_unsigned_type): Removed.
1533
1534 2007-03-26  Tom Tromey  <tromey@redhat.com>
1535
1536         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1537         (java.maintainer-clean): Likewise.
1538         (java.install-man): Likewise.
1539         (.INTERMEDIATE): Removed grmiregistry.pod.
1540         (grmiregistry.pod): Removed.
1541         * gcj.texi (Invoking gcjh): Removed.
1542         (Invoking gjnih): Likewise.
1543         (Invoking grmiregistry): Likewise.
1544         (direntry): Updated.
1545         (Top): Likewise.
1546         (which-gcj): Removed.
1547
1548 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1549
1550         * Make-lang.in: Add install-pdf target as copied from
1551         automake v1.10 rules.
1552
1553 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1554
1555         * gcj.texi: Standardize title page.
1556
1557 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1558
1559         * class.c: Fix a comment typo.
1560
1561 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1562             Brooks Moses  <brooks.moses@codesourcery.com>
1563             Lee Millward  <lee.millward@codesourcery.com>
1564
1565         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1566         of build3.
1567         (BUILD_MONITOR_EXIT): Likewise.
1568
1569         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1570         (java_gimplify_modify_expr): Likewise.
1571
1572         * class.c (cache_this_class_ref): Use build_call_expr.
1573         (build_static_field_ref): Likewise.
1574         (emit_indirect_register_classes): Likewise.
1575         (emit_register_classes): Likewise.
1576
1577         * resource.c (write_resource_constructor): Use build_call_expr.
1578
1579         * builtins.c (builtin_creator_function): Change interpretation of
1580         the second parameter to be the whole CALL_EXPR instead of the arglist.
1581         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1582         (min_builtin): Likewise.
1583         (abs_builtin): Likewise.
1584         (java_build_function_call_expr): Likewise.
1585         (convert_real): Likewise.
1586         (UNMARSHAL3): Likewise.
1587         (UNMARSHAL4): Likewise.
1588         (UNMARSHAL5): Likewise.
1589         (build_arglist_for_builtin): Delete.  Fix callers to use
1590         build_call_expr instead.
1591         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1592         accessors.
1593         (compareAndSwapInt_builtin): Likewise.
1594         (compareAndSwapLong_builtin): Likewise.
1595         (compareAndSwapObject_builtin): Likewise.
1596         (putVolatile_builtin): Likewise.
1597         (getVolatile_builtin): Likewise.
1598         (VMSupportsCS8_builtin): Likewise.
1599         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1600         instead of arglist.
1601
1602         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1603         (build_java_throw_out_of_bounds_exception): Likewise.
1604         (java_check_reference): Likewise.
1605         (build_java_arraystore_check): Likewise.
1606         (build_newarray): Likewise.
1607         (build_anewarray): Likewise.
1608         (expand_java_multinewarray): Use build_call_list instead of build3.
1609         (build_java_monitor): Use build_call_nary instead of build3.
1610         (java_create_object): Likewise.
1611         (expand_java_NEW): Likewise.
1612         (build_instanceof): Likewise.
1613         (expand_java_CHECKCAST): Likewise.
1614         (build_java_soft_divmod): Likewise.
1615         (build_java_binop): Likewise.
1616         (build_field_ref): Likewise.
1617         (build_class_init): Likewise.
1618         (rewrite_arglist_getcaller): Use build_call_expr.
1619         (build_invokeinterface):  Use build_call_nary instead of build3.
1620         (expand_invoke): Use build_call_list instead of build3.
1621         (build_jni_stub): Use build_call_nary, build_call_list, or
1622         build_call_expr instead of build3.
1623         (expand_java_field_op): Use build_call_expr instead of build3.
1624         (force_evaluation_order): Use new CALL_EXPR accessors.
1625
1626         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1627
1628 2007-02-15  David Daney  <ddaney@avtrex.com>
1629
1630         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1631         (java.maintainer-clean):Add gc-analyze.1.
1632         (.INTERMEDIATE): Add gc-analyze.pod.
1633         (gc-analyze.pod): New rule.
1634         (java.install-man): Install gc-analyze.1
1635         * gcj.texi: Add new section for the gc-analyze program.
1636
1637 2007-02-07  Andrew Haley  <aph@redhat.com>
1638
1639         * class.c (uncache_this_class_ref): New.
1640         * expr.c (build_jni_stub): Initialize the class.
1641         (expand_byte_code): Call uncache_this_class_ref after generating
1642         code.
1643
1644 2007-02-06  Tom Tromey  <tromey@redhat.com>
1645
1646         PR java/30714:
1647         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1648
1649 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1650
1651         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1652
1653 2007-02-02  Andrew Haley  <aph@redhat.com>
1654
1655         * expr.c (expand_byte_code): Call cache_this_class_ref() and
1656         cache_cpool_data_ref().
1657         Set TYPE_CPOOL_DATA_REF.
1658         (cache_cpool_data_ref): New function.
1659         * constants.c (build_ref_from_constant_pool): Remove special-case
1660         code for flag_indirect_classes.
1661         (build_constant_data_ref): Move special-case code for
1662         flag_indirect_classes here from build_ref_from_constant_pool.
1663         * decl.c (finish_method): Move class initialization from here to
1664         cache_this_class_ref.
1665         * class.c (cache_this_class_ref): New function.
1666         (build_class_ref): Use this_classdollar for the ouput class.
1667
1668 2007-02-02  David Daney  <ddaney@avtrex.com>
1669
1670         * class.c (is_compiled_class): Move check to avoid reloading
1671         current class.
1672         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1673         already set.
1674
1675 2007-02-01  Andrew Haley  <aph@redhat.com>
1676
1677         PR java/30641
1678         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1679
1680 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1681
1682         * class.c, jcf-parse.c: Fix comment typos.
1683
1684 2007-01-30  Tom Tromey  <tromey@redhat.com>
1685
1686         * gcj.texi (Strings): Fix documentation for JvNewString.
1687
1688 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1689
1690         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1691         typos.
1692
1693 2007-01-30  Ben Elliston  <bje@au.ibm.com>
1694
1695         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1696
1697 2007-01-29  Tom Tromey  <tromey@redhat.com>
1698
1699         PR java/30607:
1700         * jvspec.c (lang_specific_driver): Handle separate -I argument.
1701         * lang.opt (-I): Add 'Separate'.
1702
1703 2007-01-29  Andrew Haley  <aph@redhat.com>
1704
1705         * class.c (add_method_1): Mark fndecl as external unless we are
1706         compiling it into this object file.
1707
1708 2007-01-24  Andrew Haley  <aph@redhat.com>
1709
1710         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1711         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1712
1713 2007-01-22  Andrew Haley  <aph@redhat.com>
1714
1715         * builtins.c (VMSupportsCS8_builtin): New function.
1716
1717 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1718
1719         PR java/30454
1720         * jcf-io.c (opendir_in_zip): Close the file
1721         and free zipf before returning after an error.
1722
1723 2007-01-16  Tom Tromey  <tromey@redhat.com>
1724
1725         * java-tree.def: Added copyright header.
1726
1727 2007-01-15  Tom Tromey  <tromey@redhat.com>
1728
1729         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1730         case.
1731         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1732         Removed case.
1733         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1734         (EXPR_WFL_NODE): Likewise.
1735         (EXPR_WFL_LINECOL): Likewise.
1736         (EXPR_WFL_FILENAME): Likewise.
1737         (EXPR_WFL_LINENO): Likewise.
1738         (build_expr_wfl, expr_add_location): Don't declare.
1739         (build_unknown_wfl): Removed.
1740         (EXPR_WFL_FILENAME_NODE): Removed.
1741         (EXPR_WFL_COLNO): Removed.
1742         (EXPR_WFL_SET_LINECOL): Removed.
1743         (DECL_FUNCTION_WFL): Removed.
1744         (DECL_FIELD_FINAL_WFL): Removed.
1745         (struct lang_decl_func) <wfl>: Removed field.
1746         <called_constructor>: Likewise.
1747         <inner_access>: Likewise.
1748         (struct lang_decl_var) <wfl>: Removed field.
1749         (DECL_CONSTRUCTOR_CALLS): Removed.
1750         (DECL_FUNCTION_ACCESS_DECL): Likewise.
1751         (DECL_FUNCTION_INNER_ACCESS): Likewise.
1752         (DECL_SPECIFIC_COUNT): Likewise.
1753         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1754         * expr.c (build_expr_wfl): Removed.
1755         (expr_add_location): Likewise.
1756
1757 2007-01-12  Tom Tromey  <tromey@redhat.com>
1758
1759         * jcf-dump.c (main): Updated call to find_class.
1760         * lang.c (java_init): Removed dead code.
1761         * jcf-parse.c (read_class): Don't use java_source field.  Removed
1762         dead code.
1763         (parse_zip_file_entries): Don't use java_source field.
1764         (process_zip_dir): Likewise.
1765         (jcf_parse): Removed dead code.
1766         (java_parse_file): Likewise.
1767         (read_class): Updated call to find_class.
1768         * jcf-io.c (find_class): Don't use java_source field.  Removed
1769         'source_ok' argument, .java logic.
1770         * jcf.h (JCF) <java_source>: Removed field.
1771         (JCF_ZERO): Updated.    (find_class): Updated.
1772         * decl.c: Removed dead code.
1773         * class.c: Removed dead code.
1774
1775 2007-01-11  Tom Tromey  <tromey@redhat.com>
1776
1777         * typeck.c (convert): Don't use flag_emit_class_files.
1778         * lang.c (java_post_options): Don't use flag_emit_class_files.
1779         (java_handle_option): Don't use flag_extraneous_semicolon or
1780         flag_redundant.
1781         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1782         flag_emit_class_files.
1783         (load_class): Likewise.
1784         * java-tree.h (flag_emit_class_files): Don't declare.
1785         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1786         (flag_extraneous_semicolon): Don't declare.
1787         (flag_not_overriding): Likewise.
1788         (flag_static_local_jdk1_1): Likewise.
1789         (flag_redundant): Likewise.
1790         * expr.c (build_newarray): Don't use flag_emit_class_files.
1791         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1792         flag_emit_class_files.
1793         (build_class_ref): Likewise.
1794         * builtins.c (check_for_builtin): Don't use
1795         flag_emit_class_files.
1796
1797 2007-01-10  Tom Tromey  <tromey@redhat.com>
1798
1799         * lang.c (java_can_use_bit_fields_p): Removed.
1800         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1801
1802 2007-01-09  Andrew Haley  <aph@redhat.com>
1803
1804         * expr.c (build_java_arrayaccess): Rewrite to generate array
1805         access in canonical form.
1806         (expand_java_arraystore): Use build_fold_addr_expr() on address of
1807         array access.
1808
1809 2007-01-03  Andrew Haley  <aph@redhat.com>
1810
1811         PR java/28754
1812         * expr.c (expand_java_field_op): If we're initializing a field's
1813         declaring interface we should not also initialize the class
1814         context in which it was referenced.
1815
1816 2007-01-02  Tom Tromey  <tromey@redhat.com>
1817
1818         * java-tree.h (compiling_from_source, current_encoding,
1819         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1820         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1821         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1822         JTI_WFL_OPERATOR): Removed
1823         (finit_identifier_node, instinit_identifier_node,
1824         length_identifier_node, super_identifier_node,
1825         continue_identifier_node, access0_identifier_node, wfl_operator):
1826         Removed.
1827         (cyclic_inheritance_report,
1828         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1829         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1830         DECL_FIXED_CONSTRUCTOR_P): Removed.
1831         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1832         Removed.
1833         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1834         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1835         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1836         import_list, import_demand_list>: Removed.
1837         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1838         cxx_keyword_p): Removed.
1839         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1840         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1841         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1842         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1843         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1844         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1845         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1846         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1847         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1848         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1849         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1850         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1851         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1852         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1853         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1854         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1855         java_parse_abort_on_error, extract_field_decl): Removed.
1856         (finput): Declare.
1857         * lang.c: (compiling_from_source, current_encoding): Removed.
1858         (java_handle_option): Ignore -fencoding.
1859         * parse.h: Don't include lex.h.
1860         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1861         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1862         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1863         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1864         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1865         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1866         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1867         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1868         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1869         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1870         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1871         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1872         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1873         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1874         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1875         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1876         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1877         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1878         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1879         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1880         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1881         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1882         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1883         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1884         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1885         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1886         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1887         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1888         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1889         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1890         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1891         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1892         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1893         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1894         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1895         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1896         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1897         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1898         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1899         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1900         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1901         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1902         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1903         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1904         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1905         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1906         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1907         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1908         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1909         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1910         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1911         SET_CPC_STATIC_INITIALIZER_STMT,
1912         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1913         java_complete_class, java_check_circular_reference,
1914         java_fix_constructors, java_layout_classes, java_reorder_fields,
1915         java_method_add_stmt, java_get_line_col, reset_report,
1916         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1917         java_finish_classes, ctxp, ctxp_for_generation,
1918         ctxp_for_generation_last): Removed.
1919         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1920         * mangle.c (utf8_cmp): New function.
1921         (cxx_keywords): New global.
1922         (cxx_keyword_p): New function.
1923         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1924         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1925         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1926         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1927         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1928         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1929         * Make-lang.in (java.srcextra): Do nothing.
1930         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1931         (JAVA_OBJS): Don't mention deleted files.
1932         (java.mostlyclean): Likewise.
1933         (java.clean): Likewise.
1934         (JAVA_LEX_C): Removed.
1935         (buffer.o, check-init.o, parse.o): Remove unused targets.
1936         (typeck.o): Updated.
1937         * jcf-parse.c (read_class): Comment out unused code.
1938         (java_layout_seen_class_methods): New function.
1939         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
1940         Removed.
1941         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
1942         (init_jcf_parse): Removed.
1943         * config-lang.in (gtfiles): Remove deleted files.
1944         * decl.c (java_init_decl_processing): Don't initialize
1945         finit_identifier_node, instinit_identifier_node,
1946         length_identifier_node, super_identifier_node,
1947         continue_identifier_node, access0_identifier_node.  Don't call
1948         init_jcf_parse.
1949         * class.c (cyclic_inheritance_report): New global.
1950         (add_method_1): Don't use
1951         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
1952         (maybe_layout_super_class): Comment out code.
1953         (safe_layout_class): New function.
1954         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
1955         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
1956         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
1957         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
1958         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
1959         (java_gimplify_case_expr): Removed.
1960         (java_gimplify_default_expr): Likewise.
1961         (java_gimplify_new_array_init): Likewise.
1962         * parse.y: Removed.
1963         * keyword.gperf, keyword.h: Removed.
1964         * chartables.h: Removed.
1965         * check-init.c: Removed.
1966         * buffer.c, buffer.h: Removed.
1967         * convert.h: Removed.
1968         * gen-table.pl: Removed.
1969         * lex.c, lex.h: Removed.
1970
1971 2007-01-02  Andrew Haley  <aph@redhat.com>
1972
1973         * expr.c (expand_java_arraystore): Make sure we perform a bounds
1974         check at runtime before we perform a type check.
1975
1976 2006-12-19  Andrew Haley  <aph@redhat.com>
1977
1978         * decl.c: Bump minor BC ABI version.
1979
1980 2006-12-13  Gary Benson  <gbenson@redhat.com>
1981
1982         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
1983
1984 2006-12-12  Tom Tromey  <tromey@redhat.com>
1985
1986         * lang-specs.h: Pass -M options to jc1.
1987         * jcf-depend.c (jcf_dependency_add_file): Don't emit
1988         dependencies.
1989
1990 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
1991
1992         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
1993
1994 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
1995
1996         * lang-specs.h: Pass '%U'-based options as separate arguments.
1997
1998 2006-12-05  Tom Tromey  <tromey@redhat.com>
1999
2000         PR java/29495:
2001         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2002         classes as well.
2003         * class.c (add_field): Handle ACC_SYNTHETIC.
2004         (add_method_1): Likewise.  Handle bridge and varargs.
2005         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2006         annotation.
2007         (set_class_decl_access_flags): Handle synthetic and annotation.
2008         * java-tree.h (METHOD_BRIDGE): New macro.
2009         (METHOD_VARARGS): Likewise.
2010         (TYPE_SYNTHETIC): Likewise.
2011         (TYPE_ANNOTATION): Likewise.
2012         (lang_type): New fields 'synthetic' and 'annotation'.
2013         (lang_decl_func): New fields 'varargs' and 'bridge'.
2014
2015 2006-12-04  Andrew Haley  <aph@redhat.com>
2016
2017         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2018         there's no map.
2019
2020 2006-11-29  Gary Benson  <gbenson@redhat.com>
2021
2022         * expr.c (rewrite_arglist_getcaller): Reorder.
2023
2024 2006-11-29  Andrew Haley  <aph@redhat.com>
2025
2026         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2027         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2028
2029 2006-11-23  Andrew Haley  <aph@redhat.com>
2030
2031         * expr.c (rewrite_arglist_getcaller): New.
2032         (rewrite_arglist_getclass): Fix indentation.
2033         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
2034         gnu.classpath.VMStackWalker.getCallingClassLoader().
2035         * builtins.c (initialize_builtins): Remove duplicate def'n of
2036         __sync_synchronize.
2037         Add __builtin_return_address.
2038
2039 2006-11-22  Andrew Haley  <aph@redhat.com>
2040
2041         * jcf-reader.c (get_attribute): Mark attr_type unused.
2042
2043         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2044
2045 2007-01-08  Richard Guenther  <rguenther@suse.de>
2046
2047         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2048         * jcf-parse.c (get_constant): Likewise.
2049
2050 2006-11-12  Jan Hubicka  <jh@suse.cz>
2051
2052         * resource.c (compile_resource_data): Update for new varpool names.
2053         * java/class.c (build_utf8_ref): Likewise.
2054
2055 2006-11-12  David Daney  <ddaney@avtrex.com>
2056
2057         PR java/29805
2058         * typeck.c (build_java_array_type): Increase buffer sizes.
2059
2060 2006-11-11  Richard Guenther  <rguenther@suse.de>
2061
2062         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2063         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2064
2065 2006-11-06  Andrew Haley  <aph@redhat.com>
2066
2067         * java-tree.h (CONSTANT_LazyFlag): New.
2068         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2069         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2070         reflection_data.
2071         (handle_constant): Return 0 for dummy cpool entries.
2072         Handle constants of kind Class.
2073         Handle constants of kind NameAndType.
2074         (handle_enclosingmethod_attribute): New.
2075         (handle_signature_attribute): New.
2076         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2077         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2078         (handle_constant): Use unmangle_classname()rather than calling
2079         identifier_subst() directly.
2080
2081 2006-11-02  Andrew Haley  <aph@redhat.com>
2082
2083         * java-tree.h (FIELD_ENUM): New.
2084         (lang_decl_var.field_enum): New.
2085         (lang_type.enum_class): New.
2086         (CLASS_ENUM): New.
2087         * class.c (set_class_decl_access_flags): Handle enum types.
2088         (add_field): Handle enum fields.
2089         (get_access_flags_from_decl): Likewise.
2090
2091         * class.c (make_class_data): Put reflection_data into rodata.
2092
2093 2006-11-01  Andrew Haley  <aph@redhat.com>
2094
2095         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2096         (jcf_parse): Write end marker to annotation_data.
2097         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2098         (annotation_grow, annotation_rewrite_byte) 
2099         (annotation_rewrite_short, annotation_rewrite_int) 
2100         (annotation_read_short, annotation_write_byte) 
2101         (annotation_write_short, annotation_write_int) 
2102         (handle_long_constant, handle_constant, handle_element_value) 
2103         (handle_annotation, handle_annotations) 
2104         (handle_annotation_attribute, rewrite_reflection_indexes) 
2105         (handle_member_annotations, handle_parameter_annotations) 
2106         (handle_default_annotation): New functions.
2107         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
2108         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
2109         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2110         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2111         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2112         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
2113         (TYPE_REFLECTION_DATA): New.
2114         (TYPE_REFLECTION_DATASIZE): New.
2115         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2116         an enum.
2117         * jcf-reader.c (get_attribute): Pass field/method index and
2118         attribute type to get_attribute().
2119         * constants.c (find_class_or_string_constant): Make nonstatic.
2120         (cpool_for_class): Likewise.
2121         (build_constants_constructor): Separate string and scalar types.
2122         * class.c (make_class_data): Generate field_indexes permutation.
2123         Pass it to rewrite_reflection_indexes().
2124         (make_class_data): Generate constructor for reflection_data field.
2125
2126 2006-10-20  Tom Tromey  <tromey@redhat.com>
2127
2128         * gcj.texi (Top): Don't mention jv-scan.
2129         (Invoking gcj): Likewise.
2130         (Invoking gcjh): Likewise.
2131         (Invoking gjnih): Likewise.
2132         (Invoking gij): Likewise.
2133         (Invoking gcj-dbtool): Likewise.
2134         (Invoking jv-scan): Removed.
2135         * parse-scan.y: Removed.
2136         * jv-scan.c: Removed.
2137         * config-lang.in (stagestuff): Don't mention jv-scan.
2138         * Make-lang.in (java): Removed jv-scan.
2139         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2140         (JVSCAN_OBJS): Removed.
2141         (jv-scan$(exeext)): Likewise.
2142         (JAVA_MANFILES): Removed jv-scan.1.
2143         (java.uninstall): Don't mention jv-scan.
2144         (java.mostlyclean): Likewise.
2145         (java.maintainer-clean): Likewise.
2146         (.INTERMEDIATE): Likewise.
2147         (java/jv-scan.o): Removed.
2148         (jv-scan.pod): Likewise.
2149         (java.srcextra): Don't mention parse-scan.c.
2150         (java.mostlyclean): Likewise.
2151         (java/parse-scan.c): Removed.
2152         (java/parse-scan.o-warn): Removed.
2153         (java/parse-scan.o): Removed.
2154
2155 2006-10-20  Tom Tromey  <tromey@redhat.com>
2156
2157         * lang.c (java_handle_option): Don't use
2158         jcf_write_base_directory.
2159         * jcf.h (jcf_write_base_directory): Removed.
2160         * parse.y (java_expand_classes): Don't call write_classfile.
2161         * config-lang.in (gtfiles): Removed jcf-write.c.
2162         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2163         (java/jcf-write.o): Removed.
2164         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2165         * java-tree.h (write_classfile): Removed declaration.
2166         * jcf-write.c: Removed.
2167
2168 2006-10-20  Tom Tromey  <tromey@redhat.com>
2169
2170         * Make-lang.in (java): Removed gjnih, gcjh.
2171         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2172         (GCJH_OBJS): Removed.
2173         (GJNIH_OBJS): Likewise.
2174         (gjnih$(exeext)): Likewise.
2175         (gcjh$(exeext)): Likewise.
2176         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2177         (java.install-common): Don't special case gcjh.
2178         (java.uninstall): Don't mention gcjh, gjnih.
2179         (java.mostlyclean): Likewise.
2180         (java.maintainer-clean): Likewise.
2181         (.INTERMEDIATE): Likewise.
2182         (gcjh.pod): Removed.
2183         (gjnih.pod): Likewise.
2184         (GCJH_TARGET_INSTALL_NAME): Removed.
2185         (java/gjavah-jni.o): Removed.
2186         (java/gjavah.o): Likewise.
2187         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2188         * gjavah.c: Removed.
2189
2190 2006-10-17  Tom Tromey  <tromey@redhat.com>
2191
2192         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2193         "string" case.
2194
2195 2006-10-17  Tom Tromey  <tromey@redhat.com>
2196
2197         * jvgenmain.c (main): Handle -findirect-dispatch.
2198         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2199         jvgenmain.
2200
2201 2006-10-06  Andrew Haley  <aph@redhat.com>
2202
2203         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2204         have a compare_and_swap builtin.
2205         (compareAndSwapLong_builtin): Likewise.
2206         (compareAndSwapObject_builtin): Likewise.
2207
2208 2006-10-04  Andrew Haley  <aph@redhat.com>
2209
2210         * builtins.c (java_builtins): Add compareAndSwapInt,
2211         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2212         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2213         putObjectVolatile, getObjectVolatile, getIntVolatile,
2214         getLongVolatile, getLong.
2215         (UNMARSHAL3): New macro.
2216         (UNMARSHAL4): Likewise.
2217         (UNMARSHAL5): Likewise.
2218         (build_arglist_for_builtin): New function.
2219         (build_addr_sum, build_check_this): New functions.
2220         (putObject_builtin. compareAndSwapInt_builtin,
2221         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2222         putVolatile_builtin, getVolatile_builtin): New builtins.
2223
2224 2006-06-08  Andrew Haley  <aph@redhat.com>
2225  
2226         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2227         get_symbol_table_index().
2228         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2229         private method.
2230         (build_known_method_ref): New arg: special.  Pass it to
2231         get_symbol_table_index.
2232         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2233         the method list.
2234         (build_invokevirtual): New arg: special.  Pass it to
2235         get_symbol_table_index.
2236         (expand_invoke): New variable: special.
2237         Pass it to maybe_rewrite_invocation().
2238         Pass it to build_known_method_ref().
2239         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2240         build the symbol table conbstructor.
2241         (emit_symbol_table): Extract SPECIAL from the method list and pass
2242         it to build_symbol_entry().
2243         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2244         special accordingly.
2245  
2246 2006-09-08  Andrew Haley  <aph@redhat.com>
2247
2248         * class.c (layout_class_method): Use build_java_signature, not
2249         build_java_argument_signature.  Use lookup_java_method, not
2250         lookup_argument_method.
2251
2252 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2253             Bryce McKinlay  <bryce@mckinlay.net.nz>
2254
2255         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2256
2257 2006-07-18  Tom Tromey  <tromey@redhat.com>
2258
2259         * lang.opt: Added missing -W options.
2260
2261 2006-07-12  Tom Tromey  <tromey@redhat.com>
2262
2263         PR java/28329:
2264         * lang-specs.h: Pass '%U'-based options as separate arguments.
2265         Use -faux-classpath.
2266         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2267         * lang.opt (faux-classpath): New option.
2268
2269 2006-07-07  Tom Tromey  <tromey@redhat.com>
2270
2271         * class.c (make_class_data): Set value for reflection_data field.
2272         * decl.c (java_init_decl_processing): Add reflection_data field.
2273
2274 2006-07-07  Tom Tromey  <tromey@redhat.com>
2275
2276         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2277         earlier.
2278         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2279
2280 2006-07-07  Andrew Haley  <aph@redhat.com>
2281
2282         * jcf-parse.c (set_source_filename): Don't check for
2283         CLASS_FROM_CURRENTLY_COMPILED_P.
2284         Remove // comments.
2285
2286 2006-07-07  Andrew Haley  <aph@redhat.com>
2287
2288         * java-tree.h (java_read_sourcefilenames): Declare.
2289         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2290         * lang.opt (fsource-filename): New opt.
2291         * lang-specs.h: Add -fsource-filename.
2292         * jcf-parse.c (num_files, filenames): New variables.
2293         (reverse, cmpstringp, java_read_sourcefilenames,
2294         find_sourcefile): New.
2295         (set_source_filename): Call find_sourcefile to find the real name
2296         of a source file.
2297
2298 2006-06-27  Tom Tromey  <tromey@redhat.com>
2299
2300         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2301         Signature, LocalVariableTypeTable, annotation attributes.
2302         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2303         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2304         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2305         (HANDLE_METHOD): Likewise.
2306         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2307         (print_annotation): New function.
2308         (print_element_value): Likewise.
2309         (indent): Likewise.
2310         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2311         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2312         (print_parameter_annotations): New function.
2313         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2314         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2315         Likewise.
2316         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2317         (print_annotations): New function.
2318
2319 2006-06-23  Tom Tromey  <tromey@redhat.com>
2320
2321         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
2322         emitting class files, always use 1.5.
2323         * gcj.texi (Input Options): Document -fsource.
2324         (Code Generation): Document -ftarget.
2325
2326 2006-06-21  Tom Tromey  <tromey@redhat.com>
2327
2328         PR java/28089:
2329         * expr.c (expand_java_field_op): Initialize field's declaring
2330         class.
2331
2332 2006-06-20  Tom Tromey  <tromey@redhat.com>
2333
2334         * expr.c (push_value): Always flush quick stack.
2335
2336 2006-06-19  Tom Tromey  <tromey@redhat.com>
2337
2338         * expr.c (push_value): Also flush quick stack if value is a
2339         component_ref.
2340
2341 2006-06-19  Tom Tromey  <tromey@redhat.com>
2342
2343         * expr.c (push_value): Flush quick stack if value has side
2344         effects.
2345
2346 2006-06-13  Tom Tromey  <tromey@redhat.com>
2347
2348         * class.c (is_compiled_class): Explicitly check for current
2349         class.
2350
2351 2006-06-09  Tom Tromey  <tromey@redhat.com>
2352
2353         * gjavah.c (decompile_method): Don't decompile a static field
2354         accessor method.
2355
2356 2006-06-06  Tom Tromey  <tromey@redhat.com>
2357
2358         * lang-specs.h <jc1>: Add .jar file to command line if
2359         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
2360
2361 2006-06-05  Tom Tromey  <tromey@redhat.com>
2362
2363         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2364         synthetic, enum, annotation.
2365         * jcf.h (ACC_BRIDGE): New macro.
2366         (ACC_VARARGS): Likewise.
2367         (ACC_SYNTHETIC): Likewise.
2368         (ACC_ENUM): Likewise.
2369         (ACC_ANNOTATION): Likewise.
2370
2371 2006-06-04  Tom Tromey  <tromey@redhat.com>
2372
2373         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2374         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2375         and -ftarget.
2376         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
2377         when needed.  Handle classpath-setting.
2378         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2379         * lang-specs.h: Rewrote.
2380
2381 2006-06-04  Tom Tromey  <tromey@redhat.com>
2382
2383         * jcf-io.c (find_class): Set source_ok to 0.
2384         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2385         (parse_class_file): Don't call java_mark_class_local.
2386         (java_parse_file): Skip .java files.  Call java_mark_class_local
2387         before lowering any code.
2388         (parse_zip_file_entries): Don't call duplicate_class_warning
2389         here.
2390         (process_zip_dir): ... call it here.
2391         * class.c (add_field): Don't mark field external if it is being
2392         compiled into this object.
2393         (make_class_data): Handle situation where class_dtable_decl is
2394         created before Class is compiled.
2395         (is_compiled_class): Don't assume files in zip are compiled into
2396         this object.
2397         (layout_class_method): Don't mark method external if it is being
2398         compiled into this object.
2399
2400 2006-06-04  Tom Tromey  <tromey@redhat.com>
2401
2402         * jcf-path.c (jcf_path_compute): New function.
2403         * jcf.h (jcf_path_compute): Declare.
2404
2405 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2406
2407         * decl.c: Include langhooks.h.
2408         (builtin_function): Remove.
2409         (java_init_decl_processing): Replace calls to builtin_function
2410         with add_builtin_function.
2411         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2412         (java/decl.o): Depend on langhooks.h.
2413         * java-tree.h (builtin_function): Remove.
2414
2415 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2416
2417         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2418
2419 2006-09-12  Tom Tromey  <tromey@redhat.com>
2420
2421         * expr.c (push_value): Always flush quick stack.
2422
2423 2006-09-12  Tom Tromey  <tromey@redhat.com>
2424
2425         PR java/29013:
2426         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2427         the push of the called method's return result.
2428
2429 2006-09-12  Tom Tromey  <tromey@redhat.com>
2430
2431         * jvspec.c (lang_specific_driver): Read spec file even if
2432         -fsyntax-only.
2433
2434 2006-09-12  Tom Tromey  <tromey@redhat.com>
2435
2436         PR java/28754:
2437         * expr.c (expand_java_field_op): Initialize field's declaring
2438         interface if necessary.
2439
2440 2006-09-12  Tom Tromey  <tromey@redhat.com>
2441
2442         PR java/28892:
2443         * expr.c (expand_java_field_op): No error for assignments not in
2444         class initializer or constructor.
2445
2446 2006-08-22  Andrew Haley  <aph@redhat.com>
2447
2448         * decl.c (java_add_stmt): Give the statement list a type.
2449
2450 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2451             Bryce McKinlay  <bryce@mckinlay.net.nz>
2452
2453         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2454
2455 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
2456
2457         PR java/8923
2458         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2459         or '--' is used with a constant operand.
2460         (java_complete_lhs): When processing a '++' or '--' expression,
2461         don't call java_complete_tree but java_complete_lhs, so that a
2462         static final variable operand is never replaced by its value. This
2463         avoids an ICE later on.
2464         (patch_unaryop): Fixed typo in comment.
2465
2466 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2467
2468         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2469
2470 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2471
2472         * builtins.c (check_for_builtin): If a builtin could result in a
2473         direct call being generated, don't use it if flag_indirect_dispatch
2474         is set.
2475
2476 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2477
2478         * gcj.texi (Invocation): Corrections for Invocation API example.
2479
2480 2006-07-04  Andrew Haley  <aph@redhat.com>
2481
2482         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2483         entry.
2484
2485 2006-06-21  Andrew Haley  <aph@redhat.com>
2486
2487         * java-tree.h (update_aliases): Remove
2488         * expr.c (expand_iinc): Remove call to update_aliases().
2489         (STORE_INTERNAL): Likewise.
2490         * decl.c (update_aliases, initialize_local_variable) 
2491         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2492
2493 2006-06-19  Andrew Haley  <aph@redhat.com>
2494
2495         PR java/1305
2496         PR java/27908
2497         * expr.c (java_modify_addr_for_volatile): New function.
2498         (expand_java_field_op): Handle volatile fields.
2499         * java-gimplify.c (java_gimplify_component_ref): Call
2500         java_modify_addr_for_volatile to give the field_ref the correct
2501         volatile type.
2502         (java_gimplify_modify_expr): Likewise.
2503         * java-tree.h (java_modify_addr_for_volatile): New decl.
2504
2505 2006-06-17  Karl Berry  <karl@gnu.org>
2506
2507         * gcj.texi (@dircategory): Use "Software development" instead
2508         of "Programming", following the Free Software Directory.
2509
2510 2006-06-16  Andrew Haley  <aph@redhat.com>
2511
2512         * class.c (make_class_data): When using flag_indirect_classes,
2513         don't initialize the vtable of Class instances.
2514
2515 2006-06-09  Andrew Haley  <aph@redhat.com>
2516
2517         PR java/1305
2518         PR java/27908
2519         * builtins.c (initialize_builtins): Add __sync_synchronize().
2520         * class.c (add_field): Mark volatile fields.
2521         * java-gimplify.c (java_gimplify_expr): Call new functions to
2522         handle self-modifying exprs and COMPONENT_REFs.
2523         (java_gimplify_component_ref): New.
2524         (java_gimplify_modify_expr): Add handling for volatiles.
2525
2526 2006-06-08  Tom Tromey  <tromey@redhat.com>
2527
2528         * gcj.texi (libgcj Runtime Properties): Document
2529         gnu.gcj.user.realname.
2530
2531 2006-06-08  Andrew Haley  <aph@redhat.com>
2532
2533         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2534         get_symbol_table_index().
2535         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2536         private method.
2537         (build_known_method_ref): New arg: special.  Pass it to
2538         get_symbol_table_index.
2539         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2540         the method list.
2541         (build_invokevirtual): New arg: special.  Pass it to
2542         get_symbol_table_index.
2543         (expand_invoke): New variable: special.
2544         Pass it to maybe_rewrite_invocation().
2545         Pass it to build_known_method_ref().
2546         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2547         build the symbol table conbstructor.
2548         (emit_symbol_table): Extract SPECIAL from the method list and pass
2549         it to build_symbol_entry().
2550         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2551         special accordingly.
2552
2553 2006-06-06  David Daney  <ddaney@avtrex.com>
2554
2555         * gcj.texi (libgcj Runtime Properties): Document
2556         gnu.gcj.runtime.NameFinder.show_raw and
2557         gnu.gcj.runtime.NameFinder.remove_unknown.
2558
2559 2006-06-06  Tom Tromey  <tromey@redhat.com>
2560
2561         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2562         synthetic, enum, annotation.
2563         * jcf.h (ACC_BRIDGE): New macro.
2564         (ACC_VARARGS): Likewise.
2565         (ACC_SYNTHETIC): Likewise.
2566         (ACC_ENUM): Likewise.
2567         (ACC_ANNOTATION): Likewise.
2568
2569 2006-06-06  Mike Stump  <mrs@apple.com>
2570
2571         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2572         installing during build.
2573
2574 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2575
2576         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2577         classname-to-library resolution mechanism.
2578         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2579         mechanism deprecated.
2580         (libgcj Runtime Properties): Document
2581         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2582
2583 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2584
2585         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2586         bit wide type.
2587         (jword): Define to uint64 on 64-bit arches.
2588         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2589
2590 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2591
2592         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2593         typos.
2594
2595 2006-05-26  Tom Tromey  <tromey@redhat.com>
2596
2597         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2598         * verify-glue.c (vfy_class_type): New function.
2599         * verify-impl.c (check_constant): Allow 'ldc class'.
2600         * verify.h (vfy_class_type): Declare.
2601
2602 2006-05-25  Andrew Haley  <aph@redhat.com>
2603
2604         PR java/27756
2605         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2606         update all lifetimes, not just the first one.
2607
2608 2006-05-24  Tom Tromey  <tromey@redhat.com>
2609
2610         * java-tree.h: Fixed flag documentation.
2611
2612 2006-05-24  Tom Tromey  <tromey@redhat.com>
2613
2614         PR libgcj/27729:
2615         * jcf.h (ACC_INVISIBLE): Changed value.
2616
2617 2006-05-24  Andrew Haley  <aph@redhat.com>
2618
2619         PR java/27754
2620         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2621         COMPOUND_EXPR.
2622
2623 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2624
2625         * lang.opt (femit-class-file): Remove VarExists.
2626
2627 2006-05-16  Tom Tromey  <tromey@redhat.com>
2628
2629         * verify-impl.c (verify_instructions_0) <op_return>: Special case
2630         for Object.<init>.
2631
2632 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2633
2634         PR driver/26885
2635         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2636         $(GCC_OBJS).
2637
2638 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2639
2640         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2641         (java/expr.o): Replace target.h with $(TARGET_H).
2642         (java/parse.o): Likewise.
2643
2644 2006-05-10  Andrew Haley  <aph@redhat.com>
2645
2646         * class.c (emit_indirect_register_classes): Fix comment.
2647
2648 2006-05-04  Tom Tromey  <tromey@redhat.com>
2649
2650         * java-tree.h (uses_jv_markobj_p): Declare.
2651         * class.c (uses_jv_markobj_p): Removed.
2652         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2653         (get_boehm_type_descriptor): Use it.
2654         (uses_jv_markobj_p): Moved from class.c.  Return bool.
2655
2656 2006-05-04  Tom Tromey  <tromey@redhat.com>
2657
2658         * java-tree.def (THIS_EXPR): Now a tcc_expression.
2659
2660 2006-05-04  Andrew Haley  <aph@redhat.com>
2661
2662         * class.c (make_field_value): Always build_address_of fdecl if
2663         there is an initializer.
2664
2665 2006-05-03  Andrew Haley  <aph@redhat.com>
2666
2667         PR libgcj/27352
2668         * expr.c (maybe_rewrite_invocation): New function.
2669         (rewrite_arglist_getclass): Likewise.
2670         (rules): New.
2671         (expand_invoke): Call maybe_rewrite_invocation.
2672         * parse.y (patch_invoke): Likewise.
2673         * java-tree.h: (maybe_rewrite_invocation): New function.
2674
2675 2006-04-21  Andrew Haley  <aph@redhat.com>
2676
2677         * lang.c (java_init): Handle flag_indirect_classes.
2678         * jvgenmain.c: Use "class$$" instead of "class$".
2679         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2680         DECLs.
2681         (mangle_class_field): Special case "class$$" as well as "class$".
2682         * constants.c (build_ref_from_constant_pool): If
2683         flag_indirect_classes, generate a ref into the heap.
2684         * decl.c (constants_field_decl_node,
2685         constants_data_field_decl_node): New.
2686         * class.c (build_static_class_ref): New.
2687         (build_classdollar_field): Factor out from build_class_ref().
2688         (make_field_value): Handle static fields in heap.
2689         (make_class_data): Make sure we get a static ref to class.
2690         Make class initializer const if flag_indirect_classes.
2691         (register_class): Build a class_ref for initialization if
2692         flag_indirect_classes.
2693         (emit_indirect_register_classes): New.
2694
2695 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2696
2697         * expr.c, gjavah.c: Fix comment typos.
2698
2699 2006-04-03  Andrew Haley  <aph@redhat.com>
2700
2701         PR java/26858
2702         * expr.c (build_field_ref): Don't check the field offset if
2703         flag_syntax_only.
2704
2705 2006-03-30  Andrew Haley  <aph@redhat.com>
2706
2707         PR java/26858
2708         * lang.c (java_attribute_table): New.
2709         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2710         * expr.c (build_field_ref): Add a null pointer check for all
2711         fields of offset > 4k.  Don't do so for accesses via the this
2712         pointer, which we know can never be null.
2713         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2714         methods nonnull.
2715
2716 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
2717
2718         * Make-lang.in: Rename docdir to gcc_docdir.
2719
2720 2006-03-30  Tom Tromey  <tromey@redhat.com>
2721
2722         PR java/26042:
2723         * parse.y (java_reorder_fields): Reset superclass field's size as
2724         well.
2725
2726 2006-03-28  Tom Tromey  <tromey@redhat.com>
2727
2728         PR java/26390:
2729         * parse.y (find_most_specific_methods_list): Added 'class'
2730         argument.
2731         (lookup_method_invoke): Updated.
2732
2733 2006-03-15  Tom Tromey  <tromey@redhat.com>
2734
2735         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2736         non-static method calls.
2737
2738 2006-03-15  David Daney  <ddaney@avtrex.com>
2739
2740         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2741         declaration.
2742
2743 2006-03-15  David Daney  <ddaney@avtrex.com>
2744
2745         * lang.opt (-freduced-reflection): New option.
2746         * lang.c (java_post_options): Generate an error if
2747         -freduced-reflection used with -fjni or -findirect-dispatch.
2748         * java-tree.h (flag_reduced_reflection): Declare new variable.
2749         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2750         if bitmap overflows and flag_reduced_reflection set.
2751         * class.c (uses_jv_markobj_p): New function.
2752         (make_class_data): Moved generation of vtable to before
2753         reflection data, generate less reflection data if
2754         flag_reduced_reflection set.
2755         * gcj.texi: Document -freduced-reflection.
2756
2757 2006-03-15  Tom Tromey  <tromey@redhat.com>
2758
2759         PR java/26638:
2760         * class.c (get_interface_method_index): Don't put <clinit> into
2761         interface table.
2762
2763 2006-03-15  Tom Tromey  <tromey@redhat.com>
2764
2765         * parse.y (analyze_clinit_body): Ignore empty statements.
2766
2767 2006-03-08  David Daney  <ddaney@avtrex.com>
2768
2769         * gcj.texi: Document -static-libgcj option.
2770
2771 2006-02-20  Andrew Haley  <aph@redhat.com>
2772
2773         * jcf-parse.c (parse_class_file): Set input_location from
2774         current_class.
2775
2776 2006-02-15  Andrew Haley  <aph@redhat.com>
2777
2778         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2779         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2780         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2781
2782 2006-02-09  Andrew Haley  <aph@redhat.com>
2783
2784         PR java/26192
2785         * expr.c (expand_invoke): Allow methods in arrays to be resolved
2786         in their superclass.
2787
2788         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2789         array types.
2790         
2791 2006-02-08  Tom Tromey  <tromey@redhat.com>
2792
2793         PR java/22578:
2794         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2795         * builtins.c (convert_real): New function.
2796         (java_builtins): Handle Float.intBitsToFloat,
2797         Float.floatToRawIntBits, Double.longBitsToDouble,
2798         Double.doubleToRawLongBits.
2799
2800 2006-02-07  Andrew Haley  <aph@redhat.com>
2801
2802         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
2803         class other than the one in which we expected to find it, ignore
2804         the result.
2805
2806         PR java/25535
2807         * constants.c (build_constants_constructor): move initializer into
2808         first halfword on a 64-bit big-endian machine.
2809
2810 2006-02-04  Tom Tromey  <tromey@redhat.com>
2811
2812         PR java/25676:
2813         * builtins.c (max_builtin): Skip floating point 'max'.
2814         (min_builtin): Skip floating point 'min'.
2815         (check_for_builtin): Never return NULL_TREE.
2816
2817 2006-02-04  Tom Tromey  <tromey@redhat.com>
2818
2819         PR java/26097:
2820         * expr.c (push_type): Avoid side effect in gcc_assert.
2821
2822 2006-02-04  Roger Sayle  <roger@eyesopen.com>
2823
2824         * decl.c (java_init_decl_processing): Create char_type_node as a
2825         regular INTEGER_TYPE node.
2826         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2827         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2828         test for char_type_node and promoted_char_type_node as special
2829         instances of INTEGER_TYPE tree codes.
2830         (promote_type,build_java_signature): Likewise.
2831         * jcf-write.c (adjust_typed_op): Likewise.
2832         * mangle.c (mangle_type): Likewise.
2833         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2834         * parse.h (JINTEGRAL_TYPE_P): Likewise.
2835
2836 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
2837
2838         * expr.c (java_stack_swap): Revert gcc_assert patch.
2839
2840 2006-02-03  Ben Elliston  <bje@au.ibm.com>
2841
2842         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2843         * typeck.c: Likewise.
2844         * verify-impl.c: Likewise.
2845         * class.c: Likewise.
2846         * decl.c: Likewise.
2847         * jcf-parse.c: Likewise.
2848         * constants.c: Likewise.
2849         * check-init.c: Likewise.
2850         * jcf-write.c: Likewise.
2851         * verify-glue.c: Likewise.
2852         * mangle.c: Likewise.
2853         * expr.c: Likewise.
2854         * lang.c: Likewise.
2855         * boehm.c: Likewise.
2856
2857 2006-02-01  Jan Hubicka  <jh@suse.cz>
2858
2859         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2860         * lang.c (java_init_options): Set no_unit_at_a_time_default.
2861
2862 2006-01-30  Andrew Haley  <aph@redhat.com>
2863
2864         PR java/21428
2865         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2866
2867 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
2868
2869         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2870         Update copyright notice dates.
2871
2872 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2873
2874         * jvspec.c (lang_specific_spec_functions): Remove.
2875
2876 2006-01-06  Tom Tromey  <tromey@redhat.com>
2877
2878         * gcj.texi (Arrays): Added more documentation for
2879         JvNewObjectArray.
2880         (Primitive types): Correct information about primitive classes.
2881         (Reference types): New node.
2882         (Index): New node.
2883
2884 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
2885
2886         * jcf-parse.c (set_source_filename): Set the decl source location
2887         even when returning early.
2888
2889 2005-12-15  Tom Tromey  <tromey@redhat.com>
2890             Andrew Haley  <aph@redhat.com>
2891
2892         PR java/25429
2893         * parse.y (resolve_expression_name): Don't generate accessor
2894         methods for constant fields.
2895
2896 2005-12-13  Andrew Haley  <aph@redhat.com>
2897
2898         PR java/25366
2899         PR java/25368
2900         * class.c (maybe_layout_super_class): Update current_class before
2901         calling do_resolve_class.
2902
2903 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
2904
2905         PR java/25330
2906         * jcf-write.c (write_classfile): Use PID in temporary class
2907         file. Save/restore errno when reporting error.
2908
2909 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2910
2911         PR java/9861
2912         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2913         to bare_function_type and including the return type
2914         * builtins.c (initialize_builtins) : Change builtin mangled name
2915         constants to conform to new mangling scheme
2916
2917 2005-12-08  Andrew Haley  <aph@redhat.com>
2918
2919         PR libgcj/25265
2920         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2921         (soft_abstractmethod_node): New.
2922         * expr.c (build_field_ref): Add in-line check for missing field.
2923         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2924
2925 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2926
2927         * Make-lang.in (java.all.build, java.install-normal): Remove.
2928
2929 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2930
2931         * Make-lang.in: Remove all dependencies on s-gtype, except for
2932         gt-java-parse.h.
2933
2934 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
2935
2936         * class.c (build_utf8_ref, emit_register_classes): Use
2937         switch_to_section and get_section.
2938
2939 2005-12-06  Tom Tromey  <tromey@redhat.com>
2940
2941         PR java/25283:
2942         * parse.y (patch_new_array_init): Revert previous patch.
2943         (lookup_method_invoke): Use size-less array type when creating an
2944         anonymous constructor.
2945
2946 2005-12-05  Tom Tromey  <tromey@redhat.com>
2947
2948         * parse.y (patch_new_array_init): Don't set length on array.
2949
2950 2005-12-02  Richard Guenther  <rguenther@suse.de>
2951
2952         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
2953         buildN instead of build.
2954         * class.c (finish_class): Likewise.
2955         * expr.c (java_create_object): Likewise.
2956
2957 2005-11-28  Tom Tromey  <tromey@redhat.com>
2958
2959         PR java/18278:
2960         * expr.c (build_jni_stub): Unwrap the return value.
2961         * java-tree.h (soft_unwrapjni_node): New define.
2962         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
2963         * decl.c (java_init_decl_processing): Initialize
2964         soft_unwrapjni_node.
2965
2966 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
2967
2968         * gcj.texi (gij options): Add -Xss documentation.
2969
2970 2005-11-08  Wil Mahan  <wmahan@gmail.com>
2971
2972         PR java/23617
2973         * zextract.c (read_zip_archive): Fix out of memory error when
2974         reading jar files with zip-style comments.
2975
2976 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
2977
2978         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
2979         formats.
2980         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
2981
2982 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2983             Wil Mahan <wmahan@gmail.com>
2984
2985         PR java/23620
2986         * class.c (make_class): Create empty binfo here.
2987         (set_super_info): Only create binfo if we have superclasses.
2988
2989 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
2990
2991         PR java/24127
2992         * parse.y (method_header): Make the result of the rule a NULL_TREE
2993         when a parsing error occurs.
2994
2995 2005-09-29  Tom Tromey  <tromey@redhat.com>
2996
2997         PR java/24120:
2998         * jcf-io.c (memoized_dirlist_hash): New function.
2999         (caching_stat): Use it.
3000
3001 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3002
3003         PR java/21418
3004         * class.c (inherits_from_p): Try to lay out super class
3005         if it is not already laid out.
3006         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3007         is a NULL_TREE.
3008
3009 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3010
3011         * builtins.c (max_builtin, min_builtin, abs_builtin,
3012         java_build_function_call_expr): Use fold_buildN.
3013         * class.c (layout_class_method): Likewise.
3014         * expr.c (java_truthvalue_conversion, build_java_jsr,
3015         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3016         build_java_binop, build_field_ref, expand_compare,
3017         build_known_method_ref, build_invokevirtual,
3018         process_jvm_instruction): Likewise.
3019         * parse.y (patch_binop, patch_exit_expr): Likewise.
3020         * typeck.c (convert_ieee_real_to_integer): Likewise.
3021         (convert): Don't call fold after convert_ieee_real_to_integer.
3022
3023 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3024
3025         PR java/23891
3026         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3027         the newly created type. Set import lists here, not in create_class.
3028         (jdep_resolve_class): Set current_class.
3029         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
3030         the current package context, not ctxp->package.
3031         (cicp_cache): Removed.
3032         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3033         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3034         * java-tree.h (TYPE_PACKAGE): New macro.
3035         (struct lang_type): New member 'package'.
3036
3037 2005-09-09  Andrew Haley  <aph@redhat.com>
3038
3039         PR libgcj/23182 
3040         * expr.c (pop_type_0): If the expected type is object or ptr
3041         (i.e. void*), return the type of the object we just popped from
3042         the stack.
3043
3044 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3045
3046         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3047         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3048
3049 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3050
3051         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3052         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3053         typos.  Follow spelling conventions.
3054
3055 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3056
3057         PR java/23431
3058         * typeck.c (lookup_do): Look up interfaces for the original class,
3059         not the base class.
3060         * parse.y (java_check_regular_methods): Fix diagnostic message for
3061         more restrictive overriding of a method from an interface.
3062
3063 2005-08-16  Tom Tromey  <tromey@redhat.com>
3064
3065         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3066         class' initial state.
3067
3068 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3069
3070         PR java/22113
3071         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3072         `literal_token' for large numeric input tokens.
3073
3074 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3075
3076         PR java/19870
3077         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3078         and expand to handle method accesses across nested classes.
3079         (build_outer_method_access_method): Rename to
3080         build_nested_method_access_method.  Minor adjustments to comments.
3081         (resolve_expression_name): Use the newly-renamed
3082         nested_member_access_p method.
3083         (resolve_qualified_expression_name): Likewise.
3084         (patch_method_invocation): Also consider static methods for access
3085         method generation.  Minor adjustments to comments.
3086         (maybe_use_access_method): Use the more general
3087         nested_memeber_access_p to determine access across nested class
3088         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3089
3090 2005-08-15  Tom Tromey  <tromey@redhat.com>
3091
3092         PR java/23300.
3093         * expr.c (build_field_ref): Don't generate otable reference when
3094         DECL_FIELD_OFFSET is 0.
3095         * class.c (maybe_layout_super_class): Pass outer class to
3096         do_resolve_class.
3097
3098 2005-08-15  Tom Tromey  <tromey@redhat.com>
3099
3100         * java-tree.h (LABEL_IN_SUBR): Removed.
3101         (LABEL_IN_SUBR): Likewise.
3102         (LABEL_IS_SUBR_START): Likewise.
3103         (LABEL_SUBR_START): Likewise.
3104         (LABEL_SUBR_CONTEXT): Likewise.
3105         (LABEL_CHANGED): Likewise.
3106         (LABEL_RETURN_LABEL): Likewise.
3107         (LABEL_RETURN_TYPE_STATE): Likewise.
3108         (LABEL_RETURN_LABELS): Likewise.
3109         (RETURN_MAP_ADJUSTED): Likewise.
3110         (LABEL_PENDING_CHAIN): Likewise.
3111
3112 2005-08-15  Tom Tromey  <tromey@redhat.com>
3113
3114         * Make-lang.in (JAVA_OBJS): Removed verify.o
3115         (java/verify.o): Removed.
3116         * verify.c: Removed.
3117         * lang.c (flag_new_verifier): Removed.
3118         (java_post_options): Updated.
3119         * java-tree.h (flag_new_verifier): Removed.
3120         (verify_jvm_instructions): Removed.
3121         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3122         (build_java_check_indexed_type): Likewise.
3123         (expand_java_arraystore): Likewise.
3124         (expand_java_arrayload): Likewise.
3125         (pop_arguments): Likewise.
3126         (expand_byte_code): Likewise.
3127         (process_jvm_instruction): Likewise.
3128
3129 2005-08-10  Andrew Haley  <aph@redhat.com>
3130
3131         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3132         type mismatches to make legal GIMPLE.
3133
3134 2005-08-10  Robin Green <greenrd@greenrd.org>
3135
3136         PR java/23230:
3137         * parse.y (maybe_use_access_method): Generalize check from
3138         java.lang.Object to any superclass of current_class
3139
3140 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3141
3142         * class.c (build_class_ref): Wrap the primary class type in a
3143         NOP_EXPR.
3144         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3145         primary class type from the NOP_EXPR in which it was placed.
3146
3147 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3148
3149         * expr.c (expand_load_internal): Fix missing parens in
3150         predicate.
3151
3152 2005-07-28  Andrew Haley  <aph@redhat.com>
3153
3154         * expr.c (expand_load_internal): Convert to destination type.
3155
3156 2005-07-22  Manfred Hollstein  <mh@suse.com>
3157
3158         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3159         (check_constant): Likewise.
3160         (check_wide_constant): Likewise.
3161
3162 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3163
3164         Make CONSTRUCTOR use VEC to store initializers.
3165         * check-init.c (check_init): Update to cope with VEC in
3166         CONSTRUCTOR_ELTS.
3167         * class.c (make_field_value, make_method_value, get_dispatch_table,
3168         make_class_data, emit_symbol_table, emit_catch_table,
3169         emit_assertion_table): Use build_constructor_from_list instead of
3170         build_constructor.
3171         * constants.c (build_constants_constructor): Likewise.
3172         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3173         VEC in CONSTRUCTOR_ELTS.
3174         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3175         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3176         of a TREE_LIST.
3177         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3178         CONSTRUCTOR_ELTS.
3179         * parse.y (build_new_array_init): Use build_constructor_from_list
3180         instead of build_constructor.
3181         (patch_new_array_init): Update to cope with VEC in
3182         CONSTRUCTOR_ELTS.
3183         (array_constructor_check_entry): Likewise.
3184
3185 2005-07-12  Tom Tromey  <tromey@redhat.com>
3186
3187         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3188         command line.
3189
3190 2005-07-12  Tom Tromey  <tromey@redhat.com>
3191
3192         PR java/19674:
3193         * parse-scan.y (interface_member_declaration): Added
3194         empty_statement.
3195
3196 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3197         
3198         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3199         (LABEL_PENDING_CHAIN): Ditto.
3200         (LABEL_PC): Ditto.
3201         (DECL_BIT_INDEX): Ditto.        
3202
3203 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3204
3205         PR java/18119
3206         * parse.y (inner_class_accessible): New function. Logic moved from
3207         check_inner_class_access.
3208         (check_inner_class_access): Use inner_class_accessible.
3209         (resolve_inner_class): Simplify arguments. Create circularity hash
3210         here. Keep looking for classes if we found one that was inaccessible. 
3211         Return the inaccessible class only if there is no other match.
3212         (do_resolve_class): Update for new resolve_inner_class arguments.
3213         Don't create circularity_hash here.
3214
3215 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3216
3217         PR java/21045
3218         * parse.y (add_exception_to_throws): New function.
3219         (purge_unchecked_exceptions): Removed.
3220         (get_constructor_super): Renamed from verify_constructor_super. Now
3221         returns the super constructor after verification.
3222         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3223         or save/restore the exception list.
3224         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3225         class initializers and constructors to the throws clause of the method. 
3226
3227 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3228
3229         PR java/19674
3230         * parse.y (interface_member_declaration): Allow empty statements in
3231         interface declarations.
3232
3233 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3234
3235         * Makefile.in (parse.o): Adjust dependencies.
3236         * parse.y: Include tree-dump.h.
3237
3238 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3239
3240         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3241         flag for quoting.
3242
3243 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3244
3245         * parse.y (issue_warning_error_from_context): Call
3246         pp_output_formatted_text to be able to get the buffer.
3247
3248 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3249
3250         * parse.y (issue_warning_error_from_context): Update for the
3251         renaming of pp_format_text to pp_format.
3252
3253 2005-06-28  Paul Brook  <paul@codesourcery.com>
3254
3255         * decl.c (java_init_decl_processing): Call
3256         default_init_unwind_resume_libfunc.
3257
3258 2005-06-27  Tom Tromey  <tromey@redhat.com>
3259
3260         PR java/21540, PR java/13788:
3261         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3262         fold_constant_for_init.
3263         (patch_binop): Added 'folding' argument.  Updated all callers.
3264         (patch_unaryop) <NOP_EXPR>: New case.
3265         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3266         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3267
3268 2005-06-25  Jan Hubicka  <jh@suse.cz>
3269
3270         * builtins.c (define_builtin): Accept new flags parameter.
3271         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3272
3273 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3274
3275         * all files: Update FSF address in copyright headers.
3276
3277 2005-06-24  Tom Tromey  <tromey@redhat.com>
3278
3279         * verify-impl.c (verify_instructions_0): Correctly handle
3280         situation where PC falls off end.
3281
3282 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3283
3284         PR java/20697
3285         * parse.y (find_most_specific_methods_list): Remove special case for
3286         inner classes.
3287
3288 2005-06-15  Tom Tromey  <tromey@redhat.com>
3289
3290         PR libgcj/21906:
3291         * class.c (make_method_value): Use soft_abstractmethod_node for
3292         abstract method.
3293         * java-tree.h (soft_abstractmethod_node): New define.
3294         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3295         * decl.c (java_init_decl_processing): Initialize
3296         soft_abstractmethod_node.
3297
3298 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3299
3300         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3301
3302 2005-06-13  Per Bothner  <per@bothner.com>
3303
3304         * expr.c (int highest_label_pc_this_method,
3305         start_label_pc_this_method): New globals.
3306         (lookup_label): Add start_label_pc_this_method to pc for label, and
3307         update highest_label_pc_this_method.  This prevents conflicts between
3308         labels from different methods.
3309         * java-tree.h: Declare new globals.
3310         * jcf-parse.c (parse_class_file): If needed bump
3311         start_label_pc_this_method and reset highest_label_pc_this_method.
3312
3313 2005-06-13  Tom Tromey  <tromey@redhat.com>
3314
3315         PR java/21844:
3316         * parse.y (nested_field_access_p): Handle case where outer field
3317         is inherited by enclosing class.
3318
3319 2005-06-12  Per Bothner  <per@bothner.com>
3320
3321         * class.c (inherits_from_p): Do load_class if needed.
3322
3323 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3324
3325         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3326         * java-tree.h (parse_error_context): Move...
3327         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3328         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3329         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3330
3331 2005-06-08  Roger Sayle  <roger@eyesopen.com>
3332
3333         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3334
3335 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3336
3337         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3338         msgid for argument name.
3339         * gjavah.c (error): Likewise.
3340         * java-tree.h (parse_error_context): Likewise.
3341         * parse.y (parse_error_context, parse_warning_context,
3342         issue_warning_error_from_context): Likewise.
3343
3344 2005-06-01  Tom Tromey  <tromey@redhat.com>
3345
3346         PR java/21722:
3347         * class.c (build_static_field_ref): Don't fold constant fields if
3348         current class is from a .class file and we're using indirect
3349         dispatch.
3350
3351 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3352
3353         * java/verify-glue.c: Don't include errors.h and include toplev.h.
3354         * java/Make-lang.in: Updates dependencies.
3355
3356 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
3357
3358         PR java/19870.
3359         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3360         NESTED_FIELD_ACCESS_IDENTIFIER_P.
3361         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3362         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3363         * jcf-write.c (generate_classfile): Use
3364         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3365         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3366         * parse.y (build_outer_field_access): Rename to
3367         build_nested_field_access. Support static fields and outer-to-inner
3368         class accesses.
3369         (outer_field_access_p): Rename to nested_field_access_p. Support
3370         static fields and generalise to outer-to-inner class and sibling
3371         inner class accesses.
3372         (outer_field_expanded_access_p): Rename to
3373         nested_field_expanded_access_p and support static fields.
3374         (outer_field_access_fix): Rename to nested_field_access_fix and
3375         support static fields.
3376         (build_outer_field_access_expr): Rename to
3377         build_nested_field_access_expr and support static fields.
3378         (build_outer_field_access_methods): Rename to
3379         build_nested_field_access_methods and support static fields. For
3380         static fields, generate accessors without class instance parameters.
3381         (build_outer_field_access_method): Rename to
3382         build_nested_field_access_method and support static fields.
3383         (build_outer_method_access_method): Use
3384         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3385         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3386         (resolve_expression_name): Consider static field accesses across
3387         nested classes.
3388         (resolve_qualified_expression_name): Likewise.
3389         (java_complete_lhs): Use nested_field_access_fix instead of
3390         outer_field_access_fix.
3391         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3392         Use nested_field_expanded_access_p instead of
3393         outer_field_expanded_access_p. Use nested_field_access_fix instead
3394         of outer_field_access_fix.
3395         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3396         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3397
3398 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3399
3400         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
3401         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3402         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3403         MINOR_BINARYCOMPAT_ABI_VERSION): New.
3404         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3405         (parse_version): Calculate version ID using new method. Use bit-flags
3406         for flag_indirect_dispatch and flag_bootstrap_classes.
3407
3408 2005-05-25  Richard Henderson  <rth@redhat.com>
3409
3410         PR libgcj/21692
3411         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3412         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3413         DECL_CONTEXT; avoid pushdecl_top_level.
3414         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3415         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3416         (layout_class_method): Likewise.
3417         * decl.c (java_mark_cni_decl_local): New.
3418         (java_mark_class_local): Use it.
3419         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3420         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3421         (struct lang_decl_func): Add local_cni;
3422         (struct lang_decl_var): Add class_field, vtable.
3423         (java_mangle_decl): Declare.
3424         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3425         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3426         (mangle_obstack_1): New.
3427         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
3428         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
3429         lhd_set_decl_assembler_name for things that don't need mangling.
3430         (mangle_class_field): Rename from java_mangle_class_field, make
3431         static, don't call init_mangling or finish_mangling.
3432         (mangle_vtable): Similarly.
3433         (mangle_local_cni_method_decl): New.
3434         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
3435         gcc_assert, and MANGLE_RAW_STRING.
3436         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3437
3438 2005-05-25  DJ Delorie  <dj@redhat.com>
3439
3440         * class.c (set_constant_value): Move warning control from if() to
3441         warning(OPT_*).
3442
3443 2005-05-24  Richard Henderson  <rth@redhat.com>
3444
3445         * builtins.c (define_builtin): Don't call make_decl_rtl.
3446         * constants.c (build_constant_data_ref): Likewise.
3447         * class.c (build_utf8_ref): Likewise.
3448         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3449         (get_dispatch_table, layout_class_method): Likewise.
3450         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3451         by hand.
3452         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3453         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3454         to determine if we need a non-zero address.
3455         * decl.c (builtin_function): Don't call make_decl_rtl.
3456         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3457         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3458         * resource.c (compile_resource_data): Likewise.
3459         * parse.y (resolve_field_access): Re-word comment to avoid
3460         building DECL_RTL.
3461
3462 2005-05-24  Richard Henderson  <rth@redhat.com>
3463
3464         * class.c (registered_class): Take it out of class_roots; turn into
3465         a vec of trees.
3466         (register_class): Make static.  Don't duplicate decl node.  Use
3467         VEC_safe_push.
3468         (emit_register_classes): Use VEC_iterate.  Use output_constant
3469         instead of assemble_integer.  Don't call mark_decl_referenced
3470         directly.
3471         * java-tree.h (register_class): Remove decl.
3472
3473 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
3474
3475         PR java/17845
3476
3477         * parse.y (register_package, package_list): Remove.
3478         (package_declaration): Do not call register_package.
3479         (do_resolve_class): Do not use package_list.
3480
3481 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
3482
3483         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3484         unused variable.
3485
3486 2005-05-15  Tom Tromey  <tromey@redhat.com>
3487
3488         PR java/21519:
3489         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3490         NOTE_PUSH.
3491
3492 2005-05-12  Aaron Luchko <aluchko@redhat.com>
3493
3494         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3495
3496 2005-05-11  Tom Tromey  <tromey@redhat.com>
3497
3498         * gcj.texi (Code Generation): Document -fbootstrap-classes.
3499         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3500         (parse_version): Use it.
3501         * lang.opt (-fbootstrap-classes): New option.
3502
3503 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
3504
3505         PR java/21436
3506         * class.c (maybe_layout_super_class): Look for imports in this_class.
3507         * parse.h (ctxp_for_generation_last): New.
3508         (do_resolve_class): Add a parameter.
3509         * parse.y (ctxp_for_generation_last): New.
3510         (java_pop_parser_context): Add at end of list.
3511         (find_in_imports, find_in_imports_on_demand): Look in ctxp
3512         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3513         the given type are NULL.
3514         (do_resolve_class): Look into the imports of the new second parameter.
3515         Adjust recursive calls.
3516         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3517         calls to do_resolve_class.
3518         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3519         (java_complete_class): Do not do that here.
3520
3521 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3522
3523         PR java/20309
3524         * Make-lang.in (java): Add gjnih.
3525         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3526         (GJNIH_OBJS): New variable.
3527         (gjnih$(exeext)): New target.
3528         (JAVA_MANFILES): Add gjnih.1.
3529         (java.uninstall): Add gjnih.1.
3530         (java.mostlyclean): Add gjnih.
3531         (java.maintainer-clean): Add gjnih.1.
3532         (java/gjavah-jni.o): New target.
3533         (.INTERMEDIATE): Add gjnih.pod.
3534         (gjnih.pod): New target.
3535         * config-lang.in (stagestuff): Add gjnih.
3536         * gcj.texi (Top): Add gjnih node.
3537         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3538         -bootclasspath options.
3539         (Invoking gjnih): New node.
3540         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3541         (TOOLNAME): New macro.
3542         (error): Replace hard-coded gcjh with TOOLNAME.
3543         (process_file): Likewise.
3544         (usage): Likewise.
3545         (version): Likewise.
3546         (help): Likewise.  Add help output for -force, -old, -trace and -J
3547         options.
3548         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3549         (options): Add force, old, trace and J fields.
3550         (main): Handle -force, -old, -trace and -J options.
3551
3552 2005-05-03  Tom Tromey  <tromey@redhat.com>
3553
3554         PR java/21245:
3555         * gjavah.c (main): Unlink output file on error.
3556
3557 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3558
3559         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3560         copyright.
3561
3562 2005-04-29  Tom Tromey  <tromey@redhat.com>
3563
3564         * expr.c (build_jni_stub): Updated for change to build_block.
3565
3566 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3567
3568         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3569
3570 2005-04-28  Andrew Haley  <aph@redhat.com>
3571
3572         PR java/19285
3573         * java-tree.h (soft_resolvepoolentry_node): New.
3574         (alloc_constant_fieldref): Declare.
3575         * expr.c (expand_java_field_op): Don't call class_init for
3576         accesses to static fields with indirect dispatch.
3577         * builtins.c (initialize_builtins): Add "__builtin_expect".
3578         * decl.c (soft_resolvepoolentry_node): New variable.
3579         (java_init_decl_processing): Create a decl for
3580         "_Jv_ResolvePoolEntry".
3581         * class.c (build_fieldref_cache_entry): New function.
3582         (build_static_field_ref): Rewrite for indirect dispatch.
3583         * constants.c (find_name_and_type_constant_tree): New function.
3584         (alloc_constant_fieldref): Likewise.
3585         (build_constants_constructor): Handle CONSTANT_Fieldref and
3586         CONSTANT_NameAndType.
3587
3588         PR java/21115
3589         * expr.c (force_evaluation_order): Convert outgoing args smaller
3590         than integer.
3591
3592 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3593
3594         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3595         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
3596         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3597
3598 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3599
3600         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3601         to `unlock_stream' with `unlock_std_streams'.
3602
3603 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3604
3605         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3606         instead of just expr.h.
3607
3608 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3609
3610         * gjavah.c (main): Unlock the stdio streams.
3611         * jcf-dump.c (main): Likewise.
3612         * jv-scan.c (main): Likewise.
3613         * jvgenmain.c (main): Likewise.
3614
3615 2005-04-23  DJ Delorie  <dj@redhat.com>
3616
3617         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3618         parse.y: Adjust warning() callers.
3619
3620 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
3621
3622         * gcj.texi (Object fields): Change "Integer" to "Int" in example
3623         contructor.
3624
3625 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3626
3627         * gcj.texi: Fix typos and bogus example.
3628
3629 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
3630
3631         * except.c: Fix a comment typo.
3632
3633 2005-04-19  Julian Brown  <julian@codesourcery.com>
3634
3635         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3636         indirect dispatch with PIC.
3637
3638 2005-04-18  Andrew Haley  <aph@redhat.com>
3639
3640         * java-except.h (struct eh_range.handler): Remove unused field.
3641         (handle_nested_ranges): Remove function declaration.
3642         (sanity_check_exception_range): Add function declaration.       
3643         * verify.c (verify_jvm_instructions): Remove call to
3644         handle_nested_ranges.
3645         * verify-glue.c (verify_jvm_instructions_new): Call
3646         sanity_check_exception_range.
3647         * except.c (link_handler, eh_range_freelist, link_handler,
3648         handle_nested_ranges): Remove.
3649         (add_handler): Rewrite.
3650         (sanity_check_exception_range): New function.
3651         (print_ranges): New function.
3652
3653 2005-04-13  Julian Brown  <julian@codesourcery.com>
3654
3655         * decl.c (finish_method): Give methods once-only linkage.
3656
3657 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
3658
3659         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3660
3661 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3662
3663         * java-tree.h: Don't use PARAMS().
3664
3665 2005-04-07  Per Bothner  <per@bothner.com>
3666
3667         * class.c (push_class): By default, suppress debug output.
3668         (finish_class): Enable debug output for classes we're emitting.
3669
3670 2005-04-07  Andrew Haley  <aph@redhat.com>
3671
3672         * gcj.texi: Correct gcj-dbtool instructions.
3673
3674 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
3675
3676         * gcj.texi: Fix a typo.
3677         * lang.c: Fix a comment typo.
3678
3679 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
3680
3681         * gcj.texi (Invoking gij): Add descriptions of new -X options.
3682         Mention recognized-and-ignored compatibility options.
3683         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3684         JvFree.
3685         (About CNI): Add Memory allocation section.
3686
3687 2005-04-01  Tom Tromey  <tromey@redhat.com>
3688
3689         * decl.c (java_init_decl_processing): Fix types of
3690         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3691         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3692         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3693
3694 2005-03-31  Jan Hubicka  <jh@suse.cz>
3695
3696         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3697         * class.c: Include cgraph.h
3698         (make_local_functoin_alias): Mark aslias as needed.
3699         * resource.c: Include cgraph.h
3700         (compile_resource_data): Go via cgraph interface.
3701
3702 2005-03-30  Ian Lance Taylor  <ian@airs.com>
3703
3704         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3705
3706 2005-03-30  Tom Tromey  <tromey@redhat.com>
3707
3708         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3709         inner_class_info_index==0 or outer_class_info_index==0.
3710
3711 2005-03-29  Tom Tromey  <tromey@redhat.com>
3712
3713         * gcj.texi (libgcj Runtime Properties): Document
3714         gnu.gcj.runtime.endorsed.dirs.
3715
3716 2005-03-24  Anthony Green  <green@redhat.com>
3717
3718         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3719         'gcj-dbtool -p'.
3720
3721 2005-03-23  Tom Tromey  <tromey@redhat.com>
3722
3723         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3724         (parse_version): Use it.
3725
3726 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3727
3728         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3729
3730 2005-03-18  Andrew Haley  <aph@redhat.com>
3731
3732         PR java/20522
3733         * decl.c (update_aliases): Don't update variables that are about
3734         to die.
3735         (maybe_poplevels): Add comment.
3736
3737 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
3738
3739         PR java/20502
3740         * jcf-parse.c (duplicate_class_warning): New function.
3741         (java_parse_file): Call duplicate_class_warning if 
3742         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3743         (parse_zip_file_entries): Likewise. Also set
3744         CLASS_FROM_CURRENTLY_COMPILED_P.
3745
3746 2005-03-16  Andrew Haley  <aph@redhat.com>
3747
3748         * expr.c (expand_java_arrayload): Don't generate a
3749         NullPointerException based on the type of the node.
3750         (build_java_array_length_access): Likewise.
3751
3752 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
3753
3754         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3755
3756 2005-03-11  Tom Tromey  <tromey@redhat.com>
3757
3758         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3759         (libgcj Runtime Properties): Document the default .db.
3760
3761 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3762
3763         PR java/20312
3764         * parse.y (checks_throws_clauses): Check exceptions list even when
3765         the base class does not come from a source file being compiled.
3766         (java_complete_lhs): Remove unused variable 'wfl'.
3767
3768 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
3769
3770         PR java/20338
3771         * decl.c (finish_method): Emit _Jv_InitClass for private static
3772         methods inside inner classes as well.
3773
3774 2005-03-08  Julian Brown  <julian@codesourcery.com>
3775         * Revert patch from 2005-03-08 for causing bootstrap failure on
3776         ppc-darwin.
3777
3778 2005-03-08  Julian Brown  <julian@codesourcery.com>
3779
3780         * decl.c (finish_method): Give methods once-only linkage.
3781
3782 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3783
3784         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3785
3786 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
3787
3788         * verify-glue.c (vfy_is_assignable_from): Perform static check using
3789         can_widen_reference_to if the C++ ABI is in use.
3790         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3791         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3792         type_isresolved, init_state, set_pc, state_get_pc,
3793         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3794         (verify_fail): Report the current PC from the verifier context.
3795         (free_state): Remove #if 0 block to enable this function.
3796         (free_verifier_context): Call free_state on state_list iterator
3797         values before freeing them.
3798         * expr.c (pop_type_0): Pop correct type for error message when stack
3799         contains a multi-word type.
3800
3801 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3802
3803         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3804         for known NULL array length access.
3805
3806 2005-03-07  Tom Tromey  <tromey@redhat.com>
3807
3808         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3809
3810 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
3811
3812         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3813         typeck.c: Update copyright.
3814
3815 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
3816
3817         Remove xref code.
3818         * xref.c, xref.h: Remove file.
3819         * Make-lang.in (java/xref.o): Remove.
3820         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3821         * lang.c (flag_emit_xref): Remove definition.
3822         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3823         * typeck.c (convert): Remove use of do_not_fold.
3824         * parse.y (do_not_fold): Remove definition.
3825         (parser grammar): Remove xref code.
3826         (maybe_create_class_interface_decl, create_class): Likewise.
3827         (register_fields, method_header, finish_method_declaration): Likewise.
3828         (declare_local_variables, source_end_java_method): Likewise.
3829         (java_complete_expand_classes): Do not set do_not_fold.
3830         (java_complete_expand_method): Remove xref code.
3831         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3832         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3833         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3834         (patch_synchronized_statement, patch_throw_statement): Likewise.
3835         (maybe_build_class_init_for_field): Likewise.
3836
3837 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
3838
3839         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3840         instead of IS_NON_TYPE_CODE_CLASS.
3841
3842 2005-03-04  Andrew Haley  <aph@redhat.com>
3843
3844         PR java/18362
3845         * class.c (set_method_index): Don't set method_index if it is
3846         NULL_TREE.
3847         (layout_class_method): Don't complain about "non-static method foo
3848         overrides static method" in the case of indirect dispatch.
3849
3850 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3851
3852         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3853         warning.
3854         * Make-lang.in: Don't elide warnings in jcf-io.c.
3855
3856 2005-03-01  Per Bothner  <per@bothner.com>
3857
3858         PR java/8608
3859         * check-init.c (wfl): Remove static.
3860         (final_assign_error, check_init): Replace calls to parse_error_context
3861         by plain error.
3862         (check_init): Save, set, and restore input_location for each exp.
3863
3864 2005-03-01  Per Bothner  <per@bothner.com>
3865
3866         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3867         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3868         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3869
3870 2005-03-01  Per Bothner  <per@bothner.com>
3871
3872         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3873
3874 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3875
3876         PR libgcj/16923
3877         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3878         JvVMOption.
3879
3880 2005-02-22  Tom Tromey  <tromey@redhat.com>
3881
3882         PR java/20056:
3883         * verify-impl.c (EITHER): New define.
3884         (types_compatible): Handle it.
3885         (check_field_constant): Use it.
3886
3887 2005-02-18  Tom Tromey  <tromey@redhat.com>
3888
3889         PR java/20056:
3890         * verify-impl.c (types_equal): Fixed test.
3891
3892         PR java/20056:
3893         * verify-glue.c (vfy_class_has_field): New function.
3894         * verify.h (vfy_class_has_field): Declare.
3895         * verify-impl.c (check_field_constant): Added 'putfield'
3896         argument.
3897         (verify_instructions_0): Updated.
3898         (types_equal): New function.
3899
3900 2005-02-14  Tom Tromey  <tromey@redhat.com>
3901
3902         PR java/19921:
3903         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3904         stack effect of multianewarray.
3905
3906 2005-02-14  Andrew Haley  <aph@redhat.com>
3907
3908         PR java/19907
3909         * expr.c (expand_byte_code): Call promote_arguments().
3910         (promote_arguments): New function.
3911         * decl.c (check_local_unnamed_variable): Remove special case for
3912         new verifier.
3913         (find_local_variable): Promote all boolean types to int
3914         when searching for local variable decls.
3915
3916 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
3917
3918         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3919         parse-scan.y: Update copyright.
3920
3921 2005-02-11  Per Bothner  <per@bothner.com>
3922
3923         PR java/15543
3924         * parse-scan.y (input_location): Remove variable.
3925         (main_input_filename): New - replaces input_filename, which isn't
3926         settable if USE_MAPPED_LOCATION.
3927         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3928         so we don't reference input_location or wfl_operator in that case.
3929         * jv-scan.c (expand_location): Remove - no longer used.
3930         (main): Set main_input_filename rather than input_filename.
3931
3932 2005-02-09  Richard Henderson  <rth@redhat.com>
3933
3934         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3935         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3936
3937 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
3938
3939         * expr.c (add_type_assertion): Use the proper enumeration type,
3940         since this is what htab_find_slot() is expecting.
3941
3942 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
3943
3944         * gcj.texi: Update copyright dates.
3945
3946 2005-02-02  Tom Tromey  <tromey@redhat.com>
3947
3948         * gcj.texi (libgcj Runtime Properties): Default library_control
3949         to 'cache'.
3950
3951 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
3952
3953         PR java/15543
3954         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
3955         (modifiers) when square brackets are present in a declaration for
3956         a final paramter.
3957         * jv-scan.c (main): Set input_filename and input_line.
3958
3959 2005-02-01  Tom Tromey  <tromey@redhat.com>
3960
3961         PR java/19742:
3962         * gjavah.c (get_field_name): Don't override name for JNI header.
3963
3964 2005-02-01  Roger Sayle  <roger@eyesopen.com>
3965
3966         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
3967         of unsigned types using iushr and lushr JVM bytecodes.
3968
3969 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3970
3971         PR java/19738
3972         * gjavah.c (jni_print_float): Do not emit floating-point
3973         initialiser for a static final field.
3974         (jni_print_double): Likewise.
3975
3976 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
3977
3978         Revert:
3979         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3980         * gjavah.c (print_field_info): Mark static data members of
3981         floating-point type with "__extension__".
3982
3983 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3984
3985         * gjavah.c (print_field_info): Mark static data members of
3986         floating-point type with "__extension__".
3987
3988 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
3989
3990         PR java/9157
3991         * parse.y (build_string_concatenation): Remove redundant if.
3992         (patch_conditional_expr): Attempt to patch_string() the condition
3993         of a ?: as well, in addition to its other operands.
3994
3995 2005-01-25  Tom Tromey  <tromey@redhat.com>
3996
3997         * Make-lang.in (java/java-tree-inline.o): Removed.
3998
3999 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4000
4001         PR java/19070
4002         * parse.y (patch_binop): Allow comparisons against NULL only
4003         if the other operand is of a reference type.
4004
4005 2005-01-24  Tom Tromey  <tromey@redhat.com>
4006
4007         * java-tree.h (gcj_abi_version): Declare.
4008         * class.c (make_class_data): Push gcj_abi_version into "next"
4009         field.  Renamed field.
4010         * decl.c (gcj_abi_version): New global.
4011         (parse_version): New function.
4012         (java_init_decl_processing): Call it.  Renamed 'next' field.
4013         Include version.h.
4014         (GCJ_BINARYCOMPAT_ADDITION): New define.
4015
4016 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4017
4018         PR java/19295
4019         * jcf-write.c (generate_bytecode_insns): Conversions between
4020         integer types of the same precision shouldn't generate widening
4021         or narrowing conversion bytecodes.
4022
4023 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4024
4025         * java-except.h, java-tree.h: Remove unused prototypes.
4026
4027 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4028
4029         PR java/18091:
4030         * jcf-write.c (perform_relocations): Don't call memcpy if source
4031         and destination are the same.
4032
4033 2005-01-17  Tom Tromey  <tromey@redhat.com>
4034
4035         * verify-impl.c (get_short): Sign extend.
4036         (get_int): Likewise.
4037
4038 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4039
4040         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4041         with TYPE_SIZE.
4042
4043 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4044
4045         * verify.c: Revert to the version before the BC-ABI merge.
4046
4047 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4048
4049         PR java/19277
4050         * check-init.c (check_init): Take care of references that do not
4051         have an explicit final variable declaration (e.g. array length
4052         access) for pre/post in/de-crement operators.
4053
4054 2005-01-08  Mark Wielaard  <mark@klomp.org>
4055
4056         * parse.y (process_imports): Allocate (and free) original_name only
4057         when not already defined.
4058         * jcf-parse.c (read_class): Free results of find_class() and
4059         lrealpath().
4060         (java_parse_file): Keep pointer to head of file_list and free when
4061         done. Free result of lrealpath().
4062
4063 2005-01-05  Tom Tromey  <tromey@redhat.com>
4064
4065         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4066
4067 2004-12-20  Andrew Haley  <aph@redhat.com>
4068
4069         * typeck.c: Use fold_convert for ints and booleans.
4070
4071 2004-12-17  Andrew Haley  <aph@redhat.com>
4072
4073         PR java/18931
4074         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4075         BOOLEAN_TYPE or CHAR_TYPE.
4076         (convert_to_boolean, convert_to_char) : Remove.
4077         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4078         * expr.c (expand_load_internal): Do type conversion if type is not
4079         as required.
4080
4081 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4082
4083         PR target/18459
4084         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4085         Update comment.
4086
4087 2004-12-07  Andrew Haley  <aph@redhat.com>
4088
4089         PR java/18811:
4090         * jcf-parse.c (load_class): Remove sanity test for missing inner
4091         class file.
4092
4093 2004-12-06  Tom Tromey  <tromey@redhat.com>
4094
4095         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4096         (java.uninstall): Likewise.
4097         (java.maintainer-clean): Likewise.
4098         (.INTERMEDIATE): Likewise.
4099         (java.install-man): Likewise.
4100         (gcj-dbtool.pod): New target.
4101         * gcj.texi (Code Generation): Document -findirect-dispatch.
4102         (libgcj Runtime Properties): Document
4103         gnu.gcj.precompiled.db.path.
4104         (Top): Link to "Invoking gcj-dbtool".
4105
4106 2004-12-06  Tom Tromey  <tromey@redhat.com>
4107
4108         PR java/14853:
4109         * java-tree.h (extract_field_decl): Declare.
4110         * parse.y (extract_field_decl): Renamed from
4111         strip_out_static_field_access_decl.  No longer static.
4112         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4113
4114 2004-12-03  Tom Tromey  <tromey@redhat.com>
4115
4116         * lang.c (flag_new_verifier): Define.
4117         (java_post_options): Set flag_new_verifier if indirect dispatch
4118         is being used.
4119         * lang.opt (fnew-verifier): Removed.
4120
4121 2004-12-03  Tom Tromey  <tromey@redhat.com>
4122
4123         PR bootstrap/14614:
4124         * Make-lang.in (java.install-common): Only install transformed
4125         gcjh if gcj-cross exists.
4126
4127 2004-12-03  Andrew Haley  <aph@redhat.com>
4128
4129         PR java/18812
4130         * except.c (link_handler): Patch 'outer' field of siblings of the
4131         range we're demoting.
4132
4133 2004-12-03  Andrew Haley  <aph@redhat.com>
4134
4135         PR java/18697
4136         * class.c (layout_class_method): Don't fail to override a method
4137         simply because it has DECL_ARTIFICIAL set.
4138
4139 2004-12-02  Tom Tromey  <tromey@redhat.com>
4140
4141         PR java/16675:
4142         * parse.y (craft_constructor): Special case null_pointer_node.
4143
4144 2004-12-02  Tom Tromey  <tromey@redhat.com>
4145
4146         PR java/18741:
4147         * java-gimplify.c (java_gimplify_expr): Don't call
4148         SET_EXPR_LOCATION unless wrapped tree is an expression.
4149
4150 2004-11-27  Per Bothner  <per@bothner.com>
4151
4152         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4153         Fix fencepost error in 'i', which got executed one too many times.
4154         Also, fold memcpy into explicit loop, as originally intended.
4155         Also, free temporary 'buf' which otherwise leaks.
4156
4157 2004-11-27  Per Bothner  <per@bothner.com>
4158
4159         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4160         local static variables if not USE_MAPPED_LOCATION.
4161
4162 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4163
4164         * class.c, decl.c, expr.c: Fix comment typos.
4165
4166 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4167
4168         PR java/18305
4169         * decl.c (end_java_method): Call
4170         attach_init_test_initialization_flags on all the init_decls.
4171         * parse.y (attach_init_test_initialization_flags): Move to ...
4172         * expr.c (attach_init_test_initialization_flags): here and
4173         support BIND_EXPR also.
4174         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4175         * jcf-parse.c (parse_class_file): Don't disable class init
4176         optimization.
4177
4178 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4179
4180         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4181         in diagnostics.
4182
4183 2004-11-24  Richard Henderson  <rth@redhat.com>
4184
4185         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4186         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4187
4188 2004-11-24  Tom Tromey  <tromey@redhat.com>
4189
4190         * verify.c (defer_merging): Don't use C++-style comment.
4191         * verify.h (java_opcode): Added java_opcode_end.
4192         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4193
4194         * verify-impl.c (vfy_push_type): Removed bogus "return".
4195         (initialize_stack): Use vfy_alloc and vfy_free.
4196         (verify_instructions_0): Likewise.
4197
4198         * Merged gcj-abi-2-dev-branch to trunk.
4199
4200 2004-11-24  Andrew Haley  <aph@redhat.com>
4201
4202         * jcf-parse.c (parse_class_file): Set file_start_location.
4203
4204 2004-11-10  Tom Tromey  <tromey@redhat.com>
4205
4206         * class.c (make_field_value): Don't call build_static_field_ref.
4207         (build_static_field_ref): Don't emit direct references when using
4208         indirect dispatch.
4209
4210         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4211         -verbose:class into man page synopsis.
4212
4213 2004-11-09  Tom Tromey  <tromey@redhat.com>
4214
4215         * expr.c (build_java_arraystore_check): Still generate check if
4216         element type is itself an array.
4217
4218 2004-11-08  Tom Tromey  <tromey@redhat.com>
4219
4220         * java-tree.h (soft_check_assignment_node): Removed.
4221         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4222         * decl.c (java_init_decl_processing): Don't initialize
4223         soft_check_assignment_node.
4224
4225 2004-11-05  Tom Tromey  <tromey@redhat.com>
4226
4227         * class.c (layout_class_methods): Don't add Miranda methods when
4228         using indirect dispatch.
4229
4230 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4231
4232         * class.c (make_class_data): Call emit_assertion_table to set the
4233         'assertion_table' field.
4234         (build_signature_for_libgcj): Move here from expr.c.
4235         (add_assertion_table_entry): New function. Callback for assertion
4236         hashtable traversal.
4237         (emit_assertion_table): New. Take class argument, and generate
4238         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4239         * decl.c (init_decl_processing): Define assertion_entry_type record.
4240         Push 'assertion_table' class field instead of 'verify'.
4241         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4242         (type_assertion_hash): Include 'assertion_code' in hash.
4243         (add_type_assertion): Rewritten. Take class and assertion_code
4244         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4245         (can_widen_reference_to): Use new add_type_assertion() arguments.
4246         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4247         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4248         (verify_identifier_node): Removed.
4249         (assertion_entry_type, assertion_table_type): New.
4250         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4251         assertion code definitions.
4252         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4253         'target_type' to 'op1' and 'op2'.
4254         (add_type_assertion): Declare.
4255         (lang_printable_name_wls): Remove unused definition.
4256         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4257         to emit runtime assertion.
4258         (vfy_note_stack_type): Clean up non-C90 declarations.
4259         (vfy_note_local_type): Likewise.
4260         * verify.h (vfy_is_assignable_from): Declare.
4261         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4262         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4263         instead of is_assignable_from_slow().
4264         (types_compatible): Reinstate ref_compatible() call.
4265
4266 2004-11-04  Tom Tromey  <tromey@redhat.com>
4267
4268         * class.c (build_static_field_ref): Reverted previous patch.
4269
4270         * class.c (build_static_field_ref): Don't emit direct references
4271         when using indirect dispatch.
4272
4273 2004-11-03  Tom Tromey  <tromey@redhat.com>
4274
4275         * expr.c (expand_java_arrayload): Set lhs_type_node.
4276         (expand_java_arraystore): Set rhs_type_node.
4277
4278 2004-11-02  Tom Tromey  <tromey@redhat.com>
4279
4280         * jcf-parse.c (compute_class_name): Use filename length from zip
4281         directory, not strlen.
4282
4283         * expr.c (expand_invoke): Mark new interface methods as abstract.
4284
4285 2004-11-01  Tom Tromey  <tromey@redhat.com>
4286
4287         * verify-impl.c (push_jump): Removed check for uninitialized
4288         objects.
4289         (push_exception_jump): Likewise.
4290         (handle_ret_insn): Likewise.
4291         (handle_jsr_insn): Likewise.
4292         (state_check_no_uninitialized_objects): Removed.
4293
4294         * decl.c (check_local_unnamed_variable): Recognize
4295         promoted-to-int parameters when using the new verifier.
4296         * expr.c (expand_java_arraystore): Explicitly request array type
4297         when using new verifier.
4298         (expand_java_arrayload): Likewise.
4299         (invoke_build_dtable): Don't pass object_type_node as
4300         expression argument to build_java_indirect_ref.
4301         (build_java_check_indexed_type): Do nothing.
4302         (build_java_arraystore_check): Handle case where array doesn't
4303         have array type.
4304         (build_java_array_length_access): Likewise.
4305         (expand_invoke): Handle case where interface overrides a method
4306         from Object.
4307         (pop_type_0): Always succeed for reference types.
4308         (process_jvm_instruction): Don't pop a value in a dead
4309         exception handler.
4310         (pop_arguments): Convert arguments to correct types.
4311
4312 2004-10-29  Andrew Haley  <aph@redhat.com>
4313
4314         * jcf-parse.c (give_name_to_class): Remove line that was
4315         incorrectly merged.
4316
4317 2004-10-29  Andrew Haley  <aph@redhat.com>
4318
4319         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4320
4321 2004-10-20  Andrew Haley  <aph@redhat.com>
4322
4323         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4324
4325 2004-10-26  Tom Tromey  <tromey@redhat.com>
4326
4327         * verify.h (vfy_notify_verified): Removed.
4328         * verify-glue.c (vfy_notify_verified): Removed.
4329
4330 2004-10-26  Tom Tromey  <tromey@redhat.com>
4331
4332         * verify-impl.c (debug_print_state): Declare `i' before code.
4333         (merge_types): Modify `t' when it is null_type.
4334
4335 2004-10-26  Tom Tromey  <tromey@redhat.com>
4336
4337         * verify-impl.c (type_print): Renamed from print.  Now static and
4338         takes an argument.
4339         (debug_print_state): Use type_print.
4340
4341 2004-10-25  Tom Tromey  <tromey@redhat.com>
4342
4343         * expr.c (build_invokeinterface): Compute correct offset for
4344         index into interface methods.
4345
4346 2004-10-20  Tom Tromey  <tromey@redhat.com>
4347
4348         * java-tree.h (verify_jvm_instructions_new): Declare.
4349
4350         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4351         command line.
4352
4353         * verify-impl.c (verify_instructions): Correctly handle wide
4354         types on the stack.
4355         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4356         (vfy_get_component_type): Strip pointer types.
4357         (vfy_find_class): Use get_type_from_signature.  Strip pointer
4358         types.
4359         Include java-except.h.
4360
4361 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
4362
4363         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4364         vfy_push_type_t, set_variable, add_new_state, merge_into,
4365         handle_jsr_insn, branch_prepass, check_class_constant,
4366         check_wide_constant, get_one_type, compute_static_types,
4367         verify_instructions_0): Clean up C99 declarations after statements.
4368
4369 2004-10-20  Tom Tromey  <tromey@redhat.com>
4370
4371         * verify-impl.c (merge_refs): Compare reference against iterator,
4372         not ref2.
4373
4374         * verify-glue.c (vfy_tag): Mask off resolved flag.
4375
4376 2004-10-19  Tom Tromey  <tromey@redhat.com>
4377
4378         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4379         (init_state_with_stack): Initialize `this_type' in state.
4380         (verify_method): Use debug_print.
4381         * verify-glue.c (vfy_is_primitive): Removed debugging print.
4382         (vfy_note_stack_depth): Reverted last patch.
4383         (vfy_note_stack_type): Note pointer to Object, not Object.
4384         (vfy_note_local_type): Likewise.
4385
4386         * verify.h (vfy_note_instruction_seen): Declare.
4387         * verify-glue.c (verify_jvm_instructions_new): Set
4388         BCODE_EXCEPTION_TARGET on target instruction.
4389         (vfy_note_instruction_seen): New function.
4390         * verify-impl.c (FLAG_INSN_SEEN): New define.
4391         (verify_instructions_0): Set flag on instruction.  Save state for
4392         PC=0 later.
4393         (verify_instructions): Call vfy_note_instruction_seen.
4394
4395         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4396         (verify_jvm_instructions_new): Call method_init_exceptions,
4397         add_handler, and handle_nested_ranges.
4398         * verify-impl.c (verify_method): Return 1 on success.
4399         (verify_instructions_0): Save the state at PC=0.
4400
4401         * verify-impl.c (init_type_from_class): Set is_resolved and
4402         ref_next on new ref_intersection.
4403         (init_type_from_string): Likewise.
4404
4405 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
4406
4407         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4408         if flag_new_verifier is set.
4409         * java-tree.h (flag_new_verifier): Declare.
4410         * lang.opt (fnew-verifier): New option.
4411         * verify-impl.c: Work around namespace pollution by undef'ing
4412         'current_class'.
4413         (struct verifier_context): Make 'bytecode' const.
4414         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4415         (types_compatible): For the BC-ABI, always consider reference types
4416         compatible.
4417         (check_class_constant): Use vfr->current_class.
4418         (check_constant): Likewise.
4419         (check_wide_constant): Likewise.
4420         (check_field_constant): Check for 'L' at start of type name.
4421         (get_one_type): Return pointer instead of type. Set type result in
4422         caller via passed type pointer.
4423         (compute_argument_types): Update to use new get_one_type arguments.
4424         (compute_return_type): Likewise.
4425         (make_verifier_context): New. Allocate and initialize 'vfr'.
4426         (free_verifier_context): New. Free 'vfr' and its contents.
4427         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4428         and free_verifier_context.
4429
4430 2004-10-15  Tom Tromey  <tromey@redhat.com>
4431
4432         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4433         * verify.h (vfy_fail): Fixed formatting.
4434
4435         * verify-impl.c (vfr): Fixed comment formatting.
4436         (collapse_type): New function.
4437         (verify_instructions): Notify compiler about type map.
4438         * verify.h (vfy_note_stack_depth): Updated.
4439         (vfy_note_stack_type): Likewise.
4440         (vfy_note_local_type): Likewise.
4441         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4442         Declare.
4443         * verify-glue.c (vfy_note_stack_depth): Correctly size type
4444         state.  Added `method' argument.
4445         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
4446         argument.
4447         (vfy_note_local_type): New function.
4448         (vfy_unsuitable_type): Likewise.
4449         (vfy_return_address_type): Likewise.
4450         (vfy_null_type): Likewise.
4451
4452         * verify.h (VFY_IN_GCC): Removed.
4453         (VFY_WANT_TYPEMAP): Removed.
4454         * verify-impl.c (verify_instructions_0): Removed useless "\".
4455         (struct state) <next>: Uncomment.
4456
4457 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
4458
4459         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4460         C-style.
4461
4462 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4463
4464         * Make-lang.in (verify.o): Re-enabled this target.
4465         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4466         (vfy_get_interface): Likewise.
4467         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4468         * verify.h (verify_jvm_instructions_new): Declare.
4469         * verify-impl.c (free_state): Temporarily comment out unused
4470         function.
4471
4472 2004-10-06  Tom Tromey  <tromey@redhat.com>
4473
4474         * java-tree.h (JV_STATE_READ): New enum value.
4475
4476 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4477
4478         * verify.h: New file.
4479
4480 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
4481
4482         * verify-impl.c, verify-glue.c, verify.h: New files.
4483         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4484
4485 2004-09-24  Andrew Haley  <aph@redhat.com>
4486
4487         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4488         for a slot if it's of pointer type.
4489
4490 2004-09-14  Tom Tromey  <tromey@redhat.com>
4491
4492         * class.c (make_class_data): Correctly initialize "state" field.
4493         Initialize "engine" field.
4494         * decl.c (java_init_decl_processing): Add "engine" field.
4495
4496 2004-09-10  Andrew Haley  <aph@redhat.com>
4497
4498         PR java/12760
4499         * expr.c (build_invokeinterface): Use fast method for interface
4500         dispatch.
4501         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4502         JTI_ITABLE_PTR_TYPE.
4503         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
4504         (emit_symbol_table): Add new arg, element_size.
4505         * decl.c (java_init_decl_processing): Initialize Class.itable.
4506         * class.c (GEN_TABLE): New macro.
4507         (gen_indirect_dispatch_tables): Use it.  Add itable.
4508         (make_class_data): Add new arg for emit_symbol_table().
4509         Emit itable.
4510         (add_miranda_methods): Make sure search_class has been parsed.
4511         (emit_symbol_table): Add new arg, element_size.
4512
4513 2004-09-06  Andrew Haley  <aph@redhat.com>
4514
4515         * verify.c (merge_types): Return Object for all merges of
4516         interfaces.
4517         * expr.c (add_type_assertion): Don't generate assertions when
4518         source type is array of Object.
4519
4520 2004-09-03  Andrew Haley  <aph@redhat.com>
4521
4522         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4523
4524         * lang.c (java_post_options): Force flag_verify_invocations if
4525         we're not using indirect dispatch.
4526
4527         * expr.c (pop_type_0): Move test for interfaces before call to
4528         can_widen_reference_to().
4529         (build_signature_for_libgcj): Remove generation of canonical array
4530         type.
4531         (add_type_assertion): Canonicalize both arrays.
4532         Don't assert that type X can be assigned to Object.
4533         Don't assert that type X an be assigned to type X.
4534         Don't assert that Object can be assigned to type X.
4535         (can_widen_reference_to): Warn whenever we generate an assertion.
4536         (process_jvm_instruction): Use throwable_type_node for the type of
4537         an exception class.
4538
4539 2004-09-01  Andrew Haley  <aph@redhat.com>
4540
4541         * decl.c (java_init_decl_processing): Change
4542         verify_identifier_node to "__verify".
4543         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4544         * java-tree.h (verify_identifier_node): Change to "__verify".
4545
4546         * expr.c (build_signature_for_libgcj): New function.
4547         (add_type_assertion): Use it to construct signatures for
4548         source_type and target_type.
4549
4550 2004-08-27  Andrew Haley  <aph@redhat.com>
4551
4552         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4553         (verify_identifier_node): New.
4554         (TYPE_VERIFY_METHOD): New.
4555         (struct type_assertion): New type.
4556         * expr.c (type_assertion_eq): New function.
4557         (type_assertion_hash): New function.
4558         (add_type_assertion): New function.
4559         (can_widen_reference_to): Call add_type_assertion().
4560         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4561         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4562         (finish_class): Output TYPE_VERIFY_METHOD (type).
4563
4564         * decl.c (end_java_method): Nullify unused fields.
4565
4566 2004-08-17  Andrew Haley  <aph@redhat.com>
4567
4568         * verify.c (defer_merging): Quieten.
4569         * jcf-parse.c (load_class): Only try to open a class file if it's
4570         java.lang.Object or if it's part of the current compilation.
4571         Check that the class we just tried to load is the class we just
4572         loaded.  Quieten.
4573         (java_parse_file): Set flag_verify_invocations off if we're
4574         compiling from .class.
4575         (parse_zip_file_entries): Abort if we try to read a dummy class.
4576         * expr.c (can_widen_reference_to): Quieten.
4577         (build_invokevirtual): Abort if we try to invokevirtual an
4578         interface.
4579         (expand_invoke): Don't build a non-interface call to an interface.
4580         (build_instanceof): Don't do premature optimization if
4581         flag_verify_invocations is not set.
4582         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4583         from superclass.
4584         (build_static_field_ref): Add correct type conversion for
4585         field_address.
4586         (add_miranda_methods): Disable generation of Miranda methods for
4587         dummy classes.
4588         (layout_class_method): Don't complain about non-static method
4589         overrides static method with dummy classes.
4590
4591 2004-08-13  Tom Tromey  <tromey@redhat.com>
4592
4593         * class.c (build_static_field_ref): Re-enable atable lookups for
4594         static fields.
4595
4596         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4597
4598 2004-08-11  Tom Tromey  <tromey@redhat.com>
4599
4600         * gcj.texi (libgcj Runtime Properties): Document new properties.
4601
4602 2004-08-06  Andrew Haley  <aph@redhat.com>
4603
4604         * jcf-parse.c (load_class): Check that we really have loaded the
4605         class we're looking for.
4606
4607 2004-07-19  Andrew Haley  <aph@redhat.com>
4608
4609         * verify.c (verify_jvm_instructions): Comment change only.
4610
4611         * typeck.c (build_java_array_type): Add size field to array name.
4612
4613         * java-tree.h (LOCAL_SLOT_P): New.
4614         (update_aliases): Add PC argument.
4615         (pushdecl_function_level): New function.
4616
4617         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4618         MODIFY_EXPR, and SAVE_EXPR.
4619         (java_gimplify_modify_expr): New function.
4620
4621         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4622         (expand_iinc): Pass PC to update_aliases().
4623         (STORE_INTERNAL): Likewise.
4624         (process_jvm_instruction): Likewise.
4625
4626         * decl.c (base_decl_map): New variable.
4627         (uniq): New variable.
4628         (update_aliases): Rewrite with more thorough checking.
4629         (debug_variable_p): New function.
4630         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4631         (check_local_named_variable): Delete whole function.
4632         (initialize_local_variable): New function.
4633         (check_local_unnamed_variable): Add checks and comments.
4634         (find_local_variable): Rewrite.
4635         (java_replace_reference): New function.
4636         (function_binding_level): New variable.
4637         (pushdecl_function_level): New function.
4638         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4639         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4640         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4641         function_binding_level.
4642         (end_java_method): Null unused fields to save memory.
4643
4644 2004-06-29  Andrew Haley  <aph@redhat.com>
4645
4646         * except.c (expand_start_java_handler): Push a new binding level.
4647         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4648         register_exception_range() to register where we'll do it.
4649         (expand_end_java_handler): Remove old bogus code.  Replace with
4650         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4651         the top of the expression we're curently building.
4652         (maybe_end_try): Delete.
4653         * decl.c (binding_level.exception_range): New field.
4654         (clear_binding_level): Add field exception_range.  Reformat.
4655         (poplevel): Call expand_end_java_handler().
4656         (poplevel): Call java_add_stmt only if functionbody is false.
4657         (maybe_poplevels): Don't call maybe_end_try() from here.
4658         (end_java_method): Clear no longer used trees in function decl.
4659         (register_exception_range): New function.
4660         * java-tree.h (register_exception_range, struct eh_range): Declare.
4661
4662 2004-06-22  Andrew Haley  <aph@redhat.com>
4663
4664         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4665         the otable.
4666         * check-init.c (get_variable_decl): Teach check-init about
4667         FIELD_DECLs addressed via the otable.
4668         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4669         CLASS_PARSED_P.
4670
4671 2004-05-28  Andrew Haley  <aph@redhat.com>
4672
4673         * jcf-parse.c (load_class): Don't try to read a class that we've
4674         already read.
4675
4676         * expr.c (build_invokeinterface): Use the old-fashioned way of
4677         doing indirect dispatch: look up interfaces by name.
4678         * java-tree.h (enum java_tree_index): Add
4679         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4680         * decl.c (java_init_decl_processing): Add
4681         soft_lookupinterfacemethodbyname_node.
4682
4683         * gjavah.c (print_method_info): Final methods have vtable entries,
4684         so gjavah needs to output them.
4685         * class.c (layout_class_method): Generate vtable entries for final
4686         methods.
4687         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4688         dispatch, even if a method is final.
4689
4690 2004-05-25  Andrew Haley  <aph@redhat.com>
4691
4692         * class.c (build_symbol_entry): Convert the names of constructors
4693         to init_identifier_node when generating an entry for the indirect
4694         dispatch table.
4695
4696         * expr.c (build_known_method_ref): Generate indirect calls for
4697         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4698
4699 2004-05-24  Andrew Haley  <aph@redhat.com>
4700
4701         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4702         atable element is of the right type.
4703
4704         * class.c (build_static_field_ref): Cast pointer to correct type
4705         for field.
4706
4707 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4708
4709         * Merged with HEAD as of 20040514. Diff against
4710         gcj-abi-2-merge-20040514.
4711
4712 2004-04-16  Andrew Haley  <aph@redhat.com>
4713
4714         * verify.c (check_pending_block): Disable subroutine checks.
4715         (defer_merging): New function.
4716         (merge_types): If types are dummy, use defer_merging to combine them.
4717         (verify_jvm_instructions): If invocation is invokeinterface and
4718         target is dummy, assume target really is an interface.
4719
4720         * parse.y (patch_invoke): Break out call to java_create_object.
4721
4722         * lang.c (flag_verify_invocations): New.
4723
4724         * jcf-parse.c (load_class): If we've already failed to load a
4725         class, don't try again.
4726         (load_class): If we can't find a .class file, don't fail, but emit
4727         a warning.
4728         (parse_class_file): Don't act on dummy methods.
4729
4730         * java-tree.h (flag_verify_invocations): New.
4731         (TYPE_DUMMY): New.
4732         (lang_type.dummy_class): New field.
4733         (java_create_object): New function.
4734         (METHOD_DUMMY): New.
4735
4736         * expr.c (build_field_ref): Widen field offset.
4737         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4738         that each of its elements is compatible with the one we're
4739         popping.
4740         (pop_type_0): Issue a warning to say that we need to generate a
4741         runtime check.
4742         (java_create_object): New function.
4743         (build_field_ref): Only generate hard refs if we're not using
4744         indirect dispatch.
4745         (expand_java_field_op): If we're using !verify_invocations and we
4746         see a missing field, generate a decl for it.
4747
4748         (expand_invoke): If a class doesn't have the method we seek and
4749         we're using !flag_verify_invocations, generate a decl for the
4750         method now.
4751
4752         (build_known_method_ref): Always use indirect dispatch via the
4753         atable for static methods.
4754
4755         (expand_java_NEW): Break out object creation into new function,
4756         java_create_object.
4757
4758         (can_widen_reference_to): Issue a warning to say that we need to
4759         generate a runtime check.
4760
4761         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4762         (make_method_value): Also use index for interfaces.
4763         (make_class_data): Skip dummy field for inherited data.
4764         Don't build method array for dummy methods.
4765         Set size_in_byte to -1 when using inirect dispatch
4766         Don't build a hard class ref if we don't have a hard ref to our
4767         superclass, or if we're using inirect dispatch.
4768         Null out dispatch tables.
4769
4770         (layout_class_method): Don't complain about non-static method
4771         overrides static method is method is artificial.
4772
4773         (build_static_field_ref): Disable atable references to static
4774         fields for the time being.
4775
4776         (layout_class_methods): Check for CLASS_INTERFACE as
4777         well as CLASS_ABSTRACT.
4778
4779 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4780
4781         * class.c (make_class_data): Don't check flag_inline_functions.
4782         * lang.c (flag_really_inline): Remove unused flag.
4783         (java_handle_option): Don't set it here.  Remove special handling
4784         of flag_inline_functions for Java.
4785         (java_init): Don't set flag_inline_trees here.  Already done...
4786         (java_post_options): ...here.  Don't clear flag_inline_functions.
4787
4788 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4789
4790         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4791         (java_gimplify_exit_block_expr): New function.
4792         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4793         LABELED_BLOCK_EXPR.
4794         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4795         (EXIT_BLOCK_EXPR): Likewise.
4796         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4797         (LABELED_BLOCK_BODY): Likewise.
4798         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4799         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4800         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
4801         TREE_OPERAND.
4802         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4803         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4804         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
4805         second operand of EXIT_BLOCK_EXPR.
4806         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4807         TREE_OPERAND.
4808         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4809
4810 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4811
4812         * xref.h (xref_flag_value): Remove.
4813         (xref_set_data, xref_get_data): Likewise.
4814         (xref_set_current_fp): Likewise.
4815         (XREF_NONE): Likewise.
4816         (XREF_GET_DATA): Likewise.
4817         * xref.c (xref_flag_value): Remove.
4818         (xref_set_data, xref_get_data): Likewise.
4819         (xref_set_current_fp): Likewise.
4820
4821 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4822
4823         * gjavah.c (output_directory): Make static.
4824         (temp_directory): Likewise.
4825
4826 2004-11-15  Tom Tromey  <tromey@redhat.com>
4827
4828         * decl.c (instn_ptr_type_node): Removed.
4829         (lineNumbers_ptr_type_node): Removed.
4830         (jint_type): Removed.
4831         (jint_ptr_type): Removed.
4832
4833 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
4834
4835         PR java/15576
4836         * check-init.c (check_init): Ignore DECL_EXPR.
4837         * expr.c (always_initialize_class_p): Reenable.
4838         (build_class_init): Use a variable to store the decl.  Also use
4839         boolean_false_node instead of integer_zero_node.
4840         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4841         to the block.
4842
4843 2004-11-08  Tom Tromey  <tromey@redhat.com>
4844
4845         PR java/16843:
4846         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4847         generating a JNI header.
4848         (print_field_info): Handle JNI headers.
4849         (jni_print_float): Likewise.
4850         (jni_print_double): Likewise.
4851
4852 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
4853
4854         * decl.c (end_java_method): Remove duplicated code.
4855
4856 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
4857             Gerald Pfeifer  <gerald@pfeifer.com>
4858
4859         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4860         as well.
4861
4862 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
4863
4864         PR java/17265
4865         * class.c: Reinstate 2004-08-18 patch.
4866         (make_local_function_alias): Don't create an alias for extern (native)
4867         functions.
4868
4869 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4870
4871         PR java/17265
4872         * class.c (make_local_function_alias): Revert 2004-08-18 change.
4873         (make_method_value): Likewise.
4874
4875 2004-10-21  Andrew Haley  <aph@redhat.com>
4876
4877         PR java/18091:
4878         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4879
4880 2004-10-20  Andrew Haley  <aph@redhat.com>
4881
4882         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4883         Remove duplicated code block.
4884
4885 2004-10-18  Steven Bosscher  <stevenb@suse.de>
4886
4887         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4888         New rules to work around old Bison warnings.
4889
4890 2004-10-17  Steven Bosscher  <stevenb@suse.de>
4891
4892         * class.c (ident_subst): Always alloca buffer.
4893         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4894         opcode after including javaop.def.
4895         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4896         conditional expression that exits, to avoid warnings.
4897         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4898         a user of an extension.
4899         * win32-host.c: Move check down to have non-empty file when
4900         WIN32 is not defined.
4901
4902         * Make-lang.in (java-warn): Add STRICT_WARN.
4903         (java/jcf-io.o-warn): Don't have Werror for this file.
4904         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4905
4906 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
4907
4908         * expr.c (expr_add_location): Move declaration to before all
4909         statements.
4910         * parse.y (java_expand_classes): Ditto.
4911         * lex.c (java_peek_unicode): Ditto.
4912
4913 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4914
4915         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4916         if possible, else convert `foo' to 'foo'.
4917         * class.c: Likewise.
4918         * decl.c: Likewise.
4919         * expr.c: Likewise.
4920         * jcf-io.c: Likewise.
4921         * jcf-parse.c: Likewise.
4922         * lang.c: Likewise.
4923         * lex.c: Likewise.
4924         * parse.h: Likewise.
4925
4926 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4927
4928         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4929         rename parameter 'msg' to 'msgid' in function declaration.
4930         (issue_warning_error_from_context): Likewise.
4931         (yyerror): Rename parameter 'msg' to 'msgid'.
4932         (all over): Use new quoting style for diagnostics.
4933
4934 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
4935
4936         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4937         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4938         Update copyright.
4939
4940 2004-10-14  Matt Austern  <austern@apple.com>
4941
4942         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
4943         pointer_set_t* now.
4944
4945 2004-10-13  Tom Tromey  <tromey@redhat.com>
4946
4947         PR java/15578:
4948         * lang.opt (--extdirs): Document.
4949         * jvspec.c (lang_specific_driver): Recognize -encoding and
4950         -extdirs.
4951
4952 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
4953
4954         * parse.y (issue_warning_error_from_context): Use va_list *
4955         instead of va_list parameter.
4956         (parse_error_context): Update call.
4957         (parse_warning_context): Likewise.
4958
4959 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
4960
4961         * parse.y, parse-scan.y: Add list of diagnostic messages to
4962         insulate translation template from version of yacc/bison used
4963         to compile the grammar.
4964
4965 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
4966
4967         Prepare for %q, %< and %> in diagnostic message strings.
4968         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
4969         Name second parameter 'msgid'.
4970         * parse.y: Additionally include pretty-print.h and diagnostic.h.
4971         (issue_warning_error_from_context): Use pretty-printer functions
4972         instead of vsprintf for constructing formatted messages. Rename
4973         parameter 'msg' to 'msgid'.
4974         (parse_error_context): Rename parameter 'msg' to 'msgid'.
4975         (parse_warning_context): Likewise.
4976
4977 2004-10-05  Andrew Haley  <aph@redhat.com>
4978
4979         PR java/17779
4980         * jcf-parse.c (parse_zip_file_entries): If a class has a
4981         superclass and a TYPE_SIZE of zero, lay it out.
4982
4983 2004-09-30  Andrew Haley  <aph@redhat.com>
4984
4985         PR java/17733
4986         * jcf-parse.c (compute_class_name): Rewrite.
4987
4988 2004-10-01  Jan Hubicka  <jh@suse.cz>
4989
4990         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
4991
4992 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4993
4994         * lex.c: Fix a comment typo.
4995
4996 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
4997
4998         * java-tree.h: Fix a comment typo.
4999
5000 2004-09-30  Per Bothner  <per@bothner.com>
5001
5002         Simplify lexer.  Implement --enable-mapped-location support.
5003         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5004         (parse_source_file_1): Pass filename as extra parameter, so we can call
5005         linemap_add and set input_location here, rather than in both callers.
5006         (read_class): Pass copied filename to parse_source_file_1.
5007         Don't initialize wfl_operator - only needed for source compilation.
5008         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5009         * lex.h:  Remove a bunch of debugging macros.
5010         * lex.h (struct_java_line, struct java_error):  Remove types.
5011         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5012         (struct java_lc_s):  Remove prev_col field.
5013         (struct java_lexer):  New fields next_unicode, next_columns, and
5014         avail_unicode.  New position field, and maybe token_start field.
5015         Don't need hit_eof field - use next_unicode == -1 instead.
5016         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5017         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5018         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5019         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5020         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5021         (struct parser_ctxt):  New file_start_location field.
5022         Remove p_line, c_line fields since we no longer save lines.
5023         Remove elc, lineno, and current_jcf fields - no longer used.
5024         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5025         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5026         source_location and is probably not needed anymore anyway.
5027         Use new expr_add_Location function.
5028         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5029         (java_pop_parser_context):  Minor cleanup.
5030         (java_parser_context_save_global, java_parser_context_restore_global,
5031         java_pop_parser_context):  Save/restore input_location as a unit.
5032         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5033         a source_location instead of a wfl context node.
5034         (check_class_interface_creation):  input_filename is not addressable.
5035         (create_artificial_method):  Calling java_parser_context_save_global
5036         and java_parser_context_restore_global is overkill.  Instead,
5037         temporarily set input_location from class decl.
5038         (java_layout_seen_class_methods): Set input_location from method decl.
5039         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5040         (finish_loop_body):  Likewise.
5041         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5042         (java_sprint_unicode):  Take a character, not index in line.
5043         (java_sneak_uncode):  Replaced by java_peek_unicode.
5044         (java_unget_unicode):  No longer used.
5045         (java_allocate_new_line. java_store_unicode):  Removed, since we
5046         no longer remember "lines".
5047         (java_new_lexer):  Update for new data structures.
5048         (java_read_char):  Move unget_value checking to java_read_unicode.
5049         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5050         efficient functions that are used directly when lexing.
5051         (java_read_unicode_collapsing_terminators):  No longer needed.
5052         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5053         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5054         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5055         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5056         combine switch branches, and test for common token kinds earlier.
5057         (java_lex_error):  Rewrite.
5058         * jv-scan.c (expand_location): New function, copied from tree.c.
5059         (main): Set ctxp->filename instead of setting input_filename directly.
5060
5061 2004-09-30  Per Bothner  <per@bothner.com>
5062
5063         More cleanup for --enable-mapped-location.
5064         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5065         input_location here.  Instead do it in give_name_to_class.
5066         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5067         * expr.c (expand_byte_code): Call linemap_line_start.
5068         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5069         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5070         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5071         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5072         to USE_MAPPED_LOCATION case.
5073
5074         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5075         * jcf-parse.c (java_parse_file): Don't set input_filename.
5076         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5077         Create a list of TRANSLATION_UNIT_DECL.
5078         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5079         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5080         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5081         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5082         (file_start_location):  New static.
5083         (set_source_filename):  Avoid extra access to input_filename macro.
5084         Concatenate new name with class's package prefix.
5085         (set_source_filename, give_name_to_class): Update.
5086         (give_name_to_class):  Set class's "line 0" input_location here.
5087         (parse_class_file):  Set input_location as a unit.
5088
5089         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5090
5091 2004-09-29  Per Bothner  <per@bothner.com>
5092
5093         * java-tree.h:  Redefine some macros and add some declaration
5094         to handle the USE_MAPPED_LOCATION case.
5095         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5096         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5097         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5098         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5099
5100         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5101         * decl.c (finish_method, java_add_stmt): Likewise.
5102         * java-gimplify.c (java-gimplify.c):  Likewise.
5103         * jcf-write.c (generate_bytecode_insns):  Likewise.
5104         * lang.c (java_post_options): Likewise - call linemap_add.
5105
5106 2004-09-29  Andrew Haley  <aph@redhat.com>
5107
5108         PR java/17007
5109         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5110         result of TRUNC_MOD_EXPR.
5111         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5112         * decl.c (java_init_decl_processing): Mark
5113         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5114
5115 2004-09-28  Tom Tromey  <tromey@redhat.com>
5116
5117         PR java/15710:
5118         * class.c (add_miranda_methods): Load superinterface if not
5119         already loaded.
5120
5121 2004-09-28  Andrew Haley  <aph@redhat.com>
5122
5123         PR java/17586
5124         * jcf-parse.c (load_class): Don't try to read a class that we've
5125         already read.
5126
5127 2004-09-28  Andrew Haley  <aph@redhat.com>
5128
5129         * jcf-parse.c (load_class): Back out previous broken patch.
5130
5131 2004-09-28  Andrew Haley  <aph@redhat.com>
5132
5133         PR java/17586
5134         * jcf-parse.c (load_class): Don't try to read a class that we've
5135         already read.
5136         Check that we really did read the right class.
5137
5138 2004-09-25  Tom Tromey  <tromey@redhat.com>
5139
5140         PR java/17500:
5141         * parse.y (create_artificial_method): Use add_method_1.
5142
5143 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5144
5145         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5146         comment typos.
5147         * gcj.texi: Fix typos.
5148
5149 2004-09-24  Tom Tromey  <tromey@redhat.com>
5150
5151         PR java/15656:
5152         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5153         in error parts of rule.
5154         (unary_expression): Don't call error_if_numeric_overflow when $1
5155         is NULL.
5156
5157 2004-09-24  Tom Tromey  <tromey@redhat.com>
5158
5159         PR java/16789:
5160         * parse.y (resolve_qualified_expression_name): Set
5161         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5162         * expr.c (force_evaluation_order): Check for empty argument list
5163         after stripping COMPOUND_EXPR.
5164
5165 2004-09-23  Andrew Haley  <aph@redhat.com>
5166
5167         PR java/16927:
5168         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5169         COND_EXPRs.
5170
5171 2004-09-23  Tom Tromey  <tromey@redhat.com>
5172
5173         PR java/17329:
5174         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5175         where operand is null.
5176
5177 2004-09-23  Tom Tromey  <tromey@redhat.com>
5178
5179         PR java/17380:
5180         * parse.y (not_accessible_p): Allow access to protected members
5181         even when class is not static.
5182
5183 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5184
5185         * Make-lang.in: Revert the gcc-none.o change.
5186
5187 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5188
5189         * parse.y (patch_anonymous_class): VEC_space returns true if there
5190         is space.
5191
5192 2004-09-21  Matt Austern  <austern@apple.com>
5193
5194         Fix bootstrap.
5195         * gjavah.c (free_method_name_list): Fix function definition so
5196         it's a proper C prototype.
5197
5198 2004-09-21  Tom Tromey  <tromey@redhat.com>
5199
5200         PR java/17575:
5201         * gjavah.c (free_method_name_list): New method.
5202         (main): Call it.
5203
5204 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5205             Zack Weinberg  <zack@codesourcery.com>
5206
5207         * java-tree.def: Use tree_code_class enumeration constants
5208         instead of code letters.
5209         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5210         new tree-class enumeration constants.
5211
5212 2004-09-13  Tom Tromey  <tromey@redhat.com>
5213
5214         PR java/17216:
5215         * class.c (layout_class_method): Put synthetic methods into the
5216         vtable.
5217
5218 2004-09-11  Andrew Pinski  <apinski@apple.com>
5219
5220         * Make-lang.in (java/ggc-none.c): Change dependency
5221         for ggc.h into $(GGC_H).
5222
5223 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5224
5225         * Make-lang.in (java/win32-host.o): Add dependency on
5226         coretypes.h.
5227         * win32-host.c: Add includes for coretypes.h, jcf.h
5228
5229 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5230
5231         * Make-lang.in (GCJH_OBJS): Change dependency from
5232         ggc-none.o to java/ggc-none.o
5233         (JCFDUMP_OBJS): Likewise.
5234         (java/ggc-none.o): New target.
5235
5236 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5237
5238         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5239         * class.c (build_utf8_ref, build_static_field_ref,
5240         make_field_value, make_method_value, get_dispatch_table,
5241         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5242         * constants.c (get_tag_node, build_ref_from_constant_pool,
5243         build_constants_constructor): Likewise.
5244         * decl.c (java_init_decl_processing): Likewise.
5245         * expr.c (build_java_array_length_access, build_newarray,
5246         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5247         build_java_binop, build_field_ref, expand_java_add_case,
5248         expand_java_call, build_known_method_ref, build_invokevirtual,
5249         build_invokeinterface, build_jni_stub): Likewise.
5250         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5251         * jcf-parse.c (get_constant): Likewise.
5252         * lex.c (do_java_lex): Likewise.
5253         * parse.y (patch_binop, patch_unaryop, patch_cast,
5254         build_newarray_node, patch_newarray): Likewise.
5255         * resource.c (compile_resource_data): Likewise.
5256         * typeck.c (build_prim_array_type): Likewise.
5257
5258 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5259
5260         * decl.c (java_init_decl_processing): Adjust
5261         initialize_sizetypes call.
5262
5263 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5264
5265         * jv-scan.c (fancy_abort): Add.
5266
5267 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5268
5269         * expr.c (build_java_arrayaccess): Use convert to change
5270         len's type.
5271
5272 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5273
5274         * class.c (make_local_function_alias): Allocate extra space for 'L'
5275         in name buffer. Reported by Thomas Neumann.
5276
5277 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5278
5279         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5280         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5281         * lex.c (do_java_lex): Adjust.
5282         (error_if_numeric_overflow): Likewise.
5283
5284 2004-08-18  Andrew Pinski  <apinski@apple.com>
5285
5286         * class.c (make_local_function_alias): Only make a new decl if we
5287         support alias attribute on all decls.
5288
5289 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5290
5291         * class.c (make_local_function_alias): New function. Create local
5292         alias for public method DECL.
5293         (make_method_value): Use make_local_function_alias.
5294         * parse.y (craft_constructor): Don't special-case anonymous classes.
5295         Always set ctor_name to init_identifier_node.
5296         (lookup_method_invoke): Call layout_class_method when creating
5297         anonymous class constructor.
5298
5299 2004-08-18  Richard Henderson  <rth@redhat.com>
5300
5301         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5302         default case.  Treat '<' similarly.  Update for
5303         is_gimple_formal_tmp_var name change.
5304
5305 2004-08-17  Andrew Haley  <aph@redhat.com>
5306
5307         * lang.c (lang_printable_name): Obey verbose flag.
5308         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5309         lang_printable_name().
5310         (verify_constructor_circularity, get_printable_method_name,
5311         check_abstract_method_definitions, java_check_regular_methods,
5312         java_check_abstract_methods, check_inner_class_access,
5313         fix_constructors, patch_method_invocation, patch_return):
5314         Likewise.
5315         * expr.c (pop_type_0): Likewise.
5316
5317         * java-tree.h (lang_printable_name_wls): Delete.
5318
5319 2004-08-16  Tom Tromey  <tromey@redhat.com>
5320
5321         PR java/8473:
5322         * parse.y (primary): Changed for initialized and uninitialized
5323         array creations.
5324         (array_access): Handle array_creation_initialized.
5325         (array_creation_expression): Split into
5326         array_creation_initialized and array_creation_uninitialized.
5327
5328 2004-08-16  Andrew Haley  <aph@redhat.com>
5329
5330         * jcf-write.c (find_constant_index): Canonicalize NaNs when
5331         generating bytecode.
5332
5333 2004-08-16  Elliot Lee <sopwith@redhat.com>
5334
5335         PR java/9677
5336         * jcf-parse.c (java_parse_file): Handle filenames with embedded
5337         spaces, and quoted filelists.
5338
5339 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5340
5341         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5342         * class.c (build_utf8_ref, build_static_field_ref,
5343         make_field_value, make_method_value, get_dispatch_table,
5344         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5345         * constants.c (get_tag_node,  build_ref_from_constant_pool,
5346         build_constants_constructor): Likewise.
5347         * decl.c (java_init_decl_processing): Likewise.
5348         * expr.c (build_java_array_length_access, build_newarray,
5349         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5350         build_java_binop, build_field_ref, expand_java_add_case,
5351         expand_java_call, build_known_method_ref, build_invokevirtual,
5352         build_invokeinterface, build_jni_stub): Likewise.
5353         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5354         * jcf-parse.c (get_constant): Likewise.
5355         * lex.c (do_java_lex): Likewise.
5356         * parse.y (patch_binop, patch_unaryop, patch_cast,
5357         build_null_of_type, patch_newarray): Likewise.
5358         * resource.c (compile_resource_data): Likewise.
5359         * typeck.c (build_prim_array_type): Likewise.
5360
5361 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
5362
5363         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5364         Don't create BLOCK here or call java_gimplify_block.
5365
5366 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5367
5368         * java-tree.h (flag_deprecated): Removed.
5369         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5370         * parse.y (check_deprecation): Check warn_deprecated instead of
5371         flag_deprecated.
5372
5373 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
5374
5375         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5376         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5377         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5378         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5379         flag_force_classes_archive_check, flag_optimize_sci,
5380         flag_indirect_dispatch): Remove explicit declarations.
5381         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
5382         final comment.
5383
5384 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
5385
5386         PR bootstrap/14893
5387         * Make-lang.in (java.install-man): Install from either build
5388         tree or source tree, whichever has the file first.
5389
5390 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
5391
5392         * jcf-parse.c (get_constant): Adjust force_fit_type call.
5393         * lex.h (SET_LVAL_NODE_TYPE): Remove.
5394         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5395         (do_java_lex): Likewise. Adjust force_fit_type call.
5396
5397 2004-08-04  Roger Sayle  <roger@eyesopen.com>
5398             Andrew Haley  <aph@redhat.com>
5399
5400         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5401         checking trees as they're being built.
5402         (convert): Call convert_ieee_real_to_integer if we're
5403         converting a constant, even if we're writing a class file.
5404
5405 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
5406
5407         PR java/16701
5408         * parse.y (fold_constant_for_init): Call resolve_field_access with
5409         correct current_class context.
5410
5411 2004-08-01  Roger Sayle  <roger@eyesopen.com>
5412
5413         * decl.c (update_aliases, initialize_local_variable): Replace calls
5414         to build with calls to buildN.
5415         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5416         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5417         * parse.h (BUILD_THROW): Likewise.
5418         * parse.y (switch_expression, synchronized_statement,
5419         catch_clause_parameter, array_creation_expression,
5420         conditional_expression, make_qualified_name,
5421         resolve_qualified_expression_name, patch_method_invocation,
5422         patch_invoke, build_method_invocation, build_new_invocation,
5423         build_assignment, patch_assignment, build_binop, patch_binop,
5424         build_string_concatenation, build_incdec, patch_unaryop,
5425         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5426         patch_return, build_if_else_statement, build_labeled_block,
5427         build_new_loop, build_loop_body, build_bc_statement,
5428         build_assertion, encapsulate_with_try_catch, build_try_statement,
5429         build_try_finally_statement, patch_synchronized_statement,
5430         emit_test_initialization): Likewise, replace build with buildN.
5431
5432 2004-07-28  Eric Christopher  <echristo@redhat.com>
5433
5434         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5435         (java_unsafe_for_reeval): Ditto.
5436
5437 2004-07-26    <hp@bitrange.com>
5438
5439         * parse.y (build_super_invocation): Adjust declaration order to
5440         avoid declaration after statement.
5441
5442 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
5443
5444         * decl.c: Rename all identifiers named `class' to `cl'.
5445
5446 2004-07-25  Richard Henderson  <rth@redhat.com>
5447
5448         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5449
5450 2004-07-23  Mike Stump  <mrs@apple.com>
5451
5452         * boehm.c (set_bit): Improve type safety wrt unsignedness.
5453         * gjavah.c (throwable_p, decode_signature_piece,
5454         print_full_cxx_name, print_include, add_namelet, add_class_decl,
5455         process_file): Likewise.
5456         * jcf-dump.c (main): Likewise.
5457         * jcf-io.c (read_zip_member): Likewise.
5458         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5459         give_name_to_class, get_class_constant): Likewise.
5460         * jcf-write.c (find_constant_wide, push_long_const,
5461         generate_classfile): Likewise.
5462         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5463         * parse.y (read_import_dir): Likewise.
5464         * typeck.c (parse_signature_type): Likewise.
5465         * verify.c (verify_jvm_instructions): Likewise.
5466         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5467
5468 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
5469
5470         * Make-lang.in: Replace rmic and rmiregistry references with
5471         grmic and grmiregistry.
5472         * gcj.texi: Likewise.
5473
5474 2004-07-20  Andrew Haley  <aph@redhat.com>
5475
5476         PR java/16431.
5477         * verify.c (verify_jvm_instructions): Comment change only.
5478
5479         * typeck.c (build_java_array_type): Add size field to array name.
5480
5481         * java-tree.h (LOCAL_SLOT_P): New.
5482         (update_aliases): Add PC argument.
5483         (pushdecl_function_level): New function.
5484
5485         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5486         MODIFY_EXPR, and SAVE_EXPR.
5487         (java_gimplify_modify_expr): New function.
5488
5489         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5490         (expand_iinc): Pass PC to update_aliases().
5491         (STORE_INTERNAL): Likewise.
5492         (process_jvm_instruction): Likewise.
5493
5494         * decl.c (base_decl_map): New variable.
5495         (uniq): New variable.
5496         (update_aliases): Rewrite with more thorough checking.
5497         (debug_variable_p): New function.
5498         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5499         (check_local_named_variable): Delete whole function.
5500         (initialize_local_variable): New function.
5501         (check_local_unnamed_variable): Add checks and comments.
5502         (find_local_variable): Rewrite.
5503         (java_replace_reference): New function.
5504         (function_binding_level): New variable.
5505         (pushdecl_function_level): New function.
5506         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5507         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5508         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5509         function_binding_level.
5510         (end_java_method): Null unused fields to save memory.
5511
5512 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5513
5514         * class.c (add_interface_do): Remove.
5515         (set_super_info, interface_of_p, maybe_add_interface,
5516         add_interface, make_class_data, layout_class,
5517         add_miranda_methods): Adjust BINFO accessors and addition.
5518         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5519         accessors.
5520         * jcf-write.c (generate_classfile): Likewise.
5521         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5522         check_circular_reference, java_complete_class,
5523         check_abstract_method_definitions,
5524         java_check_abstract_method_definitions,
5525         check_interface_throws_clauses, java_check_abstract_methods,
5526         lookup_java_interface_method2,
5527         find_applicable_accessible_methods_list): Adjust BINFO accessors
5528         and addition.
5529         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5530
5531 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5532
5533         * builtins.c (max_builtin, min_builtin,
5534         java_build_function_call_expr): Replace calls to build with buildN.
5535         * class.c (build_class_ref, build_static_field_ref,
5536         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5537         * constants.c (build_ref_from_constant_pool): Likewise.
5538         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5539         add_stmt_to_compound): Likewise.
5540         * except.c (build_exception_object_ref, expand_end_java_handler):
5541         Likewise.
5542         * java-gimplify.c (java_gimplify_case_expr,
5543         java_gimplify_default_expr, java_gimplify_block,
5544         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5545         * jcf-write.c (generate_bytecode_insns): Likewise.
5546         * typeck.c (convert_ieee_real_to_integer): Likewise.
5547
5548 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5549
5550         * java-tree.h (builtin_function): Declare.
5551
5552 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5553
5554         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5555         abuse restore_line_number_status.
5556
5557 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5558
5559         g++/15861
5560         * jcf-parse.c (java_emit_static_constructor): Specify default
5561         priority.
5562
5563 2004-07-13  Per Bothner  <per@bothner.com>
5564
5565         * java-tree.h (all_class_filename):  Remove useless macro.
5566         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5567         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5568         * parse.y (java_parser_context_restore_global):  Replace
5569         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5570         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5571
5572 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5573
5574         PR java/16474
5575         gjavah.c (print_field_info): Emit constant only if field is static.
5576
5577 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5578
5579         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5580         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5581         build_java_ret, build_java_throw_out_of_bounds_exception,
5582         build_java_array_length_access, java_check_reference,
5583         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5584         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5585         expand_java_arrayload, build_java_monitor, expand_java_return,
5586         expand_load_internal, expand_java_NEW, build_get_class,
5587         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5588         build_java_soft_divmod, build_java_binop, build_field_ref,
5589         expand_compare, expand_java_goto, expand_java_switch,
5590         expand_java_add_case, build_class_init, build_known_method_ref,
5591         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5592         expand_invoke, build_jni_stub, expand_java_field_op,
5593         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5594         force_evaluation_order, emit_init_test_initialization): Convert
5595         calls to "build" into calls to the prefered "buildN" functions.
5596
5597 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5598
5599         * java-tree.h (set_block): Remove.
5600         * lang.c (java_clear_binding_stack): New.
5601         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5602         * decl.c (struct binding_level): Remove this_block.
5603         (clear_binding_level): Likewise.
5604         (poplevel): Don't handle this_block.
5605         (set_block): Remove.
5606
5607 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5608
5609         * class.c (common_enclosing_context_p): Remove statement with no
5610         side-effects.
5611
5612 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5613
5614         PR java/8618
5615         * parse.y (create_anonymous_class): Remove 'location' argument. Use
5616         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5617         (craft_constructor): Inherit access flags for implicit constructor
5618         from the enclosing class.
5619         (create_class): Fix comment typo.
5620         (resolve_qualified_expression_name): Pass type of qualifier to
5621         not_accessible_p, not the type in which target field was found.
5622         (not_accessible_p): Handle inner classes. Expand protected
5623         qualifier-subtype check to enclosing instances, but don't apply this
5624         check to static members. Allow protected access to inner classes
5625         of a subtype. Allow private access within common enclosing context.
5626         (build_super_invocation): Get WFL line number info from current
5627         class decl.
5628         (build_incomplete_class_ref): Update for new create_anonymous_class
5629         signature.
5630         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5631         common_enclosing_instance_p.
5632         * class.c (common_enclosing_context_p): New. Determine if types
5633         share a common enclosing context, even across static contexts.
5634         (common_enclosing_instance_p): Renamed from
5635         common_enclosing_context_p. Determines if types share a common
5636         non-static enclosing instance.
5637         * java-tree.h (common_enclosing_instance_p): Declare.
5638         * jcf-write.c (get_method_access_flags): New. Surpress private flag
5639         for inner class constructors.
5640         (generate_classfile): Use get_method_access_flags.
5641
5642 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5643
5644         * class.c (interface_of_p): Check for null TYPE_BINFO.
5645
5646 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
5647
5648         * class.c (make_class): Do not create binfo here.
5649         (set_super_info): Create it here.
5650         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5651
5652 2004-07-08  Richard Henderson  <rth@redhat.com>
5653
5654         * expr.c (case_identity, get_primitive_array_vtable,
5655         java_expand_expr, emit_init_test_initialization): Remove.
5656         * java-tree.h (java_expand_expr): Remove.
5657         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5658
5659 2004-07-07  Per Bothner  <per@bothner.com>
5660
5661         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
5662         get internal error due to mismatched types.
5663
5664         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
5665
5666         * gcj.texi (Linking):   New node.  Document -lgij usage.
5667
5668 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5669
5670         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5671         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5672         * java/class.c (set_super_info, class_depth, interface_of_p,
5673         maybe_add_interface, add_interface, make_class_data,
5674         layout_class, add_miranda_methods): Adjust BINFO macros.
5675         * expr.c (can_widen_reference_to, lookup_field): Likewise.
5676         * jcf-write.c (generate_classfile): Likewise.
5677         * parse.y (patch_anonymous_class,
5678         check_inner_circular_reference, check_circular_reference,
5679         java_complete_class, check_abstract_method_definitions,
5680         java_check_abstract_method_definitions,
5681         check_interface_throws_clauses, java_check_abstract_methods,
5682         lookup_java_interface_method2,
5683         find_applicable_accessible_methods_list): Likewise.
5684         * typeck.c (find_method_in_interface): Likewise.
5685         * verify.c (merge_types): Likewise.
5686
5687 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5688
5689         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5690         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5691
5692 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5693
5694         * class.c (make_class): Use make_tree_binfo.
5695         (set_super_info, add_interface_do): Likewise.
5696         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5697
5698 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5699
5700         * verify.c: Correct array element access formatting thinko.
5701
5702 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5703
5704         * verify.c: Insert a short blurb at the start referring to the JVMS.
5705         (merge_type_state): Remove redundant nested if statement.
5706         (verify_jvm_instructions): Ensure current_subr is initialised to
5707         NULL_TREE.
5708         Minor formatting fixes all over the place.
5709
5710 2004-07-02  Richard Henderson  <rth@redhat.com>
5711
5712         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5713
5714 2004-07-01  Richard Henderson  <rth@redhat.com>
5715
5716         * class.c (registerClass_libfunc): Remove.
5717         (init_class_processing): Don't set it.
5718         (emit_register_classes): Take list_p parameter.  Fill it in
5719         with _Jv_RegisterClass calls.
5720         * decl.c (java_init_decl_processing): Don't call
5721         init_resource_processing.
5722         * jcf-parse.c (java_emit_static_constructor): New.
5723         (java_parse_file): Call it.
5724         * resource.c (registerResource_libfunc): Remove.
5725         (init_resource_processing): Remove.
5726         (write_resource_constructor): Take list_p parameter.  Fill it in
5727         with _Jv_RegisterResource calls.
5728         * java-tree.h: Update prototypes.
5729
5730 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
5731
5732         PR java/1262
5733         * class.c (layout_class_method): Do not override package-private
5734         method if its in a different package.
5735         (split_qualified_name): Move here from parse.y. Rename from
5736         breakdown_qualified. Add comment.
5737         (in_same_package): Move here from parse.y. Add comment.
5738         * java-tree.h (break_down_qualified, in_same_package): Declare.
5739         (in_same_package): Likewise.
5740         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5741         Callers updated.
5742
5743 2004-06-29  Andrew Haley  <aph@redhat.com>
5744
5745         * except.c (expand_start_java_handler): Push a new binding level.
5746         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5747         register_exception_range() to register where we'll do it.
5748         (expand_end_java_handler): Remove old bogus code.  Replace with
5749         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5750         the top of the expression we're curently building.
5751         (maybe_end_try): Delete.
5752         * decl.c (binding_level.exception_range): New field.
5753         (clear_binding_level): Add field exception_range.  Reformat.
5754         (poplevel): Call expand_end_java_handler().
5755         (poplevel): Call java_add_stmt only if functionbody is false.
5756         (maybe_poplevels): Don't call maybe_end_try() from here.
5757         (end_java_method): Clear no longer used trees in function decl.
5758         (register_exception_range): New function.
5759         * java-tree.h (register_exception_range, struct eh_range): Declare.
5760
5761 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
5762
5763         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5764
5765 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
5766
5767         Formatting fixes.
5768         * expr.c (class_has_finalize_method): Fix method name indentation.
5769         (expand_java_call): Remove K&R style parameter declaration.
5770         (expand_invoke): Fix statement indentation.
5771         (expand_java_field_op): Likewise.
5772         * parse-scan.y: Fix typo.
5773         (reset_report): Fix method name indentation.
5774         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5775         line. Fix typos.
5776         * verify.c (verify_jvm_instructions): Document parameters, insert
5777         page break.
5778         * lang.c (lang_init_source): Fix method name indentation.
5779         * class.c (common_enclosing_context_p): Likewise.
5780         (emit_symbol_table): Fix parameter list indentation.
5781         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5782         parameter declaration.
5783         * constants.c: Fix copyright notice indentation.
5784         * typeck.c (find_method_in_superclasses): Fix parameter list
5785         indentation.
5786         (find_method_in_interfaces): Likewise.
5787         * zextract.c (makelong): Fix method name indentation.
5788
5789 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5790
5791         PR java/15715.
5792         * parse.y (create_interface): Set correct access modifiers for
5793         interfaces.
5794         * jcf-write.c (get_classfile_modifiers): New function.
5795         (generate_classfile): Use get_classfile_modifiers, not
5796         get_access_flags.
5797
5798 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5799
5800         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5801         dependency to current parser context, not NULL_TREE, for top-level
5802         classes.
5803         (jdep_resolve_class): Enable member access check for all inner
5804         class dependencies.
5805
5806 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5807
5808         * parse.y (qualify_and_find): Pass type decl, not identifier, to
5809         load_class.
5810
5811 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5812
5813         PR java/15734
5814         * expr.c (expand_java_field_op): Ensure that target class for static
5815         field access has been loaded.
5816
5817 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5818             Ranjit Mathew  <rmathew@hotmail.com>
5819
5820         PR java/1207, java/16178
5821         * jcf-parse.c (load_class): Return immediately if passed a type decl
5822         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5823         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5824         before calling load_class.
5825         (qualify_and_find): Likewise.
5826         (find_in_imports_on_demand): Likewise.
5827         (find_applicable_accessible_methods_list): Likewise.
5828
5829 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
5830
5831         * parse.y (java_layout_seen_class_methods): Don't call load_class
5832         on class defined by source parser.
5833
5834 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
5835
5836         * parse.y (set_nested_class_simple_name_value): Removed.
5837         (java_complete_expand_class): Remove calls to
5838         set_nested_class_simple_name_value.
5839
5840 2004-06-22  Andrew Haley  <aph@redhat.com>
5841             Ranjit Mathew  <rmathew@hotmail.com>
5842
5843         Fixes PR java/16113.
5844         * decl.c (force_poplevels): Remove call to expand_end_bindings.
5845
5846 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
5847
5848         * parse.y (create_class): Correct diagnostic message about
5849         java.lang.Object extending anything else.
5850
5851 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5852
5853         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5854         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5855         * constants.c (build_ref_from_constant_pool): Likewise.
5856         * expr.c (build_java_array_length_access): Likewise.
5857         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5858         (invoke_build_dtable, build_invokevirtual): Likewise.
5859         (build_invokeinterface, java_expand_expr): Likewise.
5860         (emit_init_test_initialization): Likewise.
5861         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5862         * parse.y (make_qualifed_name, build_array_ref): Likewise.
5863
5864 2004-06-21  Andrew Haley  <aph@redhat.com>
5865
5866         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5867         block.
5868
5869 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
5870
5871         * jcf.h (struct JCF): Change java_source, right_zip and finished
5872         to unsigned int.
5873         * lex.h (struct java_lexer): Change hit_eof, read_anything,
5874         byte_swap and use_fallback to unsigned int.
5875         * parse.h (struct _jdep): Change flag0 to unsigned int.
5876
5877 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
5878
5879         Fixes PR java/13948
5880         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5881         before trying to lay out its methods.
5882         * jcf-parse.c (read_class): Track parsed files using canonical paths
5883         obtained via lrealpath from libiberty.
5884         (java_parse_file): Likewise.
5885         (parse_source_file_1): Rename formal parameter to reflect its
5886         modified purpose. Minor formatting fix.
5887
5888 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5889
5890         * class.c (emit_register_classes): Make the function uninlinable,
5891         do not set current_function_cannot_inline.
5892         * resource.c (write_resource_constructor): Do not reset
5893         flag_inline_functions around rest_of_compilation.
5894
5895 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
5896
5897         PR java/15769
5898         * expr.c (java_truthvalue_conversion): Handle
5899         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5900         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5901         i.e. return the expression.
5902
5903 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
5904
5905         * gjavah.c: Include version.h
5906
5907 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
5908
5909         * jcf-write.c (generate_bytecode_conditional): Correct handling
5910         of unordered conditionals. Add comment.
5911
5912 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
5913             Per Bothner  <per@bothner.com>
5914
5915         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5916         local variable was initialised upon declaration.
5917         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5918         variable was final and initialised upon declaration.
5919         * check-init.c (check_final_reassigned): Give error only if a blank
5920         final is not definitely unassigned or if an initialised final is
5921         reassigned.
5922         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5923         assignment expressions. Remove case MODIFY_EXPR, label do_default.
5924         (check_init): Perform initialised-variable-removing-optimisation
5925         only on non-final local variables.
5926
5927 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5928
5929         * jcf-write.c (generate_bytecode_conditional): Handle binops
5930         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5931         and LTGT_EXPR.
5932         (generate_bytecode_insns): Likewise.
5933
5934 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5935
5936         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5937         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5938
5939 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5940
5941         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
5942         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
5943
5944 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5945
5946         * decl.c (struct binding_level): Add GTY marker. Compile
5947         binding_depth unconditionally.
5948         (current_binding_level, free_binding_level, global_binding_level):
5949         Likewise.
5950         (clear_binding_level): Unconditionally set binding_depth.
5951         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
5952
5953 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
5954
5955         * lex.c (java_new_lexer): Set 'encoding'.
5956         (java_read_char): Improve error message for unrecognized characters.
5957         * lex.h (struct java_lexer): New field 'encoding'.
5958
5959 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
5960
5961         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
5962
5963 2004-05-21  Mark Wielaard  <mark@klomp.org>
5964
5965         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
5966         extern.
5967
5968 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
5969
5970         * typeck.c: Remove non-printable character 160.
5971
5972 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
5973
5974         * check-init.c: Correct minor typos.
5975
5976 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5977
5978         * Make-lang.in, expr.c, java-gimplify.c: Rename
5979         tree-simple.[ch] to tree-gimple.[ch].
5980
5981 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
5982
5983         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
5984
5985 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
5986
5987         Merge from tree-ssa-20020619-branch.  See
5988         ChangeLog.tree-ssa for details.
5989
5990         * Make-lang.in, builtins.c, check-init.c, class.c,
5991         constants.c, decl.c, except.c, expr.c, java-except.h,
5992         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
5993         lang.c, lang.opt, parse.y, resource.c: Merged.
5994         * java-gimplify.c: New file.
5995
5996 2004-05-10  Andrew Haley  <aph@redhat.com>
5997
5998         * parse.y (create_class): Set TYPE_VFIELD.
5999         * decl.c (java_init_decl_processing): Likewise.
6000
6001         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6002         * class.c (make_method_value): Replace DECL_VINDEX with call to
6003         get_method_index().
6004         (get_dispatch_vector): Likewise.
6005         (layout_class_method): Likewise.
6006         Replace set of DECL_VINDEX with call to set_method_index().
6007         (set_method_index): New function.
6008         (get_method_index): New function.
6009         * java-tree.h (set_method_index): New function decl.
6010         (get_method_index): New function decl.
6011
6012 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6013
6014         * parse.y (check_pkg_class_access): Add new argument
6015         and use it when cl is NULL to call lookup_cl on it.
6016         (parser_check_super_interface): Do not call lookup_cl.
6017         Pass this_decl to check_pkg_class_access and NULL
6018         instead of lookup_cl.
6019         (parser_check_super): Update for change in
6020         check_pkg_class_access.
6021         (do_resolve_class): Likewise.
6022         (process_imports): Likewise.
6023         (find_in_imports_on_demand): Likewise.
6024         (resolve_qualified_expression_name): Likewise.
6025
6026 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6027
6028         Fixes PR java/9685, PR java/15073
6029         * parse.y (accessibility_string): New method.
6030         (not_accessible_field_error): Use accessibility_string()
6031         instead of java_accstring_lookup().
6032         (resolve_qualified_expression_name): Check with
6033         check_pkg_class_access() before allowing access using
6034         qualified names.
6035         Fix comment typo.
6036         Use check_pkg_class_access() instead of not_accessible_p()
6037         for unqualified types.
6038         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6039         REFERENCE for package-private access checking.
6040         (patch_method_invocation): Use accessibility_string() instead
6041         of java_accstring_lookup().
6042
6043 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6044
6045         Fixes PR java/15133
6046         * gjavah.c (struct method_name): Add member is_native.
6047         (overloaded_jni_method_exists_p): Match candidate method only if
6048         it is native.
6049         (print_method_info): Initialise is_native flag from the method's
6050         access flags.
6051
6052 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6053
6054         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6055         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6056
6057 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6058
6059         * resource.c (write_resource_constructor): Guard call to possibly
6060         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6061
6062 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6063
6064         * class.c (make_class_data): Add new field aux_info.
6065         * decl.c (java_init_decl_processing): Push type and decl for
6066         `aux_info'.
6067
6068 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6069
6070         * expr.c (expand_java_NEW): Don't use size argument for
6071         _Jv_AllocObject calls.
6072         * parse.y (patch_invoke): Likewise.
6073
6074 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6075
6076         * expr.c (build_invokeinterface): Remove unused variables to
6077         fix warnings.
6078
6079 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6080
6081         * class.c (get_interface_method_index): New function. Return dispatch
6082         index for interface method.
6083         (make_method_value): For interface methods, set index field to
6084         iface dispatch index, not DECL_VINDEX.
6085         * expr.c (build_invokeinterface): Use get_interface_method_index.
6086
6087 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6088
6089         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6090
6091 2004-03-31  Andrew Haley  <aph@redhat.com>
6092
6093         PR java/14104
6094         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6095
6096 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6097
6098         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6099         form of GTY markers.
6100
6101 2004-03-25  Marcus Meissner  <meissner@suse.de>
6102
6103         PR java/14689:
6104         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6105
6106 2004-03-23  Tom Tromey  <tromey@redhat.com>
6107
6108         PR java/14315:
6109         * jcf-write.c (make_class_file_name): Don't report if mkdir
6110         failed with EEXIST.
6111
6112 2004-03-23  Tom Tromey  <tromey@redhat.com>
6113
6114         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6115
6116 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6117
6118         * class.c, gjavah.c, lang.c: Fix comment typos.
6119         * gcj.texi: Fix typos.
6120
6121 2004-03-19  Per Bothner  <per@bothner.com>
6122
6123         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6124
6125         * class.c (assume_compiled_node_struct):  Rename type to
6126         class_flag_node_struct, as it is now also used for enable_assertions.
6127         Rename assume_compiled_node typedef.  Rename excludep field to value.
6128         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6129         Minor optimization - avoid needless strlen.
6130         (add_assume_compiled):  Some tweaking and optimization.
6131         Rename and generalize to add_class_flag takem an extra parameter.
6132         (add_assume_compled):  New just calls add_class_flag.
6133         (add_enable_assert, enable_assertions):  New functions.
6134         (enable_assert_tree):  New static.
6135         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6136         * lang.opt (fenable-assertions, fenable-assertions=,
6137         fdisable-assertions, fdisable-assertions=):  New options.
6138         * lang.c (java_handle_option):  Handle new options.
6139         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6140         class in an interface - create helper class nested in outer interface.
6141         (build_assertion):  Short-circuit if enable_assertions is false.
6142
6143 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6144
6145         * java-tree.h: Changes throughout to add checking to macros
6146         and numerous whitespace changes.
6147         (VAR_OR_FIELD_CHECK): New macro.
6148         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6149         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6150
6151 2004-03-16  Per Bothner  <per@bothner.com>
6152
6153         * jcf-jump.c (options):  New --print-constants option.
6154         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6155
6156         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6157         (print_constant_terse_with_index):  New helper function.
6158         (various places):  Check flag_print_constant_pool where missing.
6159         (main):  If verbose set flag_print_constant_pool.
6160         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6161
6162 2004-03-15  Andrew Haley  <aph@redhat.com>
6163
6164         PR java/14581
6165         * parse.y (java_complete_lhs): Check that final variable has an
6166         initializer.
6167
6168 2004-03-12  Andrew Haley  <aph@redhat.com>
6169
6170         PR java/14551
6171         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6172         conversion.
6173
6174 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6175
6176         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6177         is NULL.
6178
6179 2004-02-27  Per Bothner  <per@bothner.com>
6180
6181         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6182         suggestion:  Use build_incomplete_class_ref.
6183         This fixes PR java/13508, java/11714.
6184
6185 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6186
6187         * java/parse.h: Update copyright.
6188
6189 2004-02-26  Andrew Haley  <aph@redhat.com>
6190
6191         PR java/14231:
6192         * parse.y (check_interface_throws_clauses): Check for
6193         !METHOD_INVISIBLE (iface_method).
6194         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6195         well as CLASS_ABSTRACT.
6196
6197 2004-02-25  Per Bothner  <per@bothner.com>
6198
6199         * parse.y (build_assertion):  If we're in an inner class, create the
6200         class$ helper routine in the outer class.
6201
6202 2004-02-19  Richard Henderson  <rth@redhat.com>
6203
6204         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6205
6206 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6207
6208         * Make-lang.in (java.install-man): Add extra dependencies.
6209
6210 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6211
6212         * Make-lang.in: Install man pages under the same names
6213         (possibly transformed) as the program they document.
6214
6215 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6216
6217         * gjavah.c: Include "intl.h".
6218         (error): New function.
6219         (main): Call gcc_init_libintl.
6220         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6221         print_stub_or_jni, process_file, main): Use error rather than
6222         fprintf.
6223         (print_method_info, usage, help, version, main): Mark strings for
6224         translation with _.  Avoid splitting up sentences.  Send
6225         information messages to stdout.
6226         * jcf-dump.c: Include "intl.h".
6227         (main): Call gcc_init_libintl.
6228         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6229         Mark error, usage and version messages for translation with _.
6230         Avoid splitting up sentences.
6231         * jv-scan.c: Include "intl.h".
6232         (fatal_error, warning): Change parameter s to msgid.  Translate
6233         messages.
6234         (main): Call gcc_init_libintl.
6235         (usage, help, version): Mark error, usage and version messages for
6236         translation with _.  Avoid splitting up sentences.
6237         * jvgenmain.c: Include "intl.h".
6238         (main): Call gcc_init_libintl.
6239         (usage, main): Mark error messages for translation with _.
6240         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6241         JVGENMAIN_OBJS): Add intl.o.
6242         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6243         java/jvgenmain.o): Update dependencies.
6244
6245 2004-02-08  Per Bothner  <per@bothner.com>
6246
6247         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6248         class don't use not_accessible_field_error, which can get confused.
6249
6250 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6251
6252         Make-lang.in (po-generated):  Delete.
6253
6254 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6255
6256         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6257         Depend on target.h.
6258         * decl.c: Include target.h.
6259         (start_java_method): Replace PROMOTE_PROTOTYPES with
6260         targetm.calls.promote_prototypes.
6261         * expr.c: Include target.h.
6262         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6263         targetm.calls.promote_prototypes.
6264         * parse.y: Include target.h.
6265         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6266         with targetm.calls.promote_prototypes.
6267
6268 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6269
6270         * typeck.c: Update copyright.
6271
6272 2004-02-02  Tom Tromey  <tromey@redhat.com>
6273
6274         * decl.c (java_init_decl_processing): Remove duplicate
6275         gnu/gcj/RawData.
6276
6277 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6278
6279         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6280
6281 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6282
6283         * expr.c (build_field_ref): Move variable
6284         definition up.
6285
6286 2004-01-28  Andrew Haley  <aph@redhat.com>
6287
6288         * expr.c (build_field_ref): Widen field offset.
6289
6290 2004-01-27  Andrew Haley  <aph@redhat.com>
6291
6292         java/13273
6293         * parse.y (check_interface_throws_clauses): Make sure class_decl
6294         has been loaded.
6295
6296 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6297
6298         PR java/13733
6299         * parse.y (patch_assignment): Don't modify lhs_type for
6300         reference assignments.
6301
6302 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6303
6304         * Make-lang.in: Replace $(docdir) with doc.
6305         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6306         (java.install-man): Revamp rule.
6307
6308 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6309
6310         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6311         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6312         instead of deferred backquote.
6313
6314 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6315
6316         * typeck.c (find_method_in_interfaces): Move variable
6317         definition up.
6318
6319 2004-01-16  Andrew Haley  <aph@redhat.com>
6320
6321         PR java/13273:
6322         * typeck.c (shallow_find_method): New.
6323         (find_method_in_superclasses): New.
6324         (find_method_in_interfaces): New.
6325         (lookup_do): Rewrite.
6326         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6327
6328         * jcf-parse.c (read_class): Save and restore output_class.
6329         * decl.c (java_expand_body): Set output_class from fndecl.
6330
6331 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
6332
6333         * class.c (gen_indirect_dispatch_tables): Fix string length
6334         calculations.
6335
6336 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6337
6338         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6339         (java.srcextra): Copy above back to source directory if requested.
6340         (po-generated): Delete reference to $(parsedir).
6341         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6342         Use implicit rule.
6343
6344 2004-01-14  Jan Hubicka  <jh@suse.cz>
6345
6346         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6347         estimation.
6348
6349 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6350
6351         * java-tree.h (java_expand_expr): Change prototype.
6352         * expr.c (java_expand_expr): Add alt_rtl parameter.
6353
6354 2004-01-09  Andrew Haley  <aph@redhat.com>
6355
6356         PR java/12755:
6357         * parse.y (java_fix_constructors):  Set output_class.
6358         (java_reorder_fields): Likewise.
6359         (java_layout_classes): Likewise.
6360         (java_expand_classes): Generate indirect dispatch tables.
6361         (java_expand_classes): Set output_class.
6362         (java_finish_classes): Likewise.
6363         * lang.c (java_init): Turn on always_initialize_class_p if we're
6364         using indirect dis[atch.
6365         (java_decl_ok_for_sibcall): Use output_class, not current_class.
6366         (java_get_callee_fndecl): Use class local atable.
6367         * jcf-parse.c
6368         (always_initialize_class_p): Decl moved to java-tree.h.
6369         (HANDLE_CLASS_INFO): Set output_class.
6370         (read_class): Likewise.
6371         (parse_class_file): Call gen_indirect_dispatch_tables.
6372         (parse_zip_file_entries): Set output_class.
6373         (java_parse_file): Set output_class.  Don't emit symbol tables.
6374         * java-tree.h (output_class): New.
6375         Remove global declarations for otable, atable, and ctable.
6376         (always_initialize_class_p): moved here from decl.c.
6377         (DECL_OWNER): New.
6378         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6379         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6380         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6381         (struct lang_type): Add otable_methods, otable_decl,
6382         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6383         ctable_decl, catch_classes, type_to_runtime_map.
6384         * expr.c (build_field_ref): Make otable, atable, and ctable class
6385         local rather than global.
6386         (build_known_method_ref): Likewise.
6387         (build_invokeinterface): Likewise.
6388         (java_expand_expr): Pass runtime type (rather than actual type) to
6389         expand_start_catch.
6390         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6391         this class.  Look up each class in that map to delete duplicates.
6392         (expand_end_java_handler): Pass runtime type (rather than actual
6393         type) to expand_start_catch.
6394         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6395         (do_nothing): New.
6396         (java_init_decl_processing): Rearrange things.  Remove global
6397         declarations of otable, atable, and ctable.
6398         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6399         (java_expand_body): Set output_class.
6400         * constants.c (build_constant_data_ref): Use output_class, not
6401         current_class.
6402         (alloc_name_constant): Likewise.
6403         * class.c (gen_indirect_dispatch_tables): New.
6404         (build_class_ref): Generate hard reference to superclass, even if
6405         using indirect dispatch.
6406         (build_static_field_ref): Use class local atable.
6407         (make_class_data): Generate hard reference to superclass, even if
6408         using indirect dispatch.
6409         Generate symbolic references to interfaces when using indirect
6410         dispatch.
6411         (make_class_data): Emit otable, atable, and ctable.
6412         Make otable, atable, and ctable class local rather than global.
6413         (emit_catch_table): Make otable, atable, and ctable class local
6414         rather than global.
6415
6416 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
6417
6418         * parse.y (catch_clause_parameter): Fix typo.
6419
6420         PR java/13404
6421         * parse.y: (catch_clause_parameter): Return early if $3, aka
6422         formal_parameter, is null.
6423
6424 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6425
6426         * class.c: Remove uses of "register" specifier in
6427         declarations of arguments and local variables.
6428         * decl.c: Likewise.
6429         * expr.c: Likewise.
6430         * gjavah.c: Likewise.
6431         * jcf-dump.c: Likewise.
6432         * jcf-io.c: Likewise.
6433         * jcf-parse.c: Likewise.
6434         * jcf-write.c: Likewise.
6435         * keyword.h: Likewise.
6436         * parse.y: Likewise.
6437         * typeck.c: Likewise.
6438         * verify.c: Likewise.
6439
6440 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
6441
6442         * Make-lang.in (GCJ_CROSS_NAME): Delete.
6443         (java.install_common, java.install-man): Adjust for above.
6444         (java.uninstall): Likewise.
6445
6446 2003-12-03  Michael Koch  <konqueror@gmx.de>
6447
6448         * class.c (make_class_data):
6449         Push field value to 'hack_signers' instead of 'signers'.
6450         * decl.c (java_init_decl_processing):
6451         Push field 'hack_signers' instead of 'signers'.
6452
6453 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
6454
6455         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6456         including iconv.h.
6457
6458 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
6459
6460         PR java/12374:
6461         * parse.y (qualify_ambiguous_name): Remove lots of broken
6462         field access processing - there's no need to do that here,
6463         because we have resolve_field_access.  Remove
6464         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6465         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6466         used.
6467
6468 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
6469
6470         Fix PR java/13237
6471         * parse.y (java_complete_lhs): Save location prior to patching
6472         CALL_EXPR.
6473
6474 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
6475
6476         PR java/12548
6477         * resource.c (write_resource_constructor): Append
6478         "_resource" to constructor identifier name.
6479
6480 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
6481
6482         Fix PR java/13183.
6483         * constants.c (cpool_for_class): New function.
6484         (outgoing_cpool): Remove global variable.
6485         (alloc_name_constant): Use cpool_for_class.
6486         (build_constants_constructor): Likewise.
6487         * decl.c (java_expand_body): Set current_class.
6488         * java-tree.h (outgoing_cpool) Remove declaration.
6489         (init_outgoing_cpool): Likewise.
6490         * jcf-parse.c (init_outgoing_cpool): Remove function.
6491         (parse_class_file): Don't call init_outgoing_cpool.
6492         * parse.y (java_complete_expand_methods): Don't call
6493         init_outgoing_cpool.  Don't save outgoing_cpool.
6494         (java_expand_classes): Don't restore outgoing_cpool.
6495         (java_finish_classes): Likewise.
6496
6497 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
6498
6499         * Make-lang.in: (java.install-common) Add
6500         symlink for $(target_noncanonical)-gcjh for
6501         native builds.
6502
6503 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6504
6505         * Make-lang.in (java.extraclean): Delete.
6506
6507 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6508
6509         * Make-lang.in (check-java): Add.
6510
6511 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
6512
6513         Fix PR java/13024.
6514         * except.c (prepare_eh_table_type): Allocate variable-sized
6515         buffer `buf' with alloca.
6516
6517 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6518
6519         Fix PR java/12857.
6520
6521         decl.c (java_init_decl_processing): Don't initialize
6522         class_not_found_type_node, no_class_def_found_type_node.
6523
6524         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6525         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6526         (class_not_found_type_node, no_class_def_found_type_node):
6527         Don't define.
6528
6529         parse.y (build_dot_class_method_invocation): Add this_class
6530         argument.  Qualify method invocations to a different class.
6531         (create_new_parser_context): Initialize saved_data_ctx to 0.
6532         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6533         (build_dot_class_method): Don't load classes.  Register
6534         incomplete types.
6535         (build_incomplete_class_ref): Special cases for interfaces
6536         and inner classes.  Move build_dot_class_method call to here...
6537         (patch_incomplete_class_ref): ...from here.  Pass current_class
6538         to build_dot_class_method_invocation.
6539         (build_assertion): Pass class_type to
6540         build_dot_class_method_invocation.
6541         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6542
6543 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6544
6545         Fix PR java/12739.
6546         * java-tree.h (BLOCK_EMPTY_P): Define.
6547         * parse.y (java_complete_lhs): Check for empty blocks
6548         in TRY_FINALLY_EXPR case.
6549
6550 2003-11-17  Andrew Haley  <aph@redhat.com>
6551
6552         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6553         (struct lang_decl_var:freed): New variable.
6554         * decl.c (poplevel): Mark local vars that have gone out of scope.
6555         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6556         scope.
6557
6558 2003-11-16  Jason Merrill  <jason@redhat.com>
6559
6560         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6561         and TAGS files that include them for each front end.
6562
6563 2003-11-15  Tom Tromey  <tromey@redhat.com>
6564
6565         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6566
6567 2003-11-12  Jason Merrill  <jason@redhat.com>
6568
6569         PR optimization/12547
6570         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6571         BLOCK_EXPR_BODY directly.
6572
6573 2003-11-12  Andrew Haley  <aph@redhat.com>
6574
6575         PR java/11045
6576         * parse.y (fold_constant_for_init): Check that we really do have a
6577         constant.
6578
6579         PR java/11533
6580         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6581         init_test_decls being inlined.
6582
6583         PR java/12890:
6584         * parse.y (do_resolve_class): Check return value from
6585         breakdown_qualified().
6586
6587 2003-11-11  Tom Tromey  <tromey@redhat.com>
6588
6589         PR java/12915:
6590         * parse.y (merge_string_cste): Handle case where we have a
6591         pointer that happens to be zero, not null_pointer_node.
6592
6593 2003-11-10  Tom Tromey  <tromey@redhat.com>
6594
6595         * jcf-parse.c (classify_zip_file): Correctly compare
6596         filename_length against length of manifest file's name.
6597
6598 2003-11-08  Tom Tromey  <tromey@redhat.com>
6599
6600         PR java/12894:
6601         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6602
6603 2003-11-06  Andrew Haley  <aph@redhat.com>
6604
6605         * expr.c (java_stack_swap): Make sure destination stack slots are
6606         of the correct type.
6607
6608 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6609
6610         * Make-lang.in (dvi): Move targets to $(docobjdir).
6611         (gcj.dvi): Simplify rule and adjust target.
6612         (gcj.info): Simplify rule.
6613         (gcj.pod): New intermediate rule.
6614         (gcjh.pod): Likewise.
6615         (jv-scan.pod): Likewise.
6616         (jcf-dump.pod): Likewise.
6617         (gij.pod): Likewise.
6618         (jv-convert.pod): Likewise.
6619         (rmic.pod): Likewise.
6620         (rmiregistry.pod): Likewise.
6621         (gcj.1): Delete.
6622         (gcjh.1): Delete.
6623         (jv-scan.1): Delete.
6624         (jcf-dump.1): Delete.
6625         (gij.1): Delete.
6626         (jv-convert.1): Delete.
6627         (rmic.1): Delete.
6628         (rmiregistry.1): Delete.
6629
6630 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
6631
6632         Fixes PR java/12866.
6633         * parse.y (resolve_qualified_expression_name): Move test
6634         for outer field access methods from here...
6635         (check_thrown_exceptions) ...to here.
6636
6637 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
6638
6639         * .cvsignore: Delete.
6640
6641 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
6642
6643         * verify.c (verify_jvm_instructions): Don't warn about legal
6644         eh binding regions generated for example by jdk 1.4.1.
6645
6646 2003-10-24  David S. Miller  <davem@redhat.com>
6647
6648         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6649
6650 2003-10-22  Andrew Haley  <aph@redhat.com>
6651
6652         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6653         (java_get_callee_fndecl): New.
6654
6655         * jcf-parse.c (java_parse_file): Call emit_catch_table().
6656
6657         * java-tree.h (ctable_decl): New.
6658         (catch_classes):  New.
6659         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6660
6661         * decl.c (java_init_decl_processing): Add catch_class_type.
6662         Add ctable_decl.
6663         Add catch_classes field.
6664
6665         * class.c (build_indirect_class_ref): Break out from
6666         build_class_ref.
6667         (make_field_value): Check flag_indirect_dispatch.
6668         (make_class_data): Ditto.
6669         Tidy uses of PUSH_FIELD_VALUE.
6670         Add field catch_classes.
6671         (make_catch_class_record): New.
6672
6673         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6674
6675 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6676
6677         * jcf-write.c: Follow spelling conventions.
6678         * parse.y: Likewise.
6679
6680 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6681
6682         * ChangeLog: Fix typos.
6683         * expr.c: Fix comment typos.
6684         * jcf-write.c: Likewise.
6685         * lang.c: Likewise.
6686         * lex.c: Likewise.
6687         * mangle.c: Likewise.
6688         * parse-scan.y: Likewise.
6689         * parse.y: Likewise.
6690
6691 2003-10-22  Tom Tromey  <tromey@redhat.com>
6692
6693         * expr.c (expand_byte_code): Only warn about dead bytecode when
6694         extra_warnings is set.
6695
6696 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
6697
6698         Fix for PR java/12586.
6699         * mangle.c (find_compression_record_match): Don't iterate through
6700         package namespace elements unless they all match compression_table
6701         entries.
6702
6703 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
6704
6705         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6706         (generate-manpages): Likewise.
6707         (java.maintainer-clean): Likewise.
6708         (gcj.info): Likewise.
6709         (gcj.1): Likewise.
6710         (gcjh.1): Likewise.
6711         (jv-scan.1): Likewise.
6712         (jcf-dump.1): Likewise.
6713         (gij.1): Likewise.
6714         (jv-convert.1): Likewise.
6715         (rmic.1): Likewise.
6716         (rmiregistry.1): Likewise.
6717         (java.install-man): Likewise.
6718         (parse-scan.o): Move and define complete compile line.
6719         (parse.o): Likewise.
6720         (jcf-tree-inline.o): Move.
6721
6722 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
6723
6724         * Make-lang.in (info): Update dependencies.
6725         (java.install-info): Remove.
6726         ($(srcdir)/java/gcj.info): Replace with ...
6727         ($(docobjdir)/gcj.info): ... this.
6728
6729 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
6730
6731         * Make-lang.in: Replace uses of $(target_alias) with
6732         $(target_noncanonical).
6733
6734 2003-10-09  Tom Tromey  <tromey@redhat.com>
6735
6736         * decl.c (java_init_decl_processing): Declare signers field.
6737         * class.c (make_class_data): Set signers field.
6738
6739 2003-10-09  Jason Merrill  <jason@redhat.com>
6740
6741         * parse.y (patch_assignment): Use make_node to create a BLOCK.
6742         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6743         POINTER_TYPE.
6744
6745 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
6746
6747         * Make-lang.in (java.info): Replace with ...
6748         (info): ... this.
6749         (java.dvi): Replace with ...
6750         (dvi): ... this.
6751         (java.generated-manpages): Replace with ...
6752
6753 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
6754
6755         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6756
6757 2003-10-01  Andrew Haley  <aph@redhat.com>
6758
6759         * jcf-parse.c (java_parse_file): Write otable and atable.
6760         * java-tree.h (atable_methods): New.
6761         (atable_decl): New.
6762         (atable_syms_decl): New.
6763         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6764         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6765         (symbol_*type): Rename method_symbol* to symbol*type.
6766         (emit_offset_symbol_table): Delete.
6767         (emit_symbol_table): New.
6768         (get_symbol_table_index): New.
6769         (atable_type): New.
6770         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6771         (build_known_method_ref): Likewise.
6772         (get_symbol_table_index): Rename from get_offset_table_index.
6773         Parameterize to allow re-use by differing types of symbol table.
6774         (build_invokevirtual): Pass table to get_offset_table_index.
6775         * decl.c (java_init_decl_processing): Push types and decls for
6776         atable and atable_syyms.
6777         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6778         (make_class_data): Add new fields atable and atable_syms.
6779         (emit_symbol_table): Rename from emit_offset_symbol_table.
6780         Parameterize to allow re-use by different types of symbol table.
6781         (build_symbol_entry): Renamed from build_method_symbols_entry.
6782
6783 2003-09-30  Roger Sayle  <roger@eyesopen.com>
6784
6785         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6786         semantics for SAVE_EXPR, by caching the result in a temporary.
6787
6788 2003-09-28  Richard Henderson  <rth@redhat.com>
6789
6790         * check-init.c (check_init): Save and restore input_location
6791         instead of file and line separately.
6792         * decl.c (java_expand_body): Likewise.
6793         * jcf-write.c (generate_bytecode_insns): Likewise.
6794         * parse.y (safe_layout_class): Likewise.
6795         * jcf-parse.c (read_class, parse_class_file): Likewise.
6796         (java_parse_file): Use %H for warning locator.
6797
6798 2003-09-28  Roger Sayle  <roger@eyesopen.com>
6799
6800         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6801         with void-type branches instead of using a COMPOUND_EXPR.
6802
6803 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
6804
6805         * decl.c (java_optimize_inline, dump_function): Remove.
6806         * java-tree.h (java_optimize_inline): Remove declaration.
6807         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6808         * parse.y (source_end_java_method, java_expand_classes):
6809         Likewise.  Remove dead code.
6810
6811 2003-09-27  Roger Sayle  <roger@eyesopen.com>
6812
6813         * lang.c (java_init_options): Set flag_evaluation_order.
6814         * expr.c (force_evaluation_order): Don't attempt to force
6815         evaluation order of binary operations using save_expr.
6816         * parse.y (java_complete_lhs): No longer need to call
6817         force_evaluation_order when constructing binary operators.
6818
6819 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6820             Bryce McKinlay  <bryce@mckinlay.net.nz>
6821
6822         PR java/1333:
6823         * parse.y (not_accessible_field_error): New function.
6824         (resolve_expression_name): Check field access permissions.
6825         (resolve_qualified_expression_name): Use
6826         not_accessible_field_error.
6827         (resolve_qualified_expression_name): Likewise.
6828
6829 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6830
6831         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6832
6833 2003-09-23  Roger Sayle  <roger@eyesopen.com>
6834
6835         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6836         with equal operands without side-effects.
6837
6838 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
6839
6840         * decl.c (java_init_decl_processing): Don't emit otable decls
6841         if flag_indirect_dispatch is not set.
6842
6843 2003-09-21  Richard Henderson  <rth@redhat.com>
6844
6845         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6846         resource.c: Revert.
6847
6848 2003-09-21  Richard Henderson  <rth@redhat.com>
6849
6850         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6851         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6852
6853 2003-09-20  Richard Henderson  <rth@redhat.com>
6854
6855         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6856
6857 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6858
6859         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6860         * check-init.c (check_init): Likewise.
6861
6862 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6863
6864         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6865
6866 2003-09-16  Andrew Haley  <aph@redhat.com>
6867
6868         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6869
6870 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
6871
6872         Fixes PR java/9577
6873         * mangle.c (find_compression_record_match): Skip
6874         over a "6JArray" (the array template mangled string)
6875         IDENTIFIER_NODE.
6876         (mangle_array_type): Correct minor typo.
6877         (atms): Move definition to the beginning.
6878
6879 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
6880
6881         * class.c (add_miranda_methods): Ensure super-interfaces are laid
6882         out. Fix for PR java/12254.
6883
6884 2003-09-11  Richard Henderson  <rth@redhat.com>
6885
6886         * parse.y (source_end_java_method): Update for new
6887         cgraph_finalize_function argument.
6888
6889 2003-09-09  Richard Henderson  <rth@redhat.com>
6890
6891         * parse.y (source_end_java_method): Update call to
6892         cgraph_finalize_function.
6893
6894 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
6895
6896         * decl.c (java_expand_body): New function.
6897         * expr.c (build_class_init): Set DECL_IGNORED_P.
6898         * java-tree.h (start_complete_expand_method,
6899         java_expand_body): Declare.
6900         * jcf-parse.c (cgraph.h): Include.
6901         (java_parse_file): Handle flag_unit_at_a_time.
6902         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6903         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6904         (java_estimate_num_insns): Use walk_tree_without_duplicates.
6905         (java_start_inlining): New function.
6906         * parse.h (java_finish_classes): Declare.
6907         * parse.y: Include cgraph.h.
6908         (block): Don't special-case empty block production.
6909         (craft_constructor): Set DECL_INLINE.
6910         (source_end_java_method): Handle flag_unit_at_a_time.
6911         Replace inline code with call to java_expand_body.
6912         (start_complete_expand_method): Remove static modifier.
6913         (java_expand_method_bodies): Patch function tree for
6914         class initialization and/or synchronization as needed.
6915         Don't begin RTL expansion yet.
6916         (java_expand_classes): Check flag_unit_at_a_time before
6917         calling finish_class.
6918         (java_finish_classes): New function.
6919         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6920         (patch_assignment): Set DECL_CONTEXT on temporary variable.
6921         (emit_test_initialization): Set DECL_IGNORED_P.
6922
6923 2003-09-03  Roger Sayle  <roger@eyesopen.com>
6924
6925         * builtins.c (enum builtin_type): Delete unused enumeration.
6926         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6927
6928 2003-08-28  Tom Tromey  <tromey@redhat.com>
6929
6930         * gcj.texi (Extensions): Document gcjlib URLs.
6931
6932 2003-08-20  Tom Tromey  <tromey@redhat.com>
6933
6934         * gcj.texi (Extensions): Added xref.
6935         (libgcj Runtime Properties): Document
6936         gnu.gcj.runtime.VMClassLoader.library_control.
6937
6938 2003-08-20  Andrew Haley  <aph@redhat.com>
6939
6940         * except.c (prepare_eh_table_type): Use new encoding for exception
6941         handlers when using -fno-assume-compiled.
6942
6943 2003-08-13  Tom Tromey  <tromey@redhat.com>
6944
6945         * gcj.texi (Invoking gij): Document -X and -?.
6946
6947 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
6948
6949         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
6950         GCJH_OBJS, JCFDUMP_OBJS
6951         * win32-host.c: Removed the unnecessary and broken dependency
6952         on jcf.h
6953
6954 2003-08-11  Tom Tromey  <tromey@redhat.com>
6955
6956         * parse.y (java_check_regular_methods): Typo fixes.  Call
6957         check_interface_throws_clauses.  Use
6958         check_concrete_throws_clauses.
6959         (check_interface_throws_clauses): New function.
6960         (check_concrete_throws_clauses): New function.
6961         (hack_is_accessible_p): New function.
6962         (find_most_specific_methods_list): Added FIXME.
6963         * typeck.c (lookup_do): Use `flags' argument to decide what to
6964         do.  Reimplemented.
6965         (lookup_argument_method_generic): New function.
6966         (lookup_argument_method2): Removed.
6967         * jcf.h (ACC_INVISIBLE): New define.
6968         * jcf-write.c (generate_classfile): Skip invisible methods.
6969         * class.c (add_miranda_methods): New function.
6970         (layout_class_methods): Use it.
6971         (get_access_flags_from_decl): Use ACC_INVISIBLE.
6972         * java-tree.h (METHOD_INVISIBLE): New define.
6973         (lang_decl_func) [invisible]: New field.
6974         (lookup_argument_method_generic): Declare.
6975         (SEARCH_INTERFACE): New define.
6976         (SEARCH_SUPER): Likewise.
6977         (SEARCH_ONLY_INTERFACE): Likewise.
6978         (SEARCH_VISIBLE): Likewise.
6979         (lookup_argument_method2): Removed declaration.
6980
6981 2003-08-05  Tom Tromey  <tromey@redhat.com>
6982
6983         Fix for PR java/11600:
6984         * parse.y (java_complete_lhs): See whether we're calling a method
6985         on an array.
6986         (check_thrown_exceptions): Added `is_array_call' argument;
6987         fixed `clone' checking; updated all callers.
6988
6989 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
6990
6991         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
6992
6993 2003-08-03  Tom Tromey  <tromey@redhat.com>
6994
6995         * java-tree.h (METHOD_TRANSIENT): Removed.
6996         * decl.c (pushdecl): Removed some dead code.
6997         * class.c (get_access_flags_from_decl): Can't have transient
6998         method.
6999         (add_method_1): Can't have a transient method.
7000
7001 2003-07-28  Andreas Jaeger  <aj@suse.de>
7002
7003         * jvspec.c: Convert to ISO C90 prototypes.
7004
7005 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7006
7007         * decl.c (force_poplevels): Fix warning call.
7008
7009 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7010
7011         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7012         (expand_java_field_op): Likewise.
7013         * class.c (layout_class_method): Likewise
7014         (emit_register_classes): Likewise.
7015         * decl.c (pushdecl): Likewise.
7016         (poplevel): Likewise.
7017         (force_poplevels): Likewise.
7018         (give_name_to_locals): Likewise.
7019         * check-init.c (check_for_initialization): Likewise.
7020
7021 2003-07-24  Jason Merrill  <jason@redhat.com>
7022
7023         * java-tree.h: Move boolean_type_node et al to the back end.
7024
7025 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7026
7027         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7028         casts.
7029
7030 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7031
7032         * lang.opt: Don't show -MD_ and -MDD_.
7033
7034 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7035
7036         * lang-options.h: Remove.
7037         * lang.opt: Add help text.
7038
7039 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7040
7041         * expr.c: Remove the last argument to expand_assignment().
7042
7043 2003-07-09  Jan Hubicka  <jh@suse.cz>
7044
7045         * java-tree.h (DECL_NUM_STMTS): Rename to...
7046         (DECL_ESTIMATED_INSNS): ... this.
7047         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7048         New static functions.
7049         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7050         * parser.y (add_stmt_to_compound): Do not account statements.
7051
7052 2003-07-08  Mark Wielaard  <mark@klomp.org>
7053
7054         * gcj.texi: CNI now expands to Compiled Native Interface.
7055
7056 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7057
7058         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7059
7060 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7061
7062         * expr.c (expand_byte_code): Adjist emit_line_note call.
7063
7064 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7065
7066         * lang.c (java_handle_option): Don't handle filenames.
7067
7068 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7069
7070         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7071         DIR_SEPARATOR.
7072         Use FILENAME_CMP.
7073         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7074         * jcf.h: Delete COMPARE_FILENAMES definition.
7075
7076 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7077
7078         * lang.c (java_init_options): Update prototype.
7079
7080 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7081
7082         * decl.c (poplevel): Adjust define_label call.
7083
7084 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7085
7086         * gjavah.c (flag_jni): Make non-static.
7087         * parse-scan.y (ctxp): Make non-static.
7088
7089         * class.c (build_method_symbols_entry)
7090         * expr.c (get_offset_table_index)
7091         * jcf-parse.c (jcf_parse):
7092         Mark the definition static, matching the forward declaration.
7093
7094 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7095
7096         * lang.c (java_handle_option): Don't check for missing arguments.
7097
7098 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7099
7100         * class.c (push_class): Use a location_t to save place.
7101         (emit_register_classes): Set input_location. Adjust
7102         expand_function_end call.
7103         * resource.c (write_resource_constructor): Likewise.
7104         * decl.c (end_java_method): Adjust expand_function_end call.
7105         * parse.y (source_end_java_method): Likewise.
7106
7107 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7108
7109         * lang.c (java_handle_option): Likewise.
7110
7111 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7112
7113         * lang.c (java_handle_option): Special-casing of optional
7114         joined arguments no longer needed.
7115         * lang.opt: Update switches that take optional argument.
7116
7117 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7118
7119         * lang.opt: Declare Java.
7120         * lang.c (java_init_options): Update.
7121
7122 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7123
7124         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7125
7126 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7127
7128         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7129         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7130         * lang.opt: -MD and -MMD have an underscore.
7131
7132 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7133
7134         * class.c (emit_register_classes): Adjust init_function_start
7135         call.
7136         * decl.c (complete_start_java_method): Likewise.
7137         * resource.c (write_resource_constructor): Likewise.
7138
7139 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7140
7141         * Make-lang.in: Update to use options.c and options.h.
7142         * lang.c: Include options.h not j-options.h.
7143         (java_handle_option): Abort on unrecognized option.
7144         (java_init_options): Request Java switches.
7145
7146 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7147
7148         * Make-lang.in: Handle mostlyclean.
7149
7150 2003-06-11  Tom Tromey  <tromey@redhat.com>
7151
7152         * lang.c (java_handle_option): Update dependency_tracking for
7153         OPT_MF case.
7154
7155         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7156         empty argument.
7157
7158 2003-06-10  Andrew Haley  <aph@redhat.com>
7159
7160         * resource.c (write_resource_constructor): Use expand_expr to
7161         generate the address of the label attached to a resource.
7162         * Make-lang.in (java/resource.o): Add expr.h
7163
7164 2003-06-10  Andrew Haley  <aph@redhat.com>
7165
7166         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7167         (java_decl_ok_for_sibcall): New.
7168
7169 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7170
7171         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7172         (java/j-options.c, java/j-options.h): New.
7173         * java-tree.h (resource_name, compile_resource_file,
7174         compile_resource_data): Constify.
7175         * jcf-write.c (jcf_write_base_directory): Similarly.
7176         * jcf.h (jcf_write_base_directory): Similarly.
7177         * lang.c: Include j-options.h.
7178         (cl_options_count, cl_options, string_option, java_decode_option,
7179         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7180         process_option_with_no): Remove.
7181         (resource_name): Constify.
7182         (LANG_HOOKS_HANDLE_OPTION): Override.
7183         (java_handle_option): New.
7184         (java_init): Don't call jcf_path_init.
7185         (java_init_options): Call jcf_path_init.
7186         * lang.opt: New.
7187         * resource.c (compile_resource_data, compile_resource_file): Constify.
7188
7189 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7190
7191         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7192         (struct lang_decl_func): Add last_line field.
7193         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7194         DECL_SOURCE_LINE_LAST): Remove.
7195         * parse.y (missing_return_error, finish_method_declaration,
7196         lookup_cl, start_artificial_method_body, source_end_java_method,
7197         start_complete_expand_method): Adjust.
7198
7199 2003-06-08  Tom Tromey  <tromey@redhat.com>
7200
7201         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7202         fno-assume-compiled.
7203
7204 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7205
7206         * builtins.c (define_builtin_type, builtin_types): Delete.
7207         (define_builtin): Rewritten to take just the built-in code,
7208         the function's name, type and fallback library function name.
7209         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7210         (initialize_builtins): Overhaul to define the GCC builtins
7211         used by gcj manually, providing the Java run-time's
7212         implementations as the fallback library function.
7213
7214 2003-06-08  Anthony Green  <green@redhat.com>
7215
7216         * parse.y (patch_cast): Fix conversions from floating-point to
7217         integral types.
7218
7219 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7220
7221         * Make-lang.in: Update.
7222         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7223
7224 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7225
7226         * lang.c (java_init_options): Update.
7227
7228 2003-06-05  Jan Hubicka  <jh@suse.cz>
7229
7230         * Make-lang.in:  Add support for stageprofile and stagefeedback
7231
7232 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7233
7234         * lang.c (java_init_options): Prescribe wrap-around two's
7235         complement arithmetic overflow by setting flag_wrapv.
7236
7237 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7238
7239         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7240         (builtin_record): Add an additional builtin_code field to
7241         record which GCC built-in corresponds to the Java function.
7242         (java_builtins):  Add new entries for atan, atan2, exp, log,
7243         pow and tan.
7244         (max_builtin, min_builtin, abs_builtin): Perform constant
7245         folding on the resulting tree.
7246         (java_build_function_call_expr): Likewise, perform constant
7247         folding on the resulting tree.
7248         (initialize_builtins): The NULL creators are now allowed in
7249         the java_builtins table, which is now terminated by an entry
7250         with builtin_code == END_BUILTINS.
7251         (check_for_builtin): Likewise.  If the matching creator is
7252         NULL, construct the call using java_build_function_call_expr
7253         directly with the decl for the corresponding builtin_code.
7254
7255 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7256
7257         * win32-host.c: Normalize copyright boilerplate.
7258
7259 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7260
7261         * parse.y (print_int_node): Use string concatentation on
7262         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7263         function calls into one.
7264
7265 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7266
7267         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7268         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7269         all the affected error messages.
7270
7271 2003-05-13  Richard Henderson  <rth@redhat.com>
7272
7273         * class.c (layout_class_method): Set DECL_EXTERNAL.
7274         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7275         * java-tree.h (java_mark_class_local): Declare.
7276         * jcf-parse.c (parse_class_file): Use it.
7277         * parse.y (java_expand_classes): Likewise.
7278
7279 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7280
7281         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7282         * lex.h: #include input.h.
7283         * jv-scan.c (input_filename): Remove.
7284
7285 2003-05-02  Tom Tromey  <tromey@redhat.com>
7286
7287         PR java/10491:
7288         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7289         (handle_inner_classes): New function.
7290
7291 2003-05-01  Tom Tromey  <tromey@redhat.com>
7292
7293         PR java/10459:
7294         * parse.y (finish_for_loop): Do nothing if update expression is a
7295         EXPR_WFL_NODE wrapping nothing.
7296         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7297
7298 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7299
7300         * lex.h (input_lineno): Remove declaration.
7301         * parse-scan.y: #include input.h.
7302         (input_filename): Remove declaration.
7303         (input_location): Add definition.
7304         (input_line): Remove definition.
7305
7306 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7307
7308         * lex.h (lineno): Rename to ...
7309         (input_line): ... here
7310         * parse-scan.y (lineno): Rename to ...
7311         (input_line): ... here.
7312         (reset_report): Rename lineno to input_line.
7313         * check-init.c (check_init): Likewise.
7314         * class.c (push_class): Likewise.
7315         * decl.c (complete_start_java_method, end_java_method): Likewise.
7316         * expr.c (expand_byte_code): Likewise.
7317         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7318         * jcf-write.c (generate_bytecode_insns): Likewise.
7319         * lex.c (java_init_lex, java_allocate_new_line,
7320         do_java_lex): Likewise.
7321         * parse.h (YYNOT_TWICE): Likewise.
7322         * parse.y (empty_statement, expression_statement,
7323         java_pop_parser_context, java_parser_context_save_global,
7324         yyerror, register_fields, method_header, safe_layout_class,
7325         find_in_imports_on_demand, create_artificial_method,
7326         source_end_java_method, start_complete_expand_method,
7327         build_thisn_assign, java_complete_lhs,
7328         maybe_absorb_scoping_block): Likewise.
7329
7330 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
7331
7332         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7333         '/' when computing java source filename
7334
7335 2003-04-13  Tom Tromey  <tromey@redhat.com>
7336
7337         * gjavah.c (print_c_decl): Indentation fix.
7338
7339 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
7340
7341         * class.c (make_field_value, make_method_value, get_dispatch_table)
7342         (make_class_data, emit_offset_symbol_table)
7343         * constants.c (build_constants_constructor)
7344         * java-tree.h (START_RECORD_CONSTRUCTOR)
7345         * parse.y (maybe_build_array_element_wfl):
7346         Use build_constructor.
7347
7348 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
7349
7350         PR java/10253:
7351         * parse.y (string_convert_int_cst): Always use at least one digit
7352         in string conversion. Remove ASCII dependence.
7353         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7354
7355 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
7356
7357         * Make-lang.in: added win32-host.c
7358         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7359         resolves to open() on non-Win32 platforms and
7360         Win32-specific jcf_open_exact_case() on Win32
7361         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7362         when trying .java and .class files
7363         * win32-host.c: added to repository. Defines
7364         Win32-specific jcf_open_exact_case()
7365
7366 2003-04-10  Andrew Haley  <aph@redhat.com>
7367
7368         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7369         (maybe_free_localvar): Renamed from localvar_free.
7370         Add new arg, really.
7371         (generate_bytecode_insns): Set new variable, jsrs.
7372         Only free local vars if no jsr insns have been emittted.
7373         Call maybe_free_localvar, not localvar_free.
7374
7375 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
7376
7377         * gcj.texi: Remove @ at start of file.
7378
7379 2003-03-25  Tom Tromey  <tromey@redhat.com>
7380
7381         * parse.y (create_interface): Call CHECK_DEPRECATED.
7382
7383 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
7384
7385         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7386
7387 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
7388
7389         * javaop.h (jfloat, jdouble): Make them structures mirroring
7390         the bit fields of IEEE float and double respectively.
7391         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7392         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7393         (union Word, union DWord): Delete.
7394         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7395
7396         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7397         D_NAN_MASK): Delete.
7398         (jni_print_float, jni_print_double): New.  Generate
7399         hexadecimal floating constants.
7400         (print_field_info): Use jni_print_float/double.
7401
7402         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
7403         finite floating point numbers for output; special case
7404         non-finite floats.
7405
7406 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
7407
7408         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7409         Replace 0 and 1 with true and false in return statements.
7410
7411 2003-03-19  Tom Tromey  <tromey@redhat.com>
7412
7413         * lex.c (do_java_lex): Renamed from java_lex.
7414         (java_lex): New function.
7415         Include timevar.h.
7416
7417 2003-03-13  Tom Tromey  <tromey@redhat.com>
7418
7419         * parse.y (resolve_inner_class): Error if qualifier is a primitive
7420         type.
7421
7422 2003-03-04  Andrew Haley  <aph@redhat.com>
7423
7424         * gjavah.c (is_first_data_member): New global variable.
7425         (print_c_decl): If it's the first data member, align it as the
7426         superclass.
7427         (process_file): Set is_first_data_member.
7428
7429 2003-03-11  Tom Tromey  <tromey@redhat.com>
7430
7431         * parse.y (resolve_field_access): Initialize class if field is
7432         found in another static field.
7433         * expr.c (build_class_init): Don't optimize out initialization of
7434         implemented interface.
7435
7436 2003-03-11  Andrew Haley  <aph@redhat.com>
7437
7438         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7439         warning.
7440
7441 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
7442
7443         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7444         and DIR_SEPARATOR_2 for a target.
7445         Correct minor typos.
7446
7447         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7448         and DIR_SEPARATOR_2 for a target into account.
7449
7450 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
7451
7452         * lang.c (java_init): Update prototype, move code to java_post_options.
7453         (java_post_options): Similarly.
7454
7455 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
7456
7457         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7458         compare file name components depending on the case-sensitivity
7459         or otherwise of the host file system.
7460
7461         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7462         "strcmp" to compare file name components.
7463         Use IS_DIR_SEPARATOR instead of comparing directly against
7464         DIR_SEPARATOR.
7465         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7466         comparing directly against DIR_SEPARATOR.
7467
7468 2003-03-04  Tom Tromey  <tromey@redhat.com>
7469
7470         * Make-lang.in (java.tags): New target.
7471
7472 2003-03-01  Roger Sayle  <roger@eyesopen.com>
7473
7474         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7475         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7476
7477 2003-03-01  Tom Tromey  <tromey@redhat.com>
7478
7479         * parse.y (jdep_resolve_class): Only check deprecation if we found
7480         a decl.
7481
7482 2003-02-28  Tom Tromey  <tromey@redhat.com>
7483
7484         PR java/9695:
7485         * class.c (maybe_layout_super_class): Always pass a WFL to
7486         do_resolve_class.
7487         * parse.y (do_resolve_class): Updated comment to explain
7488         parameters.
7489
7490 2003-02-26  Tom Tromey  <tromey@redhat.com>
7491
7492         * jcf-write.c (generate_classfile): Check whether class is
7493         deprecated before writing attribute count.
7494
7495 2003-02-25  Roger Sayle  <roger@eyesopen.com>
7496
7497         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7498         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7499
7500 2003-02-23  Tom Tromey  <tromey@redhat.com>
7501
7502         * lang-options.h: Added -Wdeprecated.
7503         * gcj.texi (Warnings): Document -Wdeprecated.
7504         * java-tree.h (flag_deprecated): Declare.
7505         * lang.c (lang_W_options): Added deprecated.
7506         (flag_deprecated): New global.
7507         * chartables.h: Rebuilt.
7508         * gen-table.pl (process_one): Look at whitespace.
7509         (print_tables): Define LETTER_SPACE, LETTER_MASK.
7510         * parse.h (CLEAR_DEPRECATED): New macro.
7511         (CHECK_DEPRECATED_NO_RESET): New macro.
7512         * jcf-parse.c (handle_deprecated): New function.
7513         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7514         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7515         * parse.y (resolve_type_during_patch): Check deprecation.
7516         (jdep_resolve_class): Likewise.
7517         (process_imports): Likewise.
7518         (resolve_expression_name): Likewise.
7519         (check_deprecation): Strip arrays from decl.  Check
7520         flag_deprecated.
7521         (patch_method_invocation): Also check the particular constructor
7522         for deprecation.
7523         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7524         * jcf-write.c (append_deprecated_attribute): New function.
7525         (generate_classfile): Generate deprecated attribute when
7526         appropriate.
7527         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7528         (java_lex) [case '*']: Simplify logic.
7529         (java_start_char_p): Use LETTER_MASK.
7530         (java_part_char_p): Likewise.
7531         (java_space_char_p): New function.
7532
7533 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7534
7535         Change base class access representation.
7536         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7537         (add_interface_do): Likewise.
7538
7539 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7540
7541         * decl.c (java_init_decl_processing): Change
7542         soft_lookupjnimethod_node to reflect the change in
7543         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7544         * expr.c (build_jni_stub): Calculate and pass the size
7545         on the stack of the arguments to a JNI function. Use
7546         new target macro MODIFY_JNI_METHOD_CALL to allow a
7547         target to modify the call to a JNI method.
7548
7549 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7550
7551         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7552         instead of basename to avoid compiler warnings on Tru64.
7553
7554 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7555
7556         * gcj.texi: Update to GFDL 1.2.
7557
7558 2003-01-31  Andrew Haley  <aph@redhat.com>
7559
7560         * parse.y (java_expand_classes): Scan the whole class list looking
7561         for access methods that haven't yet been expanded.
7562
7563 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7564
7565         Fix for java/4269:
7566
7567         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7568         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7569         * jcf-parse.c: Likewise.
7570
7571 2003-01-31  Mark Wielaard  <mark@klomp.org>
7572
7573         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7574
7575 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7576
7577         * class.c (make_class): Use BINFO_ELTS.
7578         (set_super_info): Likewse.
7579         (add_interface_do): Likewise.
7580
7581 2003-01-30  Tom Tromey  <tromey@redhat.com>
7582
7583         * jcf-parse.c (read_class): Update identifier's class value if it
7584         changed during parsing.
7585
7586 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7587
7588         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7589         Propagate change to all other rules as required.
7590         (java/parse-scan.o): Add explicit dependency on
7591         $(parsedir)/java/parse-scan.c .
7592
7593 2003-01-29  Tom Tromey  <tromey@redhat.com>
7594
7595         * parse.y (patch_assignment): Only transform the rhs of an
7596         assignment when compiling to native.
7597
7598 2003-01-28  Tom Tromey  <tromey@redhat.com>
7599
7600         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7601
7602 2003-01-28  Tom Tromey  <tromey@redhat.com>
7603
7604         * lex.c (java_lex): Don't include UEOF as part of token.
7605         (java_read_unicode): Error if \u sequence prematurely terminated.
7606
7607 2003-01-27  Tom Tromey  <tromey@redhat.com>
7608
7609         * parse.y (java_check_regular_methods): Check for construct after
7610         checking types in throws clause.
7611
7612 2003-01-24  Tom Tromey  <tromey@redhat.com>
7613
7614         * class.c (build_static_field_ref): Only a String or numeric field
7615         can fold to a constant.
7616
7617 2003-01-23  Tom Tromey  <tromey@redhat.com>
7618
7619         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7620         file name in resource buffer.
7621
7622 2003-01-23  Tom Tromey  <tromey@redhat.com>
7623
7624         * expr.c (build_known_method_ref): Use method's context to find
7625         method table index.
7626
7627 2003-01-23  Tom Tromey  <tromey@redhat.com>
7628
7629         * constants.c (set_constant_entry): Allocated cleared memory.
7630
7631 2003-01-22  Tom Tromey  <tromey@redhat.com>
7632
7633         * java-tree.h: Don't use PARAMS.
7634         * resource.c: Add prototypes for all functions.
7635         (write_resource_constructor): Use `const char *' to avoid
7636         warning.
7637
7638 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
7639
7640         * jcf-parse.c (process_zip_dir): Remove unused variable.
7641
7642 2003-01-22  Tom Tromey  <tromey@redhat.com>
7643
7644         * expr.c (build_invokeinterface): Abort if method's context is not
7645         an interface.
7646
7647 2003-01-22  Tom Tromey  <tromey@redhat.com>
7648
7649         * gcj.texi (Input and output files): Mention non-class entries.
7650         * decl.c (java_init_decl_processing): Call
7651         init_resource_processing.
7652         * java-tree.h (compile_resource_data, write_resource_constructor,
7653         compile_resource_file, init_resource_processing): Declare.
7654         * config-lang.in (gtfiles): Added resource.c.
7655         * Make-lang.in (gt-java-resource.h): New target.
7656         (JAVA_OBJS): Added resource.o.
7657         (java/resource.o): New target.
7658         * resource.c: New file.
7659         * class.c (compile_resource_file): Moved to resource.c.
7660         (registerResource_libfunc): Likewise.
7661         (utf8_decl_list): Mark with GTY; now static.
7662         * jcf-parse.c (classify_zip_file): New function.
7663         (parse_zip_file_entries): Use it; compile .properties files.
7664         (process_zip_dir): Use classify_zip_file and compute_class_name.
7665         Don't write class name into zip directory.
7666         (java_parse_file): Call write_resource_constructor.
7667         (compute_class_name): New function.
7668         * jcf-io.c (read_zip_member): Reindented.
7669
7670 2003-01-21  Tom Tromey  <tromey@redhat.com>
7671
7672         * class.c (supers_all_compiled): New function.
7673         (make_class_data): Use it.
7674
7675 2003-01-21  Tom Tromey  <tromey@redhat.com>
7676
7677         * parse.y (method_header): Native method can't be strictfp.
7678         No method can be transient or volatile.
7679
7680 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7681
7682         Make-lang.in (jvspec.o-warn): Add -Wno-error.
7683
7684 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
7685
7686         * check-init.c: Fix comment typos.
7687         * class.c: Likewise.
7688         * constants.c: Likewise.
7689         * decl.c: Likewise.
7690         * except.c: Likewise.
7691         * expr.c: Likewise.
7692         * java-except.h: Likewise.
7693         * java-tree.h: Likewise.
7694         * javaop.h: Likewise.
7695         * jcf-dump.c: Likewise.
7696         * jcf-io.c: Likewise.
7697         * jcf-parse.c: Likewise.
7698         * jcf-write.c: Likewise.
7699         * lang.c: Likewise.
7700         * mangle.c: Likewise.
7701         * typeck.c: Likewise.
7702         * verify.c: Likewise.
7703
7704 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7705
7706         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7707         * jcf-write.c: Include "tm_p.h".
7708
7709 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7710
7711         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7712
7713 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7714
7715         * builtins.c (java_build_function_call_expr): Renamed from
7716         build_function_call_expr.  All callers changed.
7717
7718         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7719         * jcf-parse.c: Include tm_p.h.
7720
7721         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7722         warning.
7723
7724 2003-01-14  Tom Tromey  <tromey@redhat.com>
7725
7726         * class.c (make_class_data): Check that super is compiled before
7727         building class reference to it.
7728
7729 2003-01-14  Andrew Haley  <aph@redhat.com>
7730
7731         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7732         varargs function -- correct.
7733
7734 2003-01-14  Andrew Haley  <aph@redhat.com>
7735
7736         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7737
7738 2003-01-14  Andrew Haley  <aph@redhat.com>
7739
7740         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7741         varargs function -- correct.
7742
7743         * parse.y (patch_assignment): Copy the rhs of an assignment into a
7744         temporary if the RHS is a reference.
7745
7746 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7747
7748         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7749         * keyword.h: Regenerated.
7750
7751         * All Files: Convert to ISO C style function definitions.
7752
7753 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7754
7755         * parse.y (check_pkg_class_access): ANSIfy definition.
7756
7757 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7758
7759         * decl.c, parse-scan.y, parse.y: Don't cast return value of
7760         xmalloc et al.
7761
7762         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7763
7764 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
7765
7766         Merge from pch-branch:
7767
7768         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
7769
7770         * Make-lang.in (java/gjavah.o): Update dependencies.
7771         * gjavah.c: Include ggc.h.
7772
7773         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
7774
7775         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7776         (JCFDUMP_OBJS): Add ggc-none.o.
7777         (java/jcf-dump.o): Depend on GGC_H.
7778         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7779         CPool substructures.
7780         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7781         * jcf-dump.c: Include ggc.h.
7782
7783         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7784
7785         * jcf.h (union cpool_entry): New.
7786         (struct CPool): Use gengtype to mark.  Change field 'data' to be
7787         an array of unions.
7788         (struct JCF): Use gengtype to mark.
7789         (CPOOL_UINT): Update for new cpool_entry type.
7790         (CPOOL_USHORT1): Likewise.
7791         (CPOOL_USHORT2): Likewise.
7792         (CPOOL_FINISH): Use GC to free cpool subfields.
7793         * parse.h (struct parser_ctxt): Mark field current_jcf.
7794         * lex.c (java_init_lex): Use GC to allocate struct JCF.
7795         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7796         (main_jcf): Use gengtype to mark.
7797         (ggc_mark_jcf): Delete.
7798         (get_constant): Update for new cpool_entry type.
7799         (give_name_to_class): Likewise.
7800         (get_class_constant): Likewise.
7801         (init_outgoing_cpool): Use GGC to allocate struct CPool.
7802         (java_parse_file): Use GGC to allocate struct JCF.
7803         (init_jcf_parse): Don't call ggc_add_root.
7804         * jcf-reader.c (jcf_parse_constant_pool): Update for new
7805         cpool_entry type.
7806         * java-tree.h (current_jcf): Use gengtype to mark.
7807         (CPOOL_UTF): Update for new cpool_entry type.
7808         (outgoing_cpool): Use gengtype to mark.
7809         (struct lang_type): GC struct JCF and struct CPool.
7810         * config-lang.in (gtfiles): Add jcf.h.
7811         * constants.c (find_tree_constant): New.
7812         (set_constant_entry): Allocate cpool subfields using GGC.  Update
7813         for new cpool_entry type.
7814         (find_constant1): Update for new cpool_entry type.
7815         (find_constant2): Likewise.
7816         (find_utf8_constant): Use find_tree_constant.
7817         (find_class_or_string_constant): Remove unnecessary cast to jword.
7818         Update for new cpool_entry type.
7819         (count_constant_pool_bytes): Update for new cpool_entry type.
7820         (write_constant_pool): Likewise.
7821         (alloc_name_constant): Use find_tree_constant.
7822         (build_constants_constructor): Update for new cpool_entry type.
7823
7824         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7825
7826         * parse.y (mark_parser_ctxt): Delete.
7827         (goal): Don't use ggc_add_root.
7828         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7829         (java_pop_parser_context): Let GC free parser_ctxt.
7830         (java_parser_context_resume): Likewise.
7831         * parse.h (struct parser_ctxt): Use gengtype to mark.
7832         (ctxp): Likewise.
7833         (ctxp_for_generation): Likewise.
7834         * lex.h (struct java_lc_s): Mark for gengtype.
7835         (java_lexer): Rearrange for gengtype.
7836         * config-lang.in (gtfiles): Add lex.h, parse.h.
7837
7838 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7839
7840         * All Files: Remove PARAMS macro.
7841
7842         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7843         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7844         `__STDC__' macros.
7845
7846         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7847         VA_CLOSE.
7848
7849 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
7850
7851         * Make-lang.in (java.install-common, java.uninstall,
7852         java.install-info, java.install-man): Prepend $(DESTDIR)
7853         to destination paths in all (un)installation commands.
7854         (java.install-common): Rewrite $(LN) command to support
7855         DESTDIR with "ln" as well as with "ln -s".
7856
7857 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
7858
7859         * java-tree.h: Protect against multiple inclusion.
7860
7861 2003-01-07  Tom Tromey  <tromey@redhat.com>
7862
7863         * class.c (add_assume_compiled): Don't adjust parent if we're
7864         already at the root of tree.
7865
7866 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7867
7868         * lang.c (dump_compound_expr): Prototype.
7869
7870 2003-01-03  Tom Tromey  <tromey@redhat.com>
7871
7872         Fix for PR java/8712:
7873         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7874         when simply checking against `null'.
7875
7876 2003-01-03  Tom Tromey  <tromey@redhat.com>
7877
7878         * gcj.texi (Standard Properties): Document http.proxyHost and
7879         http.proxyPort.
7880
7881         * gcj.texi (GNU Classpath Properties): Document new properties.
7882
7883 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7884
7885         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7886         java/lang-options.h, java/mangle.c, java/mangle_name.c,
7887         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7888
7889 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7890
7891         * Make-lang.in, boehm.c, buffer.c,
7892           buffer.h, builtins.c, class.c,
7893           config-lang.in, constants.c,
7894           convert.h, decl.c, except.c,
7895           expr.c, java-except.h,
7896           java-tree.h, javaop.def,
7897           jcf-parse.c, jcf-write.c,
7898           jv-scan.c, jvgenmain.c,
7899           jvspec.c, keyword.gperf,
7900           keyword.h, lang-options.h,
7901           lang-specs.h, lang.c, lex.c,
7902           lex.h, mangle.c, mangle_name.c,
7903           parse-scan.y, parse.h, parse.y,
7904           typeck.c, verify.c, xref.c,
7905           xref.h: Replace "GNU CC" with
7906           "GCC" in the copyright header.
7907
7908         * check-init.c, gjavah.c, javaop.h,
7909           jcf-depend.c, jcf-dump.c, jcf-io.c,
7910           jcf-path.c, jcf-reader.c, jcf.h,
7911           zextract.c, zipfile.h: These files are
7912           "part of GCC". Also say "GCC" not "GNU CC".
7913
7914 2002-12-30  DJ Delorie  <dj@redhat.com>
7915
7916         * Make-lang.in: Protect against texi2pod/pod2man failing.
7917
7918 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
7919
7920         * gcj.texi: Use @copying.
7921
7922 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7923
7924         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7925         print_cxx_classname.
7926         (print_cxx_classname): Add add_scope parameter.
7927         (print_class_decls): Do not emit a semicolon after the extern
7928         "Java" block.
7929         (process_file): Adjust calls to print_cxx_classname.
7930
7931 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7932
7933         * gcj.texi: Include Cover Texts in man page.
7934
7935 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
7936
7937         * class.c (build_static_field_ref): Check FIELD_FINAL.
7938
7939         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
7940         instead of current_constant_pool_data_ref.
7941         * java-tree.h (current_constant_pool_data_ref): Undefine.
7942         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
7943         * jcf-parse.c (init_outgoing_cpool): Don't initialize
7944         current_constant_pool_data_ref.
7945
7946         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
7947         not build_internal_class_name.
7948
7949         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
7950         Use it when class ref isn't certain to be compiled.
7951
7952 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7953
7954         * gcj.texi: Include gcc-common.texi.
7955         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
7956         $(srcdir)/doc/include/gcc-common.texi.
7957
7958 2002-12-22  Anthony Green  <green@redhat.com>
7959
7960         * gcj.texi (Limitations): Add note about org.xml.sax and
7961         org.w3c.dom.
7962
7963 2002-12-20  Tom Tromey  <tromey@redhat.com>
7964
7965         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
7966         where minimum case value is Integer.MIN_VALUE.
7967         Fixes PR java/8955.
7968
7969 2002-12-18  Andrew Haley  <aph@redhat.com>
7970
7971         * parse.y (patch_invoke): Force evaluation order when `check' is
7972         set.  For PR libgcj/8945.
7973
7974 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
7975
7976         * gcj.texi: Change version number to 3.4.
7977
7978 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
7979         Andrew Haley <aph@redhat.com>
7980
7981         * parse.y (source_end_java_method): Remove custom encoding of line
7982         numbers for a function decl before passing it to the back end.
7983
7984 2002-12-03  Andrew Haley  <aph@redhat.com>
7985
7986         * class.c (make_class_data): New field, "chain".
7987         * decl.c (java_init_decl_processing): Likewise.
7988
7989 2002-12-02  Tom Tromey  <tromey@redhat.com>
7990
7991         For PR java/8740:
7992         * parse.y (do_resolve_class): Handle qualified name via
7993         recursion.
7994
7995 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
7996
7997         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
7998         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
7999         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8000         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8001         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8002         Include coretypes.h and tm.h.
8003         * Make-lang.in: Update dependencies.
8004
8005 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8006
8007         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8008
8009 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8010
8011         * jcf-reader.c: Don't expand JCF_readu4 inside the
8012         expansion of JCF_SKIP.
8013
8014 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8015
8016         * jcf-reader.c: Don't expand JCF_readu4 inside the
8017         expansion of JCF_SKIP.
8018
8019 2002-11-22  Tom Tromey  <tromey@redhat.com>
8020
8021         * parse.y (patch_binop): Cast right hand side of shift expression
8022         to `int'.  Fixes PR java/8676.
8023
8024 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8025             Andrew Haley <aph@redhat.com>
8026
8027         * gcc/java/jcf-write.c (write_classfile): Remove target
8028         class file, if it exists, before renaming the temporary
8029         class file to it.
8030
8031 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8032
8033         * jvspec.c (lang_specific_spec_functions): New.
8034
8035 2002-11-18  Tom Tromey  <tromey@redhat.com>
8036
8037         Fix for PR java/7912:
8038         * expr.c (can_widen_reference_to): Allow cast of array to
8039         Cloneable or Serializable.
8040         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8041         (java_io_serializable_identifier_node): Likewise.
8042         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8043         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8044         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8045         java_io_serializable.
8046         * decl.c (java_init_decl_processing): Initialize
8047         java_lang_cloneable_identifier_node and
8048         java_io_serializable_identifier_node.
8049         (java_lang_cloneable_identifier_node): New global.
8050         (java_io_serializable_identifier_node): Likewise.
8051
8052 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8053
8054         * buffer.c: Remove unnecessary casts.
8055         * check-init.c: Likewise.
8056         * class.c: Likewise.
8057         * constants.c: Likewise.
8058         * decl.c: Likewise.
8059         * except.c: Likewise.
8060         * gjavah.c: Likewise.
8061         * jcf-io.c: Likewise.
8062         * jcf-parse.c: Likewise.
8063         * jcf-path.c: Likewise.
8064         * jvspec.c: Likewise.
8065         * lang.c: Likewise.
8066         * lex.c: Likewise.
8067         * verify.c: Likewise.
8068
8069 2002-11-06  Tom Tromey  <tromey@redhat.com>
8070
8071         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8072         a JNI header.
8073
8074 2002-11-05  Tom Tromey  <tromey@redhat.com>
8075
8076         Fix for PR java/6388.
8077         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8078         * java-tree.h (enum java_tree_index): New values
8079         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8080         (decimal_int_max, decimal_long_max): New defines.
8081         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8082         (error_if_numeric_overflow): Rewrote range checking.
8083         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8084         decimal_long_max.
8085
8086 2002-11-02  Tom Tromey  <tromey@redhat.com>
8087
8088         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8089
8090         * class.c (make_method_value): Put class name, not signature, into
8091         `throws' field.  For PR java/8415.
8092
8093 2002-10-24  Tom Tromey  <tromey@redhat.com>
8094
8095         * gcj.texi (Invoking gij): Document --showversion.
8096         (Standard Properties): java.library.path now set.
8097
8098 2002-10-23  Tom Tromey  <tromey@redhat.com>
8099
8100         * gjavah.c (decode_signature_piece): In JNI mode, print
8101         `jobjectArray' when array depth is nonzero.
8102         Fixes PR java/8296.
8103
8104 2002-10-15  Andrew Haley  <aph@redhat.com>
8105
8106         * parse.y (patch_invoke): Call force_evaluation_order on a static
8107         arg list.
8108         (resolve_qualified_expression_name): Call force_evaluation_order
8109         on a arg list that is part of a Qualified Expression Name.
8110
8111         * lang.c (dump_compound_expr): New.
8112         (java_dump_tree): New.
8113
8114 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8115
8116         * gcj.texi: Added item describing the GCJ runtime property
8117         "gnu.gcj.progname".
8118
8119 2002-10-15  Richard Henderson  <rth@redhat.com>
8120
8121         * jcf-parse.c (get_constant): Fix type warning.
8122
8123 2002-10-15  Andrew Haley  <aph@redhat.com>
8124
8125         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8126         (java_inlining_map_static_initializers): Declare.
8127
8128 2002-10-14  Andrew Haley  <aph@redhat.com>
8129
8130         * tree-inline.c (remap_block): All local class initialization
8131         flags go in the outermost scope.
8132         (expand_call_inline): Call java_inlining_map_static_initializers.
8133         (expand_call_inline): Call java_inlining_merge_static_initializers.
8134         * java/lang.c (merge_init_test_initialization): New.
8135         (java_inlining_merge_static_initializers): New.
8136         (inline_init_test_initialization): New.
8137         (java_inlining_map_static_initializers): New.
8138
8139 2002-10-11  Mark Wielaard  <mark@klomp.org>
8140
8141         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8142
8143 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8144
8145         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8146
8147 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8148
8149         * parse.y (merge_string_cste): Add parentheses around & within |.
8150
8151 2002-10-08  Tom Tromey  <tromey@redhat.com>
8152
8153         * parse.y (variable_declarator_id): Simplify error path for
8154         array declarator error.  For PR java/8003.
8155
8156 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8157
8158         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8159         bug_report_url.
8160
8161 2002-10-08  Andrew Haley  <aph@redhat.com>
8162
8163         * parse.y (attach_init_test_initialization_flags): Check for
8164         error_mark_node.
8165
8166 2002-10-07  Anthony Green  <green@redhat.com>
8167
8168         * parse.y (merge_string_cste): Fix bug in string concatenation.
8169
8170 2002-10-03  Michael Koch  <konqueror@gmx.de>
8171
8172         * gcj.texi (Standard properties):
8173         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8174
8175 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8176
8177         PR optimization/6627
8178         * lang.c (java_init): If storing the vbit in function
8179         pointers, ensure that force_align_functions_log is atleast
8180         one to aid compatability with g++ vtables.
8181
8182 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8183
8184         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8185         foul of type-based aliasing.
8186
8187 2002-09-30  Anthony Green  <green@redhat.com>
8188
8189         * gcj.texi (Invoking jv-scan): Fix texinfo.
8190
8191 2002-09-28  Anthony Green  <green@redhat.com>
8192
8193         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8194         (Code Generation): Add -fno-assert documentation.
8195         * jv-scan.c (flag_assert): New global.
8196         (options): Add assert option.
8197         (help): Add --no-assert documentation.
8198         * parse-scan.y (flag_assert): New global.
8199         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8200         (flag_assert): New global.
8201         * java-tree.h (flag_assert): New global.
8202         * lex.c (java_lex): Obey flag_assert.
8203         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8204         calling cc1.
8205
8206 2002-09-26  Andrew Haley  <aph@redhat.com>
8207
8208         * expr.c (build_java_array_length_access): Check for null pointer.
8209         * expr.c (expand_java_arrayload): Likewise.
8210
8211 2002-09-21  Richard Henderson  <rth@redhat.com>
8212
8213         * jcf-parse.c (get_constant): Decode from IEEE no matter
8214         what the target format.
8215
8216 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8217
8218         * ChangeLog: Follow spelling conventions.
8219         * class.c: Likewise.
8220         * decl.c: Likewise.
8221         * expr.c: Likewise.
8222         * gjavah.c: Likewise.
8223         * java-tree.h: Likewise.
8224         * jcf-dump.c: Likewise.
8225         * jcf-parse.c: Likewise.
8226         * jvspec.c: Likewise.
8227         * lang.c: Likewise.
8228         * mangle.c: Likewise.
8229         * parse.y: Likewise.
8230
8231 2002-09-17  Tom Tromey  <tromey@redhat.com>
8232
8233         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8234         where \r appears at EOF.  Fixes PR java/7950.
8235
8236 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8237
8238         * jvspec.c (lang_specific_driver): Remove unused variable.
8239
8240 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8241
8242         * java-tree.h (union lang_tree_node): Add chain_next option.
8243
8244 2002-09-16  Richard Henderson  <rth@redhat.com>
8245
8246         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8247         use new real.h interface.
8248         * jcf-write.c (find_constant_index): Use new real.h interface.
8249         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8250
8251 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8252
8253         * lang.c: Follow spelling conventions.
8254
8255 2002-09-11  Per Bothner  <per@bothner.com>
8256
8257         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8258         constant to the type of the field.
8259         (java_complete_tree):  Remove now-redundant code.
8260
8261         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8262
8263 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8264
8265         For PR java/5794:
8266         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8267         return label if a ret instruction for the jsr has been reached.
8268
8269 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8270
8271         * parse.y (DIR_SEPARATOR): Don't define.
8272         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8273
8274 2002-08-28  Andrew Haley  <aph@redhat.com>
8275
8276         * verify.c (verify_jvm_instructions): Allow exception handler
8277         inside code that is being protected, but generate a warning.
8278         * except.c (link_handler): Initialize `expanded' in new eh_range.
8279         (binding_depth, is_class_level, current_pc): Declare extern.
8280
8281 2002-09-01  Mark Wielaard <mark@klomp.org>
8282
8283         * gcj.texi: Add chapter about system properties.
8284         Fixed some typos.
8285
8286 2002-08-26  Tom Tromey  <tromey@redhat.com>
8287
8288         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8289         conversion if RHS_TYPE is byte, short, or char.
8290
8291 2002-08-22  Tom Tromey  <tromey@redhat.com>
8292
8293         * gcj.texi (Invoking gij): Document -cp and -classpath.
8294
8295 2002-08-21  Tom Tromey  <tromey@redhat.com>
8296
8297         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8298         $(prefix)/share.  For PR libgcj/7633.
8299
8300         For PR java/6005 and PR java/7611:
8301         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8302         (java_can_use_bit_fields_p): New function.
8303
8304 2002-08-16  Tom Tromey  <tromey@redhat.com>
8305
8306         * gcj.texi (Class Initialization): Mention class initialization of
8307         arrays.
8308
8309 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8310
8311         * Make-lang.in (java-tree-inline.o): New.
8312         (JAVA_OBJS): Add java-tree-inline.o.
8313         * parse.y (source_end_java_method): Call java_optimize_inline.
8314         (java_expand_method_bodies): Save method's tree in
8315         DECL_SAVED_TREE.
8316         (add_stmt_to_compound): Keep track of the number of statments.
8317         * lang.c (java_init): Enable flag_inline_trees.
8318         (java_post_options): If flag_inline_functions is on, enable
8319         flag_inline_trees instread.
8320         (decl_constant_value): New.
8321         (java_tree_inlining_walk_subtrees): New.
8322         * java-tree.h (DECL_NUM_STMTS): New macro.
8323         (java_optimize_inline): Declare.
8324         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8325         Handle a LABEL_EXPR.
8326         * decl.c (build_result_decl): If we already have a DECL_RESULT
8327         don't make another.
8328         (dump_function): New.
8329         (java_optimize_inline): New.
8330         (dump_function): New.
8331
8332 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
8333
8334         For PR java/7483:
8335         * parse.y (build_assertion): Invert return from
8336         desiredAssertionStatus.
8337
8338 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8339
8340         * jcf-write.c (get_access_flags): Return correct access flags for
8341         private and protected inner classes.
8342
8343 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8344
8345         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8346
8347 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8348
8349         * mangle_name.c: Don't include obstack.h twice.
8350         * xref.c: Don't include obstack.h.
8351
8352 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8353
8354         * class.c: (permanent_obstack): Delete declaration.
8355         * constants.c: (permanent_obstack): Delete declaration.
8356         * except.c: (permanent_obstack): Delete declaration.
8357         * expr.c: (permanent_obstack): Delete declaration.
8358         * jcf-parse.c: (permanent_obstack): Delete declaration.
8359         (saveable_obstack): Delete declaration.
8360         * parse.h: (permanent_obstack): Delete declaration.
8361         * typeck.c: (permanent_obstack): Delete declaration.
8362
8363 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8364
8365         * gcj.texi (version-gcc): Increase to 3.3.
8366
8367 2002-07-22  Tom Tromey  <tromey@redhat.com>
8368
8369         * lex.c (java_lex): Check for `e' or `E' after 0.
8370
8371 2002-07-21  Richard Henderson  <rth@redhat.com>
8372
8373         * lang.c (java_unsafe_for_reeval): New.
8374         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8375
8376 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
8377
8378         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8379         (jcf_path_init): Use GET_ENVIRONMENT.
8380
8381 2002-07-10  Roger Sayle  <roger@eyesopen.com>
8382             Zack Weinberg <zack@codesourcery.com>
8383
8384         * builtins.c (initialize_builtins): Remove defines that
8385         handled C/C++ specific junk hereby removed from builtins.def.
8386
8387 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
8388
8389         * lang.c (java_post_options): Update prototype.
8390
8391 2002-07-05  Roger Sayle  <roger@eyesopen.com>
8392
8393         * builtins.c (initialize_builtins): Ignore the additional
8394         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
8395         the builtins.def file.
8396
8397 2002-07-01  Tom Tromey  <tromey@redhat.com>
8398
8399         For PR libgcj/7073:
8400         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8401         specially.
8402
8403 2002-07-01  Roger Sayle  <roger@eyesopen.com>
8404
8405         * java/decl.c (builtin_function): Accept additional parameter.
8406         (java_init_decl_processing): Pass an additional NULL_TREE
8407         argument to builtin_function.
8408
8409 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
8410
8411         * gcj.texi: Fixed gcj invocation example so that it compiles.
8412
8413 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8414
8415         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8416         * parse.y (mark_parser_ctxt): Likewise.
8417         (check_modifiers, declare_local_variables): Avoid incorrect
8418         hardcoded constant 10.
8419
8420         * lex.c (java_read_char): Avoid "comparison is always true"
8421         warning.
8422
8423 2002-06-25  Andreas Schwab  <schwab@suse.de>
8424
8425         * expr.c (JSR): Avoid undefined operation on PC.
8426
8427 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8428
8429         * decl.c (clear_binding_level): Const-ify.
8430
8431 2002-06-13  Akim Demaille  <akim@epita.fr>
8432
8433         * parse.y (class_declaration, interface_declaration): Make sure
8434         all their rules have an action, in order to avoid meaningless `$$
8435         = $1' and their type clashes.
8436
8437 2002-06-11  Tom Tromey  <tromey@redhat.com>
8438
8439         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8440         * parse-scan.y (statement_without_trailing_substatement): Added
8441         assert_statement.
8442         (assert_statement): New rule.
8443         * java-tree.h (struct lang_type) [assertions]: New field.
8444         (TYPE_USES_ASSERTIONS): New macro.
8445         (CLASS_USES_ASSERTIONS): Likewise.
8446         (FIELD_SYNTHETIC): New define.
8447         * lex.c (java_lval;): Added ASSERT_TK.
8448         * parse.y (ASSERT_TK): Added.
8449         (statement_without_trailing_substatement): Added assert_statement.
8450         (assert_statement): New rule.
8451         (build_assertion): New function.
8452         (maybe_generate_pre_expand_clinit): Create and initialize
8453         $assertionsDisabled.
8454         (lookup_package_type): Removed decl.
8455         * keyword.h: Rebuilt.
8456         * keyword.gperf (assert): New token.
8457
8458 2002-06-10  Akim Demaille  <akim@epita.fr>
8459
8460         * parse.y (interface_type_list, class_member_declaration)
8461         (unary_expression_not_plus_minus): Remove duplicate %type.
8462         Whitespace changes.
8463
8464 2002-06-09  Tom Tromey  <tromey@redhat.com>
8465
8466         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8467
8468         * parse.y (method_header): Give error message in all cases.
8469         Fixes PR java/6865.
8470
8471 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8472
8473         Don't use RTL inlining. Fix for PR java/6820.
8474         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8475         (flag_really_inline): New.
8476         (java_decode_option): Set flag_really_inline if -finline-functions
8477         is seen.
8478         (java_post_options): New function. Turn off inlining unless
8479         flag_really_inline is set.
8480
8481 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8482
8483         * gjavah.c (throwable_p): Accept argument as either a classname or
8484         signature fragment. Create null-terminated classname string for super
8485         when calling itself recursively.
8486         (decode_signature_piece): Skip first character from class name
8487         signature when calling throwable_p.
8488
8489 2002-06-08  H.J. Lu  (hjl@gnu.org)
8490
8491         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8492
8493 2002-06-04  Tom Tromey  <tromey@redhat.com>
8494
8495         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8496
8497 2002-06-04  Michael Koch  <konqueror@gmx.de>
8498
8499         * gcj.texi (Input Options): Fixed typo.
8500
8501 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
8502
8503         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8504         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8505         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8506         and all now-pointless local variables.  Rename other local
8507         variables to reflect their not being handles.
8508
8509         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8510         #if JCF_USE_STDIO blocks.
8511
8512         * parse.y: Add missing semicolon at end of rule.
8513
8514 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8515
8516         * check-init.c (attach_initialized_static_class): Delete, unused.
8517         * parse.y: Use htab_t instead of struct hashtable, update
8518         all uses.
8519         * java-tree.h: Include hashtab.h instead of hash.h.
8520         (struct lang_decl_func): Use htab_t, set up for gengtype.
8521         (struct init_test_hash_entry): Delete.
8522         (struct treetreehash_entry): New.
8523         (java_treetreehash_find): New
8524         (java_treetreehash_new): New prototype.
8525         (java_treetreehash_create): New prototype.
8526         (java_mark_tree): Delete prototype.
8527         (java_hash_hash_tree_node): Delete prototype.
8528         (java_hash_compare_tree_node): Delete prototype.
8529         (attach_initialized_static_class): Delete prototype.
8530         * expr.c (build_class_init): Update to use java_treetreehash
8531         functions.
8532         (java_expand_expr): Update to use htab_t.
8533         (emit_init_test_initialization): Likewise.
8534         * decl.c (java_mark_tree): Delete.
8535         * class.c (init_test_hash_newfunc): Delete.
8536         (java_hash_hash_tree_node): Delete.
8537         (java_hash_compare_tree_node): Delete.
8538         (add_method_1): Update to use java_treetreehash functions.
8539         (JAVA_TREEHASHHASH_H): New macro.
8540         (java_treetreehash_hash): New function.
8541         (java_treetreehash_compare): New function.
8542         (java_treetreehash_find): New function.
8543         (java_treetreehash_new): New function.
8544         (java_treetreehash_create): New function.
8545         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8546
8547         * Make-lang.in (java/parse.o): Depend on debug.h.
8548         * java-tree.h (struct lang_identifier): Use gengtype.
8549         (union lang_tree_node): New.
8550         (struct lang_decl_func): Use gengtype.
8551         (struct lang_decl_var): Likewise.
8552         (struct lang_decl): Likewise.
8553         * parse.y: Include debug.h.
8554         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8555
8556         * lang.c (struct language_function): New dummy structure.
8557
8558         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8559         descriminator for DECL_LANG_SPECIFIC.
8560         (struct lang_decl_func): Rename from struct lang_decl.
8561         (enum lang_decl_desc): New.
8562         (struct lang_decl): Make it a union.  Update all the accessor macros.
8563         (struct lang_type): Use gengtype.
8564         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8565         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8566         are now the same size.
8567         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8568         use discriminator to mark DECL_LANG_SPECIFIC.
8569
8570         * Make-lang.in (gt-java-builtins.h): New rule.
8571         (java/builtins.o): Add dependency on gt-<filename>.h.
8572         * builtins.c: Use gengtype for roots.
8573         (union string_or_tree): Use gengtype.
8574         (struct builtin_record): Use gengtype.
8575         * config-lang.in (gtfiles): Add builtins.c.
8576
8577         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8578         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8579         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8580         gt-java-parse.h, gtype-java.h): Add rules to generate.
8581         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8582         (class.o): Add dependency on gt-*.h.
8583         (constants.o): Likewise.
8584         (decl.o): Likewise.
8585         (expr.o): Likewise.
8586         (jcf-parse.o): Likewise.
8587         (jcf-write.o): Likewise.
8588         (lang.o): Likewise.
8589         * config-lang.in (gtfiles): New.
8590         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8591         * constants.c: Replace uses of ggc_add_* with GTY markers.
8592         Include gt-*.h.
8593         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8594         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8595         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8596         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8597         Include gt-*.h.
8598         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8599         Include gt-*.h.
8600         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8601         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8602         gt-*.h.
8603         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8604         Include gtype-java.h.
8605
8606 2002-06-02  Tom Tromey  <tromey@redhat.com>
8607
8608         Fix for PR java/5913:
8609         * parse.y (patch_binop): Call patch_string on op1.
8610
8611 2002-06-02  Tom Tromey  <tromey@redhat.com>
8612
8613         Fix for PR java/1343, PR java/6336:
8614         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8615         formatting.  Changed return type.
8616         (anonymous_class_counter): Moved to top of file.
8617         (maybe_make_nested_class_name): Append number to class name for
8618         function-local classes.
8619
8620 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8621
8622         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8623         * Make-lang.in: Update dependency lists.
8624
8625 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
8626
8627         * gjavah.c (throwable_p): Do not free the name of the class after
8628         passing it to find_class.
8629         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8630         * jcf-io.c (dirent.h): Include it.
8631         (fnmatch.h): Likewise.
8632         (compare_path): New function.
8633         (java_or_class_file): Likewise.
8634         (memoized_dirlist_entry): New type.
8635         (memoized_dirlist_lookup_eq): New function.
8636         (memoized_dirlists): New variable.
8637         (caching_stat): New function.
8638         (memoized_class_lookup_eq): New function.
8639         (memoized_class_lookups): Likewise.
8640         (find_class): Use memoized_class_lookups and caching_stat.
8641         * jcf.h (JCF_USE_SCANDIR): Define.
8642         * parse.y (java_expand_classes): Write the class files in reverse
8643         order.
8644
8645 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8646
8647         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8648
8649 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
8650
8651         * jcf-write.c (write_classfile): Unlink the temporary file if it
8652         cannot be renamed.  Use concat to build up the name of the
8653         temporary file.
8654
8655 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
8656
8657         * jcf-write.c (write_classfile): Write the file to a
8658         temporary file and then rename it.
8659
8660 2002-05-07  Tom Tromey  <tromey@redhat.com>
8661
8662         * gjavah.c (throwable_p): Use xstrdup, not strdup.
8663
8664         Fix for PR java/1200:
8665         * gjavah.c (throwable_p): New function.
8666         (decode_signature_piece): Use it.  A `WeakReference' isn't the
8667         same as a `jweak'.
8668         Include hashtab.h.
8669         (gcjh_streq): New function.
8670
8671 2002-05-07  Andreas Jaeger  <aj@suse.de>
8672
8673         * parse.y (finish_for_loop): Fix if statement.
8674
8675 2002-05-06  Tom Tromey  <tromey@redhat.com>
8676
8677         Fix for PR java/5941:
8678         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8679         loop update expression.
8680         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8681         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8682
8683 2002-05-04  Mark Wielaard  <mark@klomp.org>
8684
8685         For PR java/6519:
8686         * parse.y (build_string_concatenation): Return just op1 only when op2
8687         is null and op1 is a STRING_CST, otherwise always construct a
8688         StringBuffer.
8689
8690 2002-04-27  Tom Tromey  <tromey@redhat.com>
8691
8692         For PR java/6382:
8693         * parse.y (string_convert_int_cst): New function.
8694         (merge_string_cste): Use it.
8695
8696 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8697
8698         * java-tree.h (java_parse_file): Update.
8699         (java_set_yydebug): Remove.
8700         * jcf-parse.c (yydebug): Remove.
8701         (java_set_yydebug): Die.
8702         (java_parse_file): Update.
8703         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8704
8705 2002-04-24  Tom Tromey  <tromey@redhat.com>
8706
8707         For PR java/6425:
8708         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8709         EXPR_WFL_QUALIFICATION of qual_wfl.
8710
8711 2002-04-23  Per Bothner  <per@bothner.com>
8712
8713         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
8714         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
8715         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
8716
8717 2002-04-23  Tom Tromey  <tromey@redhat.com>
8718
8719         For PR java/6314:
8720         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
8721         recognize `-fcompile-resource='.
8722         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
8723         a bit.
8724
8725 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8726
8727         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8728         paths. Fixes PR java/2791.
8729
8730 2002-04-19  Andrew Haley  <aph@redhat.com>
8731
8732         * jcf-write.c (push_long_const): lo, hi: New variables.
8733         Use rshift_double to extract the high part of a 64-bit long.
8734         Use WORD_TO_INT to extract the low part.
8735
8736         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8737         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
8738         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8739
8740 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8741
8742         * typeck.c (incomplete_type_error): Remove.
8743
8744 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8745
8746         * class.c (make_class_data): Set DECL_ALIGN on static class data,
8747         for hash synchronization.
8748         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8749         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8750         class_type_node.
8751
8752 2002-04-16  Mark Wielaard  <mark@klomp.org>
8753
8754         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8755         negative zero.
8756
8757 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8758
8759         Fix for PR java/6294:
8760         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8761         interfaces.
8762
8763 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8764
8765         Fix for PR java/6085:
8766         * parse.y (patch_method_invocation): Always use build_access_to_thisn
8767         to get enclosing "this" argument for inner-class constructor
8768         invocation. Pass correct arguments to build_access_to_thisn.
8769
8770 2002-04-10  Andreas Jaeger  <aj@suse.de>
8771
8772         * gcj.texi (Input Options): Fix extdirs patch.
8773
8774 2002-04-10  Anthony Green  <green@redhat.com>
8775
8776         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8777
8778 2002-04-09  Anthony Green  <green@redhat.com>
8779
8780         * gcj.texi (Input Options): Add --extdirs documentation.
8781         * jcf-dump.c (OPT_extdirs): New macro.
8782         (options): Add extdirs option.
8783         (help): Describe --extdirs.
8784         (main): Handle OPT_extdirs.
8785         * gjavah.c (OPT_extdirs): New macro.
8786         (options): Add extdirs option.
8787         (help): Describe --extdirs.
8788         (main): Handle OPT_extdirs.
8789         * jcf-path.c (jcf_path_init): Add extdirs support.
8790         (jcf_path_extdirs_arg): New function.
8791         (extensions): New variable to hold extensions path entries.
8792         * jvspec.c: Remove -fextdirs= when compiling main().
8793         * lang.c (java_decode_option): Handle -fextdirs=.
8794         * jcf.h (jcf_path_extdirs_arg): Declare new function.
8795         * Make-lang.in: Compile jcf-path with version info for use in
8796         identifying the appropriate libgcj.jar.
8797
8798 2002-04-08  Tom Tromey  <tromey@redhat.com>
8799
8800         For PR libgcj/5303:
8801         * .cvsignore: Added rmic.1 and rmiregistry.1.
8802         * gcj.texi (Top): Link to new nodes.
8803         (Invoking rmic): New node.
8804         (Invoking rmiregistry): Likewise.
8805         * Make-lang.in (java.generated-manpages): Added rmic.1 and
8806         rmiregistry.1.
8807         (java.maintainer-clean): Likewise.
8808         ($(srcdir)/java/rmic.1): New target.
8809         ($(srcdir)/java/rmiregistry.1): Likewise.
8810         (java.install-man): Handle rmic.1 and rmiregistry.1.
8811
8812 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8813
8814         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8815         Add note about handling uncaught exceptions. Add an exception handler
8816         to example.
8817
8818 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8819
8820         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8821         after using it to patch CALL_EXPR.
8822
8823 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8824
8825         * gcj.texi (Invocation): Document CNI invocation API.
8826
8827 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8828
8829         * expr.c (truthvalue_conversion): Rename.  Update.
8830         (expand_compare): Update.
8831         * java-tree.h (java_truthvalue_conversion): New.
8832         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8833
8834 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8835
8836         * java-tree.h (java_mark_addressable): New.
8837         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8838         * typeck.c (mark_addressable): Rename, update.
8839
8840 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8841
8842         * expr.c (build_java_binop): Update.
8843         * java-tree.h (java_signed_type, java_unsigned_type,
8844         java_signed_or_unsigned_type): Update.
8845         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8846         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8847         * parse.y (patch_binop): Update.
8848         * typeck.c (signed_or_unsigned_type, unsigned_type,
8849         signed_type): Update.
8850
8851 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8852
8853         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8854         (java_dummy_print): Remove.
8855         (lang_print_error): Rename.  Exit early if inhibiting output.
8856         (inhibit_error_printing_function): New.
8857         (java_init): Don't set hook.
8858         (lang_init_source): Use new boolean.
8859
8860 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8861
8862         * parse.y (do_resolve_class): Fix infinite recursion.
8863
8864 2002-03-29  Tom Tromey  <tromey@redhat.com>
8865
8866         * parse.y (check_inner_circular_reference): Ignore incomplete
8867         types.
8868
8869 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8870
8871         * Make-lang.in (builtins.o): Update.
8872         * boehm.c (get_boehm_type_descriptor): Update.
8873         * builtins.c: Include langhooks.h.
8874         * decl.c (java_init_decl_processing): Update.
8875         * java-tree.h (java_type_for_mode, java_type_for_size): New.
8876         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8877         Redefine.
8878         * typeck.c (type_for_mode, type_for_size): Update.
8879
8880 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8881
8882         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8883
8884 2002-03-28  Tom Tromey  <tromey@redhat.com>
8885
8886         * except.c (expand_end_java_handler): If the handler type is NULL,
8887         use java.lang.Throwable.  Fixes PR java/5986.
8888
8889 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8890
8891         Fix for PR java/4715:
8892         * jcf-parse.c (parse_source_file_3): New function.
8893         (read_class): Call it.
8894         (java_parse_file): Likewise.
8895
8896 2002-03-28  Jan Hubicka  <jh@suse.cz>
8897
8898         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8899
8900 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8901
8902         * parse.y (resolve_package): Initialize "decl".
8903         (lookup_package_type): Remove unused function.
8904
8905 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8906
8907         Fix for PR java/5993:
8908         * parse.y (resolve_package): Return the decl if resolution was
8909         successful. Don't special case "java.lang" and "java.lang.reflect"
8910         packages. Set type_name to the merged identifier.
8911         (resolved_qualified_expression_name): Print error using "name" if
8912         resolve_package returns NULL_TREE.
8913
8914 2002-03-27  Tom Tromey  <tromey@redhat.com>
8915
8916         * expr.c (expand_invoke): Don't generate null pointer check if
8917         we're calling <init>.
8918
8919 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8920
8921         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8922         fix prototype.
8923         * java-tree.h (java_lang_expand_expr): Similarly.
8924         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8925         (java_init): Don't set hook.
8926
8927 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8928
8929         Fix for PR java/5850:
8930         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8931         context if field was not found in the current scope.
8932         * expr.c (lookup_field): Don't look in enclosing contexts.
8933
8934 2002-03-26  Tom Tromey  <tromey@redhat.com>
8935
8936         Fix for PR java/5942:
8937         * parse.y (init_src_parse): Added sanity check.
8938         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8939         elements, not 11.
8940
8941 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
8942
8943         * decl.c (lang_mark_tree): Rename java_mark_tree.
8944         * java-tree.h (java_mark_tree): New.
8945         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
8946
8947 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
8948
8949         * lex.c: Change java_perform_atof to take normal parameters
8950         instead of a pointer to a parameter block.  Call it directly
8951         from java_lex.
8952
8953 2002-03-22  Mark Wielaard  <mark@klomp.org>
8954
8955         Fix for PR java/5368:
8956         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
8957         when printing error message.
8958
8959 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8960
8961         * decl.c (maybe_build_cleanup): Remove.
8962
8963 2002-03-22  Tom Tromey  <tromey@redhat.com>
8964
8965         Andrew Haley  <aph@cambridge.redhat.com>
8966
8967         * expr.c (build_field_ref): Don't build a check if the field is a
8968         member of `this'.
8969
8970 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
8971
8972         Fix for PR java/6026:
8973         * lex.c (java_lex): Fix parsing of consecutive floats.
8974
8975 2002-03-21  Tom Tromey  <tromey@redhat.com>
8976
8977         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
8978         class.
8979
8980 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
8981
8982         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
8983         insert_block, getdecls, kept_level_p, global_bindings_p): New.
8984
8985 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
8986
8987         * gcj.texi: @code{gcj} becomes @command{gcj}.
8988         @code{gcc} becomes @command{gcc}.
8989         GcjRaw changed to gnu.gcc.RawData.
8990
8991 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
8992
8993         * decl.c (start_java_method): Use new hook.
8994         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
8995         (java_init): Remove old hook.
8996
8997 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
8998
8999         * builtins.c (define_builtin): Do nothing if `type' is null.
9000         Fixes PR java/5876.
9001
9002 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9003
9004         * parse.y (parser_check_super_interface): Fix error message
9005         grammar/order.
9006
9007 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9008
9009         * jcf-parse.c (get_constant): Delete unused variables.
9010
9011 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9012
9013         * java-tree.h (java_parse_file): New.
9014         * jcf-parse.c (yyparse): Rename java_parse_file.
9015         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9016
9017 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9018
9019         * parse.y (craft_constructor): Return the constructor decl.
9020         (java_expand_classes): Update comments.
9021         (lookup_method_invoke): Call fix_constructors immediately for
9022         anonymous class. Fixes PR java/5935.
9023
9024 2002-03-15  Anthony Green  <green@redhat.com>
9025
9026         * jcf-parse.c (yyparse): Don't emit class registration
9027         constructor when compiling resource files.
9028
9029 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9030
9031         * lang.c (java_tree_code_type, java_tree_code_length,
9032         tree_code_name): Delete.
9033         (tree_code_type, tree_code_length, tree_code_name): Define.
9034         (java_init): Don't try to copy into the various tree_code
9035         arrays.
9036
9037 2002-03-12  Tom Tromey  <tromey@redhat.com>
9038
9039         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9040         UTF-8, not UCS-2.  Fixes PR java/5923.
9041
9042         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9043         a call_expr wrapped in a convert.  Fixes PR java/5848.
9044
9045 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9046
9047         * jcf-write.c (write_classfile): Improve error strings.
9048
9049 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9050
9051         * lex.c: Adjust comments to GNU standards.
9052
9053 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9054
9055         Fix for PR java/5902:
9056         * lex.c (java_lex): Fix parsing of literals.
9057
9058 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9059
9060         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9061         to prevent it getting evaluated twice in the store checking case.
9062         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9063         examining OBJECT.
9064
9065 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9066
9067         * decl.c (java_init_decl_processing): Make sure class_type_node
9068         alignment is not less than 64 bits if hash synchronization is enabled.
9069
9070 2002-03-08  Per Bothner  <per@bothner.com>
9071
9072         * parse.y (java_complete_lhs):  Check if patch_assignment
9073         returned an error-mark.
9074
9075         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9076
9077 2002-03-08  Per Bothner  <per@bothner.com>
9078
9079         Fix for PR java/5812.
9080         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9081         here instead of in JSR macro.  Likewise with load_type_state call.
9082         Do the latter on if the return_pc has been verified (the jsr returns).
9083         (JSR):  Now just call build_java_jsr.
9084
9085 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9086
9087         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9088         (java.install-common): Link native driver to
9089         JAVA_TARGET_INSTALL_NAME.
9090
9091 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9092
9093         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9094         * builtins.c(sin_builtin): Likewise
9095         * builtins.c(sqrt_builtin): Likewise
9096
9097 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9098
9099         * java/expr.c, java/jcf-parse.c, java/lex.c:
9100         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9101         REAL_ARITHMETIC blocks unconditional.  Delete some further
9102         #ifdef blocks predicated on REAL_ARITHMETIC.
9103
9104 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9105
9106         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9107         explicit sizeof/sizeof.
9108         * decl.c (java_init_decl_processing): Likewise.
9109         * jcf-parse.c (init_jcf_parse): Likewise.
9110         * parse.y (init_src_parse): Likewise.
9111
9112 2002-03-02  Per Bothner  <per@bothner.com>
9113
9114         Make --CLASSPATH by a synonym for --classpath and -classpath.
9115         Implement --bootclasspath.
9116         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9117         (classpath_l):  Remove.
9118         (jcf_path_CLASSPATH_arg):  Remove.
9119         (jcf_path_bootclasspath_arg):  New function.
9120         (jcf_path_seal):  Simplify accordingly.
9121
9122         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9123         (jcf_path_CLASSPATH):  Remove declaration.
9124         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9125         (lang_specific_driver):  Translate -bootclasspath.
9126         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9127         * lang.c (decode_lang_options):  Do jcf_path_init first.
9128         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9129         * gjavah.c:  Also handle --bootclasspath.
9130         Handle --CLASSPATH as a synonum for --classpath.
9131         * jcf-dump.c: Likewise.
9132
9133         "." is not part of system path, but is the default for --classpath.
9134         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9135         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9136
9137         * gcj.texi:  Document changes.
9138
9139 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9140
9141         * expr.c (build_java_arraystore_check): Fix formatting.
9142
9143 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9144
9145         Fix for PR java/5758, java/5632:
9146         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9147         inner-class separator too.
9148         * parse.y (do_resolve_class): New local `decl_result.'
9149         Progressively build a name for what can have been loaded.
9150
9151 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9152
9153         * expr.c (java_array_data_offset): Removed function.
9154         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9155         (build_java_array_length_access): Obtain "length" value using a
9156         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9157         (build_java_arrayaccess): Correct comment. Access "data" using a
9158         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9159         (build_java_arraystore_check): New function.
9160         (expand_java_arraystore): Use build_java_arraystore_check.
9161         * parse.y (patch_assignment): Simplify code to insert a store check
9162         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9163         * check-init.c (check_init): Update to reflect that an array length
9164         access is now a COMPONENT_REF.
9165         * gcj.texi (Code Generation): Improve documentation of
9166         -fno-bounds-check. Add documentation for -fno-store-check.
9167         * java-tree.h (flag_store_check): Declare.
9168         (build_java_arraystore_check): Declare.
9169         * lang.c (flag_store_check): Initialize to 1.
9170         (lang_f_options): Add store-check option.
9171         * jvspec.c: Don't pass store-check option to jvgenmain.
9172         * lang-options.h: Add help string for -fno-store-check.
9173
9174 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9175
9176         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9177         * java-tree.h (java_dup_lang_specific_decl): New.
9178         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9179
9180 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9181
9182         * builtins.c, decl.c: Delete traditional-mode-related code
9183         copied from the C front end but not used, or used only to
9184         permit the compiler to link.
9185
9186 2002-02-22  Tom Tromey  <tromey@redhat.com>
9187
9188         Fix for PR java/2369:
9189         * jvspec.c (verify_class_name): New function.
9190         (lang_specific_driver): Call it.
9191         (JAVA_START_CHAR_P): New macro.
9192         (JAVA_PART_CHAR_P): Likewise.
9193
9194 2002-02-22  Per Bothner  <per@bothner.com>
9195
9196         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9197         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9198         type_info pointer (currently unimplemented hence NULL) to vtable.
9199         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9200         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9201         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9202         (build_dtable_decl):  Add declarations for new fields.
9203
9204 2002-02-20  Per Bothner  <per@bothner.com>
9205
9206         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9207         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9208         don't need to set it on the COMPOUND_EXPR - the caller does that.
9209
9210 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9211
9212         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9213         `--CLASSPATH' becomes `--classpath.'
9214         * gjavah.c: Likewise.
9215         * jcf-dump.c: Likewise.
9216         * lang-options.h: Likewise.
9217         * lang.c: Likewise.
9218         * jcf-path.c: Updated comment.
9219         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9220         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9221         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9222         (jcf_path_CLASSPATH_arg): Ditto.
9223         (classpath_u): Updated leading comment.
9224
9225 2002-02-20  Per Bothner  <per@bothner.com>
9226
9227         * builtins.c (check_for_builtin):  New function.
9228         (build_call_or_builtin):  Remove.
9229         * java-tree.h:  Update accordingly.
9230         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9231         of build_call_or_builtin.
9232         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9233         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9234         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9235
9236 2002-02-17  Tom Tromey  <tromey@redhat.com>
9237
9238         * java-tree.h (TYPE_STRICTFP): New macro.
9239         (struct lang_type) [strictfp]: New field.
9240         (CLASS_STRICTFP): New macro.
9241         (METHOD_STRICTFP): New macro.
9242         (struct lang_decl) [strictfp]: New field.
9243         * parse.y (method_header): Disallow strictfp constructor or
9244         abstract method.
9245         (STRICT_TK): Move before MODIFIER_TK.
9246         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9247         (METHOD_MODIFIERS): Likewise.
9248         (INTERFACE_MODIFIERS): Likewise.
9249         * jcf-write.c (get_access_flags): Likewise.
9250         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9251         (add_method_1): Likewise.
9252         (get_access_flags_from_decl): Likewise.
9253         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9254         recognize strictfp flag.
9255         * jcf.h (ACC_STRICT): New define.
9256
9257 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9258
9259         * class.c(build_utf8_ref): Move declaration of decl_size
9260
9261 2002-02-07  Tom Tromey  <tromey@redhat.com>
9262
9263         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9264         path.
9265
9266 2002-02-04  Anthony Green  <green@redhat.com>
9267
9268         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9269         sections if available.
9270
9271 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9272
9273         * parse.y (java_expand_classes): Fix typo in static field loop.
9274
9275 2002-02-02  Richard Henderson  <rth@redhat.com>
9276
9277         * class.c (add_field): Mark static fields external.
9278         (build_class_ref): Remove redundant set.
9279         * parse.y (java_expand_classes): Mark static fields of classes
9280         to be compiled as local.
9281         * jcf-parse.c (parse_class_file): Likewise.
9282
9283 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9284
9285         * gcj.texi (About CNI): New node.
9286
9287 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9288
9289         PR java/5080
9290         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9291         setlocale() with LC_CTYPE as a parameter.
9292         * jv-scan.c: Same.
9293
9294 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9295
9296         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9297         Follow GNU Coding Standards for --version.
9298
9299 2002-01-28  Tom Tromey  <tromey@redhat.com>
9300
9301         * expr.c (build_jni_stub): Ensure storage for `meth' is
9302         generated.
9303         * parse.y (java_complete_expand_methods): Set
9304         current_function_decl before building JNI stub.
9305
9306 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9307
9308         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9309         BUILT_IN_SQRTF.
9310
9311 2002-01-22  Tom Tromey  <tromey@redhat.com>
9312
9313         * decl.c (java_init_decl_processing): Use add_predefined_file.
9314         Predefine RawData.java.
9315         (predef_filenames): Removed.
9316         (java_init_decl_processing): Don't register predef_filenames.
9317         * jcf-parse.c (add_predefined_file): New function.
9318         (predefined_filename_p): Rewrote.
9319         (predefined_filename_p): No longer static.
9320         * decl.c (java_init_decl_processing): Call initialize_builtins.
9321         * Make-lang.in (JAVA_OBJS): Added builtins.o.
9322         (java/builtins.o): New target.
9323         * builtins.c: New file.
9324         * parse.y (patch_invoke): Use build_call_or_builtin.
9325         * java-tree.h (build_call_or_builtin): Declare.
9326         (initialize_builtins): Declare.
9327         (java_set_exception_lang_code): Removed unused declaration.
9328         (PREDEF_FILENAMES_SIZE): Removed.
9329         (java_tree_index): Added JTI_PREDEF_FILENAMES.
9330         (predef_filenames): New define.
9331         (add_predefined_file): Declare.
9332         (predefined_filename_p): Declare.
9333         * expr.c (expand_invoke): Use build_call_or_builtin.
9334
9335 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9336
9337         * parse.y (patch_switch_statement): Fix format specifier.
9338
9339 2002-01-16  Tom Tromey  <tromey@redhat.com>
9340
9341         More for PR java/5365:
9342         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9343         default.
9344         (process_file): Generate include for
9345         java.lang.UnsupportedOperationExceptions.
9346
9347 2002-01-15  Andreas Jaeger  <aj@suse.de>
9348
9349         * .cvsignore: Add man pages.
9350
9351 2002-01-15  Tom Tromey  <tromey@redhat.com>
9352
9353         Fix for PR java/5365:
9354         * gjavah.c (process_file): Turn class name into a file name.
9355
9356 2002-01-14  Matthias Klose  <doko@debian.org>
9357
9358         * gcj.texi: Fix whitespace and formatting errors in the
9359         synopsis of the man pages. Update copyright.
9360
9361 2002-01-14  Tom Tromey  <tromey@redhat.com>
9362
9363         For PR libgcj/5303:
9364         * Make-lang.in (java.install-man): Handle jv-convert man page.
9365         (java.generated-manpages): Added jv-convert.1.
9366         (java.uninstall): Remove jv-convert.1.
9367         (java.maintainer-clean): Likewise.
9368         ($(srcdir)/java/jv-convert.1): New target.
9369         * gcj.texi (Top): Link to jv-convert node.
9370         (Individual utilities): Likewise.
9371         (Invoking jv-convert): New node.
9372
9373 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
9374             Martin Kahlert  <martin.kahlert@infineon.com>
9375
9376         * jcf-parse.c (get_constant): Don't swap lo/hi for big
9377         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9378
9379 2002-01-03  Graham Stott  <grahams@redhat.com>
9380
9381         * class.c (compile_resource_file): Update copyright date.
9382         Constify filename parameter.
9383         (java-tree.h): Update copyright date.
9384         (compile_resource_file): Constify filename parameter.
9385
9386 2002-01-03  Graham Stott  <grahams@redhat.com>
9387
9388         * gcc/jcf-parse.c: Update copyright date.
9389         (yyparse): Constify resource_filename.
9390
9391 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9392
9393         * parse.y (src_parse_roots): Don't needlessly zero init.
9394
9395 2001-12-31  Tom Tromey  <tromey@redhat.com>
9396
9397         * parse.y (dump_java_tree): New function.
9398         (source_end_java_method): Call it.
9399         (end_class_declaration): Likewise.
9400         * lang.c (java_decode_option): Call dump_switch_p.
9401
9402 2001-12-28  Tom Tromey  <tromey@redhat.com>
9403
9404         * gen-table.pl: Don't process characters after \uffff.  Added
9405         comment pointing to input file.
9406
9407 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9408
9409         * gen-table.pl: Const-ify output.  Document the location of a
9410         suitable unicode input file.
9411
9412         * chartables.h: Regenerate.
9413
9414 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9415
9416         * chartables.h: Const-ify.
9417         * gjavah.c (options): Likewise.
9418         * jcf-dump.c (options): Likewise.
9419         * jv-scan.c (options): Likewise.
9420         * lex.c (java_start_char_p, java_part_char_p): Likewise.
9421         * parse.y (binop_lookup): Likewise.
9422
9423 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9424
9425         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9426         the static arrays that are output.
9427         * jvspec.c (jvgenmain_spec): Make static.
9428         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9429         * keyword.h: Regenerate.
9430         * lang.c (string_option, process_option_with_no, lang_f_options,
9431         lang_W_options): Const-ify.
9432         * lex.c (java_lex): Likewise.
9433
9434 2001-12-21  Richard Henderson  <rth@redhat.com>
9435
9436         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9437         (get_boehm_type_descriptor): ... here.  Arrange for the
9438         TREE_TYPE to get set properly.
9439
9440 2001-12-21  Richard Henderson  <rth@redhat.com>
9441
9442         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9443         only if the target requires collect2.
9444
9445         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9446
9447 2001-12-20  Tom Tromey  <tromey@redhat.com>
9448
9449         For PR java/4509:
9450         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9451         CAN_COMPLETE_NORMALLY for the node.
9452         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9453         generate code for second branch if first branch can't complete
9454         normally.
9455         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9456         the loop head if the loop body can't complete normally.
9457
9458 2001-12-20  Tom Tromey  <tromey@redhat.com>
9459
9460         For PR java/4766:
9461         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9462         case where `finally' clause can't complete normally.
9463
9464 2001-12-20  Tom Tromey  <tromey@redhat.com>
9465
9466         Fixes PR java/5057:
9467         * parse.y (analyze_clinit_body): Added this_class parameter.
9468         Check for more cases where we must keep <clinit>.
9469         (maybe_yank_clinit): Cleaned up flow control.
9470
9471 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9472
9473         * decl.c (java_init_decl_processing): Don't initialize
9474         finit_leg_identifier_node.
9475         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9476         (finit_leg_identifier_node): Remove.
9477         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9478
9479 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9480
9481         * mangle.c (mangle_member_name): Don't special-case for
9482         NO_DOLLAR_IN_LABEL.
9483         * mangle_name.c (unicode_mangling_length): Likewise.
9484         (append_unicode_mangled_name): Likewise.
9485         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9486         code.
9487
9488 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9489
9490         * expr.c (build_java_array_length_access): Don't force null pointer
9491         check unless flag_check_references is set.
9492
9493 2001-12-20  Tom Tromey  <tromey@redhat.com>
9494
9495         Fix for PR java/3417:
9496         * parse.y (patch_assignment): Added special processing for
9497         `return'.
9498         (patch_return): Don't convert booleans to integers, and don't
9499         special-case `null'.
9500
9501 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9502
9503         * config-lang.in (diff_excludes): Remove.
9504
9505 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9506
9507         * gcj.texi: Update link to GCC manual.
9508
9509 2001-12-17  Tom Tromey  <tromey@redhat.com>
9510
9511         * parse.y (link_nested_class_to_enclosing): Removed useless
9512         statement.
9513
9514 2001-12-16  Tom Tromey  <tromey@redhat.com>
9515
9516         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9517         Fixes PR java/5088.
9518
9519 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9520
9521         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9522         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9523         spelling errors.
9524
9525 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9526
9527         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9528
9529 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9530
9531         * decl.c (java_init_decl_processing): Build otable_type correctly.
9532         otable_decl is an otable_type.
9533
9534 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9535
9536         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9537         otable_type, otable_ptr_type, method_symbol_type,
9538         method_symbols_array_type, method_symbols_array_ptr_type): New
9539         field/global tree definitions.
9540         (flag_indirect_dispatch): New flag.
9541         * decl.c (java_init_decl_processing): Initialize new otable and
9542         otable_syms type nodes and decls. Add new field "index" to
9543         method_type_node.
9544         * class.c (build_method_symbols_entry): New function.
9545         (make_method_value): Set "index" to to method's vtable index for
9546         virtual methods when indirect-dispatch is not used.
9547         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9548         and set vtable_method_count to -1. Set otable and otable_syms field
9549         if indirect-dispatch is used and there was something to put in them.
9550         (build_method_symbols_entry): New function.
9551         (emit_offset_symbol_table): New function.
9552         * expr.c (get_offset_table_index): New function.
9553         (build_invokevirtual): Build array reference to otable at the index
9554         returned by get_offset_table_index, and use the result as the vtable
9555         offset.
9556         (build_invokeinterface): Similar.
9557         * jcf-parse.c (yyparse): If indirect-dispatch, call
9558         emit_offset_symbol_table at the end of compilation, after all classes
9559         have been generated.
9560         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9561         * lang.c (flag_indirect_dispatch): Define.
9562         (lang_f_options): Add indirect-dispatch flag.
9563
9564 2001-12-14  Matthias Klose  <doko@debian.org>
9565
9566         * gcj.texi: Markup for man page generation. Document missing
9567         options printed by <tool> --help.
9568         Terminate description of gij's -ms option with a dot.
9569         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9570         (java.generated-manpages java.install-man, java.uninstall,
9571         java-maintainer-clean) Updated.
9572
9573 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9574
9575         * class.c (get_dispatch_table): Fix java vtable layout
9576         for TARGET_VTABLE_USES_DESCRIPTORS.
9577         * decl.c (java_init_decl_processing): Initialize
9578         alloc_no_finalizer_node, finalize_identifier_node.
9579         * expr.c (class_has_finalize_method): New function.
9580         (expand_java_NEW): Generate calls for finalizer-free allocation.
9581         (build_invokevirtual): Fix java vtable layout for
9582         TARGET_VTABLE_USES_DESCRIPTORS.
9583         * java-tree.h (enum java_tree_index): New entries:
9584         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9585         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9586         (class_has_finalize_method): declare.
9587         (HAS_FINALIZER_P): New macro.
9588         * parse.y (patch_invoke): Generate calls for finalizer-free
9589         allocation.
9590
9591 2001-12-12  Matthias Klose  <doko@debian.org>
9592
9593         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9594         whitespace at end of line.
9595
9596 2001-12-11  Tom Tromey  <tromey@redhat.com>
9597
9598         * lex.c (java_init_lex): Define wfl_to_string as
9599         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9600
9601 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9602
9603         * class.c (make_method_value): Use null_pointer_node to
9604         represent empty exception table.
9605
9606 2001-12-10  Tom Tromey  <tromey@redhat.com>
9607
9608         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9609
9610 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9611
9612         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9613
9614 2001-12-09  Per Bothner  <per@bothner.com>
9615
9616         * check-init.c (current_switch_has_default):  New static field.
9617         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
9618         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
9619         DEFAULT_EXPR seen, simulate a default alternative that copies state.
9620
9621 2001-12-09  Tom Tromey  <tromey@redhat.com>
9622
9623         * check-init.c (check_init): Don't allow pre- or post- increment
9624         or decrement of final variable.
9625         (final_assign_error): Minor error message rewording.
9626
9627 2001-12-08  Tom Tromey  <tromey@redhat.com>
9628
9629         * java-tree.h: Fixed typo.
9630
9631         * gjavah.c (decompile_method): Don't decompile to `return this'
9632         for static methods.
9633
9634         * gjavah.c (cxx_keywords): Re-sorted.
9635         * lex.c (cxx_keywords): Re-sorted.
9636
9637         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9638         else.
9639
9640         * gjavah.c (print_namelet): Clear subnamelets.
9641         (HANDLE_METHOD): Set `method_printed' earlier.
9642
9643 2001-12-07  Tom Tromey  <tromey@redhat.com>
9644
9645         * lang.c (lang_f_options): Added
9646         optimize-static-class-initialization.
9647         (java_decode_option): Removed special case.
9648
9649 2001-12-07  Per Bothner  <per@bothner.com>
9650
9651         * check-init.c (check_init):  Fix typo freeing memory twice.
9652
9653 2001-12-05  Per Bothner  <per@bothner.com>
9654
9655         Restore support for static class initialization optimization.
9656         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9657         * check-init.c (check_int):  At end of BLOCK handle initialization
9658         blocks, which used to be done in java_complete_expand_method but did
9659         not handle the case where check_for_initialization might allocate
9660         more than a word of bits.
9661         * decl.c (lang_make_tree):  The smic field is now a tree.
9662         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
9663         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
9664
9665         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
9666
9667         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9668         Change from a hash table to a list.
9669         (struct_lang_decl):  Change field 'smic' to match.
9670         * class.c (add_method_1):  Initialize
9671         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9672         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
9673         (java_expand_method_bodies): -here, since 'smic' is now a list.
9674         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
9675
9676         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
9677
9678         * class.c (java_hash_compare_tree_node):  Fix casts.
9679
9680 2001-12-04  Per Bothner  <per@bothner.com>
9681
9682         * check-init.c:   Handle definite unassignment to finals in addition
9683         to definite assignment.
9684         (loop_current_locals):  New field.
9685         (num_current_locals, int start_current_locals, num_current_words):
9686         Make static.
9687         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
9688         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9689         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
9690         (get_variable_decl, check_final_reassigned):  New functions.
9691         (check_init, check_bool_init):  Modify as needed for checking finals.
9692         (check_for_initialization):  Take extra parameter and return void.
9693         Do extra start-up logic to check final fields for assignment.
9694         * parse.y (check_static_final_variable_assignment_flag,
9695         reset_static_final_variable_assignment_flag, check_final_assignment,
9696         check_final_variable_local_assignment_flag,
9697         reset_final_variable_indirect_assignment_flag,
9698         reset_final_variable_global_assignment_flag):  Remove functions.
9699         (java_complete_expand_methods, outer_field_access_fix,
9700         patch_assignment): Remove no-longer used logic.
9701         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
9702         * parse.y (register_fields, java_complete_tree):  Update accordingly.
9703
9704         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
9705         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
9706         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
9707
9708         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
9709
9710         * java-tree.h (DECL FINAL):  New bit-field.
9711         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
9712         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
9713         (DECL_INIT_CALLS_THIS):  New macro.
9714         (struct lang_decl):  New bit-field init_calls_this.
9715         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9716         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9717         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
9718         use it for both local variables and final fields.
9719         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
9720         and local_final.
9721         (struct lang_type):  Remove hfv bit-field.
9722         (check_for_initialization):  Change to return void.
9723
9724         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
9725         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
9726         * check-init.c (final_assign_error):  New helper function.
9727         (check_final_reassigned, check_init):  Use it.
9728         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9729
9730         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
9731         bit-fields to unsigned.
9732
9733 2001-12-03  Per Bothner  <per@bothner.com>
9734
9735         * parse.y (patch_binop):  Minor constant folding.
9736
9737         * parse.y (build_current_thisn):  Shorter 'buffer'.
9738
9739 2001-12-03  Per Bothner  <per@bothner.com>
9740
9741         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
9742         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9743         * jcf-write.c (generate_bytecode_insns):  Remove support for
9744         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9745         * check-init.c (check_init):  Likewise.
9746
9747 2001-12-03  Per Bothner  <per@bothner.com>
9748
9749         * verify.c (subroutine_nesting):  New function.
9750         (verify_jvm_instructions):  Use it to fix logic for checking that
9751         we're done with the current subroutine.
9752
9753         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9754         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9755
9756 2001-12-03  Per Bothner  <per@bothner.com>
9757
9758         * jcf.h:  Fix obvious typo in comment.
9759         * typeck.c (build_null_signature):  Add comment.
9760
9761 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9762
9763         * expr.c: Remove leading capital from diagnostic messages, as
9764         per GNU coding standards.
9765         * jcf-io.c: Similarly.
9766         * jcf-parse.c: Similarly.
9767         * jv-scan.c: Similarly.
9768         * jvspec.c: Similarly.
9769         * mangle.c: Similarly.
9770
9771 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
9772             Alexandre Petit-Bianco  <apbianco@redhat.com>
9773
9774         * expr.c (build_java_arrayaccess): Call save_expr on array for
9775         correct evaluation order, modified comment, fixed indentation.
9776         * parse.y: (patch_assignment): Correctly extract the array base
9777         from the tree generate by build_java_arrayaccess, added comments.
9778         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9779         Fixes PR java/3096, PR java/3803, PR java/3965.
9780
9781 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9782
9783         * expr.c (expand_byte_code): Remove trailing periods from messages.
9784         * jcf-parse.c (load_class, jcf_parse): Similarly.
9785         * jcf-write.c (generate_classfile): Similarly.
9786         * lex.c (java_lex): Similarly.
9787
9788 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9789
9790         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9791
9792 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9793
9794         * Make-lang.in (java.generated-manpages): New dummy target.
9795
9796 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9797
9798         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9799         ASM_FINAL_SPEC.
9800         (lang_specific_pre_link): Use set_input to set input_filename.
9801         Append `main' here.
9802         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9803         (main): Fix definition.
9804         Strip `main' from classname.
9805         Fixes PR java/227.
9806
9807 2001-11-18  Roger Sayle <roger@eyesopen.com>
9808
9809         * parse.h (java_expand_switch): Remove old prototype.
9810
9811 2001-11-18  Tom Tromey  <tromey@redhat.com>
9812
9813         Fix for PR java/1401:
9814         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9815         arg0 is null.
9816         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9817         correctly.
9818
9819 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9820
9821         * lang.c (finish_parse): Rename to java_finish.
9822         (LANG_HOOKS_FINISH, java_finish): New.
9823
9824 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9825
9826         * decl.c (init_decl_processing): Rename java_init_decl_processing.
9827         * java-tree.h: New prototype.
9828         * lang.c (java_init): Update prototype.  Combine with old init_parse.
9829
9830 2001-11-13  Tom Tromey  <tromey@redhat.com>
9831
9832         * gjavah.c (method_signature): New global.
9833         (HANDLE_METHOD): Set it.
9834         (decompile_return_statement): New function.
9835         (decompile_method): Use it.
9836         (print_method_info): Removed `synth' argument.
9837
9838 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9839
9840         * java-tree.h (java_set_yydebug): New.
9841         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9842         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9843         (print_lang_decl, print_lang_type, print_lang_identifier,
9844         print_lang_statistics, lang_print_xnode): Remove.
9845
9846 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9847
9848         * jcf-parse.c (init_lex): Remove.
9849         * lang.c (language_string, lang_identify): Remove.
9850         (struct lang_hooks): Constify.
9851         (LANG_HOOKS_NAME): Override.
9852         (init_parse): Update.
9853
9854 2001-11-08  Andreas Franck  <afranck@gmx.de>
9855
9856         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9857         program_transform_name the way suggested by autoconf.
9858         (java.install-common): Also transform auxiliary program names with
9859         program_transform_name.
9860
9861 2001-11-08  Tom Tromey  <tromey@cygnus.com>
9862
9863         * parse.y (trap_overflow_corner_case): New rule.
9864         (unary_expression): Use it.
9865         * lex.c (java_init_lex): Don't set minus_seen.
9866         (yylex): Don't use minus_seen.  Communicate overflow to parser for
9867         it to handle.
9868         (error_if_numeric_overflow): New function.
9869         * parse.h (minus_seen): Removed field.
9870         (JAVA_RADIX10_FLAG): New define.
9871
9872 2001-11-07  Tom Tromey  <tromey@redhat.com>
9873
9874         Patch for PR java/1414:
9875         * parse.y (case_label_list): New global.
9876         (goal): Register case_label_list with GC.
9877         (java_complete_lhs): Save new case on case_label_list.
9878         (patch_switch_statement): Check for duplicate case labels.
9879
9880 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9881
9882         * parse.y (patch_assignment): Removed unused third argument.
9883         (java_complete_lhs): Removed unused third argument to patch_assignment.
9884
9885 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9886
9887         * lang.c: Include langhooks-def.h.
9888         * Make-lang.in: Update.
9889
9890 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9891
9892         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9893
9894 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9895
9896         * mangle.c (find_compression_record_match): Don't match compression
9897         records for package name elements unless they occur at the start of
9898         the name. Fix for PR java/4717.
9899
9900 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9901
9902         * expr.c (expand_java_field_op): Don't special-case references to
9903         java.lang.PRIMTYPE.TYPE.
9904         (build_primtype_type_ref): Removed.
9905         * java-tree.h (build_primtype_type_ref): Remove prototype.
9906         * parse.y (maybe_build_primttype_type_ref): Removed.
9907         (complete_function_arguments): Don't special-case references to
9908         java.lang.PRIMTYPE.TYPE.
9909         (patch_assignment): Likewise.
9910         (array_constructor_check_entry): Likewise.
9911
9912 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9913
9914         * mangle.c (static tree compression_table): Fixed leading comment.
9915         * parse.h (struct parser_ctxt): Fixed field comment.
9916         * parse.y (check_pkg_class_access): New prototype, fixed leading
9917         comment, new parameter used to emit error only if passed as true.
9918         (parse_check_super): Pass extra argument to check_pkg_class_access.
9919         (do_resolve_class): Likewise.
9920         (process_imports): Likewise.
9921         (read_import_dir): Fixed indentation.
9922         (find_in_imports_on_demand): New local class_type_name. Local
9923         node_to_use deleted. while loop changed into for loop. Report
9924         multiple definition only for accessible classes. Improved error
9925         message.
9926         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9927         assigned to parameter list, fixed indentation. while loop changed
9928         into for loop, restore TREE_CHAIN on local `tem' before the next
9929         iteration.
9930
9931 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9932
9933         * lang.c (lang_get_alias_set): Deleted.
9934
9935 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9936
9937         * gjavah.c (jni_print_char): Fix thinko in last change.
9938
9939         * gjavah.c (jni_print_char, decode_signature_piece): Use
9940         safe-ctype macros and/or fold extra calls into fewer ones.
9941         * lex.c (java_read_unicode, java_lex): Likewise.
9942         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
9943         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
9944         * mangle_name.c (append_unicode_mangled_name,
9945         unicode_mangling_length): Likewise.
9946
9947 2001-10-17  Richard Henderson  <rth@redhat.com>
9948
9949         * Make-lang.in (java/lang.o): Depend on langhooks.h.
9950
9951 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
9952
9953         * lang.c (langhooks.h): Included.
9954         (LANG_HOOKS_INIT): Redefined.
9955         (LANG_HOOKS_INIT_OPTIONS): Likewise.
9956         (LANG_HOOKS_DECODE_OPTION): Likewise.
9957         (struct lang_hooks lang_hooks): New initialization.
9958
9959 2001-10-11  Per Bothner  <per@bothner.com>
9960
9961         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
9962         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
9963         The former is simpler, and jcf-write.c handles it better.
9964         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
9965         or WITH_CLEANUP_EXPR.
9966         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
9967         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
9968
9969         * parse.y (patch_if_else_statement):  If the condition is constant,
9970         optimize away the test.
9971
9972 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
9973
9974         * parse.y (patch_cast): Call patch_string on the first operand of
9975         the incoming node, update it if necessary. Fixes PR java/4510.
9976
9977 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9978
9979         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
9980         when name qualifier matches a package name.
9981
9982 2001-10-08  Tom Tromey  <tromey@redhat.com>
9983
9984         Fix for PR java/4489:
9985         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
9986         force a new label when computing `body_block'.
9987
9988 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9989
9990         * jcf-io.c (format_uint): Const-ify.
9991         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
9992         * lex.c (java_get_line_col): Likewise.
9993         * parse.y (build_incdec): Likewise.
9994
9995 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
9996
9997         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
9998         a NULL enclosing context if appropriate. Fixes PR java/4466.
9999
10000 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10001
10002         * parse.y (patch_assignment): Use lvalue's original TYPE when
10003         building the final COMPOUND_EXPR.
10004         (try_reference_assignconv): Fixed leading comment.
10005
10006 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10007
10008         * parse.y (check_final_variable_indirect_assignment): For
10009         COMPOUND_EXPR, return only if finals were found initialized
10010         properly, if not, keep on checking.
10011         (check_final_variable_global_assignment_flag): New local
10012         error_found, set when appropriate and used to decide whether to
10013         report uninitialized finals. Fixed typo in comment.
10014
10015 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10016
10017         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10018         last three initializations. Fixes PR java/4360.
10019
10020 2001-09-21  Richard Henderson  <rth@redhat.com>
10021
10022         * class.c (get_dispatch_table): Handle function descriptors.
10023         (build_dtable_decl): Likewise.
10024         * expr.c (build_invokevirtual): Likewise.
10025
10026 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10027
10028         * parse.y (patch_method_invocation): Build class initialization
10029         when static finals are used to qualify method invocation.
10030         Fixes PR java/4366.
10031
10032 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10033
10034         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10035         build_type_name_from_array_name.
10036         (STRING_STRIP_BRACKETS): New macro.
10037         * parse.y (build_type_name_from_array_name): New function.
10038         (array_creation_expression:): Accumulate []s instead of [s.
10039         (cast_expression:): Accumulate []s instead of [s after cast type
10040         name.
10041         (build_array_from_name): Local string deleted, use
10042         build_type_name_from_array_name.
10043         (build_unresolved_array_type): Accumulate []s instead of [s after
10044         type name.
10045         (register_fields): Fixed comment.
10046         (resolve_class): Local name, base deleted, new locals tname and
10047         array_dims. Use build_type_name_from_array_name. Use array_dims to
10048         build array type.
10049         (purify_type_name): Use STRING_STRIP_BRACKETS.
10050
10051 2001-09-18  Andreas Jaeger  <aj@suse.de>
10052
10053         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10054         * jv-scan.c: Likewise.
10055
10056 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10057
10058         * parse.y (patch_method_invocation): Inner class creation context
10059         check not enforced within constructors. Fixes PR java/1873.
10060
10061 2001-09-16  Tom Tromey  <tromey@redhat.com>
10062
10063         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10064         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10065
10066 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10067
10068         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10069         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10070         (struct lang_type): New fields import_list and import_demand_list.
10071         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10072         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10073         (do_resolve_class): New local saved_enclosing_type, initialized,
10074         passed as parameter to find_in_imports and find_in_imports_on_demand.
10075         (find_in_imports): Added paramater enclosing_type, use its
10076         TYPE_IMPORT_LIST when applicable.
10077         (find_in_imports_on_demand): Added parameter enclosing_type, use
10078         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10079         declaration and initialization.
10080         (fold_constant_for_init): Switch/restore current_class to the
10081         appropriate context.
10082
10083 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10084
10085         * verify.c (verify_jvm_instructions): Fix typo.
10086
10087 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10088
10089         * expr.c (expand_invoke): Const-ification.
10090         * parse.y (patch_method_invocation): Likewise.
10091
10092 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10093
10094         * gjavah.c (cxx_keywords): Const-ification.
10095         * keyword.gperf (java_keyword): Likewise.
10096         * lang.c (java_tree_code_name): Likewise.
10097         * lex.c (cxx_keywords): Likewise.
10098         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10099
10100 2001-09-11  Richard Henderson  <rth@redhat.com>
10101
10102         * parse.h (ctxp_for_generation): Mark extern.
10103
10104 2001-09-10  Richard Henderson  <rth@redhat.com>
10105
10106         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10107
10108 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10109
10110         * typeck.c (java_array_type_length, build_prim_array_type):
10111         Represent empty arrays by NULL index.
10112
10113 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10114
10115         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10116         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10117
10118 2001-09-06  Anthony Green  <green@redhat.com>
10119
10120         * class.c (O_BINARY): Define if necessary.
10121         (registerResource_libfunc): Declare.
10122         (init_class_processing): Initilize registerResource_libfunc.
10123         (compile_resource_file): New function.
10124         * java-tree.h (resource_name): Declare.
10125         (compile_resource_file): Declare.
10126         * jcf-parse.c (yyparse): Handle compiling java resource files.
10127         * lang.c (java_decode_option): Handle -fcompile-resource option.
10128         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10129         resource files.
10130         * gcj.texi (Code Generation): Add documentation for -R flag.
10131
10132 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10133
10134         * jcf-write.c (generate_classfile): Issue an error in case of
10135         field/initial value mismatch.
10136         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10137         being initialized and we're generating bytecode.
10138         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10139         set DECL_INITIAL properly when appropriate.
10140         Fixes PR java/4230
10141         Fixes PR java/4204
10142
10143 2001-09-01  Per Bothner  <per@bothner.com>
10144
10145         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10146         relevant.  All initializers except static final and constant require
10147         <clinit>, regardless of flag_emit_class_files.
10148
10149 2001-08-31  Per Bothner  <per@bothner.com>
10150
10151         * class.c (set_constant_value):  When not emitting class files, then a
10152         String ConstantValue is a utf8const_ptr_type.
10153
10154 2001-08-30  Per Bothner  <per@bothner.com>
10155
10156         * jcf-write.c (generate_classfile):  Check that field is primitive
10157         or string before emitting ConstantValue attribute.
10158
10159 2001-08-30  Per Bothner  <per@bothner.com>
10160
10161         * parse.y (resolve_qualified_expression_name):  If creating a
10162         COMPOUND_EXPR, set it's type correctly.
10163
10164 2001-08-30  Per Bothner  <per@bothner.com>
10165
10166         * jcf-io.c (open_class):  Set filename field.
10167
10168         * jcf-parse,c (parse_class_file):  Set current_function_decl
10169         for better error message when Code attribute is missing.
10170
10171         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10172         better diagnostics, especially for constructors.
10173
10174 2001-08-30  Per Bothner  <per@bothner.com>
10175
10176         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10177         attribute if field is not final, for compatibility with jdk.
10178
10179         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10180         to correct type.  Work-around for front-end bug.
10181         * class.c (set_constant_value):  Error if constant has wrong type.
10182
10183 2001-08-30  Per Bothner  <per@bothner.com>
10184
10185         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10186         "Double" are printed at verbosity 1.
10187
10188         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10189
10190         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10191
10192 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10193
10194         * parse.y (patch_assignment): Don't verify final re-assignment here.
10195         (java_complete_lhs): Verify assignments to finals calling
10196         patch_assignment. Verify re-assignments to finals before calling
10197         patch_assignment.
10198
10199 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10200
10201         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10202         Fixes PR java/1413
10203
10204 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10205
10206         * lex.c (java_lex): new local found_hex_digits. Set and then used
10207         in test to reject invalid hexadecimal numbers.
10208         * parse.y (java_complete_tree): Prevent unwanted cast with
10209         initialized floating point finals.
10210         (patch_binop): Emit a warning when detecting a division by zero,
10211         mark result not constant, don't simplify non integer division.
10212
10213 2001-08-28  Per Bothner  <per@bothner.com>
10214
10215         * jcf-write.c  (generate_bytecode_insns):  For increments and
10216         decrements just recurse to push constant.  Improvement on Mark's patch.
10217
10218 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10219
10220         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10221         real conversion for increments and decrements of reals.
10222
10223 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10224
10225         * parse.y (resolve_qualified_expression_name): Handle unresolved
10226         qualified expressions, prevent numerical qualifiers, fixed typo.
10227         Fixes PR java/4141
10228
10229 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10230
10231         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10232         don't report anything but deprecated class when marked so. Handle
10233         VAR_DECL.
10234         (patch_method_invocation): Check deprecation on methods and types.
10235         (patch_binop): code becomes an enum tree_code, added default: to
10236         switch to handle that. Detect division by zero, try to fold and
10237         return before using a subroutine.
10238
10239 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10240
10241         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10242         file smaller than 4 bytes.
10243         * parse.y (check_inner_circular_reference): New function.
10244         (check_circular_reference): Likewise.
10245         (array_initializer:): Accept {,}.
10246         (java_check_circular_reference): Rewritten using
10247         check_circular_reference and check_inner_circular_reference.
10248         (java_complete_expand_method): Unconditionally save and restore
10249         the unpurged exception list.
10250         (build_dot_class_method_invocation): Unmangle signature parameter.
10251
10252 2001-08-21  Tom Tromey  <tromey@redhat.com>
10253
10254         * decl.c (init_decl_processing): Add `throws' field to method
10255         descriptor.
10256         * class.c (make_method_value): Compute `throws' field for method.
10257
10258 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10259
10260         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10261         circularity is detected.
10262         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10263
10264 2001-08-17  Richard Henderson  <rth@redhat.com>
10265
10266         * class.c (emit_register_classes): Add align parameter to
10267         call to assemble_integer.
10268
10269 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10270
10271         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10272         loading a class_or_name fails, try considering an innerclass name
10273         and load the enclosing context.
10274         * parse.y (resolve_inner_class): New function.
10275         (find_as_inner_class): Added leading comment.
10276         (register_incomplete_type): Keep the current context as enclosing
10277         context for JDEP_FIELD dependencies.
10278         (do_resolve_class): Locals new_class_decl and super initialized to
10279         NULL. Call resolve_inner_class, explore the enclosing context
10280         superclass if necessary.
10281         Fixes PR java/4007
10282
10283 2001-08-16  Tom Tromey  <tromey@redhat.com>
10284
10285         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10286         * gjavah.c (main): Updated for change to jcf_path_seal.
10287         * lang.c (version_flag): New global.
10288         (java_decode_option): Recognize `-version'.
10289         (java_init): Update for change to jcf_path_seal.
10290         * jcf.h (jcf_path_seal): Added `print' argument.
10291         * jcf-path.c (jcf_path_seal): Added `print' argument.
10292
10293 2001-08-13  Zack Weinberg  <zackw@panix.com>
10294
10295         * Make-lang.in (java/decl.o): Update dependencies.
10296         * decl.c: Include libfuncs.h, don't include toplev.h.
10297
10298 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10299
10300         * decl.c (init_decl_processing): exception_type_node,
10301         class_not_found_type_node, and no_class_def_found_type_node
10302         initialized. predef_filenames augmented accordingly.
10303         instinit_identifier_node initialized.
10304         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10305         * java-tree.h (enum java_tree_index): New entries
10306         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10307         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10308         (exception_type_node): New macro.
10309         (class_not_found_type_node): Likewise.
10310         (no_class_def_found_type_node): Likewise.
10311         (instinit_identifier_node): Likewise.
10312         (PREDEF_FILENAMES_SIZE): Adjusted.
10313         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10314         (struct lang_type): Fixed typo in bitfield name.
10315         (DECL_INSTINIT_P): New macro.
10316         (ID_INSTINIT_P): Likewise.
10317         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10318         attribute.
10319         * parse.y (encapsulate_with_try_catch): New function.
10320         (generate_instinit): Likewise.
10321         (build_instinit_invocation): Likewise.
10322         (ctors_unchecked_throws_clause_p): Likewise.
10323         (add_instance_initializer): Deleted.
10324         (build_instance_initializer): Likewise.
10325         (in_instance_initializer): Likewise.
10326         (check_method_redefinition): instinit$ not to be verified.
10327         (java_complete_expand_methods): Generate instinit$, simplified code.
10328         (build_dot_class_method): Eliminated unnecessary locals. Use
10329         encapsulate_with_try_catch, removed unnecessary code.
10330         (fix_constructors): New local iii. Use build_instinit_invocation.
10331         (patch_method_invocation): Added comment.
10332         (maybe_use_access_method): Don't consider instinit$.
10333         (find_applicable_accessible_methods_list): Shorten the search for
10334         instinit$ too.
10335         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10336         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10337         (patch_throw_statement): Likewise. Fixed typo.
10338
10339 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
10340
10341         Revert:
10342         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10343         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10344         ASM_FINAL_SPEC.
10345         (lang_specific_pre_link): Use set_input to set input_filename.
10346         Append `main' here.
10347         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10348         (main): Fix definition.
10349         Strip `main' from classname.
10350         Fixes PR java/227.
10351
10352 2001-08-11  Zack Weinberg  <zackw@panix.com>
10353
10354         * lex.h: Don't include setjmp.h.  Don't define
10355         SET_FLOAT_HANDLER or prototype set_float_handler.
10356
10357 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10358
10359         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10360         `poplevel' in the right order.
10361
10362 2001-08-09  Richard Henderson  <rth@redhat.com>
10363
10364         * Make-lang.in (class.o): Depend on TARGET_H.
10365         * class.c (emit_register_classes): Use target hooks instead of
10366         assemble_constructor and assemble_destructor.
10367
10368 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
10369
10370         * check-init.c (flags.h): Include
10371         (check_init): Don't report uninitialized static class
10372         initialization flags, don't free bit index when doing static class
10373         initialization optimization.
10374         (check_for_initialization): Return type changed to `unsigned int.'
10375         (attach_initialized_static_class): New function.
10376         * class.c (add_method_1): Create the initialized static class
10377         table if necessary.
10378         (finish_class): Always emit deferred inline methods.
10379         * decl.c (emit_init_test_initialization): Moved to expr.c
10380         (complete_start_java_method): Don't traverse
10381         DECL_FUNCTION_INIT_TEST_TABLE.
10382         (lang_mark_tree): Mark hash tables in function decls.
10383         * expr.c (emit_init_test_initialization): Moved from decl.c.
10384         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10385         initialization flag, set DECL_CONTEXT and
10386         LOCAL_CLASS_INITIALIZATION_FLAG.
10387         (java_lang_expand_expr): Emit initialization code for static class
10388         initialized flags when entering block, if necessary.
10389         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10390         * java-tree.h (flag_optimize_sci): New global variable declaration.
10391         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10392         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10393         (LOCAL_FINAL_P): Fixed typo in comment.
10394         (FINAL_VARIABLE_P): Likewise.
10395         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10396         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10397         (struct lang_decl): New fields `ict', `smic' and `cif.'
10398         (check_for_initialization): New returned value for global.
10399         (attach_initialized_static_class): New global function.
10400         (STATIC_CLASS_INIT_OPT_P): New macro.
10401         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10402         * lang.c (java_decode_option): Handle
10403         `-fno-optimize-static-class-initialization'
10404         * parse.y (start_complete_expand_method): New function.
10405         (java_expand_method_bodies): Likewise.
10406         (attach_init_test_initialization_flags): Likewise.
10407         (adjust_init_test_initialization): Likewise.
10408         (emit_test_initialization): Likewise.
10409         (java_complete_expand_methods): Nullify abstract and native method
10410         bodies.
10411         (java_complete_expand_method): New locals `fbody', `block_body'
10412         and `exception_copy.' Reorganized: directly return on empty method
10413         bodies, call `start_complete_expand_method', remember definitely
10414         initialized static class in function, don't expand method bodies.
10415         (java_expand_classes): Call `java_expand_method_bodies' before
10416         `finish_class' when compiling to native.
10417         (resolve_expression_name): Use `orig' after building outer class
10418         field access.
10419         (patch_invoke): Remember static method invocations.
10420
10421 2001-08-06  Richard Henderson  <rth@redhat.com>
10422
10423         * class.c (emit_register_classes): Pass a symbol_ref and priority
10424         to assemble_constructor.
10425
10426 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
10427
10428         * java-tree.h (all_class_filename): New macro.
10429         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10430         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10431         newly created IDENTIFIER_NODE to `all_class_filename.'
10432
10433 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
10434
10435         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10436         Use ggc_add_tree_root to register roots.
10437
10438 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10439
10440         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10441         second operand calling check_init.
10442         * decl.c (complete_start_java_method): Swaped second and third
10443         arguments while creating WITH_CLEANUP_EXPR node.
10444         * jcf-write.c (generate_bytecode_insns): Use second operand
10445         instead of third when handling WITH_CLEANUP_EXPR.
10446         * parse.y (java_complete_lhs): Expand second operand of
10447         WITH_CLEANUP_EXPR nodes.
10448         (patch_synchronized_statement): Swaped second and third arguments
10449         while creating WITH_CLEANUP_EXPR node.
10450
10451 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
10452
10453         * parse.y (create_interface): Avoid cyclic inheritance report when
10454         syntax error encountered during class definition.
10455         Fixes PR java/2956
10456
10457 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10458
10459         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10460         ASM_FINAL_SPEC.
10461         (lang_specific_pre_link): Use set_input to set input_filename.
10462         Append `main' here.
10463         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10464         (main): Fix definition.
10465         Strip `main' from classname.
10466         Fixes PR java/227.
10467
10468 2001-07-18  Tom Tromey  <tromey@redhat.com>
10469
10470         For PR java/2812:
10471         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10472         * lex.c (java_new_lexer): Use ICONV_CONST.
10473         (java_read_char): Likewise.
10474         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10475         (jv-scan$(exeext)): Likewise.
10476
10477 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10478
10479         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10480         * parse.y (check_class_interface_creation): Allow `private' if the
10481         enclosing is not an interface.
10482         (create_interface): Interface tagged public if the enclosing
10483         context is an interface.
10484         (create_class): Class tagged public if the enclosing context
10485         is an interface.
10486         Fixes PR java/2959
10487
10488 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10489
10490         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10491         Fixes PR java/2665
10492
10493 2001-07-14  Tim Josling  <tej@melbpc.org.au>
10494
10495         * check-init.c (check_init): Remove references to EXPON_EXPR.
10496
10497 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10498
10499         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10500         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10501         Fixes PR java/3602
10502
10503 2001-07-13  Tom Tromey  <tromey@redhat.com>
10504
10505         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10506         invocation.
10507
10508 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10509
10510         * parse.y (patch_method_invocation): Don't override primary if one
10511         is already provided, but let this$<n> be built. Fixed comment.
10512
10513 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10514
10515         * parse.y (empty_statement:): Report empty statement error only
10516         when found at class declaration level.
10517         Fixes PR java/3635
10518
10519 2001-07-12  Tom Tromey  <tromey@redhat.com>
10520
10521         * expr.c (expand_load_internal): New function.
10522         (LOAD_INTERNAL): Use it.
10523
10524 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10525
10526         * parse.y (verify_constructor_super): Compare anonymous class ctor
10527         args with `valid_method_invocation_conversion_p.'
10528         Fixes PR java/3285
10529
10530 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10531
10532         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10533         `-fsyntax-only.' Fixes PR java/3248
10534
10535 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10536
10537         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10538
10539 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10540
10541         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10542         current function is static. Fixes PR java/1970
10543
10544 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10545
10546         * parse.y (patch_method_invocation): Add enclosing context to ctor
10547         calls if necessary. Fixes PR java/2953
10548
10549 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10550
10551         * parse.y (resolve_package): Abort if qualified expression member
10552         isn't right.
10553         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10554         Fixes PR java/1391
10555
10556 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10557
10558         * verify.c: Don't use // comments.
10559
10560 2001-07-05  Tom Tromey  <tromey@redhat.com>
10561
10562         * lang.c (flag_assume_compiled): Removed.
10563         * java-tree.h (flag_assume_compiled): Removed.
10564         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10565         -fhash-synchronization, -fuse-divide-subroutine,
10566         -fcheck-references, -femit-class-file, -femit-class-files,
10567         -fassume-compiled.  Updated --encoding information.  Changed
10568         -foutput-class-dir to `-d'.
10569
10570 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10571
10572         * jcf-parse.c (parse_class_file): Add lineno parameter to
10573         debug_start_source_file call.
10574
10575 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10576
10577         * gcj.texi: Use gpl.texi.
10578         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10579         dependencies and use doc/include in search path.
10580
10581 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10582
10583         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10584         `this'.  If so, don't build instance initializers.
10585
10586 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10587
10588         * parse.y (resolve_expression_name): Improved error message for
10589         inner class cases. Fixes PR java/1958
10590
10591 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10592
10593         * lang.c: #include diagnostic.h
10594         (lang_print_error): Add a `diagnostic_context *' parameter.
10595         (java_dummy_print): Likewise.
10596         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10597
10598 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10599
10600         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10601         * jcf.h (typedef struct JCF): New bitfield `finished.'
10602         (JCF_FINISH): Set `finished.'
10603         (JCF_ZERO): Reset `finished.'
10604         Fixes PR java/2633
10605
10606 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10607
10608         * parse.y (class_body_declaration:): Don't install empty instance
10609         initializers.
10610         Fixes PR java/1314
10611
10612 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10613
10614         * class.c (set_super_info): Call `set_class_decl_access_flags.'
10615         (set_class_decl_access_flags): New function.
10616         * java-tree.h (set_class_decl_access_flags): New prototype.
10617         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10618         (parse_class_file): New local `decl_max_locals.' Take wide types
10619         into account to compute DECL_MAX_LOCALS.
10620         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10621         imports on demand.
10622
10623 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
10624
10625         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10626
10627 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10628
10629         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10630         * parse.y (do_resolve_class): Moved comments out to leading comment
10631         section. Removed local `start', New local `_ht' and
10632         `circularity_hash.'  Record `enclosing' in hash table and search
10633         it to detect circularity.  Use `enclosing' as an argument to
10634         `lookup_cl.' Free the hash table when done.
10635
10636 2001-06-19  Tom Tromey  <tromey@redhat.com>
10637
10638         * lex.c (java_read_char): Disallow invalid and overlong
10639         sequences.  Fixes PR java/2319.
10640
10641 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
10642
10643         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10644
10645 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10646
10647         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10648         arguments accordingly.
10649
10650 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10651
10652         * gcj.texi: Move contents to just after title page.
10653
10654 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
10655
10656         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10657         builtin type.
10658         (patch_incomplete_class_ref): Build the class ref, build the class
10659         init if necessary, complete the tree.
10660         Fixes PR java/2605
10661
10662 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10663
10664         * parse.y (lookup_field_wrapper): Test `name' code.
10665         (resolve_qualified_expression_name): Test `qual_wfl' code.
10666         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10667         handle `qual_wfl' by code.
10668         (maybe_build_primttype_type_ref): Test `wfl' code.
10669
10670 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10671
10672         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10673         fdl.texi.
10674         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
10675         the dvi file in the java directory.
10676
10677 2001-05-25  Sam TH  <sam@uchicago.edu>
10678
10679         * gen-table.pl javaop.h jcf.h lex.h,
10680         parse.h: Fix header include guards.
10681
10682 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
10683
10684         * jv-scan.c (version): Update copyright year.
10685
10686 2001-05-21  Per Bothner  <per@bothner.com>
10687
10688         * jcf-parse.c (read_class):  If class is from .class or .zip file
10689         and it's already been read, don't push/pop parser context.
10690
10691 2001-05-18  Per Bothner  <per@bothner.com>
10692
10693         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
10694         command line so the jvgenmain-generated main program comes first.
10695
10696 2001-05-15  Tom Tromey  <tromey@redhat.com>
10697
10698         * class.c (build_utf8_ref): Don't generate identifier based on
10699         utf8const contents.
10700
10701 2001-05-12  Richard Henderson  <rth@redhat.com>
10702
10703         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10704         * expr.c (java_lang_expand_expr): Expand it.
10705         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10706         calling build_exception_object_ref.
10707         * parse.y (catch_clause_parameter): Likewise.
10708         (build_dot_class_method): Likewise.
10709         (try_reference_assignconv): Likewise.
10710         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10711         * jcf-write.c (generate_bytecode_insns): Likewise.
10712
10713 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10714
10715         * parse.y (build_unresolved_array_type): Set
10716         EXPR_WFL_QUALIFICATION on the newly created wfl.
10717         Fixes PR java/2538. Fixes PR java/2535.
10718
10719 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10720
10721         * parse.y (fix_constructors): Removed unnecessary assignment to
10722         local. Moved assignment to `this$<n>', fixed comments and
10723         indentation.
10724         (build_wfl_wrap): Fixed indentation.
10725         Fixes PR java/2598, java/2579 and java/2658.
10726
10727 2001-05-03  Mo DeJong  <mdejong@redhat.com>
10728
10729         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10730         check for byte swap.
10731
10732 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
10733
10734         * expr.c (build_class_init): Move MODIFY_EXPR
10735         outside of COND_EXPR.  Remove variable `call'.
10736
10737 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10738
10739         * decl.c: NULL_PTR -> NULL.
10740         * jcf-write.c: Likewise.
10741
10742 2001-05-01  Tom Tromey  <tromey@redhat.com>
10743
10744         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10745         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10746         * gcj.texi: Updated copyright text.  Include fdl.texi.
10747         (Top): Link to new node.
10748
10749 2001-05-01  Per Bothner  <per@bothner.com>
10750
10751         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
10752
10753 2001-05-01  Per Bothner  <per@bothner.com>
10754
10755         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
10756         import_list contains the name, not the TREE_PURPOSE.
10757
10758 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10759
10760         * jcf-io.c (read_zip_member): Cast to long in comparison with
10761         signed value.
10762
10763         * jvspec.c (lang_specific_driver): Initialize variables.
10764
10765         * mangle.c (find_compression_record_match): Likewise.
10766
10767         * typeck.c (build_null_signature): Provide static prototype.  Mark
10768         parameter with ATTRIBUTE_UNUSED.
10769
10770         * verify.c (verify_jvm_instructions): Initialize variable.
10771
10772 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10773
10774         * parse.y (do_resolve_class): Check for cyclic inheritance during
10775         inner class resolution.
10776
10777 2001-04-27  Per Bothner  <per@bothner.com>
10778
10779         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
10780         while iterating, since that could cause gc to lose stuff.
10781
10782 2001-04-26  Per Bothner  <per@bothner.com>
10783
10784         Fix method search wrt scope of inner classes to match JLS2.
10785         * typeck.c (build_null_signature):  New static function.
10786         (has_method):  New function.  Uses build_null_signature and lookup_do.
10787         * java-tree.h (has_method):  New declaration.
10788         * parse.y (find_applicable_accessible_methods_list):  Do not search
10789         context of inner classes here.
10790         (patch_method_invocation):  Search scope, ie. current and outer clases,
10791         for method matching simple name, to find class.
10792
10793 2001-04-26  Per Bothner  <per@bothner.com>
10794
10795         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10796         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
10797
10798         * constants.c (find_methodref_with_class_index):  New function.
10799         (find_methodref_index):  Use find_methodref_with_class_index.
10800         * java-tree.h (find_methodref_with_class_index):  New declaration.
10801         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
10802         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10803         If context changed from interface to class, don't use invokeinterface.
10804
10805 2001-04-25  Per Bothner  <per@bothner.com>
10806
10807         * verify.c (verify_jvm_instructions):  For field instructions,
10808         check that field index is valid.  For invoke instructions, check that
10809         method index is valid.
10810
10811 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
10812
10813         * config-lang.in (target_libs): Copy from $libgcj_saved.
10814
10815 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10816
10817         * decl.c (init_decl_processing): Add new class "protectionDomain"
10818         field.
10819         * class.c (make_class_data): Set initial value for "protectionDomain".
10820
10821 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10822
10823         * jvspec.c (lang_specific_driver): Fix memory allocation
10824         deficit, by using concat in lieu of xmalloc/sprintf.
10825
10826 2001-04-20  Per Bothner  <per@bothner.com>
10827
10828         Fixes to compile multiple .class files at once.
10829         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
10830         * java-tree.h (CLASS_PARSED_P):  New macro.
10831         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10832         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
10833         (read_class):  Avoid some code duplication.
10834         Don't call JCF_FINISH for a .class file - might be needed later.
10835         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
10836         rather than CLASS_LOADED_P, since latter implies class laid out.
10837         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
10838         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
10839
10840 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10841
10842         * Make-lang.in (java/boehm.o): Depend on toplev.h.
10843
10844         * boehm.c: Include toplev.h.
10845
10846 2001-04-06  Tom Tromey  <tromey@redhat.com>
10847             Alexandre Petit-Bianco  <apbianco@redhat.com>
10848
10849         Fix for PR gcj/1404 and PR gcj/2332:
10850         * parse.y (build_array_from_name): If we use the type_wfl then
10851         accumulate dimensions from the original type as well.
10852         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10853
10854 2001-04-06  Tom Tromey  <tromey@redhat.com>
10855
10856         * parse.y (analyze_clinit_body): Return true if the second operand
10857         of a METHOD_EXPR is nonzero.
10858
10859 2001-04-06  Tom Tromey  <tromey@redhat.com>
10860
10861         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10862         directory.
10863         ($(srcdir)/java/parse.c): Likewise.
10864
10865 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10866
10867         * gcj.texi: Use `which-gcj' instead of `which-g77.'
10868         (version-gcc): Initialized.
10869         (which-gcj): Likewise.
10870
10871 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10872
10873         * java-tree.h (struct lang_decl): New macro
10874         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10875         * parse.y (build_instance_initializer): New function.
10876         (add_instance_initializer): Use it.
10877         (java_fix_constructors): Set `current_class' before fix pass.
10878         (fix_constructors): Just return if already fixed. Move `super()'
10879         invocation ahead. Use `build_instance_initializer.'
10880         Fixes PR java/1315.
10881
10882 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10883
10884         * parse.y (resolve_qualified_expression_name): Pass field's
10885         DECL_CONTEXT to `not_accessible_p.'
10886         (not_accessible_p): Changed parameters order in `inherits_from_p'
10887         invocation.
10888
10889 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
10890
10891         * lang-options.h: Add flag_check_references.
10892
10893 2001-04-04  Per Bothner  <per@bothner.com>
10894
10895         * java-tree.h (CONSTANT_VALUE_P):  New macro.
10896         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
10897         * parse.y (maybe_build_class_init_for_field):  New static function.
10898         (resolve_expression_name, resolve_field_access):  Use
10899         maybe_build_class_init_for_field instead of build_class_init
10900         This does not do the init if the field is compile-time-constant.
10901         (resolve_field_access):  Simplify.
10902
10903         * parse.y (fold_constant_for_init):  Merge test into switch.
10904
10905 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
10906
10907         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10908         on gansidecl.h.
10909         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10910
10911 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
10912
10913         * expr.c (pop_type_0): Save the result of the first
10914         lang_printable_name call in a scratch buffer, so it
10915         won't be clobbered by the second call.
10916
10917 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10918
10919         * parse-scan.y (array_type:): Rewritten.
10920         (type_declaration:): `empty_statement' replaces `SC_TK.'
10921         (class_member_declaration:): `empty statement' added.
10922         (method_body:): Simplified.
10923         (static_initializer:): Likewise.
10924         (primary_no_new_array:): Use `type_literals.'
10925         (type_literals:): New rule.
10926         (dims:): Set and update `bracket_count.'
10927         Fixes PR java/1074. Fixes PR java/2412.
10928
10929 2001-03-28  Hans Boehm  <boehm@acm.org>
10930
10931         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10932         (get_boehm_type_descriptor): Set type on returned value to be a
10933         pointer length integer.
10934
10935 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10936
10937         * expr.c (pop_type_0): Call `concat' rather than building the
10938         string manually.
10939         (pop_type): Add format specifier in call to `error'.
10940
10941         * parse.y (patch_method_invocation): Avoid casting away
10942         const-ness.
10943
10944 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
10945
10946         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
10947
10948 2001-03-28  Richard Henderson  <rth@redhat.com>
10949
10950         IA-64 ABI Exception Handling:
10951         * Make-lang.in (except.o): Don't depend on eh-common.h.
10952         * check-init.c (check_init): Handle EXC_PTR_EXPR.
10953         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
10954         [soft_exceptioninfo_call_node]: Remove.
10955         [eh_personality_libfunc, lang_eh_runtime_type]: New.
10956         (end_java_method): No emit_handlers.
10957         * except.c (java_set_exception_lang_code): Remove.
10958         (method_init_exceptions): Don't call it.
10959         (prepare_eh_table_type): No CATCH_ALL_TYPE.
10960         (build_exception_object_ref): New.
10961         (expand_end_java_handler): Update for except.h name changes.
10962         (emit_handlers, expand_resume_after_catch): Remove.
10963         * expr.c (java_lang_expand_expr): Update for except.h name changes.
10964         (process_jvm_instruction): Use build_exception_object_ref.
10965         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
10966         (soft_exceptioninfo_call_node): Remove.
10967         (build_exception_object_ref): Declare.
10968         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
10969         soft_exceptioninfo_call_node.  Move processing ...
10970         [EXC_PTR_EXPR]: ... here.
10971         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
10972         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
10973         (source_end_java_method): No java_set_exception_lang_code or
10974         emit_handlers.
10975         (build_dot_class_method): Use build_exception_object_ref.
10976         (try_reference_assignconv): Check EXC_PTR_EXPR not
10977         soft_exceptioninfo_call_node.
10978
10979 2001-03-28  Richard Henderson  <rth@redhat.com>
10980
10981         * java-tree.h (throw_node): Define as a single member of
10982         java_global_trees instead of a separate array.
10983         (JTI_THROW_NODE): New.
10984         * decl.c (throw_node): Don't declare.
10985         (init_decl_processing): Init a scalar throw_node.
10986         Don't register it for gc.
10987         * check-init.c (check_init): Reference scalar throw_node.
10988         * expr.c (build_java_athrow): Likewise.
10989         * jcf-write.c (generate_bytecode_insns): Likewise.
10990         * parse.h (BUILD_THROW): Likewise.
10991
10992 2001-03-28  Richard Henderson  <rth@redhat.com>
10993
10994         * decl.c (end_java_method): Do not save and restore
10995         flag_non_call_exceptions.
10996         * parse.y (source_end_java_method): Likewise.
10997         * lang.c (flag_exceptions): Don't declare.
10998         (java_init_options): Set flag_non_call_exceptions.  Set
10999         flag_exceptions here ...
11000         (java_init): ... not here.
11001
11002 2001-03-27  Richard Henderson  <rth@redhat.com>
11003
11004         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11005         exceptions_via_longjmp.
11006
11007         * lang.c (flag_new_exceptions): Don't declare it.
11008         (java_init_options): Or set it.
11009
11010 2001-03-27  Richard Henderson  <rth@redhat.com>
11011
11012         * decl.c (end_java_method): Rename asynchronous_exceptions to
11013         flag_non_call_exceptions.
11014         * parse.y (source_end_java_method): Likewise.
11015
11016 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11017
11018         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11019
11020 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11021
11022         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11023
11024 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11025
11026         * parse.y (find_as_inner_class): Follow current package
11027         indications not to mistakingly load an unrelated class.
11028
11029 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11030
11031         * constants.c (PUTN): Use memcpy, not bcopy.
11032
11033         * lex.c (java_read_char): Use memmove, not bcopy.
11034
11035         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11036
11037 2001-03-23  Per Bothner  <per@bothner.com>
11038
11039         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11040         macro for better error pin-pointing.
11041         * java-tree.h:  Fix typo in comment.
11042
11043         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11044         Don't include jsr/goto in exception range.
11045         Check if start and end of exception range are the same (also TRY_EXPR).
11046         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11047         However, do emit the following goto even if try_block is empty.
11048         Defer freeing exception_decl until after the finalizer, to make
11049         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11050
11051         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11052         return the finally-clause and vice versa.
11053
11054 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11055
11056         * gcj.texi (Input Options): documented the check for attribute
11057         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11058         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11059         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11060         (jcf_parse): Check for the right classes archive if necessary.
11061         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11062         (jcf_parse_fields): Fixed indentation.
11063         * jcf-write.c (append_gcj_attribute): New function.
11064         (generate_classfile): Compute the attribute count, invoke
11065         `append_gcj_attribute'.
11066         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11067         turned into bit-fields. New bit-field `right_zip.'
11068         (JCF_ZERO): Set `right_zip' to zero.
11069         * lang-options.h (-fforce-classes-archive-check): Added flag.
11070         * lang.c (flag_force_classes_archive_check): New flag.
11071         (lang_f_options): New entry `force-classes-archive-check.'
11072         Fixes PR java/1213.
11073
11074 2001-02-07  Andrew Haley  <aph@redhat.com>
11075
11076         * gcj.texi (Configure-time Options): Add -fcheck-references.
11077         * expr.c (build_java_indirect_ref): New function.
11078         (java_check_reference): New function.
11079         (build_java_array_length_access): Use build_java_indirect_ref to
11080         check for null references.
11081         (build_java_arrayaccess): Likewise.
11082         (build_get_class): Likewise.
11083         (build_field_ref): Likewise.
11084         (invoke_build_dtable): Likewise.
11085         (build_invokeinterface): Likewise.
11086         * lang.c (lang_f_options): Add flag_check_references.
11087         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11088         * java-tree.h (flag_check_references): New variable.
11089         * lang.c (flag_check_references): Likewise.
11090         * parse.y (patch_invoke): Use java_check_reference.
11091         (patch_assignment): Allow for extra nesting in
11092         _Jv_CheckArrayStore.
11093
11094 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11095
11096         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11097         * lex.c (cxx_keywords): Likewise.
11098
11099 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11100
11101         * parse.y (qualify_ambiguous_name): Broaden `length'
11102         recognition. Help MODIFY_EXPR be resolved as expression names.
11103         Fixes PR java/2066. Fixes PR java/2400.
11104
11105 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11106
11107         * gjavah.c (process_file): Mark interface definitions with
11108         "__attribute__ ((java_interface))".
11109
11110 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11111
11112         * class.c (layout_class): Fixed push_super_field's second
11113         argument. Fixes PR java/2333.
11114         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11115         too early to lay innerclasses out.
11116
11117 2001-03-20  Tom Tromey  <tromey@redhat.com>
11118             Alexandre Petit-Bianco <apbianco@redhat.com>
11119
11120         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11121         inside an array reference. Insertion of the array store check
11122         rewritten. Fixes PR java/2299.
11123
11124 2001-03-20  Tom Tromey  <tromey@redhat.com>
11125
11126         * lex.c (java_read_unicode): Only accept leading `u's.
11127
11128 2001-03-20  Tom Tromey  <tromey@redhat.com>
11129
11130         * jcf-parse.c (read_class): Initialize `class'.
11131
11132 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11133
11134         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11135
11136 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11137
11138         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11139         (layout_class): Likewise.
11140         (layout_class_method): Likewise.
11141         (emit_register_classes): Likewise.
11142         * decl.c (builtin_function): Likewise.
11143         (give_name_to_locals): Likewise.
11144
11145 2001-03-19  Per Bothner  <per@bothner.com>
11146
11147         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11148         before trying to load an inner class.
11149
11150         Fixes to process to command-line .class files in two passes.
11151         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11152         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11153         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11154         * class.c (is_compiled_class):  Fix for renamed flag.
11155         * parse.y (maybe_create_class_interface_decl):  Likewise.
11156         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11157         * jcf-parse.c (read_class);  Read current_class.
11158         (jcf_parse):  Make static.
11159         (load_inner_classes):  New function, with code moved from jcf_parse,
11160         because we need to inner classes after the command-line files are read.
11161         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11162         Reduce use of main_jcf (basically only for archive) and
11163         use finput instead of main_jcf->read_state.
11164         Inline jcf_figure_file_type into yyparse.
11165         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11166         Defer load_inner_classes and parse_class_file to a second pass,
11167         after we've correctly mapped command-line .clas fiels to classes.
11168         (jcf_figure_file_type):  Removed.
11169         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11170         (JCF_ZERO):  Also clear zipd field.
11171         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11172
11173 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11174
11175         * jcf-parse.c (yyparse): Change ch from char * to char.
11176
11177 2001-03-19  Per Bothner  <per@bothner.com>
11178
11179         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11180         Add constructed filelist-file at end, following -xjava.  Thus any .o
11181         and library files are not affected by the -xjava.  Also wrap
11182         explicit @FILE with -xjava and -xnone.
11183
11184 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11185
11186         * class.c (build_static_field_ref): Call make_decl_rtl() after
11187         setting the DECL_EXTERNAL flag.
11188
11189 2001-03-17  Per Bothner  <per@bothner.com>
11190
11191         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11192
11193         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11194         when result is is needed (target is STACK_TARGET).
11195
11196         * parse.h (JDEP_SOLV):  Removed.
11197         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11198
11199         * parse.y (incomplete_class_list): Removed.
11200         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11201         It doesn't work if resolve_class changes the name of an array type
11202         that is on the list and then someone else looks for the modified name.
11203         Also, seems liable to break when compiling multiple source files at
11204         once.  So the simplest is to just remove incomplete_class_list -
11205         it is only a minor space win and it is not even clear it saves time.
11206
11207         * parse.y (resolve_class):  Remove unneeded promote_type.
11208
11209 2001-03-15  Per Bothner  <per@bothner.com>
11210
11211         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11212         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11213         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11214         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11215
11216         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11217         * parse.y (java_expand_classes):  Likewise.
11218
11219         * parse.y (expand_start_java_method):  Was only called once and had a
11220         misleading name, so inline in caller java_complete_expand_method.
11221         (enter_a_block):  Likewise inline in enter_block and remove.
11222
11223         Remove junk from when gcc/java was created (by copying from C/C++).
11224         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11225         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11226         more_cleanups_ok, have_cleanups (which have never been used).
11227         (pushlevel, poplevel):  Remove related useless code.
11228
11229         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11230         vtable for Class) should be external, except when compiling Class.
11231
11232         * jvspec.c (lang_specific_driver):  Fix -C handling.
11233         Check -save-temps to see if temp @FILE should be deleted.
11234         Follow-up to/fix for February 16 patch.
11235
11236         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11237         (type_stack_dup):  Remove no-longer neded error check.
11238
11239 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11240
11241         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11242         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11243         don't surround the element with 'N..E' if the type name is
11244         unqualified.
11245
11246 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11247
11248         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11249         DECL_RTL_SET_P, etc.
11250         (make_method_value): Likewise.
11251         (get_dispatch_table): Likewise.
11252
11253         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11254
11255 2001-03-07  Tom Tromey  <tromey@redhat.com>
11256
11257         * config-lang.in (lang_requires): Define.
11258
11259 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11260
11261         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11262         not flag_fast_math.
11263
11264 2001-03-05  Per Bothner  <per@bothner.com>
11265
11266         Fix a problem where rest_of_decl_compilation applied to
11267         class_dtable_decl causes problems because it was done too early,
11268         before output file was opened.
11269         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11270         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11271         (make_class_data):  Define class_dtable_decl.
11272         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11273
11274 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11275
11276         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11277         uses of 'boolean' with 'bool'.
11278
11279 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11280
11281         * lang-specs.h: Add zero initializer for cpp_spec field to all
11282         array elements.
11283
11284 2001-02-16  Per Bothner  <per@bothner.com>
11285
11286         Handle compiling multiple input files at once, and @FILE syntax.
11287         * gcj.texi:  Updated documentation to match.
11288         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11289         * jcf-parse.c (parse_source_file):  Split into ...
11290         (parse_source_file_1):  New function - and:
11291         (parse_source_file_2):  New function.
11292         (yyparse):  On -ffilelist-file, open and scan named file.
11293         On first pass over files, only do parse_source_file_1.
11294         A new second pass calls parse_source_file_2 for each file to compile.
11295         (init_jcf_parse):  Call init_src_parse.
11296         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11297         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11298         as multiple input file combined in one compilation.
11299         * lang-options.h:  Add -ffilelist-file
11300         * lang.c (flag_filelist_file):  New flag variable.
11301         (lang_f_options):  Handle -ffilelist-file.
11302         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11303         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11304         gclass_list - use global fields of src_parse_roots instead.
11305         * parse.y (src_parse_roots):  New array.
11306         (incomplete_class_list, gclass_list):  New macros.
11307         (push_parser_context, java_pop_parser_context,
11308         java_parser_context_resume):  Don't fiddle with deleted fields.
11309         (various):  Use incomplete_class gclass_list and global macros
11310         instead of parse_ctxt fields - the lists are global.
11311         (init_src_parse):  New function.
11312
11313 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11314
11315         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11316
11317 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11318
11319         * parse.y (check_inner_class_access): Moved declaration of local
11320         `enclosing_decl_type' to the right location.
11321
11322 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
11323
11324         * parse.y (parser_check_super_interface): Don't call
11325         check_pkg_class_access for an inner interface.
11326         (parser_check_super): Don't call check_pkg_class_access for inner
11327         class.
11328         (do_resolve_class): Simplify enclosing type loop. Don't call
11329         check_pkg_class_access if CL and DECL are not set.
11330         (find_in_imports_on_demand): Set DECL if class_type needed to be
11331         loaded. Don't call check_pkg_class_access for an inner class.
11332         (check_inner_class_access): Rewritten to implement member access
11333         rules as per spec 6.6.1.
11334         (check_pkg_class_access): Handle the empty package correctly.
11335         (in_same_package): New function. Determine if two classes are in the
11336         same package.
11337
11338 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
11339
11340         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11341         method into array types.
11342         * parse.y (patch_method_invocation): Bypass access check on clone call
11343         to array instance.
11344
11345 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
11346
11347         * expr.c (build_instanceof): Check for arrays when trying fold to
11348         false.
11349
11350 2001-02-15  Jim Meyering  <meyering@lucent.com>
11351
11352         * Make-lang.in (java.install-common): Depend on `installdirs'.
11353         (java.install-info): Likewise.
11354
11355 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
11356
11357         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11358
11359 2001-02-14  Tom Tromey  <tromey@redhat.com>
11360             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11361
11362         Fix for PR java/1261.
11363         * typeck.c (build_java_array_type): Add public `clone' method to
11364         arrays.
11365         * parse.y (resolve_qualified_expression_name): Use current_class
11366         when checking for inaccessibility.
11367         (patch_method_invocation): Fixed error message when accessibility
11368         denied.  Added `from_super' argument.
11369
11370 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11371
11372         * parse.y (resolve_class): Don't build a fake decl. Use the one
11373         already built.
11374         * typeck.c (build_java_array_type): Build and assign decl to array
11375         type.
11376
11377 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11378
11379         * parse.y (not_accessible_p): Changed leading comment. Added extra
11380         `where' argument. Use it to enforce protected access rules.
11381         (resolve_qualified_expression_name): Added extra argument to
11382         not_accessible_p.
11383         (patch_method_invocation): Use argument `primary' to provide
11384         not_accessible_p with an extra argument.
11385         (lookup_method_invoke): Added extra argument to not_accessible_p.
11386         (search_applicable_method_list): Likewise.
11387
11388 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11389
11390         * parse.y (resolve_qualified_expression_name): Try to resolve as
11391         an inner class access only if `decl' is a TYPE_DECL.
11392
11393 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11394
11395         * decl.c (classdollar_identifier_node): Initialize.
11396         * java-tree.h (enum java_tree_index): New entry
11397         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11398         (classdollar_identifier_node): New macro.
11399         (ID_CLASSDOLLAR_P): Likewise.
11400         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11401         (build_dot_class_method_invocation): Likewise.
11402         (find_applicable_accessible_methods_list): `class$' can't be
11403         inherited.
11404
11405 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
11406
11407         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11408
11409 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11410
11411         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11412         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11413         gone.
11414
11415 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11416
11417         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11418         outside of the `__U' sequence too.
11419         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11420         sequence too.
11421
11422 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11423
11424         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11425
11426 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11427
11428         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11429         (JVGENMAIN_OBJS): Likewise.
11430         * java-tree.h (append_gpp_mangled_name): New prototype.
11431         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11432         Removed cast calling `gcc_add_root.'
11433         * jvgenmain.c (mangle_obstack): New global, initialized.
11434         (main): Use it.
11435         (do_mangle_class): Constify local `ptr.'
11436         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11437         append_gpp_mangle_name and update `count' if necessary.
11438         Use `mangle_obstack.'
11439         * mangle.c (append_unicode_mangled_name): Removed.
11440         (append_gpp_mangled_name): Likewise.
11441         (unicode_mangling_length): Likewise.
11442         (mangle_member_name): Return type set to `void.'
11443         (mangle_field_decl): Don't append `U' in escaped names.
11444         (mangle_method_decl): Likewise.
11445         (mangle_member_name): Just use `append_gpp_mangled_name.'
11446         * mangle_name.c: New file.
11447
11448 2001-02-07  Per Bothner  <per@bothner.com>
11449
11450         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
11451
11452         * check-init.c (check_init):  Don't call done_alternative after
11453         processing loop code, as a LOOP_EXPR never terminates normally.
11454
11455 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11456
11457         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11458
11459 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11460
11461         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11462         DECLs.
11463
11464 2001-02-06  Tom Tromey  <tromey@redhat.com>
11465
11466         * lex.c (java_new_lexer): Longer error message.
11467
11468 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
11469             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11470
11471         * typeck.c (build_prim_array_type): Added leading comment.
11472         (build_java_array_type): Moved locals out of
11473         block. Always create the `data' field, fixed alignment to match
11474         C++.
11475
11476 2001-02-04  Tom Tromey  <tromey@redhat.com>
11477
11478         * expr.c (java_lang_expand_expr): Don't bother recomputing
11479         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
11480         Fixes PR java/1866.
11481
11482 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11483
11484         * parse.y (process_imports): Save the original name of the import
11485         for better error report.
11486
11487 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
11488
11489         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11490         of macros used when compiling jvspec.c.
11491         * jvspec.c (lang_specific_driver): Link with the shared
11492         libgcc by default.
11493
11494 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11495
11496         * check-init.c (check_init): Call internal_error instead of fatal.
11497         * expr.c (java_lang_expand_expr): Likewise.
11498         * jcf-parse.c (get_constant): Likewise.
11499         * mangle.c (java_mangle_decl): Likewise.
11500         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11501         (operator_string): Likewise.
11502         * check-init.c (check_init): Call abort instead of fatal.
11503         * class.c (build_class_ref): Likewise.
11504         * constants.c (write_constant_pool): Likewise.
11505         * decl.c (start_java_method): Likewise.
11506         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11507         (java_stack_dup, encode_newarray_type): Likewise.
11508         (build_java_array_length_access): Likewise.
11509         (build_java_check_indexed_type, expand_java_pushc): Likewise.
11510         (build_java_soft_divmod, build_invokeinterface): Likewise.
11511         * java-tree.h (INNER_CLASS_P): Likewise.
11512         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11513         (give_name_to_class, get_class_constant): Likewise.
11514         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11515         (find_constant_index, generate_bytecode_conditional): Likewise.
11516         (generate_bytecode_insns, perform_relocations): Likewise.
11517         * lex.c (java_unget_unicode, java_lex): Likewise.
11518         * mangle.c (mangle_type, mangle_record_type): Likewise.
11519         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11520         (finish_mangling): Likewise.
11521         * parse.h (MARK_FINAL_PARMS): Likewise.
11522         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11523         (obtain_incomplete_type, java_complete_class): Likewise.
11524         (java_check_regular_methods, java_complete_expand_method): Likewise.
11525         (cut_identifier_in_qualified, check_deprecation): Likewise.
11526         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11527         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11528         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11529         * typeck.c (set_local_type, parse_signature_type): Likewise.
11530         (parse_signature_string, build_java_signature): Likewise;
11531         (set_java_signature): Likewise.
11532         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11533         * class.c (add_method): Call fatal_error instead of fatal.
11534         (build_static_field_ref): Likewise.
11535         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11536         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11537         * lex.c (java_new_new_lexer): Likewise.
11538         * jv-scan.c (main): Likewise.
11539         (fatal_error): Renamed from fatal.
11540         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11541         pfatal_with_name.
11542         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11543         (yyparse): Likewise.
11544         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11545         * lex.c (java_get_line_col): Likewise.
11546         * jcf-parse.c (load_class): Make errors non-fatal.
11547         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11548
11549 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11550
11551         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11552         (error): Remove unused function.
11553         (main): Don't use "__attribute__ alias" on generated class symbol.
11554
11555 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11556
11557         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11558         argument.
11559         * parse.y (finish_method_declaration): Code accounting for WFLed
11560         method DECL_NAMEs deleted.
11561         (check_abstract_method_definitions): Likewise.
11562         (resolve_type_during_patch): Layout resolved type.
11563         * typeck.c (lookup_do): Removed unused local.
11564
11565 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11566
11567         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11568         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11569         integer_negative_one_node.
11570         * expr.c (build_java_binop): Likewise.
11571
11572 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11573
11574         * zextract.c (read_zip_archive): Read file_offset before writing
11575         zipd and consequently clobbering the header contents.
11576
11577 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11578
11579         * Make-lang.in: Remove all dependencies on defaults.h.
11580         * decl.c: Don't include defaults.h.
11581         * expr.c: Likewise.
11582         * parse.y: Likewise.
11583
11584 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11585
11586         * ChangeLog (2001-01-21): Fixed typo.
11587         * class.c (layout_class_method): Code accounting for WFLed
11588         method DECL_NAMEs deleted.
11589         * constant.c (find_methodref_index): Likewise.
11590         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11591         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11592         (struct lang_decl): New field `wfl'.
11593         (java_get_real_method_name): Prototype deleted.
11594         * mangle.c (mangle_method_decl): Code accounting for WFLed
11595         method DECL_NAMEs deleted.
11596         * parse.h (GET_METHOD_NAME): Macro deleted.
11597         * parse.y (reset_method_name): Deleted.
11598         (method_header): Set DECL_FUNCTION_WFL.
11599         (check_abstract_method_header): Code accounting for WFLed method
11600         DECL_NAMEs deleted.
11601         (java_get_real_method_name): Deleted.
11602         (check_method_redefinition): Code accounting for WFLed method
11603         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11604         (java_check_regular_methods): Likewise.
11605         (java_check_abstract_methods): Likewise.
11606         (java_expand_classes): Don't call `reset_method_name.'
11607         (search_applicable_method_list): Use DECL_NAMEs instead of
11608         GET_METHOD_NAME.
11609         * typeck.c (lookup_do): Code accounting for WFLed method
11610         DECL_NAMEs deleted.
11611
11612 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
11613
11614         * lex.c (java_read_char): Check for EOF from getc first.
11615
11616 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11617
11618         * class.c (layout_class): Don't lay the superclass out if it's
11619         already being laid out.
11620         * jcf-parse.c (handle_innerclass_attribute): New function.
11621         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11622         handle_innerclasses_attribute.
11623         (jcf_parse): Don't load an innerclasses if it's already being
11624         laid out.
11625         * jcf-write.c (append_innerclass_attribute_entry): Static
11626         `anonymous_name' and its initialization deleted. `ocii' and `ini'
11627         to be zero for anonymous classes.
11628
11629 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11630
11631         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11632         necessary.
11633         * jcf-parse.c (set_source_filename): Use
11634         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11635
11636 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11637
11638         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11639         gets a unique asm name.
11640
11641 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11642
11643         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11644         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11645         if necessary.
11646         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11647         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11648         * parse.y (lookup_package_type_and_set_next): Deleted.
11649         (resolve_package): Removed unnecessary code.
11650         (find_applicable_accessible_methods_list): `finit$' can't be
11651         inherited.
11652         * verify.c (pop_argument_types): Added missing prototype.
11653
11654 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
11655
11656         * config-lang.in: Disable java by default.
11657
11658 2001-01-23  Tom Tromey  <tromey@redhat.com>
11659
11660         * gcj.texi (Copying): New node.
11661         Added copyright information.
11662
11663 2001-01-21  Per Bothner  <per@bothner.com>
11664
11665         Various fixes to allow compiling a compressed .jar/.zip archive.
11666         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
11667         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
11668         (struct ZipDirectory):  New field zipf points to owning ZipFile.
11669         * jcf.h (struct ZipDirectory):  Add forward declaration.
11670         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
11671         Remove seen_in_zip and zip_offset fields.
11672         (JCF_SEEN_IN_ZIP):  New macro.
11673         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
11674         * jcf-io.c:  Change all ZipFileCache to ZipFile.
11675         (read_zip_member):  New function.
11676         (open_in_zip):  Call read_zip_member.
11677         * jcf-parse.c (find_in_current_zip):  Remove function.
11678         (read_class):  Merge in find_in_current_zip functionality.
11679         Call read_zip_member if needed.
11680         (parse_zip_file_entries):  Use read_zip_member.
11681         (process_zip_dir):  Update for removed and added JCF fields.
11682         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
11683
11684 2001-01-21  Per Bothner  <per@bothner.com>
11685
11686         Minor optimization of static ggc roots.
11687         * jcf-parse.c (parse_roots):  New static field.
11688         (current_field, current_method, current_file_list):  Replace by macros
11689         naming fields of parse_roots.
11690         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
11691         * class.c (class_roots):  New static field.
11692         (registered_class, fields_ident, info_ident, class_list):
11693         New macros naming fields of parse_roots.
11694         (build_static_field_ref):  Don't register roots here.
11695         (layout_class):  Static field list replaced by macro class_list.
11696         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
11697         Initialize fields_ident and info_ident here.
11698
11699 2001-01-21  Per Bothner  <per@bothner.com>
11700
11701         * jcf-parse.c (ggc_mark_jcf):  New function.
11702         (init_jcf_parse):  Register current_jcf as ggc root.
11703
11704 2001-01-21  Per Bothner  <per@bothner.com>
11705
11706         * lang.c (put_decl_node):  Print method's name.
11707
11708 2001-01-21  Per Bothner  <per@bothner.com>
11709
11710         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
11711         (verify_jvm_instructions):  Use it, for better error messages on loads.
11712
11713 2001-01-21  Per Bothner  <per@bothner.com>
11714
11715         * verify.c (merge_type_state):  Still may have to merge even if
11716         LABEL_VERIFIED (label).
11717
11718 2001-01-21  Per Bothner  <per@bothner.com>
11719
11720         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
11721         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11722
11723 2001-01-19  Per Bothner  <per@bothner.com>
11724
11725         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
11726         if expeting an interface type.  Refines Tom's change of 2000-09-12.
11727
11728 2001-01-18  Per Bothner  <per@bothner.com>
11729
11730         * gcj.texi (Input Options): Mention .java files.
11731
11732 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11733
11734         * lang-options.h (-Wunsupported-jdk11): Removed.
11735         * lang.c (flag_not_overriding): Deleted.
11736         (flag_static_local_jdk1_1): Likewise.
11737         (lang_W_options): Removed "unsupported-jdk11" entry.
11738         * parse.y (java_check_methods): Removed dead code.
11739
11740 2001-01-17  Tom Tromey  <tromey@redhat.com>
11741
11742         Changes suggested by Per Bothner:
11743         * gcj.texi (Input Options): Don't mention input files.
11744         (Code Generation): Updated --main information.
11745         (Invoking jcf-dump): Mention that --javap is incomplete.
11746         From Alexandre Petit-Bianco:
11747         (Warnings): Don't mention -Wunsupported-jdk11.
11748         My stuff:
11749         (Compatibility): Mention JDK 1.2-ness of libraries.
11750         (Resources): Mention resources used when writing gcj.
11751
11752 2001-01-17  Tom Tromey  <tromey@redhat.com>
11753
11754         * gcj.texi: New file.
11755         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11756         (java.info): Depend on gcj.info.
11757         (java/gcj.dvi): New target.
11758         (java.dvi): Depend on gcj.dvi.
11759         (java.install-info): Wrote.
11760
11761 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
11762
11763         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11764         having called make_decl_rtl.
11765
11766 2001-01-14  Per Bothner  <per@bothner.com>
11767
11768         Various patches to emit better messages on verification errors.
11769         * expr.c (push_type_0):  Return error indication on stack overflow,
11770         instead of callinfg fatal.
11771         (push_type):  Now just call push_type_0 (nd fatal on overflow).
11772         (pop_type_0):  Return detailed error message (in a char** argument).
11773         (pop_type):  If pop_type_0 fails, print error message.
11774         (pop_argument_types):  Moved to verify.c.
11775         * verify.c (pop_argument_types):  Moved from expr.c.
11776         Return a (possible) error message, rather than void.
11777         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
11778         (verify_jvm_instruction):  Use new macros, improving error messages.
11779         For case OPCODE_astore use object_ptr_type_node.
11780         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
11781         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
11782
11783         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11784         constant, return body without wrapper.  (Improves constant folding.)
11785         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
11786
11787 2001-01-13  Per Bothner  <per@bothner.com>
11788
11789         * expr.c (expand_java_field_op):  Assigning to a final field outside
11790         an initializer does not violate JVM spec, so should be warning, not
11791         error.  (Sun's verifier does not complain - though MicroSoft's does.)
11792
11793 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
11794
11795         * gjavah.c (version), jcf-dump.c (version): Update copyright year
11796         to 2001.
11797
11798 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
11799
11800         * parse.y (resolve_expression_name): Permit instance variables from
11801         enclosing context in super constructor call.
11802         (resolve_qualified_expression_name): Permit enclosing class's qualified
11803         "this" in super constructor call.
11804
11805 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11806
11807         * class.c (build_utf8_ref): Remove last argument in call to
11808         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11809         (build_class_ref): Likewise.
11810         (build_static_field_ref): Likewise.
11811         (get_dispatch_table): Likewise.
11812         (layout_class_method): Likewise.
11813         (emit_register_classes): Likewise.
11814         * constants.c (build_constant_data_ref): Likewise.
11815         * decl.c (builtin_function): Likewise.
11816         (create_primitive_vtable): Likewise.
11817         * expr.c (build_known_method_def): Likewise.
11818         (build_jni_stub): Likewise.
11819         (java_lang_expand_expr): Likewise.
11820
11821 2001-01-10  Tom Tromey  <tromey@redhat.com>
11822
11823         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11824
11825 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11826
11827         * java-tree.h (lang_printable_name_wls): New prototype.
11828         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11829         rather than `current_class' to print type name. Don't prepend type
11830         names when printing constructor names.
11831         (lang_printable_name_wls): New function.
11832         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11833         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11834         * parse.y (patch_method_invocation): Message tuned for constructors.
11835         (not_accessible_p): Grant `private' access from within
11836         enclosing contexts.
11837
11838 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11839
11840         All files with updated copyright when applicable.
11841         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11842         * class.c (mangle_class_field): Function removed.
11843         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11844         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11845         (build_class_ref): Call `java_mangle_class_field' instead of
11846         `mangle_class_field.'
11847         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11848         (layout_class): Call `java_mangle_decl' instead of
11849         `mangle_static_field.'
11850         (cxx_keywords): Initialized static array moved to `lex.c.'
11851         (layout_class_method): Changed leading comment. Simplified to
11852         call `java_mangle_decl.' Local `ptr' moved in for loop body.
11853         * decl.c (lang_mark_tree): Mark field `package_list.'
11854         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11855         (struct lang_type): New field `package_list.'
11856         (unicode_mangling_length): Prototype removed.
11857         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11858         emit_unicode_mangled_name): Likewise.
11859         (cxx_keyword_p): New prototype.
11860         (java_mangle_decl, java_mangle_class_field,
11861         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11862         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11863         `build_expr_wfl.'
11864         * jvgenmain.c (main_method_prefix): Global variable removed.
11865         (main_method_suffix): Likewise.
11866         (do_mangle_classname): New function.
11867         (main): Call it. Format changed to accommodate new mangling scheme.
11868         * lex.c: (utf8_cmp): Conditionally prototyped.
11869         (cxx_keywords): Moved from class.c, conditionally defined.
11870         (utf8_cmp, cxx_keyword_p): Likewise.
11871         * mangle.c (obstack.h, ggc.h): Included.
11872         (mangle_field_decl): New function.
11873         (mangle_method_decl, mangle_type, mangle_pointer_type,
11874         mangle_array_type, mangle_record_type,
11875         find_compression_pointer_match, find_compression_array_match,
11876         find_compression_record_match,
11877         find_compression_array_template_match, set_type_package_list,
11878         entry_match_pointer_p, emit_compression_string, init_mangling,
11879         finish_mangling, compression_table_add, mangle_member_name): Likewise.
11880         (mangle_obstack): New global.
11881         (MANGLE_RAW_STRING): New macro.
11882         (unicode_mangling_length): Turned static.
11883         (append_unicode_mangled_name): Renamed from
11884         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
11885         replaces `obstack', removed from the parameter list.
11886         (append_gpp_mangled_name): Turned static. `mangle_obstack'
11887         replaces parameter `obstack', removed from the parameter list. Call
11888         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11889         (append_gpp_mangled_classtype): Removed.
11890         (compression_table, compression_next): New static variables.
11891         * parse.y (temporary_obstack): Extern declaration removed.
11892
11893 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11894
11895         * parse.y (patch_binop): Compute missing type in error situations.
11896
11897 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11898
11899         * class.c (make_class_data): Push initial value for "arrayclass".
11900         * decl.c (init_decl_processing): Add new class field "arrayclass".
11901
11902 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11903
11904         From patha@softlab.ericsson.se:
11905         * parse.y (switch_label): Use build, not build1, to construct
11906         DEFAULT_EXPR.
11907
11908 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
11909
11910         * lang.c (lang_decode_option): Change -MA to -MP.
11911         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11912         Update to new prototype; do quote targets.
11913         (jcf_dependency_write): Update.
11914
11915 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
11916
11917         Shorten primitive array allocation path:
11918         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11919         to create new primitive arrays.
11920         * expr.c (build_newarray): If generating native code, call
11921         soft_newarray_node with a reference to the primitive TYPE identifier
11922         instead of type_value.
11923
11924 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
11925
11926         Fix for PRs gcj/312 and gcj/253:
11927         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11928         dest if they arn't already.
11929         * class.c (layout_class): Call maybe_layout_super_class on
11930         superinterfaces also, but only if compiling from bytecode.
11931
11932         Fix for PR gcj/373:
11933         * parse.y (create_class): Set ACC_STATIC if class is declared in an
11934         interface.
11935
11936 2000-12-15  Tom Tromey  <tromey@redhat.com>
11937
11938         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11939         set.
11940
11941 2000-12-14  Andrew Haley  <aph@redhat.com>
11942
11943         * boehm.c (mark_reference_fields): Change test to correctly detect
11944         bitmap overflow.
11945
11946 2000-12-15  Andreas Jaeger  <aj@suse.de>
11947
11948         * config-lang.in (lang_dirs): Added.
11949
11950 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11951
11952         * parse.y (end_artificial_method_body): Fixed undefined behavior.
11953         Credits go to rth for finding it.
11954
11955 2000-12-13  Mike Stump  <mrs@wrs.com>
11956
11957         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
11958
11959 2000-11-07  Tom Tromey  <tromey@cygnus.com>
11960
11961         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
11962         * lex.c (java_ignorable_control_p): Removed.
11963         (java_letter_or_digit_p): Removed.
11964         (java_start_char_p): New function.
11965         (java_read_char): Return `int', not `unicode_t'.  Changed
11966         callers.
11967         (java_read_unicode): Likewise.
11968         (java_read_unicode_collapsing_terminators): Likewise.
11969         (java_get_unicode): Likewise.
11970         (java_new_lexer): Initialize hit_eof.
11971         (java_parse_end_comment): Take `int' argument.
11972         (java_parse_doc_section): Likewise.
11973         (java_parse_escape_sequence): Don't allow backlash-newline.
11974         Return `int'.
11975         * lex.h (JAVA_DIGIT_P): Removed.
11976         (_JAVA_LETTER_OR_DIGIT_P): Removed.
11977         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
11978         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
11979         (JAVA_PART_CHAR_P): New macro.
11980         (UEOF): Now -1.
11981         (JAVA_CHAR_ERROR): Now -2.
11982         (java_lexer): New field `hit_eof'.
11983         * chartables.h: New file.
11984         * gen-table.pl: new file.
11985
11986 2000-11-20  Tom Tromey  <tromey@cygnus.com>
11987             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11988
11989         * parse.y (java_complete_lhs): Only allow compound assignment of
11990         reference type if type is String.
11991
11992 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11993
11994         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
11995         jcf-path.c: Likewise.
11996
11997 2000-12-09  Anthony Green  <green@redhat.com>
11998
11999         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12000         filestart and filename_length as int values.
12001
12002 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12003
12004         * jcf-io.c (find_class): Correct the logic that tests to see if a
12005         .java file is newer than its .class file. The compiler was
12006         incorrectly printing a warning when file mod times were equal.
12007
12008 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12009
12010         * jvgenmain.c: Use ISPRINT not isascii.
12011
12012 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12013
12014         * parse.y (end_artificial_method_body): Fixed typo.
12015
12016 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12017
12018         * parse.y (patch_method_invocation): Pick the correct enclosing
12019         context when creating inner class instances.
12020         Fixes gcj/332.
12021
12022 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12023
12024         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12025         Update copyright year to 2000.
12026
12027 2000-11-23  Anthony Green  <green@redhat.com>
12028
12029         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12030         Move current_file_list out of yyparse and make it static.
12031
12032         * expr.c: Declare quick_stack and tree_list_free_list as static
12033         (init_expr_processing): Register quick_stack and
12034         tree_list_free_list roots.
12035
12036 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12037
12038         * parse.y (build_outer_field_access): New local `decl_ctx', use
12039         it. Check for field's context and current class immediate outer
12040         context inheritance.
12041         (outer_field_access_p): Consider fields inherited from the last
12042         enclosing context.
12043         (build_access_to_thisn): Stop at the last enclosing context if
12044         necessary.
12045         Fixes gcj/367.
12046
12047 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12048
12049         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12050
12051 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12052
12053         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12054         scratch buffer.
12055
12056 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12057
12058         * jv-scan.c (help): Document --complexity.
12059         (options): Added --complexity.
12060         (flag_complexity): New global.
12061         (main): Call `report'.
12062         * parse-scan.y (complexity): New global.
12063         (if_then_statement, if_then_else_statement,
12064         if_then_else_statement_nsi, switch_block_statement_group,
12065         while_expression, do_statement, for_begin, continue_statement,
12066         throw_statement, catch_clause, finally, method_invocation,
12067         conditional_and_expression, conditional_or_expression,
12068         conditional_expression): Update complexity.
12069         (reset_report): Reset complexity.
12070         (report): New function.
12071
12072 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12073
12074         * lex.c (yylex): Added STRICT_TK case.
12075         * parse.y (STRICT_TK): Added.
12076         * parse-scan.y (STRICT_TK): Added.
12077         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12078         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12079         file.
12080         * keyword.h: Rebuilt.
12081         * keyword.gperf (strictfp): Added.
12082
12083 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12084
12085         * lex.c (yylex): Recognize floating point constants with leading
12086         0.
12087
12088 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12089
12090         * java-tree.h (cyclic_inheritance_report): Constify.
12091         * parse.y (cyclic_inheritance_report): Likewise.
12092
12093 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12094
12095         * parse.y (goal): Remove call to ggc_add_string_root.
12096
12097 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12098
12099         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12100         Create string in scratch buffer, then pass to build_string.
12101
12102 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12103
12104         * parse.y (issue_warning_error_from_context): Add
12105         ATTRIBUTE_PRINTF.
12106
12107 2000-11-11  Anthony Green  <green@redhat.com>
12108
12109         * jcf-parse.c (process_zip_dir): Add finput parameter.
12110         (jcf_figure_file_type): Call process_zip_dir with appropriate
12111         argument.
12112
12113 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12114
12115         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12116         * jcf-parse.c (jcf_figure_file_type): Likewise.
12117
12118 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12119
12120         * parse.y (create_new_parser_context): Use memset () instead of
12121         bzero ().
12122
12123 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12124
12125         * gjavah.c (process_file): Only include gcj/cni.h when generating
12126         CNI stubs.
12127
12128 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12129
12130         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12131         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12132         instead of bzero ().
12133
12134 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12135
12136         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12137         * lex.c (IS_ZERO): New define.
12138         (java_perform_atof): Error on floating point underflow.
12139
12140 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12141
12142         * lex.c (java_parse_escape_sequence): Only read two octal
12143         characters if the first one is greater than 3.  Don't allow
12144         "octal" numbers to include the digits 8 or 9.
12145
12146 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12147
12148         * Make-lang.in (java.distdir): Remove.
12149
12150 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12151
12152         * Make-lang.in (java.dvi): New target.
12153         Partial fix for PR other/567.
12154
12155         * lang-options.h: Mention -Wout-of-date.
12156         * jcf-dump.c (flag_newer): New global.
12157         * gjavah.c (flag_newer): New global.
12158         * jcf-io.c (find_class): Only warn when flag_newer set.
12159         * lang.c (flag_newer): New global.
12160         (struct string_option): New declaration.
12161         (lang_W_options): New global.
12162         (process_option_with_no): New function.
12163         (lang_decode_option): Use it.
12164
12165         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12166         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12167         `$'.
12168
12169         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12170         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12171         * lex.c (java_read_unicode): Removed `term_context' argument.
12172         Recognize any number of `u' in `\u'.
12173         (java_read_unicode_collapsing_terminators): New function.
12174         (java_get_unicode): Use it.
12175         (java_lineterminator): Removed.
12176         (yylex): Produce error if character literal is newline or single
12177         quote.  Return if eof found in middle of `//' comment.  EOF in
12178         `//' comment is only an error if pedantic.
12179         (java_ignorable_control_p): New function.
12180         (java_parse_end_comment): Return if eof found in middle of
12181         comment.
12182         Include flags.h.
12183         * jv-scan.c (pedantic): New global.
12184
12185 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12186
12187         * parse.y (outer_field_access_p): Inherited fields aren't
12188         consider outer fields.
12189         (maybe_build_thisn_access_method): Use
12190         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12191         (resolve_expression_name): Trigger an error if a static field
12192         is being accessed as an outer field.
12193
12194 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12195
12196         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12197         Fixes gcj/365.
12198
12199 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12200
12201         * Make-lang.in: Move all build rules here from Makefile.in,
12202         adapt to new context.  Wrap all rules that change the current
12203         directory in parentheses.  Expunge all references to $(P).
12204         When one command depends on another and they're run all at
12205         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12206         all object-file generation rules.  Delete obsolete variables.
12207
12208         * Makefile.in: Delete.
12209         * config-lang.in: Delete outputs= line.
12210
12211 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12212
12213         * parse.y (patch_method_invocation): NULLify this_arg when already
12214         inserted.
12215         (maybe_use_access_method): Handle call to methods unrelated to the
12216         current class. Fixed comment.
12217         Fixes gcj/361.
12218
12219 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12220
12221         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12222         scope.
12223
12224 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12225
12226         * lex.c (java_new_lexer): Initialize new fields.  Work around
12227         broken iconv() implementations.
12228         (java_read_char): Swap bytes if required.  Use fallback decoder if
12229         required.
12230         (byteswap_init, need_byteswap): New globals.
12231         (java_destroy_lexer): Only close iconv handle if it is in use.
12232         * lex.h (java_lexer): New fields read_anything, byte_swap,
12233         use_fallback.
12234         Made out_buffer unsigned.
12235
12236 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12237
12238         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12239         where an enclosing context can be set on the jdep.
12240         (do_resolve_class): Fixed identation.
12241
12242 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12243
12244         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12245
12246         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12247         when requested.
12248
12249         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12250
12251         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12252
12253 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12254
12255         * jcf-write.c (OP1): Update `last_bc'.
12256         (struct jcf_block): Fixed indentation and typo in comments.  New
12257         field `last_bc'.
12258         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12259         follows `monitorenter'.
12260         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12261         `patch_string'.
12262         Fixes gcj/232.
12263
12264 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12265
12266         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12267         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12268         * lang-options.h: Added -MA, -MT, -MF..
12269         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12270         (DEPEND_TARGET_SET): New macro.
12271         (DEPEND_FILE_ALREADY_SET): Likewise.
12272         (init_parse): Handle new flags.
12273         * jcf.h (jcf_dependency_print_dummies): Declare.
12274         * Make-lang.in (s-java): Added mkdeps.o.
12275         * Makefile.in (BACKEND): Added mkdeps.o.
12276         (../gcjh$(exeext)): Added mkdeps.o.
12277         (../jcf-dump$(exeext)): Added mkdeps.o.
12278         * jcf-depend.c: Include mkdeps.h.
12279         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12280         add_entry): Removed.
12281         (jcf_dependency_reset): Rewrote.
12282         (dependencies): New global.
12283         (jcf_dependency_set_target): Rewrote.
12284         (jcf_dependency_add_target): Likewise.
12285         (jcf_dependency_add_file): Likewise.
12286         (munge): Removed.
12287         (print_ents): Removed.
12288         (jcf_dependency_write): Rewrote.
12289         (print_dummies): New global.
12290         (jcf_dependency_print_dummies): New function
12291         (jcf_dependency_write): Call deps_dummy_targets if required.
12292
12293 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12294
12295         * gjavah.c (add_class_decl): Removed unused variables `tname',
12296         `tlen' and `name_index'.
12297         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12298         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12299         in `wfl_operator' with value.
12300         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12301         (jcf_figure_file_type): Fixed identation.
12302         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12303         * parse.y (analyze_clinit_body): New function.
12304         (static_initializer:): Reset `current_static_block'.
12305         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12306         `wfl_operator' with new value.
12307         (lookup_cl): Use EXPR_WFL_FILENAME.
12308         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12309         analyze_clinit_body.
12310         (build_outer_field_access): Access to this$<n> built from
12311         current_class, not its outer context.
12312         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12313         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12314         (patch_method_invocation): Use `is_static_flag' when already
12315         initialized.
12316         (patch_newarray): Removed assignment in ternary operator.
12317
12318 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12319
12320         * except.c (free_eh_ranges): Don't free `whole_range'.
12321
12322 2000-10-15  Anthony Green  <green@redhat.com>
12323
12324         * decl.c (init_decl_processing): Call init_class_processing before
12325         anything else.
12326
12327 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12328
12329         * check-init.c (check_init): Fixed leading comment. Use
12330         LOCAL_FINAL_P.
12331         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12332         (give_name_to_locals): Likewise.
12333         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12334         fields in lang_decl_var.
12335         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12336         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12337         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12338         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12339         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12340         (LOCAL_FINAL): Rewritten.
12341         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12342         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12343         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12344         `init_final' fields.
12345         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12346         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12347         (TYPE_HAS_FINAL_VARIABLE): New macro.
12348         (struct lang_type): Added `afv' field.
12349         * parse.y (check_static_final_variable_assignment_flag): New function.
12350         (reset_static_final_variable_assignment_flag): Likewise.
12351         (check_final_variable_local_assignment_flag): Likewise.
12352         (reset_final_variable_local_assignment_flag): Likewise.
12353         (check_final_variable_indirect_assignment): Likewise.
12354         (check_final_variable_global_assignment_flag): Likewise.
12355         (add_inner_class_fields): Use LOCAL_FINAL_P.
12356         (register_fields): Handle local finals and final variables.
12357         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12358         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12359         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12360         on local finals.
12361         (java_complete_expand_methods): Loop to set
12362         TYPE_HAS_FINAL_VARIABLE. Call
12363         `reset_final_variable_local_assignment_flag' and
12364         `check_final_variable_local_assignment_flag' accordingly before
12365         and after constructor expansion. Call
12366         `reset_static_final_variable_assignment_flag'
12367         before expanding <clinit> and after call
12368         `check_static_final_variable_assignment_flag' if the
12369         current_class isn't an interface. After all methods have been
12370         expanded, call `check_final_variable_global_assignment_flag' and
12371         `check_static_final_variable_assignment_flag' if the current class
12372         is an interface.
12373         (maybe_yank_clinit): Fixed typo in comment.
12374         (build_outer_field_access_methods): Removed old sanity check. Use
12375         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12376         Don't create access methods for finals.
12377         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12378         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12379         existing DECL_INIT has been processed.
12380         (java_complete_lhs): Likewise.
12381         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12382         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12383         logic.
12384         (patch_assignment): Use LOCAL_FINAL_P.
12385         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12386         DECL_INITIAL is nullified.
12387         Fixes gcj/163.
12388
12389 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12390
12391         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12392
12393         * Makefile.in (parse.c, parse-scan.c): Likewise.
12394
12395 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12396
12397         * class.c (temporary_obstack): Remove.
12398         (make_class): Don't mess with obstascks.
12399         (push_class): Likewise.
12400         (set_super_info): Likewise.
12401         (add_method_1): Likewise.
12402         (add_method): Likewise.
12403         (add_field): Likewise.
12404         (build_utf8_ref): Likewise.
12405         (build_class_ref): Likewise.
12406         (build_static_field_ref): Likewise.
12407         (finish_class): Likewise.
12408         (push_super_field): Likewise.
12409         (layout_class): Likewise.
12410         (layout_class_methods): Likewise.
12411         (init_class_processing): Likewise.
12412         * constants.c (get_tag_node): Likewise.
12413         (build_constant_data_ref): Likewise.
12414         * decl.c (ggc_p): Remove.
12415         (copy_lang_decl): Use ggc_alloc.
12416         (complete_start_java_method): Don't mess with obstacks.
12417         (start_java_method): Likewise.
12418         (end_java_method): Likewise.
12419         * except.c (link_handler): Use xmalloc.
12420         (free_eh_ranges): New function.
12421         (method_init_exceptions): Use it.
12422         (add_handler): Use xmalloc.
12423         (expand_start_java_handler): Don't mess with obstacks.
12424         (prepare_eh_table_type): Likewise.
12425         (expand_end_java_handler): Likewise.
12426         * expr.c (push_value): Likewise.
12427         (create_label_decl): Likewise.
12428         (build_jni_stub): Likewise.
12429         (java_lang_expand_expr): Likewise.
12430         (note_instructions): Use xrealloc.
12431         (java_push_constant_from_pool): Don't mess with obstacks.
12432         (process_jvm_instruction): Likewise.
12433         * java-tree.h (cyclic_inheritance_report): Remove duplicate
12434         declaration.
12435         * jcf-parse.c (get_constant): Don't mess with obstacks.
12436         (read_class): Likewise.
12437         (jcf_parse): Likewise.
12438         * lex.c (expression_obstack): Remove.
12439         (java_lex): Don't use obstack_free.
12440         * parse.h (exit_java_complete_class): Don't mess with obstacks.
12441         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12442         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12443         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12444         * parse.y (gaol): Add more GC roots.
12445         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12446         (lookup_field_wrapper): Likewise.
12447         (obtain_incomplete_type): Don't mess with obstacks.
12448         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12449         macros.
12450         (craft_constructor): Don't mess with obstacks.
12451         (safe_layout_class): Likewise.
12452         (java_complete_class): Likewise.
12453         (source_end_java_method): Likewise.
12454         (build_outer_field_access_methods): Likewise.
12455         (build_outer_method_access_method): Likewise.
12456         (maybe_build_thisn_access_method): Likewise.
12457         (build_dot_class_method_invocation): Likewise.
12458         (java_complete_tree): Likewise.
12459         (java_complete_lhs): Likewise.
12460         (do_merge_string_cste): Likewise.
12461         (patch_string_cst): Likewise.
12462         (array_constructor_check_entry): Likewise.
12463         * typeck.c (build_java_array_type): Likewise.
12464         (parse_signature_string): Likewise.
12465         (build_java_signature): Likewise.
12466
12467 2000-10-12  Tom Tromey  <tromey@cygnus.com>
12468
12469         Fix for PR gcj/356:
12470         * gjavah.c (add_class_decl): Don't special-case inner classes.
12471         (add_namelet): Likewise.
12472
12473 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
12474
12475         * java-tree.h: Constify current_encoding.
12476         * lang.c: Constify current_encoding.
12477
12478 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
12479
12480         * jvgenmain.c (class_mangling_suffix): Omit `.'.
12481         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12482
12483 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12484
12485         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12486         patch. Fixes gcj/340.
12487
12488 2000-10-10  Tom Tromey  <tromey@cygnus.com>
12489
12490         * lex.c (java_new_lexer): Initialize out_first and out_last
12491         fields.
12492         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12493
12494 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12495
12496         * parse.y (pop_current_osb): New function.
12497         (array_type:): Use `dims:', changed actions
12498         accordingly. Suggested by Anthony Green.
12499         (array_creation_expression:): Used pop_current_osb.
12500         (cast_expression:): Likewise.
12501         (search_applicable_method_list): Fixed indentation.
12502
12503 2000-10-08  Anthony Green  <green@redhat.com>
12504
12505         * parse.y (array_type_literal): Remove production.
12506         (type_literals): Refer to array_type, not array_type_literal.
12507
12508 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12509
12510         Patch contributed by Corey Minyard.
12511         * decl.c (check_local_named_variable): New function.
12512         (tree check_local_unnamed_variable): Likewise.
12513         (find_local_variable): Splitted. Call check_local_{un}named_variable.
12514
12515 2000-10-07  Anthony Green  <green@redhat.com>
12516
12517         * class.c (layout_class): Handle case where superclass can't be
12518         layed out yet.
12519
12520 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12521
12522         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12523         gperf.
12524
12525 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12526
12527         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12528         * jvgenmain.c (class_mangling_prefix): Removed.
12529         (class_mangling_suffix): New global.
12530         (main): Use it.
12531         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12532         `$'.
12533         (print_method_info): Handle overrides for static and final
12534         methods.
12535         (process_file): Generate declaration for class object field.
12536         * class.c (cxx_keywords): New array.
12537         (utf8_cmp): New function.
12538         (cxx_keyword_p): New function.
12539         (layout_class_method): Mangle C++ keywords by appending `$'.
12540         (mangle_field): New function.
12541         (mangle_class_field): Use mangle_field.  Mangle class name as
12542         `class$'.
12543         (mangle_static_field): Use mangle_field.
12544
12545 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12546
12547         * decl.c (find_local_variable): Removed uncessary type check and
12548         fixed range check typo. From Corey Minyard.
12549
12550 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12551
12552         * decl.c (give_name_to_locals): New local `code_offset'. Call
12553         `maybe_adjust_start_pc'.
12554         * expr.c (note_instructions): New function.
12555         (expand_byte_code): Don't collect insn starts here.
12556         (peek_opcode_at_pc): New function.
12557         (maybe_adjust_start_pc): Likewise.
12558         * java-tree.h (maybe_adjust_start_pc): Declare.
12559         (note_instructions): Likewise.
12560         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12561
12562 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12563
12564         * parse.y (field_access:): Fixed indentation.
12565         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12566
12567 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12568
12569         Fix for PR gcj/307:
12570         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12571         JPRIMITIVE_TYPE_P, for arithmetic operators.
12572         (patch_method_invocation): Indentation fix.
12573         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12574         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12575         (do_unary_numeric_promotion): Cleaned up code.
12576         (valid_cast_to_p): Handle boolean correctly.
12577
12578 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12579
12580         * lex.c (java_read_unicode): Reset bs_count when finished with
12581         `\u' sequence.
12582
12583 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12584
12585         Convert to GC.
12586         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12587         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12588         (typeck.o): Depend on ggc.h.
12589         * class.c (add_method_1): Use GC functions for allocation.
12590         (init_class_processing): Register roots.
12591         * decl.c (ggc_p): Set to 1.
12592         (pending_local_decls): Make it static.
12593         (push_jvm_slot): Use GC functions for allocation.
12594         (init_decl_processing): Register roots.
12595         (give_name_to_locals): Use GC functions for allocation.
12596         (lang_mark_tree): New function.
12597         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12598         functions for allocation.
12599         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12600         * lex.c (java_lex): Use build_string, rather than replicating it
12601         inline.
12602         * parse.y (goal): Add more roots.
12603         (mark_parser_ctxt): New function.
12604         * typeck.c: Include ggc.h.
12605
12606 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12607
12608         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12609         contains something else than MODIFY_EXPR.
12610
12611 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
12612
12613         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12614         * Makefile.in (parse.o): Depend on ggc.h.
12615         (class.o): Likewise.
12616         (constants.o): Likewise.
12617         (decl.o): Likewise.
12618         (expr.o): Likewise.
12619         (jcf-parse.o): Likewise.
12620         (jcf-write.o): Likewise.
12621         (mangle.o): Likewise.
12622         * class.c: Include ggc.h.
12623         (build_static_field_ref): Register GC roots.
12624         (layout_class): Likewise.
12625         (init_class_processing): Likewise.
12626         * constants.c: Include ggc.h.
12627         (current_constant_pool_data_ref): Remove.
12628         (tag_nodes): Move it to ...
12629         (get_tag_node): ... here.  Register GC roots.
12630         * decl.c: Include ggc.h.  Remove many global tree definitions.
12631         (throw_node): Define.
12632         (java_global_trees): Likewise.
12633         (predef_filenames): Make the size a constant.
12634         (init_decl_processing): Adjust accordingly.
12635         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
12636         * expr.c: Include ggc.h.
12637         (init_expr_processing): Register GC roots.
12638         (build_invokeinterface): Likewise.
12639         * java-tree.h: Replace extern tree declarations with macros.
12640         (java_global_trees): New variable.
12641         (java_tree_index): New enumeration.
12642         (init_jcf_parse): Declare.
12643         * jcf-parse.c: Include ggc.h.
12644         (current_class): Remove declaration.
12645         (main_class): Likewise.
12646         (all_class_list): Likewise.
12647         (predefined_filename_p): Adjust for constant size of
12648         predef_filenames.
12649         (init_jcf_parse): New function.
12650         * jcf-write.c: Include ggc.h.
12651         (generate_classfile): Register GC roots.
12652         (append_synthetic_attribute): Likewise.
12653         (append_innerclass_attribute_entry): Likewise.
12654         * lang.c: Include ggc.h.
12655         (lang_print_error): Register GC roots.
12656         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12657         with macros.
12658         * parse.y: Include ggc.h.
12659         (wfl_operator): Remove.
12660         (goal): Register GC roots.
12661         (java_pop_parser_context): Adjust for new field names.
12662         (java_parser_context_save_global): Likewse.
12663         (java_parser_context_restore_global): Likewise.
12664         (java_parser_context_suspend): Likewise.
12665         (java_parser_context_resume): Likewise.
12666         (verify_constructor_circularity): Register GC roots.
12667         (lookup_cl): Likewise.
12668         (java_reorder_fields): Likewise.
12669         (build_current_this): Likewise.
12670         (class_in_current_package): Likewise.
12671         (argument_types_convertible): Likewise.
12672         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12673
12674 2000-09-14  Tom Tromey  <tromey@cygnus.com>
12675
12676         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12677
12678 2000-09-13  Tom Tromey  <tromey@cygnus.com>
12679
12680         * jcf-parse.c: Include <locale.h>.
12681         * jv-scan.c: Include <locale.h>.
12682
12683 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12684
12685         * expr.c (pop_type_0): Return `Object' if trying to merge two
12686         interface types.
12687         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12688         interface types; `Object' is always a valid supertype.
12689
12690 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12691
12692         Fix for PR gcj/33:
12693         * jv-scan.c (help): Document --encoding.
12694         (options): Added `encoding' entry.
12695         (OPT_ENCODING): New define.
12696         (main): Handle --encoding.
12697         Include <langinfo.h> if nl_langinfo exists.
12698         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12699         --encoding.
12700         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12701         (parse_source_file): Correctly call java_init_lex.  Added `finput'
12702         argument.  Use nl_langinfo to determine default encoding.
12703         * java-tree.h (current_encoding): Declare.
12704         * parse.y (java_parser_context_restore_global): Don't restore
12705         `finput'.
12706         (java_parser_context_save_global): Don't set `finput' field.
12707         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
12708         if required.
12709         * lang.c (current_encoding): New global.
12710         (lang_decode_option): Recognize `-fencoding='.
12711         (finish_parse): Don't close finput.
12712         * parse.h (struct parser_ctxt): Removed `finput' and
12713         `unget_utf8_value' fields.  Added `lexer' field.
12714         (java_init_lex): Fixed declaration.
12715         * lex.c (java_new_lexer): New function.
12716         (java_destroy_lexer): Likewise.
12717         (java_read_char): Added `lex' argument.  Handle iconv case.
12718         (java_read_unicode): Added `lex' argument.  Count backslashes in
12719         lexer structure.
12720         (java_init_lex): Added `finput' and `encoding' arguments.  Set
12721         `lexer' field in ctxp.
12722         (BAD_UTF8_VALUE): Removed.
12723         (java_lex): Handle seeing UEOF in the middle of a string literal.
12724         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12725         (java_lexer): New structure.
12726         (UNGETC): Removed.
12727         (GETC): Removed.
12728         (DEFAULT_ENCODING): New define.
12729         (java_destroy_lexer): Declare.
12730
12731 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12732
12733         Fix for PR gcj/343:
12734         * lex.c (java_init_lex): Initialize java_io_serializable.
12735         * parse.y (java_io_serializable): New global.
12736         (valid_ref_assignconv_cast_p): An array can be cast to
12737         serializable.
12738
12739 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12740
12741         * decl.c, expr.c: Include defaults.h if not already included.
12742         Don't define the *_TYPE_SIZE macros.
12743
12744 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
12745
12746         * typeck.c (build_java_array_type): Correct first parameter
12747         in ADJUST_FIELD_ALIGN invocation.
12748
12749 2000-09-06  Tom Tromey  <tromey@cygnus.com>
12750
12751         * lang-specs.h: Also recognize `-femit-class-files'.
12752
12753 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12754
12755         * verify.c (merge_types): Load the types to merge if necessary.
12756
12757 2000-09-02  Anthony Green  <green@redhat.com>
12758
12759         * jcf-io.c: Include zlib.h.
12760         (open_in_zip): Read compressed class file archives.
12761         * zipfile.h (ZipDirectory): Add uncompressed_size and
12762         compression_method fields.
12763         * zextract.c (read_zip_archive): Collect file compression info.
12764
12765 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
12766
12767         * parse.y (do_resolve_class): Also explore superclasses of
12768         intermediate enclosing contexts when searching for inner classes.
12769
12770 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12771
12772         * parse.y (variable_declarator_id:): Better error message.
12773         (expression_statement:): Use YYNOT_TWICE.
12774         (cast_expression:): Likewise.
12775         (assignment:): Likewise.
12776
12777 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12778
12779         * parse.y (do_merge_string_cste): New locals. Create new
12780         STRING_CSTs each time, use memcpy. Fixes gcj/311.
12781
12782 2000-08-07  Hans Boehm  <boehm@acm.org>
12783
12784         * boehm.c (mark_reference_fields): Set marking bits for all words in
12785         a multiple-word record.
12786         (get_boehm_type_descriptor): Use the procedure marking descriptor for
12787         java.lang.Class.
12788
12789 2000-08-31  Mike Stump  <mrs@wrs.com>
12790
12791         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12792         jcf-dump$(exeext)): Make parallel safe.
12793
12794 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12795
12796         * jcf-parse.c (set_source_filename): Constify a char *.
12797         * jcf-write.c (append_innerclasses_attribute,
12798         make_class_file_name): Constify a char *.  Don't recycle a
12799         variable for an unrelated purpose.
12800         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12801         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12802
12803 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12804
12805         * expr.c (can_widen_reference_to): Fixed indentation.
12806         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12807         * parse.y: `finit$' replaces `$finit$' in comments.
12808         (try_builtin_assignconv): Fixed leading comment.
12809
12810 2000-08-25  Greg McGary  <greg@mcgary.org>
12811
12812         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12813
12814 2000-08-24  Greg McGary  <greg@mcgary.org>
12815
12816         * lang.c (lang_decode_option): Use ARRAY_SIZE.
12817         * parse.y (BINOP_LOOKUP): Likewise.
12818
12819 2000-08-22  Andrew Haley  <aph@cygnus.com>
12820
12821         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12822         sign extending. Fixes gcj/321.
12823         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12824         combining to make a jlong. Fixes gcj/321.
12825
12826 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12827
12828         * lang-specs.h: Do not process -o or run the assembler if
12829         -fsyntax-only.
12830
12831 2000-08-16  Andrew Haley  <aph@cygnus.com>
12832
12833         * typeck.c (build_java_array_type): Rewrite code to do array
12834         alignment.  Take into account back-end macros when aligning array
12835         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12836         user to set alignment. Fixes gcj/252 and 160.
12837
12838 2000-08-09  Tom Tromey  <tromey@cygnus.com>
12839
12840         * parse.y (check_abstract_method_definitions): Now return `int'.
12841         Check implemented interfaces.  Fixes PR gcj/305.
12842
12843         * parse.y (patch_switch_statement): Disallow `long' in switch
12844         expressions.  Fixes PR gcj/310.
12845
12846 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12847
12848         * decl.c (finit_leg_identifier_node): New global.
12849         (init_decl_processing): Use `finit$' to initialize
12850         finit_identifier_node. Use `$finit$' to initialize
12851         finit_leg_identifier_node.
12852         * expr.c (expand_java_field_op): Use ID_FINIT_P.
12853         * java-tree.h (finit_identifier_node): Changed attached comment.
12854         (finit_leg_identifier_node): New declaration.
12855         (ID_FINIT_P): Take finit_identifier_node and
12856         finit_leg_identifier_node into account. This is a backward
12857         compatibility hack.
12858
12859 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12860
12861         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12862         Jan 6 2000 patch.
12863         (generate_bytecode_insns): Check `nargs' before emitting it.
12864         * verify.c (merge_type_state): Fixed typo.
12865         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12866         generate_bytecode_{conditional,insns}.
12867
12868 2000-08-13  Anthony Green  <green@redhat.com>
12869
12870         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12871         for -pg builds).
12872
12873 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12874
12875         * class.c (maybe_layout_super_class): Fixed indentation.
12876         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12877         (java_check_methods): New function declaration.
12878         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12879         instead of `str_ptr'.
12880         * jcf-write.c (generate_bytecode_insns): Emit number the of args
12881         of a `invokeinterface' at the right time.
12882         * parse.h (WFL_STRIP_BRACKET): New macro.
12883         (SET_TYPE_FOR_RESOLUTION): Use it.
12884         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12885         (check_class_interface_creation): Don't check for cross package
12886         innerclass name clashes.
12887         (method_header): Behave properly if MDECL is `error_mark_node'.
12888         (method_declarator): Return `error_mark_node' if bogus current
12889         class.
12890         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12891         (resolve_and_layout): New local `decl_type', set and used. Call
12892         java_check_methods.
12893         (java_check_methods): New method.
12894         (java_layout_classes): Use it.
12895         (resolve_qualified_expression_name): No EH check necessary in
12896         access$<n>.
12897         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12898         `case' statement.
12899         (patch_assignment): Set DECL_INITIAL on integral final local.
12900
12901 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12902
12903         * java-tree.h (flag_extraneous_semicolon): New extern.
12904         * lang-options.h: (-Wextraneous-semicolon): New option.
12905         * lang.c (flag_redundant): Fixed typo in leading comment.
12906         (flag_extraneous_semicolon): New global.
12907         (lang_decode_option): Set `flag_extraneous_semicolon' when
12908         -Wall. Decode `-Wextraneous-semicolon'.
12909         * parse.y (type_declaration:): Removed `SC_TK' hack, added
12910         `empty_statement' rule.
12911         (class_body_declaration): Likewise.
12912         (method_body:): Accept `;' as a method body.
12913         (static_initializer:): Removed `SC_TK' hack.
12914         (constructor_block_end:): Likewise.
12915         (empty_statement:): Report deprecated empty declaration. Fixes
12916         gcj/295
12917
12918 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12919
12920         * parse.y (build_dot_class_method_invocation): Changed parameter
12921         name to `type'. Build signature from `type' and convert it to a
12922         STRING_CST if it's an array.
12923         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12924         to use `ref_type' directly.
12925
12926 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
12927
12928         * lang-options.h: Added a comma after the last element to avoid
12929         syntax errors when other languages define additional options.
12930
12931 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12932
12933         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12934         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12935         (jc1): Link with $(BACKEND).
12936         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12937
12938 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12939
12940         * jvspec.c: Adjust type of second argument to
12941         lang_specific_driver, and update code as necessary.
12942
12943         * class.c (build_dtable_decl): Initialize dummy.
12944
12945 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12946
12947         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
12948         method bodies not to rule out discarding `<clinit>'; don't use
12949         <clinit> to initialize static fields with constant initializers.
12950
12951 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12952
12953         * gjavah.c (print_method_info): Added `synth' parameter. Skip
12954         synthetic methods.
12955         (method_synthetic): New global.
12956         (HANDLE_METHOD): Recognize synthetic method and tell
12957         `print_method_info' about it.
12958         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
12959         processing a synthetic method.
12960         * jcf-reader.c (skip_attribute): New function.
12961         ( skip_attribute): Likewise.
12962
12963 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12964
12965         * parse.y (build_outer_field_access): Fixed comments.
12966         (fix_constructors): Emit the initialization of this$<n> before
12967         calling $finit$.
12968         (resolve_qualified_expression_name): Build an access to `decl' if
12969         necessary.
12970
12971 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12972
12973         * parse-scan.y (curent_class): Non longer const.
12974         (inner_qualifier, inner_qualifier_length): Deleted.
12975         (current_class_length): New global.
12976         (bracket_count): Fixed typo in leading comment.
12977         (anonymous_count): New global.
12978         (class_instance_creation_expression:): Handle anonymous classes.
12979         (anonymous_class_creation:): New rule.
12980         (push_class_context): Rewritten.
12981         (pop_class_context): Likewise.
12982         (INNER_QUALIFIER): Macro deleted.
12983         (report_class_declaration): call `push_class_context' when
12984         entering the function. `fprintf' format modified not to use
12985         INNER_QUALIFIER.
12986         (report_class_declaration): Assign `package_name' and
12987         `current_class' to NULL separately.
12988
12989 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12990
12991         * expr.c (build_invokeinterface): Call layout_class_methods on
12992         target interface.
12993
12994 2000-07-27  Tom Tromey  <tromey@cygnus.com>
12995             Anthony Green  <green@cygnus.com>
12996             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12997
12998         * class.c (make_class_data): Create vtable for abstract classes.
12999         (get_dispatch_table): Changed to cope with abstract classes.
13000
13001 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13002
13003         * parse.y (patch_method_invocation): Don't reverse the argument
13004         list when dealing with anonymous class constructors. Fixed typo in
13005         comment.
13006
13007 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13008
13009         * parse.y (build_alias_initializer_parameter_list): Reverse
13010         crafted list when building aliases for anonymous class
13011         constructors.
13012
13013 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13014
13015         * parse.y (jdep_resolve_class): Don't bother checking potential
13016         innerclass access if `decl' is NULL.
13017         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13018         WFL.
13019
13020 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13021
13022         * parse.c: Remove (again.)
13023
13024 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13025
13026         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13027         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13028         outside the `if' statement, alias to innerclass removed, `decl'
13029         used to mark the class complete.
13030
13031 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13032
13033         * parse.y (simple_name:): Fixed typo in error message.
13034
13035 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13036
13037         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13038         or its first operand can be error marks.
13039
13040 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13041
13042         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13043         * parse.y (method_header): Likewise.
13044
13045 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13046
13047         * parse.y (process_imports): Consider that one might be trying to
13048         import an innerclass. Fixes gcj/254
13049
13050 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13051
13052         * parse.y (find_as_inner_class): Handle the case where the
13053         enclosing context of an innerclass has been loaded as bytecode.
13054
13055 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13056
13057         * parse.y (simple_name:): Reject `$' in type names.
13058         (resolve_type_during_patch): Use `type' as a second
13059         argument to resolve_no_layout. Fixes gcj/257.
13060
13061 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13062
13063         * parse.y (find_most_specific_methods_list): Select the only
13064         non-abstract method even if max has been set.
13065         Fixes gcj/285, gcj/298.
13066
13067 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13068
13069         * lang-specs.h: Added %(jc1) to java compiler options.
13070
13071 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13072
13073         * .cvsignore: New file.
13074
13075 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13076
13077         * parse.y (not_accessible_p): Access granted to innerclasses
13078         (indirectly) extending the reference type. Fixes gcj/249.
13079
13080 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13081
13082         * parse.y (patch_method_invocation): Fixed comment.
13083         (maybe_use_access_method): Build this$<n>s to the context of the
13084         target method, or a type that extends it. Fixes gcj/242.
13085
13086 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13087
13088         * parse.c: Remove.
13089
13090 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13091
13092         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13093
13094 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13095
13096         * lang-specs.h: Added %{I*}.
13097
13098 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13099
13100         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13101
13102 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13103
13104         * parse-scan.c: Remove.
13105
13106 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13107
13108         * class.c (set_super_info): Handled protected inner classes.
13109         (common_enclosing_context_p): Bail early if arguments aren't both
13110         inner classes.
13111         (get_access_flags_from_decl): Handle private and protected inner
13112         classes.
13113         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13114         (CLASS_PROTECTED): Likewise.
13115         (struct lang_type): New bitfield `poic'.
13116         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13117         inner classes only.
13118         (check_inner_class_access): Renamed arguments, added
13119         comments. Handles protected inner classes (fixes gcj/225)
13120         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13121
13122 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13123
13124         * parse.y (resolve_qualified_expression_name): Verify qualified
13125         access to `this'. Fixes gcj/239.
13126
13127 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13128
13129         * jcf-write.c (generate_classfile): Don't install ConstantValue
13130         for null pointers.
13131
13132 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13133
13134         * parse.y (resolve_qualified_expression_name): Handle inner class
13135         access. Fixes gcj/256.
13136
13137 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13138
13139         * jcf-write.c (generate_classfile): Properly install the
13140         ConstantValue attribute and the initial value constant pool index
13141         on string constants.
13142         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13143         class files.
13144
13145 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13146
13147         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13148         construct.
13149         * parse.y (find_as_inner_class): Fixed typo.
13150         (do_resolve_class): Explore enclosing contexts when searching for
13151         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13152         (check_inner_class_access): Check `decl' which can be null in case
13153         of previous errors.
13154
13155 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13156
13157         * java-tree.h (java_debug_context): Declared `extern'.
13158         (safe_layout_class): Likewise.
13159         * parse.y (resolve_field_access): Field must be `static' in order
13160         to be replaced by its initial value. Added comments.
13161         (find_applicable_accessible_methods_list): Fixed typo.
13162         (find_most_specific_methods_list): Methods found in innerclasses
13163         take over methods founds in the enclosing contexts.
13164         (java_complete_tree): Loosen restrictions on the type of DECLs
13165         that can be replaced by their initialization values.
13166         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13167
13168 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13169
13170         * Make-lang.in (PARSE_DIR): New macro.
13171         (PARSE_RELDIR): Likewise.
13172         (PARSE_C): Likewise.
13173         (PARSE_SCAN_C): Likewise.
13174         ($(PARSE_C)): New target.
13175         ($(PARSE_SCAN_C)): Likewise.
13176         (SET_BISON): New macro.
13177         (BISONFLAGS): Likewise.
13178         (JAVABISONFLAGS): Likewise.
13179
13180 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13181
13182         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13183         argument on the first pass for CNI as well as JNI.
13184         (print_method_info): Set up method name on the first pass only.
13185
13186 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13187
13188         * parse.y (parser_qualified_classname): Removed parameter
13189         `is_static'.
13190         (create_interface): Removed first passed parameter to
13191         parser_qualified_classname.
13192         (create_class): Likewise. Don't install alias on static
13193         innerclasses. Fixes gcj/275.
13194
13195 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13196
13197         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13198         debugable statement with empty_stmt_node. Fixes gcj/272
13199
13200 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13201
13202         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13203         gcj/271.
13204
13205 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13206
13207         * jcf-write.c (push_long_const): Appropriately cast short negative
13208         constant to jword.
13209
13210 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13211
13212         * parse.y (verify_constructor_super): Use loop variable
13213         `m_arg_type' initialized with `mdecl_arg_type'.
13214
13215 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13216
13217         * parse.y (resolve_field_access): Handle case where `type_found'
13218         is NULL.
13219
13220 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13221
13222         * expr.c (lookup_field): The same field can be found through two
13223         different interface. Don't declare it ambiguous in that case.
13224
13225 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13226
13227         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13228         follows \r, then unget it at a lower level.
13229
13230 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13231
13232         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13233         java_complete_tree.
13234
13235 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13236
13237         * parse.y (for_statement): Wrap expression in a WFL if it is a
13238         constant.  For PR gcj/268.
13239
13240 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13241
13242         * parse.y (do_resolve_class): Minor optimiztion in the package
13243         list search. Removed unnecessary test and return statement.
13244         (valid_ref_assignconv_cast_p): Order of arguments to
13245         enclosing_context_p fixed.
13246
13247 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13248
13249         * expr.c (lookup_field): Print error and return error_mark_node if
13250         field reference is ambiguous.
13251
13252         * parse.y (check_abstract_method_definitions): Also check if
13253         `other_method' is abstract.
13254
13255 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13256
13257         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13258         classes.
13259         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13260         (struct lang_type): New field `pic'.
13261         (CLASS_PRIVATE): New macro.
13262         * parse.y (check_inner_class_access): New function.
13263         (jdep_resolve_class): Call it.
13264
13265 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13266
13267         * parse.y (patch_incomplete_class_ref): Initialize the returned
13268         class.  For PR gcj/260.
13269
13270 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13271
13272         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13273
13274 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13275
13276         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13277         Java specific checks.
13278         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13279         screened by DECL_P.
13280         * java-tree.def (CASE_EXPR): Marked 'e'.
13281         (DEFAULT_EXPR): Likewise.
13282         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13283         screened by DECL_P.
13284         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13285         Java specific checks.
13286         (generate_bytecode_insns): Test try_block for BLOCK before using
13287         BLOCK_EXPR_BODY.
13288         * parse.y (build_wfl_wrap): Added `location' argument. Set
13289         EXPR_WFL_LINECOL accordingly.
13290         (dim_expr:): Wrap constants with WFLs.
13291         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13292         (resolve_package): Check for `stmt' not being a BLOCK before
13293         building a debuggable statement with it.
13294         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13295         invocation.
13296         (resolve_field_access): Make sure `decl' is a DECL before treating
13297         it as such.
13298         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13299         IDENTIFIER_NODE before treating it as such.
13300         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13301         treating it as such.
13302         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13303         to be applied only on non array types.
13304
13305 2000-06-16  Per Bothner  <per@bothner.com>
13306
13307         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13308         define in terms of DECL_RESULT, as that fails when --enable-checking.
13309
13310 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13311
13312         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13313         types the same in comparison.
13314         (CHECK_OP): Add static prototype.
13315
13316 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13317
13318         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13319         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13320         * parse.c: Rebuilt.
13321
13322 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13323
13324         * decl.c (create_primitive_vtable): Prototype.
13325
13326         * jcf-write.c (generate_bytecode_insns): Initialize variable
13327         `saved_context'.
13328
13329         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13330
13331 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13332
13333         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13334         to track searched classes, and do not search the same class more than
13335         once. Call find_applicable_accessible_methods_list on immediate
13336         superclass, instead of search_applicable_method_list on all ancestors.
13337         Fix for PR gcj/238.
13338
13339 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13340
13341         * parse.y (register_fields): Permit static fields in inner classes
13342         if they are final. Fix for PR gcj/255.
13343
13344 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13345
13346         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13347         * parse.y (find_in_imports): Returned type changed to void,
13348         leading comment fixed.
13349         (register_package): New function.
13350         (qualify_and_find): Likewise.
13351         (package_declaration:): Use `register_package'.
13352         (single_type_import_declaration:): Removed local variable
13353         `node'. Added missing `;' for consistency.
13354         (type_import_on_demand_declaration:): Use `chainon' to link new
13355         entries.
13356         (lookup_field_wrapper): Lookup local variables defined in outer
13357         contexts first.
13358         (java_complete_class): Don't reverse the list of imported on demand.
13359         (do_resolve_class): Reorganized. Removed local variable
13360         `original_name'. Call `qualify_and_find' with the current package
13361         name, invoke `find_in_imports_on_demand' right after. Call
13362         `qualify_and_find' with the packages we've seen so far. Fixed
13363         operations numbering in comments.
13364         (java_expand_class): Don't reverse `package_list'.
13365         (find_most_specific_methods_list): New local variables `abstract'
13366         and `candidates'. Use them to pick the right method.
13367
13368 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
13369
13370         * parse.y (check_modifiers_consistency): Don't subtract out
13371         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13372
13373 2000-06-04  Philipp Thomas  <pthomas@suse.de>
13374
13375         * Makefile.in (INTLLIBS): New.
13376         (LIBS): Add above.
13377         (DEPLIBS): Ditto.
13378
13379 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13380
13381         * class.c (get_dispatch_table): Build the vtable dummy entry list
13382         element with a null purpose. Fixed leading comment.
13383         (build_dtable_decl): Build an accurate dtable type when appropriate
13384         and use it.
13385
13386 2000-06-02  Richard Henderson  <rth@cygnus.com>
13387
13388         * lang.c (lang_get_alias_set): New.
13389
13390 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13391
13392         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13393         before using it as the accessed field.
13394
13395 2000-05-31  Tom Tromey  <tromey@cygnus.com>
13396
13397         * java-tree.h (boolean_array_vtable, byte_array_vtable,
13398         char_array_vtable, short_array_vtable, int_array_vtable,
13399         long_array_vtable, float_array_vtable, double_array_vtable):
13400         Declare.
13401         * expr.c (get_primitive_array_vtable): New function.
13402         (create_primitive_vtable): New function.
13403         (java_lang_expand_expr): Enable code to statically generate
13404         arrays.
13405         * decl.c (init_decl_processing): Create primitive vtables.
13406         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13407         short_array_vtable, int_array_vtable, long_array_vtable,
13408         float_array_vtable, double_array_vtable): Define.
13409
13410 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
13411
13412         * java/parse.y (find_applicable_accessible_methods_list):
13413         Don't add an uninitialized value to the list.
13414
13415 2000-05-25  Tom Tromey  <tromey@cygnus.com>
13416
13417         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13418         when trying to see if field's class should be initialized.  Always
13419         initialize field's declaring class, not qualified class.
13420         For PR gcj/162.
13421
13422         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13423         `wfl_operator', to maybe_build_primttype_type_ref.
13424         Fixes PR gcj/235.
13425
13426 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
13427
13428         * parse.y (patch_method_invocation): Don't try to lookup methods
13429         in primitive types.
13430
13431 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13432
13433         * parse.y (resolve_field_access): Call the appropriate <clinit>
13434         before accessing the length of a static array. Craft a decl for
13435         the field while its time. Fixes PR gcj/129.
13436
13437 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13438
13439         * parse.y (resolve_package): Correctly set `*next' (was off by
13440         one.)
13441         (resolve_qualified_expression_name): Fixed comment.
13442
13443 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13444
13445         * jcf-parse.c (jcf_parse_source): Reset current_class and
13446         current_function_decl to NULL before parsing a new file.
13447
13448 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13449
13450         * parse.y (block_end:): If the collected block doesn't feature a
13451         statement, insert an empty statement.
13452
13453 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13454
13455         * parse.y (maybe_yank_clinit): New function.
13456         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13457         end of the list of methods belonging to a class.
13458         (java_complete_expand_method): Check whether <clinit> is really
13459         necessary and expand it accordingly.
13460
13461 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13462
13463         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13464         processed by the method's switch statement.
13465
13466 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13467
13468         * java-tree.h: Added init state enum.
13469         * decl.c (emit_init_test_initialization): Initialize class
13470         initialization check variable by looking at class' state.
13471
13472 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13473
13474         * java-tree.h (build_instanceof): Declare.
13475         (build_get_class): Declare.
13476         * parse.y (patch_binop): Use build_instanceof.
13477         * expr.c (build_instanceof): New function.  If class is final,
13478         don't make a function call.
13479         (expand_java_INSTANCEOF): Use it.
13480         (build_get_class): New function.
13481
13482 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
13483
13484         * jcf-write.c (generate_classfile): Scan the source_file for
13485         slashes with the right pointer variable.
13486
13487 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
13488
13489         * lang.c (lang_decode_option): Update -Wunused flags by calling
13490         set_Wunused.
13491         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13492
13493 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13494
13495         * check_init.c (check_init): Constify local char *.
13496         * class.c (push_class): Constify local char *.
13497         * java_tree.h: Update prototypes.
13498         * jcf-io.c (open_class): Constify filename parameter and
13499         return value.
13500         (find_class): Remove redundant string copy.  Cast return from
13501         open_class.
13502         * jcf-parse.c (read_class, parse_class_file, yyparse):
13503         Constify local char *.
13504         * jcf-write.c (generate_bytecode_insns, generate_classfile):
13505         Constify local char *.
13506         * jcf.h (JCF): Constify filename and classname.
13507         (JCF_FINISH): Cast args to FREE to char * when appropriate.
13508         * lang.c (init_parse): Constify parameter and return value.
13509         * lex.c (java_get_line_col): Constify filename parameter.
13510         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
13511         * parse.y (java_parser_context_suspend,
13512         issue_warning_error_from_context, safe_layout_class): Constify
13513         local char *.
13514         * parse.c: Regenerate.
13515
13516 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13517
13518         * expr.c (build_jni_stub): Cache the result of
13519         _Jv_LookupJNIMethod.
13520
13521 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13522
13523         * decl.c (predef_filenames_size): Now 7.
13524         (predef_filenames): New seventh entry.
13525
13526 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13527
13528         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13529         Keep track of when we've seen a reference field after a
13530         non-reference field.
13531         (get_boehm_type_descriptor): Handle case where we see
13532         non-reference fields but no trailing reference field.
13533         * decl.c (rawdata_ptr_type_node): Define.
13534         (init_decl_processing): Initialize rawdata_ptr_type_node.
13535         * java-tree.h (rawdata_ptr_type_node): Declare.
13536
13537 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13538
13539         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13540         specifiers in calls to fprintf.
13541
13542 2000-05-03  Andrew Haley  <aph@cygnus.com>
13543
13544         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13545
13546         * javaop.h (WORD_TO_INT): New function.
13547         (IMMEDIATE_s4): Use WORD_TO_INT.
13548         * jcf.h (JPOOL_INT): Ditto.
13549
13550         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13551         separator.
13552
13553 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13554
13555         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13556         on native function.
13557         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13558         JNI methods.
13559         * expr.c (build_jni_stub): New function.
13560         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13561         * parse.c: Rebuilt.
13562         * parse.y (java_complete_expand_methods): Expand a native method
13563         and call build_jni_stub if -fjni given.
13564         * lang-options.h: Document -fjni.
13565         * lang.c (flag_jni): New global.
13566         (lang_f_options): Added `jni' entry.
13567         * java-tree.h (soft_lookupjnimethod_node,
13568         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13569         Declare.
13570         (flag_jni): Declare.
13571         (build_jni_stub): Declare.
13572         (struct lang_decl): Added `native' flag.
13573         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13574         structure.
13575         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13576         soft_jnipopsystemframe_node): New globals.
13577         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13578         argument.
13579
13580         * java-tree.def: Put into `C' mode.
13581
13582 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13583
13584         Fix for PR gcj/2:
13585         * expr.c (expand_invoke): Generate check to see if object pointer
13586         is null in nonvirtual invocation case.
13587         * java-tree.h (soft_nullpointer_node): Declare.
13588         * decl.c (soft_nullpointer_node): New global.
13589         (init_decl_processing): Initialize soft_nullpointer_node.
13590         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13591         or `private' methods.
13592         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13593
13594 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13595
13596         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13597         from <clinit>
13598
13599 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13600
13601         * zextract.c (find_zip_file_start): New function.
13602         (read_zip_archive): Use it.
13603
13604 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13605
13606         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13607
13608 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13609
13610         * class.c (common_enclosing_context_p): New function.
13611         * java-tree.h (common_enclosing_context_p): Added prototype.
13612         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13613         classes sharing an outer context with the current instance.
13614         * parse.y (build_access_to_thisn): Fixed leading comment.
13615         (verify_constructor_super): New local `supper_inner'. Skip
13616         enclosing context argument in the case of inner class constructors.
13617         (patch_method_invocation): Insert proper context as second
13618         parameter to pure inner class constructor super invocations.
13619
13620 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13621
13622         * parse.y (end_class_declaration): Reset the interface number
13623         counter.
13624
13625 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13626
13627         * parse.y (source_start_java_method): Deleted unnecessary code.
13628         (patch_method_invocation): Fixed comment.
13629
13630 2000-04-24  Robert Lipe <robertlipe@usa.net>
13631
13632         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13633
13634 2000-04-23  Tom Tromey  <tromey@cygnus.com>
13635
13636         * boehm.c (mark_reference_fields): Use int_byte_position.
13637
13638 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13639
13640         * boehm.c (mark_reference_fields): Only call byte_position on
13641         non-static fields.
13642
13643 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13644
13645         * boehm.c (mark_reference_fields): Added `last_view_index'
13646         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
13647
13648 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
13649
13650         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13651         * parse.y (check_class_interface_creation): Fixed comments. Select
13652         permitted modifiers for (inner) interfaces. Changed error message
13653         to report rejected modifiers used with local classes.
13654
13655 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13656
13657         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13658         of directly inherited type considered in scope.
13659         * parse.y (do_resolve_class): Search inherited classes for inner
13660         classes.
13661
13662 2000-04-20  Tom Tromey  <tromey@cygnus.com>
13663
13664         * parse.y (not_accessible_p): Use member's class, not current
13665         class, when doing inheritance check for protected reference.
13666         Fixes PR gcj/124.
13667
13668 2000-04-20  Jason Schroeder  <shrode@subnature.com>
13669
13670         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13671
13672 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13673
13674         * parse.y (lookup_field_wrapper): Search for final local aliases.
13675         (resolve_expression_name): Let lookup_field_wrapper search for
13676         final local aliases. Force the value of `name' if one is found.
13677         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13678         an expression name. Fixed comments.
13679
13680 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13681
13682         * parse.y (yyerror): `msg' can be null, don't use it in that case.
13683
13684 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13685
13686         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13687
13688 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13689
13690         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13691
13692 2000-04-18  Tom Tromey  <tromey@cygnus.com>
13693
13694         PR gcj/211:
13695         * gjavah.c (utf8_cmp): Changed return value.
13696         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
13697         result.
13698         (cxx_keywords): New global.
13699         (get_field_name): Handle new result of cxx_keyword_subst.
13700         (print_method_info): Likewise.
13701
13702 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
13703
13704         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13705         with a newline, for CNI.
13706         (print_stub_or_jni): Print a space or newline before method name for
13707         CNI as well as JNI.
13708         (print_cxx_classname): Don't write leading "::" in CNI stub method.
13709         (process_file): Include gcj/cni.h if generating CNI stubs.
13710
13711 2000-04-16  Tom Tromey  <tromey@cygnus.com>
13712
13713         * gjavah.c (decompile_method): Use print_field_name.
13714         Fixes PR gcj/205.
13715
13716 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13717
13718         * parse.y (java_expand_classes): Reverse the package list once.
13719         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13720         reduction.
13721         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13722         the `==' and `!=' operators.
13723
13724 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13725
13726         * jcf-write.c (generate_bytecode_insns): At invocation time,
13727         always relate an interface method to the type of its selector.
13728
13729 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13730
13731         Fix for PR gcj/2:
13732         * expr.c (expand_invoke): Generate check to see if object pointer
13733         is null in nonvirtual invocation case.
13734         * java-tree.h (soft_nullpointer_node): Declare.
13735         * decl.c (soft_nullpointer_node): New global.
13736         (init_decl_processing): Initialize soft_nullpointer_node.
13737         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13738         or `private' methods.
13739         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13740
13741 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13742
13743         Fix for PR gcj/140:
13744         * parse.y (check_final_assignment): Recognize assignments to the
13745         `length' field of an array when generating class files.
13746
13747 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13748
13749         * class.c (decl_hash): Prototype removed.
13750         (decl_compare): Likewise.
13751
13752 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13753
13754         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13755         * parse.y (check_modifiers_consistency): Check for final/volatile
13756         clash.  Fixes PR gcj/164.
13757
13758 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13759
13760         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13761         made global.
13762         (java_hash_compare_tree_node): Renamed from `decl_compare, made
13763         global.
13764         (add_method_1): Use `java_hash_hash_tree_node' and
13765         `java_hash_compare_tree_node'.
13766         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13767         (java_hash_compare_tree_node): Likewise.
13768         * parse.y (find_applicable_accessible_methods_list): Create,
13769         delete and use a hash table to remember already searched interfaces.
13770
13771 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
13772
13773         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13774         with latest entry.
13775
13776 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13777
13778         * boehm.c (mark_reference_fields, set_bit): Prototype.
13779         (set_bit): Un-ANSI-fy definition.
13780
13781         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13782         Prototype.
13783
13784         * decl.c (emit_init_test_initialization): Likewise.
13785
13786         * gjavah.c (jni_print_char): Likewise.
13787
13788         * parse.y (create_new_parser_context): Likewise.
13789
13790 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13791
13792         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13793         patch missing hunk. Fixed indentation.
13794
13795 2000-03-30  Tom Tromey  <tromey@cygnus.com>
13796
13797         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13798         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13799
13800 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13801
13802         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13803         when negative *before* using it as an array index.
13804         * ChangeLog: Fixed typo.
13805
13806 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13807
13808         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13809         to 0 when it reaches -1.
13810
13811 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13812
13813         * jcf-parse.c (get_constant): Properly cast `num' during the
13814         invocation of `add_double'.
13815         * jcf-write.c (push_long_const): Properly cast `lo' before
13816         comparing it to short bounds.
13817         * parse-scan.y (interface_declaration:): Rule re-arrange so that
13818         `interface_body:' is reduced after the current interface is
13819         pushed.
13820
13821 2000-03-26  Tom Tromey  <tromey@cygnus.com>
13822
13823         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13824         Java-specific `-f' option.
13825
13826 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13827
13828         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13829         Adjust order of making types.
13830         Make bitsize_*_node values.
13831
13832 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13833
13834         * class.c (make_field_value): Use byte_position.
13835         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13836         (java_array_data_offset): Likewise.
13837         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13838         bzero call.
13839
13840 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13841
13842         * parse.y (check_abstract_method_definitions): New local
13843         `end_type_reached'. Make sure we also consider `end_type'.
13844         (java_check_abstract_method_definitions): Make sure we eventually
13845         consider `java.lang.Object'.
13846         (maybe_use_access_method): Don't use access method if not in the
13847         context of a pure inner class or if the method's context is right.
13848         (find_applicable_accessible_methods_list): New static flag
13849         `object_done'. Don't search abstract classes as interfaces. Fixed
13850         indentation. Fixed the `java.lang.Object' only search. Search
13851         class interface(s) first, then fully search enclosing contexts.
13852         (find_most_specific_methods_list): Pick the closest candidate when
13853         they're all abstract.
13854
13855 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13856
13857         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13858         properly initialize `finished_label'. Don't emit gotos for empty
13859         try statements.
13860
13861 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13862
13863         * except.c (emit_handlers): Clear catch_clauses_last.
13864
13865 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13866
13867         * parse.y (check_method_types_complete): New function.
13868         (create_class): Reset anonymous class counter only when seeing an
13869         non inner classe.
13870         (java_complete_class): JDEP_METHOD: Don't recompute signature
13871         if incomplete.
13872
13873 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13874
13875         * class.c (build_static_ref): Fixed indentation in comment.
13876         * java-tree.def (TRY_EXPR): Fixed typo in name.
13877         (CLASS_LITERAL): Likewise.
13878         * java-tree.h: (TYPE_DOT_CLASS): New macro.
13879         (struct lang_type): New field `dot_class'.
13880         * jcf-write.c (generate_bytecode_insns): Fixed error message.
13881         (generate_classfile): Method `class$' is synthetic.
13882         * parse.y (build_do_class_method): New function.
13883         (build_dot_class_method_invocation): Likewise.
13884         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13885         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13886         (qualify_ambiguous_name): Likewise.
13887         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13888         (build_try_statement): Fixed leading comment.
13889
13890 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13891
13892         * class.c (make_field_value): Properly handle sizes.
13893         (get_dispatch_vector): Use tree_low_cst and host_integerp.
13894         (layout_class_method): Count using trees.
13895         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13896         * expr.c (java_array_data_offset): Use int_bit_position.
13897         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13898         (build_invokevirtual): Use tree_low_cst and do computations with trees.
13899
13900 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13901
13902         * lang.c (flag_hash_synchronization): New global.
13903         (lang_f_options): Added `hash-synchronization'.
13904         * lang-options.h: Mention -fhash-synchronization.
13905         * java-tree.h (flag_hash_synchronization): Declare.
13906         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13907         hash table synchronization is disabled.
13908         * decl.c (init_decl_processing): Only push `sync_info' value when
13909         hash table synchronization is disabled.
13910         * class.c (make_class_data): Only push `sync_info' field when hash
13911         table synchronization is disabled.  Removed dead code.
13912
13913 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13914
13915         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13916
13917 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13918
13919         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13920         classes.
13921         * parse.y (patch_method_invocation): Handle anonymous classes
13922         creation in static context.
13923
13924 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13925
13926         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13927         * parse.y (resolve_qualified_expression_name): Use it.
13928         (patch_method_invocation): Likewise.
13929
13930 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13931
13932         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13933         depending on the type of dependency which dictates what the
13934         current class is.
13935         (unresolved_type_p): Resolved types limited to the current class.
13936
13937 2000-03-15  Tom Tromey  <tromey@cygnus.com>
13938
13939         * decl.c (init_decl_processing): Set type of `sync_info' to be
13940         pointer to Object.
13941
13942         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
13943         Correctly compute bit number for current slot.  Zero `high' and
13944         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
13945         mark_reference_fields.
13946         (mark_reference_fields): New function.
13947
13948 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13949
13950         * parse.y (register_incomplete_type): Fixed initialization of
13951         JDEP_ENCLOSING.
13952
13953 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13954
13955         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
13956         static globals.
13957         (push_class_context, pop_class_context): New function.
13958         (class_body:): Call pop_class_context.
13959         (interface_body:): Likewise.
13960         (INNER_QUALIFIER): New macro.
13961         (report_class_declaration): Changed output format and use
13962         INNER_QUALIFIER. Call push_class_context.
13963
13964 2000-02-14  Andrew Haley  <aph@cygnus.com>
13965
13966         * check-init.c (check_init): Add new cases for unary and binary
13967         tree nodes.
13968
13969 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13970
13971         * parse.y (resolve_package): Set `next' once a type name has been
13972         progressively discovered.
13973         (resolve_qualified_expression_name): Propagate resolution only if
13974         there are remaining qualifiers. Take into account `q' might have
13975         been cleared after re-qualification.
13976         * parse.y (patch_method_invocation): New local `resolved'.
13977         Section dealing with qualified expression rewritten to use
13978         resolve_field_access.
13979
13980 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13981
13982         * parse.h (PUSH_CPC): Fixed indentation.
13983         (DEBUG_CPC): New macro.
13984         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
13985         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
13986         * parse.y (class_body_declaration:): Use
13987         SET_CPC_INSTANCE_INITIALIZER_STMT.
13988         (method_declaration:): Check for null current_function_decl.
13989         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
13990         (java_parser_context_pop_initialized_field): Better handling of
13991         empty lists.
13992         (maybe_make_nested_class_name): Mark nested class name as
13993         qualified when necessary.
13994         (end_class_declaration): Don't call java_parse_context_resume when
13995         one or more error occurred.
13996         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
13997         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
13998         SET_CPC_INITIALIZER_STMT.
13999         (method_header): Check for inner classes declaring static methods.
14000         (resolve_qualified_expression_name): Handle situation where `this'
14001         is implied.
14002
14003 2000-03-13  Hans Boehm <boehm@acm.org>
14004
14005         * typeck.c (build_prim_array_type): Correctly set the high word too.
14006
14007 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14008
14009         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14010         ordinary methods.
14011         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14012         list of methods for interfaces.
14013
14014 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14015
14016         * parse.y (qualify_ambiguous_name): Properly handle expressions
14017         using `null'.
14018
14019 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14020
14021         * parse.y (check_final_assignment): Extended to process
14022         COMPOUND_EXPR.
14023         (patch_assignment): Have check_final_assignment called only once.
14024
14025 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14026
14027         * java-tree.h (IS_INIT_CHECKED): New flag.
14028         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14029         * parse.y (patch_string): Call force_evaluation_order on the
14030         completed string concatenation tree.
14031         * expr.c (force_evaluation_order): Call force_evaluation_order on
14032         function's arguments too.
14033
14034 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14035
14036         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14037         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14038         (build_anewarray): Likewise.
14039         * parse.y (patch_newarray): Likewise.
14040         * parse.c: Regenerated.
14041
14042 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14043
14044         * decl.c (init_decl_processing): Added new class fields `depth',
14045         `ancestors', and `idt' to class_type_node. Use
14046         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14047         * class.c (make_class_data): Push initial values for new fields.
14048         * java-tree.h: Updated prototype for `build_invokeinterface'.
14049         * expr.c (build_invokeinterface): Changed parameters to accept
14050         `method' tree. Calculate index of `method' in its declaring
14051         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14052         (expand_invoke): Call `build_invokeinterface' with new parameters.
14053         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14054         parameters.
14055
14056 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14057
14058         * typeck.c (lookup_do): Search superinterfaces first
14059         when looking up an interface method. From Godmar Back
14060         <gback@cs.utah.edu>
14061
14062 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14063
14064         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14065
14066 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14067
14068         * java-tree.h (lookup_argument_method2): Declared.
14069         (safe_layout_class): Prototype moved from parse.h.
14070         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14071         * parse.y (java_check_regular_methods): Local `super_class' gone.
14072         Call lookup_argument_method2 instead of lookup_argument_method.
14073         Perform modifier match for methods found declared in implemented
14074         interfaces. Fixed indentation problem. Overriding/hiding error
14075         report to take place only for methods found in classes.
14076         * typeck.c (lookup_argument_method): Changed leading
14077         comment. Re-written by calling lookup_do.
14078         (lookup_argument_method2): New function.
14079         (lookup_java_method): Re-written by calling lookup_do.
14080         (lookup_do): New function.
14081
14082 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14083
14084         * check-init.c (check_init): Removed dead code. Handle (blank)
14085         final variables.
14086         * parse.y (declare_local_variables): New local `final_p', set it
14087         and use it to initialize LOCAL_FINAL.
14088         (check_final_assignment): Only check FIELD_DECLs.
14089
14090 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14091
14092         * Makefile.in (JAVA_OBJS): Added boehm.o.
14093         (boehm.o): New target.
14094         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14095         * java-tree.h (flag_use_boehm_gc): Declare.
14096         (get_boehm_type_descriptor): Declare.
14097         * lang.c (lang_f_options): Added `use-boehm-gc'.
14098         (flag_use_boehm_gc): New global.
14099         * lang-options.h: Added -fuse-boehm-gc.
14100         * boehm.c: New file.
14101         * class.c (get_dispatch_table): If class uses a Boehm type
14102         descriptor, put it in the vtable.
14103         (make_class_data): Removed dead code.
14104
14105 2000-03-03  Per Bothner  <per@bothner.com>
14106
14107         * decl.c (init_decl_processing):  Initialize sizetype properly.
14108
14109 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14110
14111         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14112         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14113         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14114         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14115         (jcf_parse): New local `current'. Load innerclasses seen in outer
14116         context being processed.
14117         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14118         * jcf-write.c (append_innerclasses_attribute): New function.
14119         (append_innerclasses_attribute_entry): Likewise.
14120         (get_access_flags): Handle static classes. Set anonymous and local
14121         classes to be private.
14122         (generate_classfile): Attribute count adjusted. Call
14123         append_innerclasses_attribute.
14124         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14125         PURE_INNER_CLASS_TYPE_P.
14126         * parse.y (parser_qualified_classname): New parameter `is_static',
14127         produce non qualified name accordingly.
14128         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14129         (create_interface): Added argument to parser_qualified_classname.
14130         (create_class): Added argument to parser_qualified_classname. Setup
14131         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14132         (add_inner_class_fields): Fixed indentation.
14133         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14134         (method_declarator): Fixed typo in comment.
14135         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14136         (build_current_thisn): Likewise.
14137         (patch_method_invocation): Likewise.
14138
14139 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14140
14141         * decl.c (current_function_decl): Move to toplev.c.
14142
14143 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14144
14145         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14146         (DECL_BIT_INDEX): Use underlying representation.
14147         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14148
14149 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14150
14151         * expr.c (build_java_ret): Pass proper type to size_binop.
14152
14153 2000-02-25  Anthony Green  <green@cygnus.com>
14154
14155         * expr.c (build_class_init): Mark the decl to be ignored by
14156         check_init.
14157         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14158         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14159         * class.c (init_test_hash_newfunc): New function.
14160         (decl_hash): New function.
14161         (decl_compare): New function.
14162         * decl.c (emit_init_test_initialization): New function.
14163         (complete_start_java_method): Traverse the init test hashtable,
14164         calling emit_init_test_initialization.
14165         (always_initialize_class_p): Define.
14166         * expr.c (build_class_init): Use initialization tests when
14167         emitting class initialization code.
14168         (always_initialize_class_p): Declare.
14169         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14170         1.
14171         * java-tree.h: Include hash.h.
14172         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14173         (struct lang_decl): Add init_test_table field.
14174         (init_test_hash_entry): Define.
14175
14176 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14177
14178         * gjavah.c (main): Avoid using `argi' to report unimplemented
14179         options.
14180
14181 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14182
14183         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14184         initialize locals to avoid warnings. Local `exception_type' moved
14185         into if statement.
14186
14187 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14188
14189         * parse.y (resolve_expression_name): Use `orig' as a second
14190         argument to resolve_field_access.
14191         (resolve_field_access): Removed unnecessary code when dealing with
14192         static fields.
14193
14194 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14195
14196         * class.c (push_super_field): Don't push the field twice.
14197         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14198         * parse.h (java_reorder_fields): Prototyped.
14199         * parse.y (java_reorder_fields): New function.
14200         (java_layout_class): Simplified not to worry about re-ordering.
14201
14202 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14203
14204         * gjavah.c (print_name): In JNI case, correctly quote string.
14205         (print_method_info): Don't handle overrides in JNI mode.
14206
14207 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14208
14209         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14210         value type set to `boolean_type_node'.
14211
14212 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14213
14214         * jcf-dump.c (main): Test for correct condition after
14215         output file creation.
14216
14217 2000-02-19  Anthony Green  <green@cygnus.com>
14218
14219         * jcf-depend.c (add_entry): Fix test for first list entry.
14220
14221 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14222
14223         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14224         * constants.c (build_constants_constructor): Likewise.
14225
14226 2000-02-19  Anthony Green  <green@cygnus.com>
14227
14228         * jcf-depend.c (add_entry): Add entries to the end of the list.
14229
14230 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14231
14232         * decl.c (INT_TYPE_SIZE): Define if necessary.
14233         (expand_java_return): Handle the case of a native integer smaller
14234         than a JVM integer.
14235
14236 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14237
14238         * gjavah.c (help): Use GCCBUGURL.
14239         * jv-scan.c (help): Likewise.
14240         * jcf-dump.c (help): Likewise.
14241
14242 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14243
14244         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14245         `finally' clauses.
14246
14247 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14248
14249         * jcf-parse.c (load_class): Call `fatal' if no file containing
14250         the target class are found.
14251
14252 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14253
14254         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14255         lex.c, lex.h, and PARSE_H to...
14256         (parse.o, parse-scan.o): ...here, respectively.
14257
14258         * lex.c: Split out code that may trigger SIGFPE from yylex()
14259         to its own function.
14260         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14261
14262 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14263
14264         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14265
14266 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14267
14268         * parse.y (outer_field_access_p): Stop in time when outer contexts
14269         are exhausted.
14270         (resolve_qualified_expression_name): Properly qualify *everything*
14271         after a package.type to be resoled as expression names.
14272         (find_applicable_accessible_methods_list): Save/restore `class' to
14273         isolate it from a possible outer context search.
14274
14275 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14276
14277         * gjavah.c (jni_print_char): New function.
14278         (print_full_cxx_name): Use it.
14279         (decode_signature_piece): Likewise.
14280         (print_cxx_classname): Likewise.
14281
14282 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14283
14284         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14285         version.o.
14286         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14287
14288         * gjavah.c: Include version.h.
14289
14290         * jcf-dump.c: Likewise.
14291
14292         * jv-scan.c: Likewise.
14293
14294 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14295
14296         * parse.y (outer_field_access_fix): First parameter now a tree
14297         node. Check for assignment to final. First argument to
14298         build_outer_field_access_fix modified to accommodate prototype.
14299         (build_outer_field_access): Don't check for assignment to final
14300         here.
14301         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14302         possibly returned by outer_field_access_fix. Changed
14303         outer_field_access_fix's first argument.
14304         (check_final_assignment): $finit$'s context is OK.
14305         (patch_unaryop): Use node instead of its line/column value when
14306         calling outer_field_access_fix.
14307
14308 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14309
14310         * parse.y (interface_declaration:): No longer tagged
14311         <node>. Re-installed default action.
14312         (class_member_declaration:): Handle inner interfaces.
14313         (interface_member_declaration): Handle inner interfaces and
14314         classes.
14315         (create_interface): Push error if one seen. Suspend parsing
14316         context when processing an inner interface.
14317         (register_fields): Inner class static field limitations not to
14318         apply to inner interfaces.
14319
14320 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14321
14322         * jcf-parse.c (load_class): Update `java_error_count' when a
14323         class' file can't be found.
14324         (parse.y): Avoid (byte)code generation when errors seen.
14325
14326 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14327
14328         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14329         decodes a valid node.
14330         (patch_binop): Handle TRUNC_DIV_EXPR.
14331
14332 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14333
14334         * parse.y (resolve_package): New local `acc'. Try to progressively
14335         build and guess a package and type name.
14336
14337 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14338
14339         * parse.y (find_applicable_accessible_methods_list): Load and
14340         layout the search class if necessary.
14341         (java_complete_tree): Keep to original type of the folded initial
14342         value.
14343
14344 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14345
14346         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14347         Generate error message if circularity is detected. New static
14348         local `list'.
14349         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
14350         * jcf-write.c (generate_bytecode_insns): Very simply handle
14351         SAVE_EXPR.
14352         * parse.y (java_check_circular_reference): Use
14353         `cyclic_inheritance_report' during report, if necessary.
14354         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14355         walking NEW_ARRAY_INIT twice.
14356
14357 2000-02-09  Tom Tromey  <tromey@cygnus.com>
14358
14359         * parse.y (check_class_interface_creation): Allow inner classes to
14360         be `private' or `protected', check modifiers' consistency. Prevent
14361         block local classes from bearing any modifiers.
14362
14363 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14364
14365         * except.c (check_start_handlers): Re-add prototype lost in last
14366         patch.
14367         (maybe_start_try): Remove excess argument to `check_start_handlers'.
14368
14369 2000-02-09  Andrew Haley  <aph@cygnus.com>
14370
14371         * decl.c (clear_binding_level): Remove excess initializer.
14372         (maybe_poplevels): Remove unused variable.
14373         (force_poplevels): Ditto.
14374         (struct binding_level): Add comment.
14375
14376 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14377
14378         * jcf-write.c (generate_classfile): Don't consider
14379         pre-initialization with reference value (use <clinit> instead.)
14380         * parse.y (java_fix_constructors): No generated constructor for
14381         interfaces.
14382         (build_outer_field_access): Removed debug message.
14383         (outer_field_expanded_access_p): Adapted to bytecode generation.
14384         (build_outer_field_access_method): Use fix_method_argument_names.
14385         (build_outer_method_access_method): Fixed indentation. Added
14386         comment. Handle access method generation for static and also void
14387         methods.
14388         (build_access_to_thisn): Inserted debug message.
14389         (maybe_build_thisn_access_method): Use fix_method_argument_names.
14390         (resolve_qualified_expression_name): Fixed comment.
14391         (not_accessible_p): Adapted to bytecode generation. Added comment.
14392         (patch_method_invocation): Added comment.
14393         (maybe_use_access_method): Fixed leading comment. Handle static
14394         methods.
14395         (java_complete_lhs): Don't shortcut handling of initialized upon
14396         declaration String type static fields when generating bytecode.
14397         (patch_unaryop): Handle outer field access when generating
14398         bytecode.
14399
14400 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14401
14402         * java-tree.h (FIELD_THISN): New macro.
14403         * jcf-write.c (append_synthetic_attribute): New function.
14404         (generate_classfile): Set "Synthetic" attribute on this$<n>,
14405         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14406         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14407         this$<n> fields.
14408         (build_outer_field_access): Turned on access functions usage and
14409         generation when compiling to bytecode.
14410         (maybe_use_access_method): Likewise.
14411
14412 2000-01-25  Andrew Haley  <aph@cygnus.com>
14413
14414         * java-except.h (struct eh_range): Add `expanded' field.
14415         (maybe_start_try): Add end_pc arg.
14416         (maybe_end_try): Ditto.
14417         * java-tree.h (force_poplevels): new function.
14418         * expr.c (expand_byte_code): Don't call maybe_start_try or
14419         maybe_end_try.
14420         * except.c (add_handler): Reset expanded.
14421         (expand_start_java_handler): Set expanded.
14422         (check_start_handlers): Don't expand a start handler that's
14423         already been expanded.
14424         (maybe_start_try): Add end_pc arg.  Only expand a handler which
14425         ends after end_pc.
14426         (expand_end_java_handler): call force_poplevels.
14427         (force_poplevels): new function.
14428         * decl.c (binding_level): Add start_pc of binding level.
14429         (maybe_pushlevels): Call maybe_start_try when pushing binding
14430         levels.
14431         (maybe_poplevels): Call maybe_end_try when popping binding levels.
14432         (LARGEST_PC): Define.
14433         (clear_binding_level): Use LARGEST_PC.
14434
14435         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14436         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14437         (binding_depth, is_class_level, current_pc): new variables.
14438         (struct binding_level): ditto.
14439         (indent): new function.
14440         (push_jvm_slot): add debugging info.
14441         (maybe_pushlevels): ditto.
14442         (maybe_poplevels): ditto.
14443         (pushlevel): ditto.
14444         (poplevel): ditto.
14445         (start_java_method): ditto.
14446         (give_name_to_locals): comment only.
14447         * except.c (binding_depth, is_class_level, current_pc):
14448         new variables.
14449         (expand_start_java_handler): add debugging info.
14450         (expand_end_java_handler): ditto.
14451
14452 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14453
14454         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14455         (print_name_for_stub_or_jni, process_file): Constify a char*.
14456
14457 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14458
14459         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14460
14461 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14462
14463         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14464         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14465         defined to be 1.
14466
14467 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14468
14469         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14470         * java-tree.h (TYPE_II_STMT_LIST): New macro.
14471         (struct lang_type): New field `ii_block'.
14472         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14473         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14474         * parse.h (struct parser_ctxt): New field `instance_initializers'.
14475         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14476         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14477         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14478         macros.
14479         * parse.y (add_instance_initializer): New function.
14480         (in_instance_initializer): New static global.
14481         (class_body_declaration:): Link instance initializer block.
14482         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14483         (array_creation_expression:): Remove unused local.
14484         (java_parser_context_push_initialized_field): Fixed leading
14485         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14486         CPC_INSTANCE_INITIALIZER_LIST.
14487         (java_parser_context_pop_initialized_field): Likewise.
14488         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14489         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14490         CPC_INITIALIZER_STMT.
14491         (fix_constructors): New local `class_type'. Use it. Call
14492         add_instance_initializer.
14493         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14494         (patch_return): Forbid return in instance initializers.
14495         (patch_throw_statement): Enforce exception handling in the context
14496         of instance initializers.
14497
14498 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14499
14500         * Make-lang.in (java.mostlyclean): Remove executables in
14501         `mostlyclean'.
14502
14503 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14504
14505         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14506         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14507         (java_float_finite): Convert to use union Word from javaop.h.
14508         (java_double_finite): Convert to use union DWord from javaop.h.
14509
14510 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14511
14512         * gjavah.c (options): Added `jni' entry.
14513         (help): Document -jni.
14514         (flag_jni): New global.
14515         (process_file): Handle JNI output.  Don't print text from
14516         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14517         suffix if it actually exists.
14518         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14519         correct output file name with `--jni'.
14520         (print_include): Mangle header name differently in JNI case.
14521         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14522         method list.
14523         (print_method_info): Handle JNI case.  Put signature info into
14524         method name.  Handle case when STREAM is NULL.
14525         (print_name_for_stub_or_jni): New function.
14526         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14527         (print_cxx_classname): Handle JNI.
14528         (print_full_cxx_name): Likewise.
14529         (decode_signature_piece): Likewise.
14530         (overloaded_jni_method_exists_p): New function.
14531         (struct method_name): Added `signature' and `sig_length' fields.
14532         (HANDLE_END_FIELD): Do nothing in JNI mode.
14533
14534 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14535
14536         * jv-scan.c: Include version.c, <getopt.h>.
14537         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14538         (options): New array.
14539         (usage): New function.
14540         (version): New function.
14541         (main): Use getopt_long to parse command line.
14542         * jcf-dump.c: Include version.c, <getopt.h>.
14543         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14544         OPT_JAVAP): New macros.
14545         (options): New array.
14546         (usage): Return `void'.  Changed message.
14547         (help): New function.
14548         (version): New function.
14549         (main): Use getopt_long_only to parse command line.
14550         * gjavah.c: Include <getopt.h>.
14551         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14552         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14553         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14554         (options): New array.
14555         (java_no_argument): Removed.
14556         (help): Updated with missing options.
14557         (main): Use getopt_long_only to parse command line.
14558         (usage): Changed message.
14559
14560 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14561
14562         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14563         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14564         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14565         * parse.y (array_creation_expression:): Handle anonymous arrays.
14566         (build_array_from_name): Don't set `ret_name' if null.
14567         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14568         (qualify_ambiguous_name): Likewise.
14569         (java_complete_expand_class): Likewise.
14570
14571 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14572
14573         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14574         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14575         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14576         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14577         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14578         AIPL_FUNCTION_COMPLETED_INVOCATION.
14579         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14580         AIPL_FUNCTION_INVOCATION_READY.
14581         (AIPL_FUNCTION_DECLARATION): New enum entry.
14582         * parse.y (reorder_static_initialized): New function.
14583         (java_parser_context_pop_initialized_field): Use it.
14584         (add_inner_class_fields): Use
14585         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14586         augmented. Install marker after last alias initializer, if any.
14587         (generate_finit): Fixed typo. Don't try to retain only the used
14588         fields.
14589         (method_header): Compute and set DECL_FUNCTION_NAP.
14590         (method_declarator): Fixed comment. Insert alias initializer in
14591         parameter list.
14592         (build_alias_initializer_parameter_list): Fixed leading
14593         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14594         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14595         (java_complete_expand_class): Code to retain only used aliases
14596         removed.
14597         (java_complete_expand_methods): New local `first_decl'. Generate
14598         $finit$ first, then expand the constructors, regular methods and
14599         <clinit>.
14600         (java_complete_expand_method): Don't report error on missing
14601         return statement if previously detected bogus.
14602         (fix_constructors): Don't patch constructor parameters list.
14603         (patch_method_invocation): Use new AIPL enum values. Reverse
14604         alias initializer list for anonymous classes.
14605
14606 2000-01-30  Anthony Green  <green@redhat.com>
14607
14608         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14609         determine how many stack slots to pop.
14610
14611 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14612
14613         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14614         error handling/recovery.
14615         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14616
14617 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14618
14619         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14620         FIELD_LOCAL_ALIAS_USED): New macros.
14621         (DECL_FUNCTION_NAP): New macro.
14622         (struct lang_decl): New field `nap'.
14623         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14624         (struct lang_type): New fields `finit_stmt_list' and
14625         `clinit_stmt_list'.
14626         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14627         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14628         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14629         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14630         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14631         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14632         (BUILD_THROW): Macro line separator re-indented.
14633         * parse.y (end_class_declaration): New function.
14634         (maybe_generate_pre_expand_clinit): New name for
14635         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14636         pre-expand static fields.
14637         (maybe_generate_clinit): Function deleted.
14638         (check_for_static_method_reference): Prototype's parameter list
14639         indented.
14640         (generate_finit): New name for maybe_generate_finit. Changed
14641         leading comment. Function rewritten to use
14642         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14643         (build_alias_initializer_parameter_list): New function.
14644         (java_parser_context_pop_initialized_field): Likewise.
14645         (add_inner_class_fields): Likewise.
14646         (type_declaration:): Call end_class_declaration.
14647         (class_member_declaration:): Likewise.
14648         (formal_parameter_list:): Fixed typos.
14649         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14650         element. Improved error handling.
14651         (block_statement:): Call end_class_declaration.
14652         (anonymous_class_creation:): Likewise.
14653         (create_anonymous_class): Fixed comments.
14654         (create_class): Call add_inner_class_fields.
14655         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14656         (method_header): Use MARK_FINAL_PARMS.
14657         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14658         (method_declarator): Propagate final argument flag.
14659         (craft_constructor): New local `artificial'. Call
14660         build_alias_initializer_parameter_list. Use
14661         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14662         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14663         necessary.
14664         (complete_expand_class): Get rid of unused outer context local
14665         alias fields.
14666         (java_complete_expand_methods): Fixed leading
14667         comment. Generate/pre-expand <clinit> first. Changed method
14668         expansion order to regular, $finit$, constructors, <clinit>.
14669         (java_complete_expand_method): Set current_function_decl.
14670         (fix_constructors): Fix constructor parameter list to account for
14671         outer context local alias initializers.
14672         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14673         (resolve_expression_name): Lookup outer context local aliases. New
14674         local `access', use it.
14675         (patch_method_invocation): Patch inner class ctor invocation with
14676         outer context local aliases initialization values. $finit$
14677         invocation patching now includes things generated with
14678         build_alias_initializer_parameter_list.
14679         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14680         (build_super_invocation): Likewise.
14681         (patch_assignment): Changed comment.
14682
14683 2000-01-27  Andrew Haley  <aph@cygnus.com>
14684
14685         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14686         (emit_if): Ditto.
14687         (emit_jsr): Ditto.
14688
14689 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14690
14691         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14692         concatenation.
14693         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14694
14695         * parse.y (register_fields): Don't pass a format specifier to
14696         OBSOLETE_MODIFIER_WARNING.
14697         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14698         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14699         specifier.
14700         (check_modifiers): Change function into a macro.
14701         (check_class_interface_creation): Pass a literal format string.
14702
14703 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14704
14705         * buffer.h: PROTO -> PARAMS.
14706         * check-init.c: Likewise.
14707         * class.c: Likewise.
14708         * constants.c: Likewise.
14709         * convert.h: Likewise.
14710         * decl.c: Likewise.
14711         * except.c: Likewise.
14712         * expr.c: Likewise.
14713         * gjavah.c: Likewise.
14714         * java-except.h: Likewise.
14715         * java-tree.h: Likewise.
14716         * jcf-depend.c: Likewise.
14717         * jcf-dump.c: Likewise.
14718         * jcf-parse.c: Likewise.
14719         * jcf-path.c: Likewise.
14720         * jcf-reader.c: Likewise.
14721         * jcf-write.c: Likewise.
14722         * jcf.h: Likewise.
14723         * jv-scan.c: Likewise.
14724         * jvgenmain.c: Likewise.
14725         * jvspec.c: Likewise.
14726         * lang.c: Likewise.
14727         * lex.c: Likewise.
14728         * lex.h: Likewise.
14729         * parse-scan.y: Likewise.
14730         * parse.h: Likewise.
14731         * parse.y: Likewise.
14732         * typeck.c: Likewise.
14733         * verify.c: Likewise.
14734         * xref.c: Likewise.
14735         * xref.h: Likewise.
14736         * zextract.c: Likewise.
14737         * zipfile.h: Likewise.
14738
14739 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14740
14741         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14742         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14743         * constants.c (build_constant_data_ref): Check for cached
14744         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14745         in TYPE_CPOOL_DATE_REF.
14746         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14747         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14748         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14749         (LOCAL_FINAL): New macro.
14750         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14751         constant pool -- don't try to reuse.
14752         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14753         TYPE_LANG_SPECIFIC.
14754         (find_in_current_zip): Use TYPE_JCF.
14755         * parse.h (java_check_final): Prototype removed.
14756         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14757         (maybe_create_class_interface_decl,
14758         check_class_interface_creation): Likewise.
14759         (java_expand_finals): Function removed.
14760         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14761         (block_statement:): Fixed comment.
14762         (anonymous_class_creation:): Likewise.
14763         (check_class_interface_creation): Reversed Jan 12, 2000 extra
14764         argument patch.
14765         (check_class_interface_creation): Loosened error report on (inner)
14766         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14767         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14768         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14769         argument patch.
14770         (create_interface): Likewise.
14771         (anonymous_class_counter): New static global.
14772         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14773         patch. Fixed comments.
14774         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14775         anonymous_class_counter when declaring a toplevel class.
14776         (craft_constructor): Fixed constructor name when handling
14777         anonymous classes. Anonymous class constructors to feature hidden
14778         this$<n> parameter.
14779         (java_fix_constructors): Added comment.
14780         (java_check_final): Function removed.
14781         (java_complete_expand_methods): Fixed comment. Don't generate
14782         class data, save its outgoing constant pool instead.
14783         (verify_constructor_super): Skip anonymous class constructor
14784         hidden this$<n> parameter.
14785         (java_expand_classes): New local `saved_ctxp'. Removed call to
14786         java_expand_finals and java_check_final. Expand anonymous class
14787         constructors. Generate class data.
14788         (build_super_invocation): Skip anonymous class hidden this$<n>
14789         parameter.
14790         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14791         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14792         (set_java_signature): Likewise.
14793
14794 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14795
14796         * gjavah.c: Delete ACC_VISIBILITY define.
14797         * jcf.h: Add ACC_VISIBILITY define.
14798         * parse.y: final: rule tagged <value>.
14799         (java_check_regular_methods): Use ACC_VISIBILITY define for
14800         default package access check.
14801         (local_variable_declaration_statement): Use final: rule.
14802
14803 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14804
14805         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14806         (final:): New rule.
14807
14808 2000-01-17  Tom Tromey  <tromey@cygnus.com>
14809
14810         * gjavah.c (print_field_info): Allow non-static final fields.
14811
14812 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14813
14814         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14815         * parse.y (patch_anonymous_class): New function.
14816         (create_anonymous_class): Register incomplete type when the
14817         class/interface to extends/implement isn't known yet.
14818         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14819         (verify_constructor_super): Tuned error message.
14820
14821 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14822
14823         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14824         (ANONYMOUS_CLASS_P): New macro.
14825         (TYPE_SIGNATURE, TYPE_JCF): New macros.
14826         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14827         * parse.y (create_class): Added leading argument.
14828         (maybe_create_class_interface_decl,
14829         check_class_interface_creation): Likewise.
14830         (craft_constructor): New function.
14831         (verify_constructor_super): Added argument in prototype.
14832         (class_declaration:): Inserted leading argument.
14833         (for_begin:): Use FOR_LOOP_P.
14834         (anonymous_class_creation): Create WFL of the anonymous class to
14835         instantiate. Call build_new_invocation. Added comments.
14836         (check_class_interface_creation): Handle parameter `anonymous' in
14837         verbose mode class creation announce.
14838         (link_nested_class_to_enclosing): Exclude anonymous classes.
14839         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14840         anonymous class, even though they appear to have an enclosing
14841         context.
14842         (create_interface): Pass extra argument to
14843         check_class_interface_creation.
14844         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14845         (create_class): Call check_class_interface_creation and
14846         maybe_create_class_interface_decl with extra new argument. Don't
14847         add private this$<n> to anonymous classes.
14848         (method_declarator): Insert hidden this$<n> to anonymous class
14849         constructors.
14850         (java_fix_constructors): Deleted code creating default
14851         constructor. Call craft_constructor instead.
14852         (java_check_regular_methods): Set `saw_constructor' to 1 for
14853         anonymous classes.
14854         (fix_constructors): Pass extra argument to verify_constructor_super.
14855         (verify_constructor_super): New local `sdecl', use it. Search for
14856         matching constructor (possibly featuring arguments) in super
14857         class.
14858         (lookup_method_invoke): Craft constructor according to arguments
14859         list when dealing with anonymous class constructors.
14860         (build_super_invocation): Pass arguments to anonymous class super
14861         constructors.
14862         (search_loop): Use FOR_LOOP_P.
14863         (labeled_block_contains_loop_p): Likewise.
14864
14865 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14866
14867         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14868         (enclosing_context_p): New function.
14869         (get_access_flags_from_decl): Handle CLASS_STATIC.
14870         (maybe_layout_super_class): Extra first argument passed to
14871         do_resolve_class.
14872         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14873         ID_INIT_P.
14874         * decl.c (access0_identifier_node): New global.
14875         (init_decl_processing): access0_identifier_node initialized.
14876         (pushdecl): Set DECL_CONTEXT only on non type decls.
14877         * expr.c (lookup_field): Lookup inner class fields in enclosing
14878         contexts.
14879         (expand_invoke): Use ID_INIT_P.
14880         (expand_java_field_op): Use DECL_CLINIT_P.
14881         * java-tree.def (CLASS_LITERAL): New tree code.
14882         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14883         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14884         (struct lang_decl): New field `inner_access'.
14885         (enclosing_context_p): Prototyped.
14886         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14887         ID_CLINIT_P): New macros.
14888         (CLASS_STATIC): New macro.
14889         (CLASS_ACCESS0_GENERATED_P): New macro.
14890         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14891         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14892         INNER_CLASS_P): New macros.
14893         (DECL_INNER_CLASS_LIST): New macro.
14894         * jcf-parse.c (yyparse): Avoid the use of ANSI string
14895         concatenation.
14896         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14897         the shift value to int. Fixed typo in comment.
14898         * lex.c (inst_id, wpv_id): Initialize.
14899         * mangle.c (unicode_mangling_length): Take `$' into account.
14900         * parse.h (DRECOVER, RECOVER): Terminate properly.
14901         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14902         (typedef struct _jdep): New field `enclosing'.
14903         (JDEP_ENCLOSING): New macro.
14904         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14905         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14906         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14907         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14908         GET_ENCLOSING_CPC_CONTEXT): New macros.
14909         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14910         (do_resolve_class): Added extra argument in prototype.
14911         * parse.y (resolve_class): Added extra argument in prototype.
14912         (maybe_create_class_interface_decl): Likewise.
14913         (maybe_use_access_method, build_wfl_wrap): New functions.
14914         (java_complete_expand_classes, java_complete_expand_class):
14915         Likewise.
14916         (java_parser_context_push_initialized_field,
14917         java_parser_context_suspend, java_parser_context_resume):
14918         Likewise.
14919         (maybe_make_nested_class_name, make_nested_class_name,
14920         set_nested_class_simple_name_value,
14921         link_nested_class_to_enclosing, find_as_inner_class,
14922         find_as_inner_class_do, check_inner_class_redefinition,
14923         build_thisn_assign, build_current_thisn, build_access_to_thisn,
14924         maybe_build_thisn_access_method, build_outer_field_access,
14925         build_outer_field_access_methods, build_outer_field_access_expr,
14926         build_outer_method_access_method, build_new_access_id,
14927         build_outer_field_access_method, outer_field_access_p,
14928         outer_field_expanded_access_p, outer_field_access_fix,
14929         build_incomplete_class_ref, patch_incomplete_class_ref,
14930         create_anonymous_class): Likewise.
14931         (inst_id, wpv_id): New static global variables.
14932         (synchronized:): New rule, tagged <node>.
14933         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14934         rules.
14935         (anonymous_class_creation:): New rule, tagged <node>.
14936         (NEW_TK): Tagged <node>.
14937         (type_literals, array_type_literal): New rules, tagged <node>.
14938         (class_declaration:): Removed action when reducing by class_body:
14939         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
14940         using GET_CPC in sub-rules.
14941         (class_member_declaration): Handle inner classes.
14942         (method_declaration): When reducing method_header:, reset
14943         current_function_decl when appropriate.
14944         (method_declarator:): Set the number of formal parameter to 0 for
14945         method declared without arguments.
14946         (constructor_declarator:): Likewise.
14947         (static_initializer:): List of elements kept in a list.
14948         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
14949         use of the keyword `static' for type declarations.
14950         (block_statement:): Handle inner class declarations.
14951         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
14952         type qualified `this'.
14953         (class_instance_creation_expression): Use anonymous_class_creation:
14954         to handle inner class instances creation. Handle qualified `new'.
14955         (something_dot_new): Added appropriate actions.
14956         (create_new_parser_context): New function.
14957         (java_push_parser_context, java_parser_context_save_global,
14958         java_parser_context_suspend): Use create_new_parser_context.
14959         (check_modifiers): Changed leading comment.
14960         (check_class_interface_creation): Handle interclasses.
14961         (add_superinterfaces): Fixed comment.
14962         (create_interface): Build qualified name from the raw_name instead
14963         of its matching WFL. Push the initialized fields list. raw_name added
14964         as an extra argument to maybe_create_class_interface_decl.
14965         (create_class): Build qualified name from the raw_name instead of
14966         its matching WFL. Removed assignment to current_parsed_class_un.
14967         Call PUSH_ERROR before returning an error. Suspend the current
14968         parser context when processing an inner class. Push the
14969         initialized fields list. raw_name added as an extra argument to
14970         maybe_create_class_interface_decl. Add the private this$<n>
14971         field.
14972         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
14973         (register_fields): Get the class type from GET_CPC and handle
14974         previous errors.  Added code to handle the creation of static
14975         fields in inner classes. Initialized fields initialization
14976         statements kept in a list of lists.
14977         (maybe_generate_finit): Initialized fields initialization
14978         statements kept in a list of lists. Use GET_CPC.
14979         (maybe_generate_clinit): Likewise.
14980         (method_header): Use GET_CPC and GET_CPC_UN.
14981         (parser_qualified_classname): Handle inner classes.
14982         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
14983         (java_fix_constructors): Hide pointer to enclosing context
14984         instance in constructor list when dealing with inner classes.
14985         (jdep_resolve_class): Call resolve_class with extra first argument
14986         JDEP_ENCLOSING.
14987         (resolve_class): Add enclosing context as a first extra argument
14988         to do_resolve_class.
14989         (do_resolve_class): Call find_as_inner_class. Handle WFLs
14990         properly.
14991         (resolve_no_layout): Extra argument added to resolve_class
14992         invocation.
14993         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
14994         (java_get_real_method_name): Use GET_CPC_UN.
14995         (check_abstract_method_definitions): Use DECL_CLINIT_P.
14996         (java_check_abstract_methods): Handle static method declared in
14997         inner classes by an error.
14998         (java_check_regular_methods): Use DECL_CLINIT_P.
14999         (source_start_java_method): Also set DECL_MAX_LOCALS.
15000         (create_artificial_method): Call java_parser_context_save_global
15001         and java_parser_context_restore_global instead of saving/restoring
15002         the context by hand.
15003         (expand_start_java_method): Improved verbose mode message.
15004         (java_complete_expand_methods): Fixed leading comment. Use
15005         DECL_CLINIT_P.
15006         (fix_constructors): Added assignment to this$<n> if necessary.
15007         (java_expand_classes): Call java_complete_expand_classes instead
15008         of java_complete_expand_methods.
15009         (make_qualified_primary): Simplified.
15010         (merge_qualified_name): Optimized for missing left or right parts.
15011         (resolve_expression_name): Handle access to outer class fields from
15012         interclasses.
15013         (resolve_qualified_expression_name): New macro
15014         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15015         classes. Report error on non appropriate qualification of
15016         `new'. Handle qualified `this'.
15017         (not_accessible_p): Allow access to outer class private fields from
15018         inner classes.
15019         (patch_method_invocation): Handle method invocations through
15020         access methods and inner class constructor invocations.
15021         (find_applicable_accessible_methods_list): Search enclosing
15022         contexts of an inner class.
15023         (search_applicable_methods_list): Fixed typo.
15024         (argument_types_convertible): Handle inner class constructors'
15025         hidden outer context reference argument.
15026         (qualify_ambiguous_name): Handle qualified `this'.
15027         (java_complete_lhs): Handle use of field accessed through
15028         artificial access methods in various cases of assignments. Handle
15029         CLASS_LITERAL node.
15030         (check_final_assignment): Use DECL_CLINIT_P.
15031         (valid_ref_assignconv_cast_p): Handle the destination being an
15032         enclosing context of the source.
15033         (patch_unaryop): Handle use of field accessed through artificial
15034         access methods.
15035         (patch_return): Use DECL_CLINIT_P.
15036         (patch_throw_statement): Use DECL_CLINIT_P.
15037         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15038         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15039         ID_INIT_P.
15040
15041 2000-01-16  Anthony Green  <green@cygnus.com>
15042
15043         * parse.y (build_string_concatenation): Only use
15044         StringBuffer(String) shortcut if String arg is constant.
15045
15046 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15047
15048         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15049         the shift value to int. Fixed typo in comment.
15050
15051 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15052
15053         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15054         * jcf-write.c: Likewise.
15055         * parse.y: Likewise.
15056         * parse.c: Regenerate.
15057
15058 2000-01-09  Anthony Green  <green@cygnus.com>
15059
15060         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15061         bytecodes in the correct order.
15062
15063 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15064
15065         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15066
15067 2000-01-06  Anthony Green  <green@cygnus.com>
15068
15069         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15070         before building constant array decl.
15071
15072 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15073
15074         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15075         method invocation and typo in conditional expression.
15076         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15077         the appropriate NOTE_POP.
15078         * parse.y (patch_binop): Shift value mask to feature the right
15079         type.
15080
15081 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15082
15083         * class.c (assume_compiled, assume_compiled_node): Add static
15084         prototype.
15085         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15086
15087         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15088
15089         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15090
15091         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15092         to `__modifier' to avoid stringifying it.
15093
15094         * parse.y (verify_constructor_circularity): Don't call a variadic
15095         function with a non-literal format string.
15096         (java_check_abstract_methods): Move unreachable code inside
15097         `continue' statement.
15098         (lookup_method_invoke): Call xstrdup, not strdup.
15099
15100         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15101         concatenation.
15102
15103         * jcf-parse.c (yyparse): Likewise.
15104
15105         * jv-scan.c (main): Likewise.
15106
15107 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15108
15109         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15110         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15111         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15112         concatenation.
15113
15114         * parse.y (synchronized, variable_redefinition_error,
15115         check_class_interface_creation, create_interface, create_class,
15116         method_header, finish_method_declaration,
15117         check_modifiers_consistency, method_declarator,
15118         complete_class_report_errors, check_abstract_method_definitions,
15119         java_check_regular_methods, check_throws_clauses,
15120         java_check_abstract_methods, read_import_dir,
15121         check_pkg_class_access, declare_local_variables, fix_constructors,
15122         cut_identifier_in_qualified, resolve_expression_name,
15123         resolve_qualified_expression_name, patch_method_invocation,
15124         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15125         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15126         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15127         patch_try_statement, patch_synchronized_statement,
15128         patch_throw_statement, check_thrown_exceptions,
15129         patch_conditional_expr): Likewise.
15130
15131 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15132
15133         * Makefile.in (LIBDEPS): Added gcc's errors.o
15134         (../jcf-dump$(exeext):): Link with gcc's errors.o
15135         (../gcjh$(exeext):): Likewise.
15136         * expr.c (expand_java_NEW): Layout the entire target type instead of
15137         laying out its methods only.
15138         (lookup_field): Layout the class after having loaded it.
15139         * java-tree.h (java_debug_context): Declared.
15140         * jcf-io.c (toplev.h): Included.
15141         (find_class): Removed assignment to jcf's outofsynch
15142         field. Force source file to be read if newer than its matching
15143         class file. Tweaked debug messages.
15144         * jcf-parse.c (jcf_out_of_synch): Deleted.
15145         (read_class): Call to jcf_out_of_synch removed.
15146         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15147         (jcf_out_of_synch): Prototype deleted.
15148         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15149         `deprecated' and `class_err': integer turned into bit-fields.
15150         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15151         * parse.y (package_list): New global.
15152         (package_declaration:): Record newly parsed package name.
15153         (extra_ctxp_pushed_p): Static global deleted.
15154         (java_parser_context_save_global): Create buffer context for the
15155         purpose of saving globals, if necessary.
15156         (java_parser_context_restore_global): Pop context pushed for the
15157         purpose of saving globals, if necessary.
15158         (java_debug_context_do): New prototype and function.
15159         (java_debug_context): Likewise.
15160         (do_resolve_class): Use already parsed package names to qualify
15161         and lookup class candidate.
15162         (java_pre_expand_clinit): Removed unnecessary local variable.
15163
15164 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15165
15166         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15167         fixes PR gcj/119.
15168         (process_file): Use `\n\' at end of each line in string.
15169
15170 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15171
15172         * expr.c (expand_invoke): Layout the loaded class before
15173         attempting to use it.
15174         (expand_java_field_op): Allow final field assignments to take
15175         place in $finit$.
15176         * typeck.c (convert): Return error_mark_node if expr is null.
15177
15178 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15179
15180         * class.c (class_depth): Return -1 if the class doesn't load
15181         properly.
15182         * expr.c (can_widen_reference_to): Check for errors during depth
15183         computation and return 0 accordingly.
15184         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15185         create default constructors and add an other error check.
15186         * parse.h (java_fix_constructors): Prototyped.
15187         * parse.y (java_pre_expand_clinit): Likewise.
15188         (build_super_invocation): Re-prototyped to feature one argument.
15189         (java_check_circular_reference): Directly use `current'.
15190         (java_fix_constructors): New function.
15191         (java_check_regular_methods): Don't create default constructors
15192         here, but abort if none were found.
15193         (java_complete_expand_methods): Pre-process <clinit> calling
15194         java_pre_expand_clinit.
15195         (java_pre_expand_clinit): New function.
15196         (fix_constructors): build_super_invocation invoked with the
15197         current method declaration as an argument.
15198         (build_super_invocation): Use the context of the processed method
15199         decl argument instead of current_class.
15200         * typeck.c (lookup_java_method): Take WFLs in method names into
15201         account.
15202
15203 1999-12-14  Per Bothner  <per@bothner.com>
15204
15205         * class.c (make_class_data): flag_keep_inline_functions to keep
15206         private methods in the method array.
15207
15208 1999-12-15  Anthony Green  <green@cygnus.com>
15209
15210         * check-init.c (check_init): Take into account both types of
15211         `throw's when checking for uninitialized variables.
15212
15213 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15214
15215         * parse.y (java_complete_lhs): Force conversion of array
15216         dimensions to int_type_node, that's what runtime's ABI expects.
15217
15218 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15219
15220         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15221         operand of a WFL, until the Java front-end gets fixed with regard
15222         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15223
15224 1999-12-10  Andrew Haley  <aph@cygnus.com>
15225
15226         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15227         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15228         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15229         java-tree.h: Ditto.
15230         jcf-write.c: Ditto.
15231
15232 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15233
15234         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15235         before calling expand_eh_region_start and expand_start_all_catch.
15236         * except.c (expand_start_java_handler): Switch to permanent
15237         obstack before calling expand_eh_region_start.
15238         (expand_end_java_handler): Switch to permanent obstack before
15239         calling expand_start_all_catch.
15240
15241 1999-12-5  Anthony Green  <green@cygnus.com>
15242
15243         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15244         function with side effects.
15245         (init_decl_processing): Mark all memory allocating DECLs with
15246         DECL_IS_MALLOC.
15247
15248 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15249
15250         * except.c (expand_end_java_handler): Call
15251         expand_resume_after_catch and end_catch_handler.
15252
15253 1999-11-30  Anthony Green  <green@cygnus.com>
15254
15255         * verify.c (verify_jvm_instructions): Create new return label
15256         chain if non existent (don't rely on the verified state of the jsr
15257         target.)
15258
15259 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15260
15261         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15262         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15263
15264         * parse.y (patch_assignment): Removed bogus final class test on
15265         lhs when checking on whether to emit an ArrayStoreException runtime
15266         check.
15267         * expr.c (expand_java_arraystore): Likewise.
15268
15269 1999-11-28 Anthony Green <green@cygnus.com>
15270
15271         * decl.c (find_local_variable): Reuse single slot decls when
15272           appropriate.
15273
15274 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15275
15276         * jcf-parse.c (saw_java_source): Global variable removed.
15277         (read_class): Don't use `saw_java_source'. Added extra braces.
15278         (yyparse): Code setting `saw_java_source' removed.
15279
15280 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15281
15282         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15283
15284 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15285
15286         * verify.c (merge_type_state): Non verified subroutines being
15287         considered more than once to trigger passive type merge.
15288
15289 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15290
15291         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15292         in case of error. Error message tuned.
15293
15294 1999-11-21  Anthony Green  <green@cygnus.com>
15295
15296         * constants.c (find_methodref_index): Unwrap method names before
15297         inserting them in the constant pool.
15298
15299         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15300
15301         * class.c (assume_compiled_node): New typedef.
15302         (assume_compiled_tree): New static data.
15303         (find_assume_compiled_node): New function.
15304         (add_assume_compiled): New function.
15305         (assume_compiled): New function.
15306         * class.c (make_class_data): Use assume_compiled.
15307         (is_compiled_class): Use assume_compiled.
15308
15309         * java-tree.h (add_assume_compiled): Declare.
15310
15311         * lang.c (lang_decode_option): Parse new options.
15312
15313 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15314
15315         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15316         int_type_node: that's what `_Jv_AllocObject' expects.
15317
15318 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15319
15320         * parse.y (lookup_method_invoke): Use lang_printable_name to
15321         reliably build the type name during error report. Fixes PR gcj/97.
15322
15323 1999-11-09  Tom Tromey  <tromey@cygnus.com>
15324
15325         * jcf-path.c: Include <sys/stat.h>.
15326         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
15327         (DIR_UP): New macro.
15328
15329 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15330
15331         * parse.y (source_end_java_method): Resume permanent allocation,
15332         reversing Apr 27 1998 patch.
15333         (patch_string_cst): Pop obstacks after having pushed the permanent
15334         ones.
15335
15336 1999-11-05  Tom Tromey  <tromey@cygnus.com>
15337
15338         * class.c (finish_class): Emit inlined methods if any native
15339         methods exist in the class.  Fixes PR gcj/85.
15340
15341 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15342
15343         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15344         (qualify_ambiguous_name): Likewise.
15345
15346 1999-11-03  Godmar Back <gback@cs.utah.edu>
15347
15348         * typeck.c: (lookup_java_method):  search all inherited
15349         interfaces when looking up interface method.
15350
15351 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15352
15353         * parse.y (method_header:): Issue error message for rule `type
15354         error'.
15355         (synchronized:): Error report when not using synchronized.
15356
15357 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15358
15359         * parse.y (resolve_qualified_expression_name): Prevent `this' from
15360         being used before the superclass constructor has been called.
15361         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15362         instead of `CALL_THIS_CONSTRUCTOR_P'.
15363
15364 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
15365
15366         * check-init.c: Fix typo in comment.
15367
15368 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15369
15370         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15371         and final method.
15372
15373 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15374
15375         * parse.y (expression_statement:): Call function to report
15376         improper invocation of a constructor.
15377         (parse_ctor_invocation_error): New function.
15378
15379 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
15380
15381         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15382         remember_end_note.
15383
15384 1999-10-21  Tom Tromey  <tromey@cygnus.com>
15385
15386         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15387         in generated `main'.
15388
15389 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15390
15391         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15392         (qualify_ambiguous_name): Likewise.
15393
15394 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15395
15396         * parse.y (java_complete_tree): fold_constant_for_init to work on
15397         permanent_obstack.
15398         (java_complete_lhs): Likewise.
15399         (array_constructor_check_entry): Complete an initializer element
15400         on permanent_obstack.
15401
15402 1999-10-19  Tom Tromey  <tromey@cygnus.com>
15403
15404         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15405         From Mike Moreton <mike@pillim.demon.co.uk>.
15406
15407 1999-10-15  Greg McGary  <gkm@gnu.org>
15408
15409         * java-tree.h (flag_bounds_check): Remove extern decl.
15410         * lang.c (flag_bounds_check): Remove global variable.
15411         (lang_f_options): Remove "bounds-check" entry.
15412         (lang_init_options): Default flag_bounds_check to "on".
15413
15414 1999-10-14  Tom Tromey  <tromey@cygnus.com>
15415
15416         * jvgenmain.c (usage): New function.
15417         (main): Use it.  Also, handle `-D' options.
15418         * jvspec.c (lang_specific_driver): Recognize -D.
15419         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15420
15421         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15422
15423 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15424
15425         * jcf-dump.c (print_constant, disassemble_method): Don't call a
15426         variadic function with a non-literal format string.
15427
15428         * parse-scan.y (report_main_declaration): Likewise.
15429
15430         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15431
15432         * parse.y (read_import_dir, patch_assignment, patch_binop,
15433         patch_array_ref): Likewise.
15434
15435         * typeck.c (build_java_array_type): Likewise.
15436
15437         * verify.c (verify_jvm_instructions): Likewise.
15438
15439 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15440
15441         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15442
15443 1999-10-07  Anthony Green  <green@cygnus.com>
15444
15445         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15446         where CHECK_PUT may fail for valid reasons.
15447
15448         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15449         UNSAFE_PUTN): New macros.
15450
15451 1999-10-04  Tom Tromey  <tromey@cygnus.com>
15452
15453         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15454         well.  Fixes Java PR gcj/59.
15455         * parse-scan.y (yyerror): Report errors.
15456
15457 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
15458
15459         * decl.c (insert_block): Remove unconditional `abort'.
15460
15461 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
15462
15463         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
15464         FUNCTION_CODE now of type int.  All callers changed.
15465         Set the builtin's DECL_BUILT_IN_CLASS.
15466
15467 1999-09-23  Tom Tromey  <tromey@cygnus.com>
15468
15469         * jvspec.c (lang_specific_driver): Don't read spec file if
15470         -fsyntax-only given.
15471
15472 1999-09-22  Tom Tromey  <tromey@cygnus.com>
15473
15474         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15475
15476         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15477         (WORDS_TO_LONG): Likewise.
15478         (WORDS_TO_DOUBLE): Likewise.
15479
15480 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15481
15482         * jcf-write.c (RELOCATION_VALUE_0): New macro.
15483         (RELOCATION_VALUE_1): Likewise.
15484         (emit_iinc, emit_reloc, push_constant1, push_constant2,
15485         push_in_const, push_long_const): Prototyped.
15486         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15487         (push_constant2): Likewise.
15488         (push_int_const): Cast find_constant1's integer arguments to `jword'.
15489         (find_constant_wide): Cast find_constant2's integer arguments to
15490         `jword'.
15491         (find_constant_index): Cast find_constant2's and find_constant2's
15492         integer arguments to `jword'.
15493         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15494         (emit_switch_reloc): Use RELOCATION_VALUE_0.
15495         (emit_if): Use RELOCATION_VALUE_1.
15496         (emit_goto): Likewise.
15497         (emit_jsr): Likewise.
15498         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15499         argument to push_long_const to HOST_WIDE_INT.
15500
15501 1999-09-15  Andreas Schwab  <schwab@suse.de>
15502
15503         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15504
15505 1999-09-20  Nick Clifton  <nickc@cygnus.com>
15506
15507         * lang.c (lang_decode_option): Extend comment.
15508
15509 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15510
15511         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15512         instead of fndecl.
15513
15514 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15515
15516         * gjavah.c (get_field_name, print_method_info, print_include,
15517         add_namelet): Use xmalloc, not malloc.
15518
15519         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15520         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15521         NULL pointer.
15522
15523         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15524
15525         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15526
15527         * jcf-path.c (add_entry): Likewise.
15528
15529         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15530
15531         * jv-scan.c (xmalloc): Remove definition.
15532
15533         * jvgenmain.c (xmalloc): Likewise.
15534
15535         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15536
15537         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15538
15539         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15540         concat, not xmalloc/sprintf.
15541         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15542         (xstrdup): Remove definition.
15543
15544         * parse.y (duplicate_declaration_error_p,
15545         constructor_circularity_msg, verify_constructor_circularity,
15546         check_abstract_method_definitions, java_check_regular_methods,
15547         java_check_abstract_methods, patch_method_invocation,
15548         check_for_static_method_reference, patch_assignment, patch_binop,
15549         patch_cast, array_constructor_check_entry, patch_return,
15550         patch_conditional_expr): Use xstrdup, not strdup.
15551
15552         * zextract.c (ALLOC): Use xmalloc, not malloc.
15553
15554 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15555
15556         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15557
15558         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15559         (do_spec, lang_specific_pre_link, lang_specific_driver,
15560         input_filename, input_filename_length): Don't declare.
15561         (main_class_name, jvgenmain_spec, lang_specific_driver):
15562         Constify a char*.
15563         (lang_specific_driver): All calls to the function pointer
15564         parameter now explicitly call `fatal'.
15565
15566 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15567
15568         * parse.y (find_applicable_accessible_methods_list): Search
15569         abstract classes as interfaces.
15570
15571 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15572
15573         * class.c (finish_class): We're now outside a valid method
15574         declaration. Tell the rest of gcc so.
15575
15576 1999-09-08  Bruce Korb  autogen@linuxbox.com
15577
15578         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15579
15580 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15581
15582         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15583         java-array.h.
15584         (decode_signature_piece): Don't emit "::" in JArray<>.
15585         (print_namelet): Only print trailing `;' when printing a class.
15586
15587 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15588
15589         * java-tree.h: Delete declarations for all tree nodes now moved to
15590         global_trees.
15591         * decl.c: Delete their definitions.
15592
15593 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15594
15595         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15596         * Makefile.in (OBJS): Add ggc-callbacks.o.
15597         (OBJDEPS): Likewise.
15598
15599 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15600
15601         * parse.y (strip_out_static_field_access_decl): Return operand if
15602         it satisfies JDECL_P.
15603
15604 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15605
15606         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15607         Handle nested arrays, like `[[I'.
15608
15609 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15610
15611         * class.c (finish_class): Remove unused parameter, all callers
15612         changed.
15613
15614         * expr.c (build_java_athrow): Change return type to void.
15615         (java_lang_expand_expr): Make sure each case in switch returns a
15616         value.
15617
15618         * java-tree.h (finish_class): Fix prototype to take void args.
15619
15620         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15621         (main): Issue return from main, not exit.
15622
15623         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15624
15625         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15626
15627         * jv-scan.c (main): Issue return from main, not exit.
15628
15629         * parse.y (check_abstract_method_definitions,
15630         java_check_abstract_method_definitions): Add static prototypes.
15631         (java_complete_expand_methods): Fix call to `finish_class'.
15632
15633         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15634         and `prevpc'.
15635
15636 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15637
15638         * lang.c (language_string): Constify.
15639
15640 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15641
15642         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15643         Remove hacks for stuff which comes from libiberty.
15644
15645         * Make-lang.in: Likewise.
15646
15647 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
15648
15649         * Makefile.in (xref.o): Depend on xref.c explicitly.
15650
15651 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15652
15653         * java-tree.h (lang_printable_name): Constify a char*.
15654
15655         * lang.c (lang_printable_name): Likewise.
15656
15657 1999-08-27  Jeffrey A Law  (law@cygnus.com)
15658
15659         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15660         comments in C code.
15661
15662 1999-08-26  Tom Tromey  <tromey@cygnus.com>
15663
15664         * gjavah.c (print_cxx_classname): Print "::" before qualified
15665         name.
15666
15667 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15668
15669         * parse.y (lookup_cl): Changed leading comment. Now does its best
15670         to set the column number.
15671         (qualify_ambiguous_name): Take WFL wrappers into account.
15672
15673 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
15674
15675         * verify.c (verify_jvm_instructions): Don't check instruction
15676         validity beyond end of method.
15677
15678 1999-08-25  Tom Tromey  <tromey@cygnus.com>
15679
15680         * jvspec.c (lang_specific_driver): Correctly handle --help again.
15681
15682 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15683
15684         * gjavah.c (print_name, print_base_classname, utf8_cmp,
15685         cxx_keyword_subst, generate_access, name_is_method_p,
15686         get_field_name, print_field_name, super_class_name, print_include,
15687         decode_signature_piece, print_class_decls, usage, help,
15688         java_no_argument, version, add_namelet, print_namelet): Add static
15689         prototype.
15690         (print_base_classname, utf8_cmp, cxx_keyword_subst,
15691         name_is_method_p): Constify a char*.
15692         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
15693         Provide a final else clause in an if-else-if.
15694         (print_field_info): Add missing final arg in function call to
15695         `print_field_name'.
15696         (print_method_info, decompile_method, decode_signature_piece,
15697         print_c_decl, print_full_cxx_name, print_stub,
15698         print_mangled_classname, super_class_name, print_include,
15699         add_namelet, add_class_decl, print_class_decls, process_file,
15700         help): Constify a char*.
15701
15702         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15703         push_int_const, find_constant_wide, find_constant_index,
15704         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15705         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15706         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15707         emit_if, emit_goto, emit_jsr, call_cleanups,
15708         make_class_file_name): Add static prototypes.
15709         (generate_bytecode_return, generate_bytecode_insns): Pass a
15710         NULL_PTR, not a NULL_TREE.
15711
15712         * jv-scan.c: Include "jcf.h".
15713         (main): Declare using DEFUN macro.
15714
15715         * jvspec.c (find_spec_file, lang_specific_pre_link,
15716         lang_specific_driver): Add prototypes.
15717         (find_spec_file): Constify a char*.
15718
15719         * keyword.gperf (hash, java_keyword): Add prototypes.
15720
15721         * lang.c (lang_print_error): Add static prototype.
15722         (lang_init): Prefer memcpy over bcopy to avoid casts.
15723
15724         * lex.c (yylex): Add static prototype.
15725
15726         * parse-scan.y: Include "lex.c" earlier.
15727
15728         * parse.h: Remove redundant declaration for `yylex'.
15729
15730         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15731         labeled_block_contains_loop_p): Add static prototypes.
15732         (not_accessible_p): Make static to match prototype.
15733
15734         * verify.c (start_pc_cmp): Don't needlessly cast away const.
15735
15736 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15737
15738         * parse.y (check_method_redefinition): Changed leading comment.
15739         (check_abstract_method_definitions): New function.
15740         (java_check_abstract_method_definitions): New function.
15741         (java_check_regular_methods): Call it.
15742         (verify_constructor_super): Fixed indentation.
15743         (lookup_method_invoke): Likewise.
15744
15745 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15746
15747         * parse.y (method_header): Return a null pointer if the current
15748         class node is null.
15749         (finish_method_declaration): Return if the current function decl
15750         is null.
15751         (source_start_java_method): Likewise.
15752         (java_method_add_stmt): Likewise.
15753
15754 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15755
15756         * class.c (emit_register_class): Removed unnecessary call to
15757         start_sequence.
15758         * parse.y (labeled_block_contains_loop_p): Removed unused local
15759         variable.
15760
15761 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15762
15763         * parse.y (java_refold): Added prototype.
15764
15765 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15766
15767         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15768         (java_stabilize_reference): Removed unnecessary `else'.
15769         (java_complete_lhs): Set flag to remember boolean. Call
15770         java_refold. Added comments.
15771         (java_decl_equiv): New function.
15772         (binop_compound_p): Likewise.
15773         (java_refold): Likewise.
15774         (patch_unaryop): Striped static field access assigned to decl and
15775         op. Changed promotion scheme for ++/-- operators.
15776         (search_loop): New function.
15777         (labeled_block_contains_loop_p): Likewise.
15778         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15779         comment.
15780         (patch_bc_statement): Call search_loop. Fixed comment.
15781
15782 1999-08-14  Anthony Green  <green@cygnus.com>
15783
15784         * expr.c (java_lang_expand_expr): Mark static array data as
15785         referenced.
15786
15787 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
15788
15789         * jvgenmain.c (main): NUL-terminate name_obstack.
15790
15791 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15792
15793         * check-init.c (check_bool2_init, done_alternative): Add static
15794         prototypes.
15795
15796         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15797         (add_method, build_utf8_ref, build_class_ref,
15798         append_gpp_mangled_type, layout_class_method): Constify a char*.
15799
15800         * decl.c (push_promoted_type, make_binding_level): Add static
15801         prototypes.
15802         (push_promoted_type, pushdecl): Constify a char*.
15803
15804         * except.c (find_handler_in_range, link_handler,
15805         check_start_handlers): Add static prototypes.
15806
15807         * expr.c (process_jvm_instruction): Constify a char*.
15808
15809         * gjavah.c (main): Constify a char*.
15810
15811         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15812         Constify a char*.
15813
15814         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15815         static prototypes.
15816         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15817         munge, print_ents): Constify a char*.
15818
15819         * jcf-dump.c (disassemble_method): Constify a char*.
15820         (print_constant_pool, print_exception_table): Add static prototypes.
15821         (print_constant, print_exception_table, main, disassemble_method):
15822         Constify a char*.
15823
15824         * jcf-io.c (find_classfile, find_class): Likewise.
15825
15826         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15827         (set_source_filename, predefined_filename_p): Add static prototypes.
15828         (set_source_filename, get_constant, get_class_constant,
15829         find_in_current_zip): Constify a char*.
15830
15831         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15832         static prototypes.
15833         (add_entry, add_path, jcf_path_classpath_arg,
15834         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15835
15836         * jcf-reader.c (get_attribute, jcf_parse_preamble,
15837         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15838         jcf_parse_one_method, jcf_parse_methods,
15839         jcf_parse_final_attributes): Add static prototypes.
15840         (get_attribute): Constify a char*.
15841
15842         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15843         jcf_dependency_add_target, jcf_path_classpath_arg,
15844         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15845
15846         * jv-scan.c (main): Constify a char*.
15847         (gcc_obstack_init): Add prototype arguments.
15848
15849         * jvgenmain.c (gcc_obstack_init): Likewise.
15850         (main): Constify a char*.
15851
15852         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15853         static prototypes.
15854         (put_decl_string, lang_print_error): Constify a char*.
15855         (lang_init): Remove redundant extern prototype.
15856
15857         * mangle.c (emit_unicode_mangled_name): Constify a char*.
15858
15859         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15860         Add static prototypes.
15861         (get_type_from_signature): Constify a char*.
15862
15863         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15864         Add static prototypes.
15865         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15866         (verify_jvm_instructions): Constify a char*.
15867
15868         * xref.c (xref_flag_value): Likewise.
15869
15870         * xref.h (xref_flag_value): Likewise.
15871
15872         * zextract.c (makeword, makelong): Add static prototypes.
15873         (makeword, makelong): Constify a uch*.
15874
15875 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15876
15877         * lang.c (java_dummy_print): Constify a char*.
15878         (lang_print_error): Likewise.
15879         (lang_init): Remove redundant prototype for `print_error_function'.
15880         (lang_init_source): Likewise.
15881         (lang_identify): Constify a char*.
15882
15883 1999-08-09  Tom Tromey  <tromey@cygnus.com>
15884
15885         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15886         (WORDS_TO_LONG): Likewise.
15887         (WORDS_TO_DOUBLE): Likewise.
15888
15889 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15890
15891         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15892
15893         * expr.c (java_stack_pop, java_array_data_offset,
15894         build_java_throw_out_of_bounds_exception, case_identity,
15895         build_java_check_indexed_type): Add static prototypes.
15896         (linenumber_table, expand_invoke, expand_java_field_op,
15897         build_primtype_type_ref, expand_byte_code): Constify a char*.
15898
15899         * java-tree.h (build_primtype_type_ref, linenumber_table):
15900         Constify a char*.
15901         (java_lang_expand_expr): Add prototype.
15902
15903         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
15904         `java_lang_expand_expr'.
15905
15906         * lex.c (java_lex_error): Constify a char*.
15907         (java_get_unicode, java_read_char, java_allocate_new_line,
15908         java_unget_unicode, java_sneak_unicode): Prototype.
15909
15910         * parse-scan.y (current_class, package_name, method_declarator,
15911         report_class_declaration, yyerror): Constify a char*.
15912
15913         * parse.h (java_report_errors): Prototype.
15914         (yyerror): Constify a char*.
15915
15916         * parse.y (classitf_redefinition_error, check_modifiers,
15917         parse_jdk1_1_error, lookup_package_type,
15918         lookup_package_type_and_set_next, get_printable_method_name,
15919         purify_type_name): Constify a char*.
15920         (build_super_invocation, maybe_generate_finit,
15921         verify_constructor_super, parser_add_interface,
15922         add_superinterfaces, jdep_resolve_class, note_possible_classname,
15923         java_complete_expand_methods, java_expand_finals,
15924         cut_identifier_in_qualified, java_stabilize_reference,
15925         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15926         merge_string_cste): Prototype.
15927         (single_type_import_declaration, yyerror,
15928         variable_redefinition_error, build_array_from_name,
15929         build_unresolved_array_type, check_class_interface_creation,
15930         resolve_class, complete_class_report_errors,
15931         note_possible_classname, read_import_dir,
15932         find_in_imports_on_demand, resolve_package, fix_constructors,
15933         check_deprecation, lookup_method_invoke,
15934         maybe_build_primttype_type_ref, array_constructor_check_entry):
15935         Constify a char*.
15936         (java_complete_expand_methods, java_expand_finals): Make static.
15937         (convert_narrow): Remove static prototype.
15938
15939 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
15940
15941         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
15942
15943 1999-08-02  Richard Henderson  <rth@cygnus.com>
15944
15945         * decl.c: Include defaults.h instead of expr.h.
15946         * parse.y: Likewise.
15947
15948 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
15949
15950         * java/decl.c (start_java_method): Change all uses of
15951         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
15952         Ensure expr.h is included.
15953         * java/expr.c (pop_arguments): Ditto.
15954         * java/parse.y (expand_start_java_method): Ditto.
15955
15956 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15957
15958         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
15959
15960 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
15961
15962         * decl.c: Include "function.h".
15963         * except.c: Likewise.
15964         * parse.y: Likewise.
15965         * Makefile.in: Update dependencies.
15966
15967 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15968
15969         * expr.c (build_java_soft_divmod): Provide a default case in switch.
15970         (java_lang_expand_expr): Mark parameters `target', `tmode' and
15971         `modifier' with ATTRIBUTE_UNUSED.
15972
15973         * gjavah.c (process_file): Add braces around ambiguous `else'.
15974
15975         * jcf-dump.c (print_access_flags, localvar_free): Change return
15976         type to void.
15977
15978         * parse.y (java_complete_expand_method): Initialize variable
15979         `exception_copy'.
15980         (resolve_qualified_expression_name): Likewise for `field_decl'.
15981         (patch_method_invocation): Likewise for `class_to_search'.
15982         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
15983         (patch_assignment): Likewise for `lhs_type'.
15984
15985         * verify.c (verify_jvm_instructions): Remove unused variable
15986         `caller'.
15987
15988 1999-07-25  Richard Henderson  <rth@cygnus.com>
15989
15990         * decl.c (va_list_type_node): New.
15991
15992 1999-07-25  Anthony Green  <green@cygnus.com>
15993
15994         * gjavah.c (print_stub): New function.
15995         (METHOD_IS_NATIVE): New macro.
15996         (print_mangled_classname): Make static.
15997         (HANDLE_END_FIELD): Don't emit fields during stub generation.
15998         (process_file): Perform stub generation.
15999         (HANDLE_METHOD): Don't emit class decls during stub
16000         generation.
16001         (HANDLE_END_METHOD): Take into account stub generation.
16002         (print_method_info): Handle stub generation.
16003         (print_stub): New function.
16004         (print_cxx_classname): Make signature consistant with others.
16005         (help): Describe -stubs option.
16006         (main): Create stub file.
16007         (version): Use version.c.
16008         (print_full_cxx_name): New function.
16009         (print_c_decl): Use print_full_cxx_name.
16010
16011 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16012
16013         * check-init.c (check_init): Handle MAX_EXPR.
16014
16015 1999-07-15  Andrew Haley  <aph@cygnus.com>
16016
16017         * lang.c (flag_use_divide_subroutine): New variable.
16018         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16019         fp-to-integer conversion.
16020         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16021         is not set.
16022
16023         * expr.c (build_java_soft_divmod): New function.
16024         (build_java_binop): Call build_java_soft_divmod if
16025         flag_use_divide_subroutine is set.
16026         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16027         soft_lrem_node: new builtin functions.
16028         (init_decl_processing) Initialize the new builtins.
16029         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16030         soft_lrem_node: new builtin functions.
16031         (build_java_soft_divmod): New function.
16032         * parse.y: Call build_java_soft_divmod if
16033         flag_use_divide_subroutine is set.
16034         * parse.c: Rebuilt.
16035
16036         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16037         a --specs= arg) even if not linking.
16038         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16039         -fuse-divide-subroutine
16040
16041 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16042
16043         * parse.y (resolve_and_layout): Check methods only once.
16044         (resolve_qualified_expression_name): Verify thrown exceptions
16045         compatibility.
16046         (check_thrown_exceptions): Reject exceptions thrown in
16047         initializer. Error message tuned.
16048
16049 1999-07-14  Andrew Haley  <aph@cygnus.com>
16050
16051         * expr.c (expand_expr): Do not return the last statement in a
16052         block as the block's value.
16053
16054 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16055
16056         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16057         CALL_EXPR, to avoid order of evaluation changes.
16058
16059 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16060
16061         * parse.y (qualify_ambiguous_name): Do not use
16062         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16063
16064 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16065
16066         * check-init.c (check_init): Handle MAX_EXPR.
16067         * expr.c (force_evaluation_order): Force method call arguments to
16068         be evaluated in left-to-right order.
16069         * parse.y (qualify_ambiguous_name): Loop again to qualify
16070         NEW_ARRAY_EXPR properly.
16071
16072 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16073
16074         * parse.y (patch_invoke): Resolve unresolved invoked method
16075         returned type.
16076         (qualify_ambiguous_name): STRING_CST to qualify expression for
16077         type name resolution.
16078
16079 1999-06-24  Andrew Haley  <aph@cygnus.com>
16080
16081         * class.c (finish_class): Whenever a deferred method is
16082         output, rescan the list of methods to see if a new candidate for
16083         output can be found.
16084
16085 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16086
16087         * jvspec.c (lang_specific_driver): Recognize --help.
16088
16089 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16090
16091         * parse.y (resolve_package): Fixed bogus return statement.
16092         (patch_method_invocation): Resolve method invocation beginning with
16093         a package name qualifier.
16094
16095 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16096
16097         * Make-lang.in (java.stage1): Depend on stage1-start.
16098         (java.stage2): Likewise for stage2-start.
16099         (java.stage3): Likewise for stage3-start.
16100         (java.stage4): Likewise for stage4-start.
16101
16102 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16103
16104         * parse.y (java_complete_lhs): When doing cross referencing, don't
16105         try to keep file location on a WFL expanded as a CALL_EXPR.
16106
16107 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16108
16109         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16110         compiling to class file a void method with an empty method body.
16111         As a side effect, the bytecode backend will generate the
16112         appropriate `return' instruction.
16113
16114 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16115
16116         * parse.y (lookup_package_type_and_set_next): New function prototype.
16117         (resolve_package): Search current and imported packages.
16118         (lookup_package_type_and_set_next): New function.
16119
16120 1999-06-22  Andrew Haley  <aph@cygnus.com>
16121
16122         * verify.c (verify_jvm_instructions): Check for pending blocks
16123         before invalid PC test and opcode switch, not after.
16124
16125 1999-06-21  Andrew Haley  <aph@cygnus.com>
16126
16127         * except.c (find_handler_in_range): The upper limit for exception
16128         ranges is exclusive, not inclusive: (start <= pc < end).
16129         (link_handler): find child pointer which points to outer by
16130         searching sibling list: previous code incorrectly assumed that
16131         outer->outer->first_child must point to outer.
16132         * verify.c (verify_jvm_instructions): FIXME added to code for
16133         `athrow'.
16134         (verify_jvm_instructions): Do not assume that the last block
16135         processed in a subroutine is a block which ends with a `ret'
16136         instruction.  With some control flows it is possible that the last
16137         block ends with an `athrow'.
16138
16139 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16140
16141         * parse.y (qualify_ambiguous_name): Reorganized the post
16142         evaluation of non WFL leading expression nodes.
16143
16144 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16145
16146         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16147         CONVERT_EXPR.
16148
16149 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16150
16151         * parse.y (qualify_ambiguous_name): Handle qualified expression
16152         beginning with a STRING_CST.
16153
16154 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16155
16156         * parse.y (register_fields): Set DECL_INITIAL on both
16157         pre-initialized static and public fields.
16158         (resolve_field_access): Static field access expressions to always
16159         use pointer types.
16160         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16161         qualification. CONVERT_EXPR to be resolved as an expression name.
16162         (java_complete_lhs): Identify and access qualified final
16163         initialized field in switch statement case expression.
16164         (fold_constant_for_init): Pre-initialized field decl constant to
16165         be folded.
16166
16167 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16168
16169         * parse.y (note_possible_classname): Mark returned node with
16170         QUALIFIED_P only if the original class name contained a '/'.
16171
16172 1999-06-05  Anthony Green  <green@cygnus.com>
16173
16174         * Make-lang.in (gcjh): More parallel build fixes.
16175
16176 1999-06-03  Mike Stump  <mrs@wrs.com>
16177
16178         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16179
16180 1999-06-02  Anthony Green  <green@cygnus.com>
16181
16182         * except.c (link_handler): Chain exception handlers in order.
16183
16184 1999-06-02  Anthony Green  <green@cygnus.com>
16185
16186         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16187         with nops and process as usual in order to always set correct EH
16188         ranges.  Emit detailed warnings about unreachable bytecodes.
16189
16190 1999-06-02  Anthony Green  <green@cygnus.com>
16191
16192         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16193         constant.
16194
16195 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16196
16197         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16198           or the searched field decl.
16199
16200 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16201
16202         * parse.y (fold_constant_for_init): Convert numerical constant
16203         values to the type of the assigned field.
16204
16205 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16206
16207         * expr.c (lookup_field): Relaxed the test on class loading error
16208         detection.
16209         * parse.y (fold_constant_for_init): Enabeled old code.
16210
16211 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16212
16213         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16214         decide the validity of the cast of a java.lang.Cloneable reference
16215         to an array.
16216         (patch_conditional_expr): Fixed first argument passed to
16217         binary_numeric_promotion.
16218
16219 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16220
16221         * parse.y (qualify_ambiguous_name): Take into account that a
16222         CONVERT_EXPR might specify a type as a WFL.
16223
16224 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16225
16226         * parse.y (patch_assignment): Save the rhs before using it as an
16227         argument to _Jv_CheckArrayStore.
16228
16229 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16230
16231         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16232
16233 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16234
16235         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16236         floating point literal only when the exponent indicator has been
16237         parsed.
16238
16239 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16240
16241         * parse.y (formal_parameter:): Construct argument tree list
16242         element even if a yet unsupported final parameter was encountered.
16243
16244 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16245
16246         * parse.y (finish_method_declaration): Issue errors for native or
16247         abstract methods declared with a method body, as well as for non
16248         native or non abstract methods with no method body.
16249
16250 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16251
16252         * class.c (build_utf8_ref): Initialize variable `field'.
16253
16254         * decl.c (init_decl_processing): Initialize variable `field'.
16255
16256         * expr.c (build_known_method_ref): Mark parameters `method_type',
16257         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16258         (process_jvm_instruction): Likewise for parameter `length'.
16259
16260         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16261         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16262         ATTRIBUTE_UNUSED.
16263
16264         * parse.y (maybe_generate_clinit): Remove unused variable
16265         `has_non_primitive_fields'.
16266         (find_in_imports_on_demand): Initialize variables `node_to_use'
16267         and `cl'.
16268         (patch_binop): Likewise for variable `prom_type'.
16269         (patch_unaryop): Likewise for variable `prom_type'.
16270
16271         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16272
16273         * xref.c (xref_table): Add missing initializer.
16274
16275 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16276
16277         * java-except.h (struct eh_range): Removed unused `next' member.
16278         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16279         after adding all exception handlers.  Sort exception ranges in
16280         order of start PC.
16281         (struct pc_index): New structure.
16282         (start_pc_cmp): New function.
16283         * except.c (add_handler): Return `void'.  Don't call link_handler;
16284         instead construct an ordinary linked list and do range
16285         coalescing.
16286         (check_nested_ranges): New function.
16287         (link_handler): Changed interface to allow merging of eh_ranges.
16288         Split overlapping ranges.  Return `void'.
16289
16290 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16291
16292         * parse.y (constructor_block_end:): New rule, tagged <node>.
16293         (constructor_body:): Use `constructor_block_end' instead of
16294         `block_end'.
16295
16296 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16297
16298         * parse.y (statement_nsi:): Pop `for' statement block.
16299         (java_complete_lhs): Labeled blocks containing no statement are
16300         marked as completing normally.
16301
16302 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16303
16304         * xref.c (xref_set_current_fp): New function, defined.
16305         * xref.h (xref_set_current_fp): New function, prototyped.
16306
16307 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16308
16309         * check-init.c (check_init): Take into account that
16310         LABELED_BLOCK_STMT can be empty.
16311
16312 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16313
16314         * parse.y (java_check_regular_methods): Warning check on not
16315         overriding methods with default access in other packages does not
16316         apply to `<clinit>'.
16317         (java_complete_lhs): If block body is an empty_stmt_node, replace
16318         it by NULL_TREE. This prevents gcc from generating an irrelevant
16319         warning.
16320
16321 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16322
16323         * check-init.c (check_init): Removed code accepting to see things
16324         falling through default:, when doing xrefs.
16325         * java-tree.h (do_not_fold): New global variable, declared.
16326         * parse.y (do_not_fold): New global variable, defined.
16327         (java_complete_expand_method): Set `do_not_fold' to the value of
16328         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16329         and reinstall them after them have been purged; do not check for
16330         initializations; do not issue missing return errors.
16331         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16332         when doing xrefs.
16333         (patch_binop): Skip the fold part when doing xrefs.
16334         (build_string_concatenation): Skip the concatenation part when
16335         doing xrefs.
16336         (patch_synchronized_statement): Do not generate a try-finally when
16337         doing xrefs.
16338         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16339         and keep the location where the throw was seen.
16340         * typeck.c (convert): When `do_not_fold' is set, do not attempt
16341         any treatment on the converted node an simply return a NOP_EXPR of
16342         the targeted type.
16343         * xref.c (xref_get_data): New function, defined.
16344         * xref.h (xref_get_data): New function, declared.
16345         (XREF_GET_DATA): Use xref_get_data.
16346
16347 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16348
16349         * gjavah.c (print_include): Cast the result of `strlen' to int
16350         when comparing against a signed value.
16351         (add_namelet): Likewise.
16352
16353 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16354
16355         * expr.c (expand_invoke): Mark parameter `nargs' with
16356         ATTRIBUTE_UNUSED.
16357         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16358
16359         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16360         ATTRIBUTE_UNUSED.
16361
16362         * jcf-reader.c (get_attribute): Cast a value to long
16363         when comparing against a signed expression.  Likewise.
16364
16365         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16366         HOST_BITS_PER_CHAR.
16367
16368 1999-05-11  Andrew Haley  <aph@cygnus.com>
16369
16370         * parse.y (source_end_java_method): If the current method contains
16371         any exception handlers, force asynchronous_exceptions: this is
16372         necessary because signal handlers in libjava may throw exceptions.
16373         * decl.c (end_java_method): Ditto.
16374
16375 1999-05-11  Tom Tromey  <tromey@cygnus.com>
16376
16377         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16378         flags.
16379         * jvspec.c (THREAD_NAME): Removed.
16380         (GC_NAME): Likewise.
16381         (MATHLIB): Likewise.
16382         (WITHLIBC): Likewise.
16383         (GCLIB): Likewise.
16384         (THREADLIB): Likewise.
16385         (MATH_LIBRARY): Likewise.
16386         (lang_specific_driver): Don't add `-l' options to command line.
16387         Instead, add a single --specs option.  Recognize `-L' options and
16388         use them to search for spec file.
16389         (find_spec_file): New function.
16390         (SPEC_FILE): New define.
16391
16392 1999-05-11  Dave Brolley  <brolley@cygnus.com>
16393
16394         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16395         cpplib-enabled build.
16396
16397 1999-05-05  Per Bothner  <bothner@cygnus.com>
16398
16399         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
16400         temporarily zero it while calling rest_of_decl_compilation.
16401
16402         * java-tree.h (string_ptr_type_node):  Add declaration.
16403         * decl.c:  Define and initialize string_ptr_type_node.
16404         * parse.y (patch_string_cst):  Use string_ptr_type_node.
16405
16406         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
16407         * parse.y (for_statement):  Now unconditionally exit_block.
16408         (finish_labeled_statement):  No longer exit_block if for-loop.
16409         (patch_loop_statement):  Check harder if the loop is already labeled.
16410
16411         * parse.y (patch_initialized_static_field):  Removed function.
16412         (maybe_generate_clinit):  Removed special handling for interfaces.
16413         (java_complete_expand_methods):  Do a preliminary java_complete_tree
16414         on <clinit> to determine if it can be removed.
16415         (java_complete_expand_method):  Remove special handling for <clinit>.
16416         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
16417         optimize if we get back empty_stmt_node.
16418         For MODIFY_EXPR, re-do checking of static initializers.
16419         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
16420         For VAR_DECL, pass correct context.
16421
16422         * verify.c (verify_jvm_instructions):  Better error messages.
16423
16424 1999-05-03  Tom Tromey  <tromey@cygnus.com>
16425
16426         * parse-scan.y (interface_declaration): Call
16427         report_class_declaration for interfaces.
16428
16429 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
16430
16431         * Makefile.in: Remove -v from bison command lines.
16432
16433 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16434
16435         * check-init.c (check_init): Exclude a case of error when doing
16436         xrefs.
16437         * class.c (layout_class_method): Don't generate the error message
16438         twice when compiling from source.
16439         * lang-options.h: Added `-Wredundant-modifers' and
16440         `-Wunusupported-jdk11' flags and help text.
16441         * lang.c (lang_decode_option): Added support for
16442         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16443         flag_static_local_jdk11 and flag_redundant set accordingly.
16444         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16445         * parse.h (EXPR_WFL_ADD_COL): New macro.
16446         (DECL_END_SOURCE_LINE): Likewise.
16447         (DECL_INHERITED_SOURCE_LINE): Likewise.
16448         * parse.y (static_ref_err): New function, prototyped.
16449         (CCB_TK): Now tagged <operator>.
16450         (class_body:): Remember the location of the closing '}' of a class
16451         definition when doing xrefs.
16452         (block:): Likewise.
16453         (block_end:): Likewise.
16454         (create_class): Remember the location of the inherited class
16455         identifier when doing xrefs.
16456         (register_fields): Added test on first operand of `init' before
16457         testing it TREE_CODE.
16458         (method_header): Store the location of the class identifier in the
16459         class decl when doing xrefs.
16460         (finish_method_declaration): Don't combine first/last method line
16461         when doing xref.
16462         (java_check_regular_methods): Warning check on not overriding
16463         methods with default access on other packages move before check on
16464         static methods. Initialization of `aflags' also moved up.
16465         (resolve_expression_name): Call static_ref_err to report the error.
16466         (static_ref_err): New function, implemented.
16467         (resolve_field_access): Returned simplified static field access
16468         when doing xrefs.
16469         (resolve_qualified_expression_name): Check for illegal use of
16470         static fields in a non static context. Call static_ref_err to
16471         report error in various places.
16472         (java_complete_tree): Do not fold initialized static fields when
16473         doing xrefs.
16474         (java_complete_lhs): Likewise.
16475
16476 1999-04-29  Anthony Green  <green@cygnus.com>
16477
16478         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16479         create internal labels.
16480         (lookup_label): Ditto.
16481
16482 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16483
16484         * class.c (layout_class_method): Generate <clinit>'s rtl for
16485         interfaces.
16486         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16487         for interfaces' <clinit>.
16488         * expr.c (lookup_field): Search for fields in interfaces.
16489         (expand_invoke): Fixed indentation.
16490         (expand_java_field_op): Likewise. Use IS_CLINIT.
16491         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16492         (IS_CLINIT): New macro.
16493         * parse.y (type_declaration:): Call maybe_generate_clinit after an
16494         interface was parsed.
16495         (maybe_generate_clinit): Don't generate if the current class is an
16496         interface with only fields of primitive types.
16497         (reset_method_name): Use IS_CLINIT.
16498         (java_complete_expand_method): Expand <clinit> when it exists for
16499         interfaces. Use IS_CLINIT.
16500         (resolve_expression_name): Use DECL_CONTEXT instead of
16501         current_class to build static field references.
16502         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16503         ARRAY_REF when doing xreferencing.
16504         (check_final_assignment): Fixed typo in leading comment. Use
16505         IS_CLINIT.
16506         (patch_array_ref): Don't fully expand array references when
16507         xreferencing.
16508         (patch_return): Use IS_CLINIT.
16509         (patch_throw_statement): Likewise.
16510
16511 1999-04-22  Tom Tromey  <tromey@cygnus.com>
16512
16513         * Make-lang.in (JAVA_SRCS): Added check-init.c.
16514
16515 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16516
16517         * decl.c (predef_filenames, predef_filenames_size): New globals
16518         (init_decl_processing): predef_filenames and predef_filenames_size
16519         initialized.
16520         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16521         extern.
16522         * jcf-parse.c (predefined_filename_p): New function.
16523         (yyparse): Check that files on the command line are specified only
16524         once and issue a warning otherwise.
16525         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16526         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16527         avoid a gcc warning with -W -Wall turned on.
16528         (java_expand_classes): Abort if errors were encountered.
16529         (java_complete_lhs): If the cross reference flag is set, wrap
16530         field DECL node around a WFL when resolving expression name.
16531
16532 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16533
16534         * lang.c (lang_decode_option): Fixed returned value when parsing
16535         `-fxref=...' and `-Wall'.
16536         * parse.y (source_end_java_method): Do not generate code when
16537         flag_emit_xref is set.
16538         (resolve_expression_name): Do not build static field access when
16539         flag_emit_xref is set.
16540         (resolve_field_access): No special treatment on `length' when
16541         flag_emit_xref is set. Do not build qualified static field access
16542         when flag_emit_xref is set.
16543         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16544         when flag_emit_xref is set.
16545         (patch_assignment): Do not generate array store runtime check when
16546         flag_emit_xref is set.
16547         * xref.c (xref_flag_value): Fixed function declaration
16548         indentation.
16549         (xset_set_data): New function.
16550         * xref.h (xref_set_data): Added prototype for new function.
16551         (typedef struct xref_flag_table): New field data.
16552         (XREF_GET_DATA): New macro.
16553
16554 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16555
16556         * xref.h (enum): Removed trailing comma.
16557
16558         * parse.y (resolve_qualified_expression_name): Added missing
16559         `break'.
16560
16561 1999-04-15  Anthony Green  <green@cygnus.com>
16562
16563         * gjavah.c: New prototypes for java_float_finite and
16564         java_double_finite.
16565
16566 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16567
16568         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16569         references.
16570
16571 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16572
16573         * Makefile.in (TREE_H): Add tree-check.h.
16574         (RTL_H): Add genrtl.h.
16575
16576 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16577
16578         * parse.y (patch_assignment): Added ArrayStoreException runtime
16579         check.
16580
16581 1999-04-06  Per Bothner  <bothner@cygnus.com>
16582
16583         * expr.c (pop_type_0):  New function.
16584         (pop_type):  Use pop_type_0.
16585         * java-tree.h (pop_type_0):  New declaration.
16586         * verify.c (verify_jvm_instructions):  Check return instructions.
16587
16588         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16589         class files.
16590
16591 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16592
16593         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16594
16595         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16596         (main_jcf): Don't define.
16597         (process_file): Don't set `main_jcf'.
16598
16599         * java-tree.h (main_jcf): Don't declare.
16600
16601         * jcf-parse.c (main_jcf): Add static definition.
16602
16603         * lang.c (main_jcf): Don't define.
16604
16605 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16606
16607         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16608
16609         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16610
16611         * jcf-depend.c: Include "config.h", not <config.h>.
16612
16613         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16614         `bcopy' to PTR.
16615
16616         * jcf-path.c: Include "config.h", not <config.h>.
16617
16618         * lex.c: Don't include various system header files.
16619         (java_init_lex): Cast the argument of `bzero' to PTR
16620
16621         * parse-scan.y (java_push_parser_context): Likewise.
16622
16623         * parse.y (java_push_parser_context): Likewise.
16624         (patch_bc_statement): Match format specifier to variable argument.
16625
16626         * xref.c: Don't include <stdio.h>.
16627
16628 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16629
16630         * parse.y (struct parser_ctxt *ctxp): Now global.
16631         (declare_local_variables): Use WFL compound value for the
16632         declaration source line value, when doing cross-referencing.
16633
16634 1999-03-31  Tom Tromey  <tromey@cygnus.com>
16635
16636         * gjavah.c (print_field_info): Allow constants of other types.
16637         (print_include): Generate include when new name is proper prefix
16638         of already printed name.
16639         (add_namelet): Likewise.
16640         (cxx_keyword_subst): New function.
16641         (print_method_info): Use it.
16642         (print_field_name): New function.
16643         (get_field_name): New function.
16644         (print_field_info): Use get_field_name and print_field_name.
16645
16646 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16647
16648         * Makefile.in (keyword.h): Generate using gperf language 'C', not
16649         'KR-C', so gperf uses the `const' keyword on strings.
16650
16651         * keyword.gperf (java_keyword): Const-ify a char*.
16652
16653 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16654
16655         * parse.y (patch_bc_statement): Fixed identation and a bogus
16656         `printf' format.
16657
16658 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16659
16660         * parse.y (patch_assignment): Allow static variables in other
16661         classes to be assigned.
16662
16663 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16664
16665         * class.c (maybe_add_interface): Remove unused variable
16666         `interface_binfo'.
16667         (make_class_data): Use = for assignment, not ==.  Likewise.
16668         (emit_register_classes): Remove unused variable `decl'.
16669
16670         * lex.c: Fix comment so as not to contain an embedded `/*'.
16671
16672         * verify.c (verify_jvm_instructions): Remove unused variable
16673         `self_type'.
16674
16675 1999-03-27  Per Bothner  <bothner@cygnus.com>
16676
16677         * parse.y (complete_loop_body):  Rename to finish_loop_body.
16678         (complete_labeled_statement):  Rename to finish_labeled_statement.
16679         (complete_for_loop):  Rename to finish_for_loop.
16680         (complete_method_declaration):  Rename to finish_method_declaration.
16681
16682         * java-tree.h (continue_identifier_node):  New global node.
16683         * decl.c:  Define and initialize continue_identifier_node.
16684         * parse.y (generate_labeled_block):  Remove - no longer needed.
16685         (build_loop_body):  Use continue_identifier_node for continue block.
16686         (finish_labeled_statement):  Also do pop_labeled_block actions.
16687         (java_complete_lhs):  POP_LOOP even if error.
16688         (build_labeled_block):  Special handling for continue_identifier_node.
16689         (patch_loop_statement):  Re-organize.
16690         (patch_bc_statement):  Re-write.
16691
16692 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16693
16694         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16695         using a WFL compound value.
16696         * parse.y (xref.h): Include.
16697         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16698         WFL compound value.
16699         (register_fields): Set WFL compound value to lineno if doing
16700         xrefs.
16701         (java_complete_expand_method): Call expand_xref if flag_emit_xref
16702         is set.
16703         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16704         * xref.h (expand_xref): Prototype renamed from xref_generate.
16705
16706 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16707
16708         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16709         (GET_CURRENT_BLOCK): New macro.
16710         * parse.y (current_static_block): New global variable.
16711         (method_body:): Define action.
16712         (complete_method_declaration): Set current_function_decl to NULL
16713         when work on the current method is done.
16714         (declare_local_variables): Use GET_CURRENT_BLOCK.
16715         (java_method_add_stmt): Likewise.
16716         (java_complete_expand_method): Disable the use of `this' when
16717         expanding <clinit>.
16718         (enter_a_block): If no current method exist, use
16719         current_static_block to link static initializer blocks.
16720         (exit_block): Rewritten to use current_static_block when no current
16721         method decl exists.
16722         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16723         (patch_return): Forbid the use of `return' in static initializers.
16724         (patch_throw_statement): Fixed indentation. Issue specific error
16725         for uncaught thrown checked exception in static initializer
16726         blocks. Removed FIXME.
16727
16728 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
16729
16730         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16731         Link gcj from gcc.o.
16732
16733 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16734
16735         * parse.y (find_applicable_accessible_methods_list): When dealing
16736         with interface: ensure that a given interface or java.lang.Object
16737         are searched only once.
16738
16739 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16740
16741         * gjavah.c (print_c_decl): Remove unused argument `flags'.
16742
16743         * jcf-dump.c (print_access_flags): Add braces around if-else.
16744
16745         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16746         COMBINE_INPUTS.
16747
16748         * lex.c (build_wfl_node): Add static prototype.
16749
16750         * lex.h (build_wfl_node): Remove static prototype.
16751
16752         * parse.y: Include lex.c early enough to declare everything needed.
16753         Ensure calls to `build_wfl_node' pass the proper arguments.
16754         (create_class): Remove unused variable `super_decl'.
16755         (get_printable_method_name): Initialize variable `name'.
16756
16757 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16758
16759         * Changelog: Fixed 1999-03-22 typos.
16760         * lang.c (lang_decode_option): Fixed typo in error string in the
16761         XARG section.
16762
16763 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16764
16765         * Makefile.in (JAVA_OBJS): Added entry xref.o.
16766         (xref.o): New rule.
16767         * java-tree.h (flag_emit_xref): Declared extern.
16768         * lang.c (xref.h): Included.
16769         (flag_emit_xref): New global variable.
16770         (lang_decode_option): Added support for -fxref.
16771         * xref.c: Created.
16772         * xref.h: Likewise.
16773
16774 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
16775
16776         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16777         linked with.
16778
16779 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16780
16781         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16782         $(srcdir)/../system.h and $(JAVA_TREE_H).
16783         (jcf-io.o): Depend on $(JAVA_TREE_H).
16784         (mangle.o): Likewise.
16785
16786         * check-init.c (check_cond_init): Add static prototype.
16787
16788         * class.c (build_java_method_type, hashUtf8String,
16789         make_field_value, get_dispatch_vector, get_dispatch_table,
16790         append_gpp_mangled_type, mangle_static_field): Likewise.
16791         (strLengthUtf8): Hide unused definition.
16792         (hashUtf8String): Const-ify.
16793         (make_field_value): Un-ANSI-fy.
16794
16795         * constants.c: Move inclusion of jcf.h above java-tree.h.
16796         (set_constant_entry, find_class_or_string_constant,
16797         find_name_and_type_constant, get_tag_node,
16798         build_constant_data_ref): Add static prototype.
16799
16800         * decl.c (push_jvm_slot, builtin_function,
16801         lookup_name_current_level): Likewise.
16802         (builtin_function): Const-ify.
16803
16804         * except.c (expand_start_java_handler, expand_end_java_handler):
16805         Add static prototype.
16806
16807         * expr.c (flush_quick_stack, push_value, pop_value,
16808         java_stack_swap, java_stack_dup, build_java_athrow,
16809         build_java_jsr, build_java_ret, expand_java_multianewarray,
16810         expand_java_arraystore, expand_java_arrayload,
16811         expand_java_array_length, build_java_monitor, expand_java_pushc,
16812         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16813         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16814         expand_compare, expand_test, expand_cond, expand_java_goto,
16815         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16816         expand_java_field_op, java_push_constant_from_pool): Likewise.
16817
16818         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16819         (build_java_arraynull_check): Mark parameters `node' and `type'
16820         with ATTRIBUTE_UNUSED.
16821         (note_label): Likewise for parameter `current_pc'.
16822         (expand_java_call, expand_java_ret): Hide unused definition.
16823
16824         * java-tree.h (make_class, build_constants_constructor,
16825         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16826         init_outgoing_cpool, register_class, emit_register_classes,
16827         java_layout_seen_class_methods): Prototype.
16828         (unicode_mangling_length): Const-ify.
16829         (append_gpp_mangled_name, append_gpp_mangled_classtype,
16830         emit_unicode_mangled_name, format_int, format_uint,
16831         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16832         jcf_print_utf8_replace, open_class): Prototype.
16833
16834         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
16835         <stdio.h>.  Include tree.h/java-tree.h.
16836         (utf8_equal_string usage, process_class): Add static prototype.
16837         (open_class): Don't prototype this here.
16838         (utf8_equal_string): Match arguments to format specifiers.
16839         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16840         TABLE_SWITCH, disassemble_method): Likewise.
16841
16842         * jcf-io.c: Include tree.h/java-tree.h.
16843         (open_class, find_classfile, jcf_print_utf8,
16844         jcf_print_utf8_replace): Const-ify.
16845
16846         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16847         parse_class_file): Add static prototype.
16848         (find_in_current_zip): Match definition to existing static
16849         prototype.
16850
16851         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16852         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16853         finish_jcf_block, define_jcf_label, get_jcf_label_here,
16854         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16855         write_chunks, adjust_typed_op, generate_bytecode_conditional,
16856         generate_bytecode_return, perform_relocations, init_jcf_state,
16857         init_jcf_method, release_jcf_state, generate_classfile):
16858         Add static prototype.
16859         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16860         (make_class_file_name): Const-ify.
16861
16862         * jcf.h (find_classfile): Const-ify.
16863
16864         * jv-scan.c (reset_report): Remove prototype.
16865
16866         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16867         (error): Rewrite to allow varargs.
16868
16869         * lang.c (lang_f_options): Const-ify.
16870
16871         * lex.c (java_parse_escape_sequence): Add static prototype.
16872         (java_allocate_new_line): Match definition to existing static
16873         prototype.
16874
16875         * mangle.c Include tree.h/java-tree.h.
16876         (unicode_mangling_length, emit_unicode_mangled_name,
16877         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16878
16879         * parse.h (jdep_code): Remove trailing comma in enumeration.
16880         (java_get_line_col): Move prototype outside of !JC1_LITE test.
16881         (reset_report): Add prototype.
16882
16883         * verify.c (push_pending_label, merge_types): Add static
16884         prototypes.
16885
16886         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16887
16888 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16889
16890         * parse.y (find_applicable_accessible_methods_list): Extend the
16891         search to superinterfaces when relevant.
16892         (search_applicable_methods_list): New function.
16893
16894 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16895
16896         * class.c (unmangle_classname): Implemented stricter testing
16897         before setting the QUALIFIED_P flag on an identifier.
16898
16899 1999-03-16  Per Bothner  <bothner@cygnus.com>
16900
16901         * parse.y (java_complete_lhs):  Call force_evaluation_order
16902         after patch_newarray.
16903         (patch_binop):  Don't call fold if there are side effects.
16904
16905 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16906
16907         * parse.y (java_stabilize_reference): Use save_expr instead of
16908         building a SAVE_EXPR node.
16909         (java_complete_lhs): Patch the resulting string of the `+='
16910         operator (if necessary) and complete the RHS after having built
16911         the cast.
16912
16913 1999-03-15  Per Bothner  <bothner@cygnus.com>
16914
16915         * class.c (make_class):  Don't set CLASS_P here (because
16916         this function is also called by build_java_array_type).
16917         (push_class):  Set CLASS_P here instead.
16918         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
16919
16920         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
16921         context.  If the context is class, perfer "super" over "synchronized".
16922         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
16923
16924         * parse.y (create_class):  Don't call parser_check_super here;
16925         it is not robust.  Always wait until later.
16926
16927         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
16928         match what JDK 1.2 does), but don't set ACC_PUBLIC.
16929
16930 1999-03-13  Per Bothner  <bothner@cygnus.com>
16931
16932         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
16933         * lex.h (UNGETC):  Change misleading macro.
16934
16935 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16936
16937         * parse.y (java_stabilize_reference): Return NODE when patching a
16938         COMPOUND_EXPR.
16939         (java_complete_lhs): Put parenthesis around truth values.
16940
16941 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16942
16943         * class.c (layout_class_method): Don't make rtl for interface
16944         methods.
16945         * parse.h (GET_TYPE_NAME): New macro.
16946         * parse.y (if_then_statement:): Fixed indentation.
16947         (if_then_else_statement:): Likewise.
16948         (for_statement:): Fixed spacing.
16949         (try_statement:): Fixed indentation.
16950         (create_interface): Don't force interfaces to be abstract.
16951         (method_header): Abstract methods are OK in interfaces.
16952         (declare_local_variables): Fixed typo in comment.
16953         (java_complete_expand_method): Fixed indentation.
16954         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
16955         non accessible fields.
16956         (java_stabilize_reference): New function.
16957         (java_complete_lhs): Fixed indentation. Use
16958         java_stabilize_reference in compound assignment. Insert the
16959         cast. If not processing `+' fix string constants before processing
16960         binop.
16961
16962 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16963
16964         * constants.c (find_class_or_string_constant): Cast variable `j'
16965         to a `jword' when comparing against one.
16966
16967         * expr.c (java_lang_expand_expr): Remove unused variables
16968         `has_finally_p' and `op0'.
16969
16970         * gjavah.c (print_field_info): Cast a value to jint when comparing
16971         against one.  Likewise for a jlong.
16972         (add_namelet): Likewise cast a `sizeof' to an int when comparing
16973         against a signed quantity.
16974
16975         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
16976         (print_signature): Don't needlessly dereference variable `str'
16977
16978         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
16979         `max_locals' with ATTRIBUTE_UNUSED.
16980         (jcf_parse_class): Likewise for variable `index'.
16981
16982         * parse.h (reverse_jdep_list): Remove static prototype.
16983
16984         * parse.y (build_jump_to_finally): Remove prototype and definition.
16985         (reverse_jdep_list): Add static prototype.
16986
16987         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
16988         `assignment' and `expr_decl'.
16989
16990         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
16991
16992 1999-03-12  Andrew Haley  <aph@cygnus.com>
16993
16994         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
16995         we'll need a directory separator and a null character.
16996
16997 1999-03-10  Per Bothner  <bothner@cygnus.com>
16998
16999         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17000
17001 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17002
17003         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17004         interfaces.
17005
17006 1999-03-05  Per Bothner  <bothner@cygnus.com>
17007
17008         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17009
17010         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17011
17012         * class.c (layout_class_method):  A static method in a base class
17013         is never overridden, so treat it like it doesn't exist.
17014         However, do complain about private non-static method overriding
17015         public static method.
17016
17017         * parse.y:  Don't set unused INITIALIZED_P flag.
17018         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17019
17020         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17021         (build_array_from_name):  Re-order &index[string] to &string[index].
17022
17023         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17024         error_mark (it might catch more errors, but it is more likely to lose).
17025
17026 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17027
17028         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17029         (parse-scan.o): Depend on toplev.h.
17030
17031         * class.c (make_method_value): Add prototype.  Make it static.
17032         Remove unused second argument, caller changed.
17033
17034         * expr.c (java_lang_expand_expr): Remove unused variable
17035         `return_label'.
17036
17037         * java-tree.h: Don't prototype find_in_current_zip.
17038         Add prototypes for verify_constant_pool, start_java_method,
17039         end_java_method, give_name_to_locals, expand_byte_code,
17040         open_in_zip, set_constant_value, find_constant1, find_constant2,
17041         find_utf8_constant, find_string_constant, find_class_constant,
17042         find_fieldref_index, find_methodref_index, write_constant_pool,
17043         count_constant_pool_bytes and encode_newarray_type.
17044
17045         * jcf-dump.c: Remove unused variable `LONG_temp'.
17046
17047         * jcf-parse.c: Include parse.h.
17048         (jcf_parse_source): Remove unused parameter, all callers changed.
17049         (jcf_figure_file_type): Add static prototype.
17050         (find_in_current_zip): Likewise.  Also remove unused parameter,
17051         all callers changed.
17052         (read_class): Initialize variable `saved_pos'.
17053
17054         * jcf-reader.c (jcf_parse_preamble): Mark variables
17055         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17056
17057         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17058         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17059         (java_parse_doc_section): Initialize variable `seen_star'.
17060         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17061         (java_lex_error): Mark parameters `msg' and `forward' with
17062         ATTRIBUTE_UNUSED.
17063         (java_get_line_col): Mark parameters `filename' and `line' with
17064         ATTRIBUTE_UNUSED.
17065
17066         * parse-scan.y: Include toplev.h.
17067         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17068
17069         * parse.h: use `struct JCF', not plain `JCF'.
17070         (java_parser_context_save_global, java_expand_classes
17071         java_parser_context_restore_global, java_parse): Add prototypes.
17072
17073         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17074         `node'.
17075
17076 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17077
17078         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17079
17080 1999-02-26  Per Bothner  <bothner@cygnus.com>
17081
17082         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17083         explicit build_decl.  (Avoids crash in reload when optimizing.)
17084
17085 1999-02-25  Per Bothner  <bothner@cygnus.com>
17086
17087         * decl.c (complete_start_java_method):  Handle synchronized method
17088         even when compiling from bytecode.
17089
17090 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17091
17092         * gjavah.c (add_class_decl): Only generate `#include' if outer
17093         class is not the name of the class we are processing.  Correctly
17094         append `.h' in #include.
17095         (process_file): Clean up newlines around generated `#include's.
17096         (decode_signature_piece): Correctly handle inner classes.
17097         (struct include): New structure.
17098         (all_includes): New global.
17099         (print_include): New function.
17100         (add_class_decl): Use it.
17101         (process_file): Likewise.
17102         (add_class_decl): Generate include for java-array.h if array
17103         seen.
17104         (process_file): Don't generate java-array.h include.
17105
17106         * gjavah.c (add_namelet): Check for standard package names here.
17107         (add_class_decl): Don't check for standard package names here.
17108
17109 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17110
17111         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17112         When reading a zip file, only use strncmp if both strings are
17113         bigger than the buffer length.  Initialize `k' when looping
17114         through zip file.
17115
17116 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17117
17118         * gjavah.c (struct namelet): New structure.
17119         (add_namelet): New function.
17120         (print_namelet): New function.
17121         (print_class_decls): Use add_namelet and print_namelet to generate
17122         namespaces and not classes.
17123         (method_printed): New global.
17124         (HANDLE_END_METHOD): Examine method_printed.
17125         (print_method_info): Set method_printed when required.  Print
17126         error if function to be ignored is marked virtual.  Handle $finit$
17127         method.
17128         (METHOD_IS_FINAL): New macro.
17129         (print_field_info): Use it.
17130         (HANDLE_METHOD): Clear method_printed.
17131         (method_pass): New global.
17132         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17133         (process_file): Do two passes over both fields and methods.
17134         (HANDLE_METHOD): Examine method_pass.
17135         (root): New global.
17136         (add_class_decl): New function.
17137         (print_class_decls): Don't scan over entire constant pool.
17138
17139 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17140
17141         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17142         disable linking in that case.
17143
17144 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17145
17146         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17147         not 0x1f.
17148
17149 1999-02-21  Per Bothner  <bothner@cygnus.com>
17150
17151         * decl.c (build_result_decl), java-tree.h:  New method.
17152         (complete_start_java_method):  Handle synchronized methods.
17153         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17154         (start_java_method):  Call build_result_decl here instead  ...
17155         * parse.y (java_complete_expand_method):  ... and here.
17156         (expand_start_java_method): Don't call complete_start_java_method here.
17157         (java_complete_expand_method):  Call it here instead.
17158         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17159         * java-tree.h:  ... here.
17160
17161         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17162         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17163         for ARRAY_REF - it doesn't work when array bounds are checked.
17164         (patch_array_ref):  Handle it here instead.
17165
17166         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17167
17168 1999-02-19  Per Bothner  <bothner@cygnus.com>
17169
17170         Force left-to-right evaluation of binary operations etc.
17171         * expr.c (force_evaluation_order), java-tree.h:  New function.
17172         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17173         calls, and ARRAY_REFs to force_evaluation_order.
17174         (various):  Set TREE_SIDE_EFFECTS more carefully.
17175
17176         Tolerate random (non-UTF8) encoding in comments without complaining.
17177         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17178         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17179
17180         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17181         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17182
17183         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17184         COMPOUND_EXPR.  Don't complain about empty statement after return.
17185
17186 1999-02-19  Per Bothner  <bothner@cygnus.com>
17187
17188         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17189         in TREE_LIST - just chain the POINTER_TYPEs together.
17190         (resolve_class):  If type already resolved, return decl.
17191         After resolving, update TREE_TYPE(class_type), and name (if array).
17192         * parse.h (do_resolve_class), parse.y:  Make non-static.
17193         * class.c (maybe_layout_super_class):  Take this_class argument.
17194         Do do_resolve_class if necessary.
17195         (layout_class, layout_class_methods): Adjust calls appropriately.
17196         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17197         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17198         * typeck.c (build_java_array_type):  Don't call layout_class.
17199
17200 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17201
17202         * parse.y (check_pkg_class_access): Allow private class access
17203         within the same package.
17204         (strip_out_static_field_access_decl): New function.
17205         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17206         operator argument before testing its nature.
17207
17208 1999-02-03  Per Bothner  <bothner@cygnus.com>
17209
17210         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17211         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17212         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17213         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17214         * expr.c (java_lang_expand_expr):  Likewise.
17215         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17216         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17217         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17218         (build_try_statement):  Remove finally parameter and handling.
17219         (build_try_finally_statement):  New function.
17220         (patch_try_statement):   No longer need to support finally clause.
17221         (try_statement):  Update grammar action rules.
17222         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17223         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17224
17225 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17226
17227         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17228         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17229
17230 1999-02-17  Andrew Haley  <aph@cygnus.com>
17231
17232         * class.c (build_utf8_ref): Back out broken patch which was
17233         intended to to output signatures using '.' as a separator.
17234
17235         * class.c (make_class_data): Output signatures using '.' as a
17236         separator, rather than '/'.
17237         (mangled_classname): Likewise.
17238         (make_field_value): Likewise.
17239         (make_method_value): Likewise.
17240         * constants.c (alloc_class_constant): Likewise.
17241         * expr.c (build_invokeinterface): Likewise.
17242
17243 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17244
17245         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17246         of an ancient workaround.
17247
17248 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17249
17250         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17251         here anymore.
17252
17253 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17254
17255         * lex.c (yylex): Encode \0 as UTF8.
17256
17257 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17258
17259         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17260         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17261         (libgcj_zip): Renamed.
17262         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17263         LIBJAVA_ZIP_FILE.
17264         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17265
17266         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17267         (GC_NAME): Renamed -lgc to -lgcjgc.
17268
17269 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17270
17271         * lex.c (java_lang_cloneable): Initialize.
17272         * parse.y (java_lang_cloneable): New static variable.
17273         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17274         doing one more qualification round.
17275         (valid_ref_assignconv_cast_p): Reject null source or
17276         destination. Allow an array to be cast into java.lang.Cloneable.
17277         (patch_cast): Swapped two first arguments to first call to
17278         valid_ref_assignconv_cast_p.
17279
17280 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17281
17282         * parse.h: DECL_P renamed JDECL_P.
17283         * parse.y: DECL_P replaced by JDECL_P.
17284         (build_array_from_name): Always use pointer's type.
17285         (patch_bc_statement): Extra code to search continue target in a
17286         for loop. Fixed comments. Continue target is current loop when
17287         unlabeled.
17288
17289 1999-02-05  Andrew Haley  <aph@cygnus.com>
17290
17291         * class.c (make_class_data): The superclass of an interface should
17292         be null, not class Object.
17293
17294         * lex.c (java_lex): Sign extend hex literals.
17295
17296 1999-02-04  Andrew Haley  <aph@cygnus.com>
17297
17298         * class.c (build_utf8_ref): Output signatures using '.' as a
17299         separator, rather than '/'.
17300         (make_class_data): Likewise.
17301
17302 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17303
17304         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17305         mkstemp.o.  Get them from libiberty now.
17306
17307 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17308
17309         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17310
17311 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17312
17313         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17314         from libiberty.h
17315
17316 1999-02-02  Per Bothner  <bothner@cygnus.com>
17317
17318         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17319         * jcf-write.c (generate_bytecode_return):  New function.
17320         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
17321
17322         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
17323         generate special [fd]const_[01] instructions.
17324
17325         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
17326
17327         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
17328         handling OPCODE_lookupswitch or OPCODE_tableswitch.
17329
17330 1999-02-01  Per Bothner  <bothner@cygnus.com>
17331
17332         * parse.y (patch_method_invocation):  Handle calling static methods,
17333         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17334
17335         * parse.y (java_complete_lhs):  Don't complain about unreachable
17336         exit condition in a do-while statement.
17337
17338 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17339
17340         * lex.c (java_read_char): Fixed utf8 decoding.
17341         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17342         range.
17343         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17344         comments. Local variable `all_primitive' is gone. Broadened
17345         acceptance of `0' to floating point targets. `long' can now be
17346         widened to `double' or `float'.
17347         (valid_method_invocation_conversion_p): Added leading
17348         comment. Fixed tabulation.
17349         (build_string_concatenation): Optimize out left or right empty
17350         string constants.
17351
17352 1999-01-28  Per Bothner  <bothner@cygnus.com>
17353
17354         * jcf-write.c (localvar_alloc):  Only emit entry for
17355         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17356         (generate_bytecode_insns):  Only call put_linenumber if
17357         debug_info_level > DINFO_LEVEL_NONE.
17358         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
17359         is specified, add -g1 (for compatibility wih javac).
17360
17361 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
17362
17363         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17364         gjavah.o, check-init.o, jv-scan.o
17365
17366 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17367
17368         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17369
17370         * gjavah.c: Include config.h and system.h.
17371
17372         * javaop.h (inline): Don't define, its handled by system.h.
17373         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17374         from `inline' to `static inline'.
17375
17376         * jcf.h (inline): Don't define, its handled by system.h.
17377
17378         * lex.c (inline): Likewise.
17379
17380 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
17381
17382         * lang-specs.h: Map -Qn to -fno-ident.
17383
17384 1999-01-29  Richard Henderson  <rth@cygnus.com>
17385
17386         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17387
17388 1999-01-29  Tom Tromey  <tromey@cygnus.com>
17389
17390         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17391         then cast it to Object before calling `append' method.
17392
17393 1999-01-28  Per Bothner  <bothner@cygnus.com>
17394
17395         * check-init.c (check_bool2_init, check_bool_init, check_init):
17396         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17397         * jcf-write.c (generate_bytecode_insns):  Likewise.
17398
17399 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17400
17401         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17402         * parse.y (patch_cast): Allow a boolean to be cast into a
17403         boolean.
17404
17405 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17406
17407         * parse.y: (class_declaration:): Fixed indentation.
17408         (class_member_declaration:): Extra `;' after field declaration now
17409         accepted.
17410         (interface_declaration:): Removed debug messages in error reports.
17411         (patch_binop): Nodes created and returned inherit the orignal
17412         node's COMPOUND_ASSIGN_P flag value.
17413         (patch_cast): Fix cast from char to floating point.
17414
17415 1999-01-25  Andrew Haley  <aph@cygnus.com>
17416
17417         * except.c, java-except.h (expand_resume_after_catch): new
17418         function.
17419         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17420         to branch back to main flow of control after a catch block.
17421
17422 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17423
17424         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17425         $(srcdir)/../system.h.
17426         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17427         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17428         (jcf-write.o): Likewise.
17429         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17430         (mangle.o): Depend on $(srcdir)/../toplev.h.
17431         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17432         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17433
17434         * class.c: Include output.h and parse.h.
17435         (mangled_classname): Add the `const' keyword to a char*.
17436         (find_named_method): Hide unused function definition.
17437         (build_utf8_ref): Change type of variable `c' to unsigned char.
17438         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17439         (build_class_ref): Add the `const' keyword to a char*.
17440         (layout_class_method): Remove unused variable `buf'.
17441
17442         * decl.c (find_local_variable): Remove unused variable `rtl'.
17443         (pushdecl): Likewise for variables `different_binding_level' and
17444         `oldglobal'.
17445         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17446         (maybe_build_cleanup): Likewise for parameter `decl'.
17447
17448         * except.c (expand_start_java_handler): Mark parameter `range'
17449         with ATTRIBUTE_UNUSED.
17450
17451         * expr.c: Include except.h.
17452         (pop_type): Remove unused variable `i'.
17453         (pop_value): Likewise for variables `n_words' and `i'.
17454         (expand_java_arrayload): Likewise for variable `convert'.
17455         (java_lang_expand_expr): Likewise for variables `op0', `type',
17456         `mode', `unsignedp', `node' and `elements'.
17457         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17458         `eh_ranges'.
17459         (process_jvm_instruction): Add a `const' qualifier to a char*.
17460
17461         * gjavah.c (output_directory): Add the `const' keyword to a char*.
17462         (temp_directory): Likewise.
17463         (print_c_decl): Likewise.
17464         (print_method_info): Likewise.
17465         (decode_signature_piece): Likewise.
17466         (print_mangled_classname): Likewise.
17467
17468         * java-except.h: Provide prototypes for maybe_start_try,
17469         maybe_end_try and add_handler.
17470
17471         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17472         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
17473         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17474         init_expr_processing, push_super_field, init_class_processing,
17475         can_widen_reference_to, class_depth, verify_jvm_instructions,
17476         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17477         set_local_type, merge_type_state, push_type, load_type_state,
17478         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17479         emit_unicode_mangled_name): Add prototypes.
17480
17481         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17482         (print_signature_type): Use ISDIGIT, not isdigit.
17483         (print_signature): Remove unused variable `j'.
17484
17485         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17486         int when comparing against one.
17487
17488         * jcf-parse.c: Include toplev.h.
17489
17490         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
17491         (localvar_free): Remove unused variable `i'.
17492         (generate_bytecode_conditional): Likewise for variable `kind'.
17493
17494         * jv-scan.c: Include config.h and system.h.  Remove redundant
17495         OS header and gansidecl.h includes.
17496         (warning): Add the `const' keyword to a char*.  Also add
17497         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
17498         __STDC__, when determining whether to use ANSI-isms.
17499         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
17500         (xmalloc): Don't redundantly prototype here.
17501         (main): Remove unused parameter `envp'.  Also fix the arguments
17502         passed to function `fatal' to match the format specifier.
17503
17504         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17505
17506         * mangle.c: Include toplev.h.
17507         (emit_unicode_mangled_name): Declare parameter `len'.
17508
17509         * parse.y (parse_warning_context): Add the `const' keyword to a
17510         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
17511         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17512         (issue_warning_error_from_context): Add the `const' keyword to
17513         a char*.
17514         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17515         not `__STDC__' for whether to use ANSI-isms.
17516
17517         * typeck.c (incomplete_type_error): Mark parameters `value' and
17518         `type' with ATTRIBUTE_UNUSED.
17519         (parse_signature_type): Use ISDIGIT, not isdigit.
17520
17521         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17522         (verify_jvm_instructions): Likewise.  Remove unused variables
17523         `field_name' and `default_val'.
17524
17525         * zextract.c: Include config.h and system.h.  Remove redundant
17526         OS header includes.
17527
17528         * zipfile.h: Prototype `read_zip_archive'.
17529
17530 1999-01-21  Andrew Haley  <aph@cygnus.com>
17531
17532         * typeck.c (convert): Allow conversions to void type: some
17533         optimizations in gcc do this.
17534
17535 1999-01-21  Andrew Haley  <aph@cygnus.com>
17536
17537         * typeck.c (convert_ieee_real_to_integer): New function.
17538         (convert): When not using fast-math and using hardware fp, convert
17539         an IEEE NaN to zero.
17540
17541 1999-01-18  Andrew Haley  <aph@cygnus.com>
17542
17543         * parse.y (patch_binop): Do a type conversion from signed to
17544         unsigned and then back to signed when a ">>>" is found.
17545
17546 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17547
17548         * java-tree.h: (check_for_initialization): Added prototype.
17549         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17550         * parse.y (do_resolve_class): Removed unused locals.
17551         (read_import_dir): Likewise.
17552         (resolve_qualified_expression_name): Array creation
17553         expressions are valid primary expressions.
17554         (qualify_ambiguous_name): Likewise.
17555         (patch_synchronized_statement): Removed unused local.
17556
17557 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17558
17559         * Makefile.in (zextract.o): Add dependencies.
17560
17561         * Makefile.in: Do not put ^Ls at the start of a line.
17562
17563 1999-01-15  Per Bothner  <bothner@cygnus.com>
17564
17565         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17566         sub-type the result of the call that gets the exception value.
17567
17568         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17569         don't call finish_class.
17570
17571         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17572         clear found before continuing.
17573
17574         * verify.c (verify_jvm_instructions):  On an array load, allow
17575         and handle top of stack to be TYPE_NULL.
17576
17577         * gjavah.c (generate_access):  Translate Java package private or
17578         protected access to C++ public, but with a comment.
17579
17580 1999-01-13  Andrew Haley  <aph@cygnus.com>
17581
17582         * expr.c (generate_name): Name prefix changed to avoid clashes
17583         with assembler temp labels.
17584
17585         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17586         MODIFY_EXPR.  Without this, code for the assignment may not be
17587         generated at all and the synchronized statement will read an
17588         uninitialized variable.
17589
17590 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17591
17592         * class.c (maybe_layout_super_class): Fixed returned value.
17593         * lex.c: Added 1999 to the copyright.
17594         (java_init_lex): Initialize java_lang_imported.
17595         * lex.h: Added 1999 to the copyright.
17596         * parse.h: Added 1999 to the copyright.
17597         (REGISTER_IMPORT): Fixed typo in trailing macro.
17598         (CURRENT_OSB): New macro.
17599         (struct parser_ctxt): New fields osb_depth, osb_limit.
17600         * parse.y (java_lang_id): New global variable.
17601         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17602         (array_creation_expression:): Use CURRENT_OSB.
17603         (dims:): Uses a stack to keep track of array dimensions.
17604         (cast_expression:): Use CURRENT_OSB.
17605         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17606         conditions.
17607         (register_fields): Fixed typos in comment.
17608         (check_method_redefinition): Fixed comment indentation.
17609         (java_check_regular_methods): Set saved found wfl to NULL after
17610         having reinstalled it in the previously found DECL_NAME.
17611
17612 1999-01-10  Richard Henderson  <rth@cygnus.com>
17613
17614         * gjavah.c (java_float_finite): Use a union to do type punning.
17615         (java_double_finite): Likewise.
17616
17617 1999-01-09  Per Bothner  <bothner@cygnus.com>
17618
17619         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
17620         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17621         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
17622         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
17623         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17624         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
17625
17626 1999-01-08  Per Bothner  <bothner@cygnus.com>
17627
17628         * check-init.c (check_init):  If compiling to native, we don't
17629         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
17630
17631 1999-01-08  Tom Tromey  <tromey@cygnus.com>
17632
17633         * parse-scan.y (variable_declarator_id): Set or increment
17634         bracket_count.
17635         (bracket_count): New global.
17636         (formal_parameter): Handle case where bracket pairs trail variable
17637         declarator id.
17638
17639 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
17640
17641         * jcf-parse.c (yyparse): variable len changed from a char to an
17642         int to prevent overflow.
17643
17644 1999-01-06  Per Bothner  <bothner@cygnus.com>
17645
17646         * java-tree.h:  Declare read_class.
17647         * jcf-parse.c (read_class):  New function.
17648         (load_class):  Now just call read_class.
17649
17650         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
17651         * jcf-parse.c (parse_source_file):  Declare save_error_count,
17652         which is needed by java_parse_abort_on_error macro,
17653         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
17654
17655         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
17656         constructor, if initializing a static field.
17657         (patch_new_array_init):  Set TREE_CONSTANT if it is.
17658         * expr.c (java_lang_expand_expr):  For a static array constructor
17659         of primitive elements, allocate the array itself statically.
17660         Disabled until we can set the vtable field statically.
17661
17662         * check-init.c:  New file.  Checks for definite assignment.
17663         * Makefile.in (JAVA_OBJS):  Add check-init.o.
17664         * parse.y (java_complete_expand_method): Call check_for_initialization.
17665         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
17666
17667 1999-01-06  Graham <grahams@rcp.co.uk>
17668
17669         * parse.y : include system.h instead of including
17670         standard headers directly with the exception of <dirent.h>.
17671
17672 1999-01-06  Per Bothner  <bothner@cygnus.com>
17673
17674         * lex.h:  Moved static function declarations to lex.c,
17675         to shut up some -Wall warnings.
17676         * lex.c:  Static function declarations moved here.
17677         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
17678
17679 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17680
17681         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17682
17683 1998-12-22  Per Bothner  <bothner@cygnus.com>
17684
17685         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
17686         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
17687
17688         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
17689         (localvar_alloc):  Change return type to void,
17690         (emit_unop):  Remove unused variable size.
17691
17692         * jcf-write.c (struct jcf_block):  Add new union.
17693         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
17694         (call_cleanups):  New functions.
17695         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
17696         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
17697         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17698         * lang.c (lang_init):  Call using_eh_for_cleanups.
17699         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
17700         completing operands to patch_synchronized_statement.
17701         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17702         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17703         WITH_CLEANUP_EXPR instead of TRY_EXPR.
17704
17705 1998-12-20  John F. Carr  <jfc@mit.edu>
17706
17707         * Make-lang.in: Comment out control-Ls; they upset some makes.
17708
17709 1998-12-18  Tom Tromey  <tromey@cygnus.com>
17710
17711         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17712         consistently.
17713
17714 1998-12-17  Tom Tromey  <tromey@cygnus.com>
17715
17716         * parse.y (DIR_SEPARATOR): New define.
17717         (check_class_interface_creation): Use it.
17718
17719         * parse-scan.y (report_main_declaration): Recognize
17720         `java.lang.String' in argument to main.
17721
17722 1998-12-16  Per Bothner  <bothner@cygnus.com>
17723
17724         * parse.y (create_interface):  Remove bogus test.
17725
17726 1998-12-16  Per Bothner  <bothner@cygnus.com>
17727
17728         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
17729         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
17730
17731 1998-12-16  Tom Tromey  <tromey@cygnus.com>
17732
17733         * parse-scan.y (qualified_name): Use correct sprintf format.
17734
17735 1998-12-15  Tom Tromey  <tromey@cygnus.com>
17736
17737         * gjavah.c (print_field_info): Changed how most negative number is
17738         printed.
17739
17740 1998-12-14  Per Bothner  <bothner@cygnus.com>
17741
17742         * parse.y (fold_constant_for_init):  New function.
17743         (resolve_expression_name):  Don't replace static final
17744         constant-initialized fields by its value.
17745         (java_complete_lhs):  New.  Same as java_complete_tree, except does
17746         not replace static final constant-initialized fields by their values.
17747         (register_fields):  If there is an initializer, set DECL_INITIAL and
17748         MODIFY_EXPR_FROM_INITIALIZATION_P.
17749         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
17750         Only call patch_initialized_static_field if
17751         MODIFY_EXPR_FROM_INITIALIZATION_P.
17752         (patch_initialized_static_field):  If not valid constant, clear
17753         DECL_INITIAL.
17754
17755         * parse.y (lookup_field_wrapper):  Fix thinko.
17756
17757         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
17758         set and restore global lineno.
17759
17760 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17761
17762         * gjavah.c (print_field_info): If value to print is the smallest
17763         value of its size, then print as hex to avoid later warnings from
17764         C++ compiler.
17765
17766 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17767
17768         * gjavah.c (decompile_method): Decompile `return null'.
17769         (process_file): Generate `#pragma interface'.
17770         (method_declared): New global.
17771         (print_method_info): Set it.
17772         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17773         (print_method_info): Handle abstract methods.
17774
17775 1998-12-13  Per Bothner  <bothner@cygnus.com>
17776
17777         * parse.y (patch_method_invocation):  If class_decl is null
17778         (e.g. an array type), use original type.
17779
17780         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
17781         errors about uncaught exception from clone (of array, specifically).
17782
17783 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17784
17785         * gjavah.c (decompile_method): Handle all types of `return'
17786         opcode.  Decompile `return this' and `return'.
17787         (method_access): New global.
17788         (print_method_info): Set it.
17789         (decompile_method): Don't decompile a synchronized method.
17790
17791 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17792
17793         * jcf-reader.c (jcf_parse_one_method): Recognize
17794         HANDLE_END_METHOD.
17795         * gjavah.c (HANDLE_END_METHOD): New macro.
17796         (HANDLE_CODE_ATTRIBUTE): New macro.
17797         (decompile_method): New function.
17798         (print_method_info): Don't print `;\n' at end of function decl.
17799         Include java-opcodes.h.
17800         (decompiled): New global.
17801
17802 1998-12-12  Per Bothner  <bothner@cygnus.com>
17803
17804         * class.c (build_class_ref):  Handle PRIMTYPE.class if
17805         flag_emit_class_files.
17806         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
17807         if flag_emit_class_files.
17808         * parse.y (java_complete_tree):  Pre-liminary support for
17809         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17810
17811         * parse.y (patch_synchronized_statement):   Don't call monitorexit
17812         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
17813
17814         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
17815
17816         * zipfile.h (opendir_in_zip):  New declaration.
17817         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
17818         (opendir_in_zip):  New function, using code from open_in_zip.
17819         (open_in_zip):  Call opendir_in_zip.
17820         (find_class):  Remove no-longer-used do_class_file parameter,
17821         but add source_ok parameter.  Change logic so if we find a .java file,
17822         we don't look for .class in later classpath emtries.
17823         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
17824         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
17825         * gjavah.c: Update call to find_class.
17826         * jcf-dump.c:  Likewise.
17827
17828         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
17829         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
17830         nothing if body is empty_stmt_node.
17831         Various little fixes so SP gets correctly adjusted.
17832         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17833         For CALL_EXPR, test if static first.
17834         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
17835         such as the ones we create for Object and Class.
17836         Set and restore current_function_decl.
17837         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17838         (note_possible_classname):  New function.
17839         (read_import_entry):  Removed.  Merged with read_import_dir.
17840         (read_import_dir):  Don't call find_class - that only gives us
17841         the first classpath entry having the needed package.
17842         Use the struct buffer data structure from buffer.h.
17843         (read_import_dir, find_in_imports_on_demand):  The remembered
17844         class names now use '.' (not '/') as package separator.
17845
17846         * parse.y (java_complete_expand_methods):  Call write_classfile
17847         here, and not in java_expand_classes (which only gets first class).
17848
17849 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17850
17851         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
17852         (register_fields):  If a static fields has an initializer, just
17853         chain it on ctxp->static_initialized, and handle later.
17854         (java_complete_expand_methods):  Force <clinit> first.
17855         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
17856         - it's already been completed.
17857         (patch_initialized_static_field):  New function.
17858         (java_complete_field):  Call it.
17859
17860 1998-12-12  Per Bothner  <bothner@cygnus.com>
17861
17862         * expr.c (encode_newarray_type, build_new_array):  New functions.
17863         * java-tree.h:  Declare build_new_array.
17864         * jcf-write.c (patch_newarray):  Use build_new_array.
17865
17866         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
17867         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
17868
17869         * parse.y (patch_new_array_init):  Re-organize.
17870         Now is passed the actual array (pointer) type of the value.
17871         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17872         (patch_array_constructor):  Removed - merged into patch_new_array_init.
17873         (java_complete_tree):  Update patch_new_array_init.
17874
17875         * jcf-write.c (find_constant_index):  New function.
17876         (generate_bytecode_insns):  Use find_constant_index.
17877         (generate_classfile):  Use find_constant_index for ConstantValue.
17878
17879 1998-12-11  Tom Tromey  <tromey@cygnus.com>
17880
17881         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17882         * decl.c (init_decl_processing): Renamed dtable -> vtable.
17883         * class.c (make_class_data): Renamed dtable -> vtable, and
17884         dtable_method_count -> vtable_method_count.
17885
17886 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17887
17888         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17889         global variables, initialized.
17890         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17891         Declared new global variables.
17892         * lex.c (java_lex): Return long_zero_node, float_zero_node,
17893         double_zero_node, integer_zero_node upon direct matching.
17894         * parse.y (purify_type_name): Added function prototype.
17895         (duplicate_declaration_error_p): Consider new_type as potentially
17896         being a incomplete type. Use purify_type_name on type string.
17897         (method_header): saved_type: unused variable removed. Don't figure
17898         return type if method name is invalid.
17899         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17900         processed by patch_unaryop.
17901         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17902         increment/decrement node into its original type after binary
17903         numeric promotion on its operands.
17904
17905 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17906
17907         * parse.y (array_initializer:): Array init operand is NULL_TREE
17908         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17909         now an error. Fixed indentation problems.
17910         (patch_string): Handle error_mark_node as an argument.
17911         (patch_new_array_init): Fixed indentation problems.
17912         (array_constructor_check_entry): Removed check on null wfl_value.
17913         Return an error if wfl_value's walk returns an error.
17914
17915 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17916
17917         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17918         * lex.c (java_lex): Remember column position before advancing one
17919         token. Retain location information on OCB_TK.
17920         * lex.h (typedef struct java_lc): Added new field.
17921         * parse.h (GET_SKIP_TYPE): New macro.
17922         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17923         * parse.y (build_new_array_init, patch_new_array_init,
17924         patch_array_constructor, maybe_build_array_element_wfl,
17925         array_constructor_check_entry): New function prototypes.
17926         (switch_block:): Tagged <node>.
17927         (OCB_TK): Tagged <operator>.
17928         (array_initializer:): Installed actions.
17929         (variable_initializer): Build location information on element if
17930         necessary.
17931         (switch_statement:): Fixed indentation typo.
17932         (switch_block:): Redefined default action.
17933         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17934         (patch_assignment): Removed duplicate code.
17935         (maybe_build_array_element_wfl, build_new_array_init,
17936         patch_new_array_init, patch_array_constructor,
17937         array_constructor_check_entry): New functions.
17938
17939 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17940
17941         * parse.y (array_initializer): Tagged <node>.
17942         (variable_initializer:): Use default rule.
17943         (array_initializer:): Defined actions.
17944         (variable_initializers:): Likewise.
17945         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
17946         non-static field accesses.
17947         (patch_invoke): Fixed indentation typo.
17948         (java_complete_tree): Likewise.
17949         (build_labeled_block): Changed leading comment. Generate an error
17950         in case of duplicate loop labels.
17951         (patch_conditional_expr): Patch results of string concatenation
17952         operations.
17953
17954 1998-12-06  Per Bothner  <bothner@cygnus.com>
17955
17956         * constants.c (find_methodref_index):  When the class is an interface,
17957         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
17958
17959         * decl.c (finit_identifier_node):  Use "$finit$", rather than
17960         "<finit>" (which Sun's verifier rejects).
17961         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
17962         (generate_field_initialization_code):  Removed.
17963         (fix_constructors)  Don't add call to $finit$ here (wrong order).
17964         (patch_method_invocation):  Add $finit$ call here.
17965
17966         * java-tree.h (CALL_USING_SUPER):  New macro.
17967         * parse.y (patch_invoke):  Remove im local variable.
17968         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
17969         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
17970         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
17971
17972         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
17973
17974         * parse.y (java_complete_tree):  Don't complain about unreachable
17975         statement if it is empty_stmt_node.
17976
17977         * jcf-write.c (find_constant_wide):  New function.
17978         (push_long_const):  Use find_constant_wide.
17979
17980         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
17981         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
17982         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
17983         Emit invokeinterface when calling an interface method.
17984         Emit invokespecial also when calling super or private methods.
17985
17986         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
17987
17988 1998-12-06  Per Bothner  <bothner@cygnus.com>
17989
17990         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
17991
17992 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17993
17994         * java-tree.h (java_layout_seen_class_methods): New function
17995         prototype.
17996         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
17997         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
17998         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
17999         * parse.y (method_declarator:): Defined action.
18000         (issue_warning_error_from_context): input_filename saved, set to
18001         the appropriate value and restored after java_error is called.
18002         (build_unresolved_array_type): Fixed comment.
18003         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18004         (method_header): Deal with return type the same way type are
18005         handled for fields and method's parameters and local variables
18006         types are handled.
18007         (check_method_redefinition): Removed extra CR.
18008         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18009         (java_layout_seen_class_methods): New function.
18010         (java_layout_classes): Call java_layout_seen_class_methods.
18011
18012 1998-12-03  Per Bothner  <bothner@cygnus.com>
18013
18014         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18015
18016 1998-12-03  Per Bothner  <bothner@cygnus.com>
18017
18018         * jcf-dump.c (main):  Fix error message.
18019         * jcf-path.c (add_entry):  Style fix.
18020
18021 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18022
18023         * class.c (layout_class_method): Call build_java_argument_signature
18024         on constructors too.
18025         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18026         (patch_method_invocation): Define a primary when resolving an
18027         expression name. Augmented comment on code checking illegal `this'
18028         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18029
18030 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18031
18032         * class.c (layout_class_method): Don't report error on non-static
18033         overriding static if the method is private.
18034         * java-tree.h (finish_class): Prototype added.
18035         * lex.c (java_get_line_col): Handle col argument -2 value.
18036         * parse.h: All static method declarations moved to parse.y.
18037         * parse.y: Now contains all static method declarations previously
18038         found in parse.h.
18039         (find_expr_with_wfl, missing_return_error,
18040         unreachable_stmt_error): New functions.
18041         (java_get_real_method_name): Identify constructors bearing class
18042         names in source code compiled classes only.
18043         (java_complete_expand_methods): Call missing_return_error.
18044         (invocation_mode): Private methods invoked as static methods.
18045         (java_complete_tree): Call unreachable_stmt_error.
18046
18047 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18048
18049         * Makefile.in (+target): Removed.
18050         (+xmake_file): Likewise.
18051         (+tmake_file): Likewise.
18052         (.NOEXPORT): Removed duplicate.
18053
18054 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18055
18056         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18057
18058         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18059
18060         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18061         libiberty.h.  Provide an xmalloc definition.
18062
18063         * jvspec.c: Remove the xmalloc prototype.
18064
18065         * parse-scan.y: Include config.h and system.h.  Don't include
18066         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18067         Provide an xstrdup definition.
18068
18069 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18070
18071         * jcf-path.c (add_entry): Recognize ".jar" too.
18072         * lang-specs.h: Likewise.
18073
18074 1998-11-26  Per Bothner  <bothner@cygnus.com>
18075
18076         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18077         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18078
18079         * jcf-write.c (generate_bytecode_insns):
18080         Handle pre/post-increment/decrement of long.
18081
18082         * jcf-write.c (generate_bytecode_insns):
18083         Handle missing exception handler (finally for synchronized).
18084
18085 1998-11-25  Per Bothner  <bothner@cygnus.com>
18086
18087         * java-tree.h (end_params_node):  Declare global.
18088         * decl.c (end_params_node):  New global.
18089         (init_decl_processing, start_java_method):  Use end_params_node for
18090         end of list of parameter types.  Follows correct gcc conventions.
18091         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18092         * lang.c (put_decl_node):  Likewise.
18093         * typeck.c (various places):  Likewise.
18094         * class.y (various places):  Likewise.
18095         * parse.y (various places):  Likewise.
18096
18097         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18098         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18099
18100         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18101
18102         * class.c (layout_class_method):  Remove commented-out code, re-format.
18103         Don't add vtable entry (or index) for private methods.
18104         * expr.c (expand_invoke):  A private method is implicitly final.
18105         * class.c (make_class_data):  If inlining or optimizing,
18106         skip private methods.
18107
18108         * class.c (finish_class):  New function.  Calls existing methods,
18109         but alls emits deferred inline functions.
18110         * jcf-parse.c (parse_class_file):  Call finish_class.
18111         * parse.y (java_complete_expand_methods):  Likewise.
18112
18113         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18114
18115         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18116
18117 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18118
18119         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18120
18121 1998-11-24  Per Bothner  <bothner@cygnus.com>
18122
18123         * (generate_classfile): Always write class access flag with
18124         ACC_SUPER set.
18125
18126 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18127
18128         * class.c (maybe_layout_super_class): New function.
18129         (layout_class): Reorganized. Loop on class methods dispatched into
18130         a new function. Call maybe_layout_super_class.
18131         (layout_class_methods, layout_class_method): New functions.
18132         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18133         class.
18134         (expand_invoke): Likewise.
18135         * java-tree.h (all_class_list): New global variable declared.
18136         (layout_class_methods, layout_class_method): New function
18137         prototypes.
18138         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18139         * jcf-parse.c (all_class_list): New global variable.
18140         (load_class): Extended what class_or_name can be. Use parser
18141         context mechanism to save globals before calling jcf_parse.
18142         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18143         is set on the file name.
18144         (jcf_parse): Layout class methods when Object is loaded, otherwise
18145         record class in all_class_list for delayed method layout.
18146         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18147         * lang.c (put_decl_node): Decode <init> into the decl context
18148         class name.
18149         * lex.c (java_allocate_new_line): Use xmalloc.
18150         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18151         pointers, not TREE_LIST elements.
18152         (struct parser_ctxt): Fixed comment indentations, added comments
18153         and reordered some fields.
18154         (java_check_methods): Function prototype removed.
18155         * parse.y (java_push_parser_context): Use xmalloc.
18156         (java_parser_context_restore_global): Pop extra pushed ctxp only
18157         when there's nothing next.
18158         (maybe_create_class_interface_decl): Fixed comment, add new
18159         created class decl to all_class_list.
18160         (method_header): Use GET_REAL_TYPE on argument's types.
18161         (method_declarator): Use GET_REAL_TYPE, change type to the real
18162         type in TREE_LIST dependency node. Build argument list with the
18163         real type.
18164         (create_jdep_list): Use xmalloc. Removed allocation error message.
18165         (obtain_incomplete_type): Fixed leading comment. Broadened
18166         incoming argument meaning.
18167         (register_incomplete_type): Use xmalloc. Removed allocation error
18168         message.
18169         (safe_layout_class): Fixed leading comment.
18170         (jdep_resolve_class): Reversed if statement condition and switch
18171         if and else bodies.
18172         (resolve_and_layout): Fixed leading comment. Broadened incoming
18173         argument meaning.
18174         (complete_class_report_errors): New local variable name, for
18175         clarity. purify_type_name used for all error cases.
18176         (java_get_real_method_name): Stricter check on constructors.
18177         (java_check_regular_methods): Reverse methods list only if not
18178         already laid out. Layout artificial constructor.
18179         (java_check_methods): Deleted.
18180         (source_start_java_method): Obtain incomplete type for patchable
18181         method arguments.
18182         (java_layout_classes): Fixed leading comment. Use
18183         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18184         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18185         before returning. Fixed comments.
18186         (java_expand_classes): Check for errors up front.
18187         (patch_method_invocation): Class to search is resolved and laid
18188         out.
18189
18190 1998-11-24  Per Bothner  <bothner@cygnus.com>
18191
18192         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18193
18194         * javaop.h (int8):  Removed - not used.
18195         (jbyte):  Redefine portably with correct signedness.
18196
18197         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18198
18199         * jcf-write.c (generate_bytecode_insns):  Fix typo
18200         OPCODE_getstatic to OPCODE_getfield.
18201
18202         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18203         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18204         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18205
18206 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18207
18208         * jcf-parse.c (jcf_parse_source): Function returned type is
18209         void. Added prototype.
18210         (jcf_parse): Function returned type is void.
18211         (yyparse): Remove call to fclose on the last parsed file.
18212
18213         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18214
18215 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18216
18217         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18218         (layout_class): Cope with methods featuring WFL in decl names.
18219         * decl.c (unqualified_object_id_node): New global variable,
18220         initialized.
18221         (build_decl_no_layout): Removed.
18222         * expr.c (build_primtype_type_ref): Handle Double.
18223         (java_lang_expand_expr): Fixed indentations.
18224         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18225         (flag_wall, flag_redundant, flag_not_overriding,
18226         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18227         variable declarations.
18228         (build_decl_no_layout): Removed prototype.
18229         (java_get_real_method_name): Added prototype.
18230         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18231         (java_parse_abort_on_error): Macro now just returns.
18232         * jcf-parse.c (jcf_parse_source): Check fclose returned
18233         value. Call emit_register_classes if java_report_errors returns
18234         zero.
18235         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18236         flag_static_local_jdk1_1): New integer flags.
18237         (lang_decode_option): New flags set here.
18238         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18239         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18240         the flag_redundant variable.
18241         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18242         when parsing java.lang.Object class.
18243         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18244         NULL_TREE to build.
18245         (resolve_qualified_expression_name): Fixed indentation.
18246         (patch_array_ref): Changed prototype.
18247         (not_initialized_as_it_should_p): Prototype removed.
18248         (java_report_errors): Added function prototype.
18249         * parse.y (formal_parameter:): Changed error message for not yet
18250         supported final parameters.
18251         (class_type_list:): Set both PURPOSE and VALUE of created
18252         TREE_LIST to be class_type.
18253         (primary_no_new_array:): Handle class literals on primitive types.
18254         (parse_warning_context): Reinstalled correct force_error and
18255         do_warning flags setups.
18256         (java_report_errors): Changed prototype. Return java_error_count
18257         value.
18258         (variable_redefinition_error): Consider treating variable type as
18259         a fake pointer.
18260         (create_interface): Warn about redundant abstract modifier if
18261         flag_redundant is set. Changed error message.
18262         (lookup_field_wrapper): Save/restore globals before/after looking
18263         up field.
18264         (duplicate_declaration_error_p): Consider treating declaration
18265         type as a fake pointer.
18266         (register_fields): Extract real type from dependency node. Check
18267         for duplicate field declaration after type adjustment. Use
18268         DECL_INITIAL to store static final initialized values.
18269         (method_header): Extract real function type from dependency node.
18270         (check_abstract_method_header): Use GET_METHOD_NAME.
18271         (obtain_incomplete_type): Layout fake pointer type.
18272         (safe_layout_class): Don't try to check for methods before layout.
18273         (java_complete_class): Don't check for correct throws clause
18274         elements inheritance here.
18275         (resolve_and_layout): Broadened name parameter meaning.
18276         (reset_method_name): Use GET_METHOD_NAME.
18277         (java_get_real_method_name): New function.
18278         (java_check_regular_methods): Don't check methods in
18279         java.lang.Object.  Verify lineage of throws clause elements. Use
18280         flag_no_overriding in warning report.
18281         (check_throws_clauses): Don't check if class was from
18282         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18283         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18284         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18285         warning on unsupported final local variables. Use build_decl
18286         instead of build_decl_no_layout. Get real local variable type from
18287         dependency node.
18288         (source_start_java_method): Get real parameter type from
18289         dependency node. Call build_decl instead of build_decl_no_layout.
18290         (java_layout_classes): Reverse tree and layout type and class as
18291         required. Mark class as loaded when done.
18292         (resolve_field_access): Fixed indentation. Restricted condition
18293         leading to static field access code generation. Set field_type
18294         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18295         (resolve_qualified_expression_name): Initialize type_found to
18296         null. Handle static field resolved during qualification. Fixed
18297         layout on non primitive field decl types.
18298         (not_accessible_p): Fixed typo in comment.
18299         (patch_method_invocation): Resolve and layout class to search from
18300         type.
18301         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18302         layout non primitive type, if necessary. Make method node only to
18303         report errors.
18304         (find_applicable_accessible_methods_list): Consider WFL'ed method
18305         decl names. Fixed indentation.
18306         (argument_types_convertible): Resolve and layout target type if
18307         necessary.
18308         (java_complete_tree): Fixed indentation problems. Rewrote
18309         CALL_EXPR thrown exceptions check. Re-installed further processing
18310         of the assignment in certain cases.
18311         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18312         inlining on class literals.
18313         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18314         0 literal.
18315         (valid_method_invocation_conversion_p): Likewise.
18316         (patch_string): Temporary disable forbidden use of `this' in
18317         explicit constructor invocations when doing string concatenation
18318         within their scope.
18319         (patch_unaryop): Added comment. Reinstalled code to disable
18320         further check on assignment operation with cast expression RHS.
18321         (patch_switch_statement): Fixed indentation.
18322         (build_try_statement): Call build_decl instead of
18323         build_decl_no_layout.
18324         (patch_synchronized_statement): Likewise.
18325         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18326         IS_UNCHECKED_EXPRESSION_P.
18327         (check_thrown_exceptions_do): Changed leading comment. Resolve and
18328         layout argument exception type.
18329         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18330         of IS_UNCHECKED_EXPRESSION_P.
18331
18332 1998-11-18  Anthony Green  <green@cygnus.com>
18333
18334         * jcf-parse.c (yyparse): Open class file in binary mode.
18335
18336 1998-11-15  Per Bothner  <bothner@cygnus.com>
18337
18338         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
18339
18340         * jcf-write.c (perform_relocations):  Move check out one loop.
18341
18342 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
18343
18344         * Make-lang.in: Fix reference to srcdir.
18345         * jv-scan.c: Add missing xmalloc prototype.
18346         * jvgenmain.c: Ditto.
18347
18348 1998-11-15  Per Bothner  <bothner@cygnus.com>
18349
18350         * decl.c (error_mark_node), java-tree.h:  New global.
18351         * parse.y:  Use empty_stmt_node instead of size_zero_node.
18352         (build_if_else_statement):  If missing else, use empty_stmt_node.
18353
18354         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
18355         (java_complete_expand_method):  Complain if return is missing.
18356         (java_check_regular_methods):  Comment out incorrect error check.
18357         (not_accessible_p):  Fix incorrect handling of protected methods.
18358         (patch_method_invocation):  Pass correct context to not_accessible_p.
18359         (find_applicable_accessible_methods_list):  Likewise.
18360         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
18361         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
18362         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
18363         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
18364
18365         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
18366         (push_int_const):  Remove reundant NOTE_PUSH.
18367         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
18368         (- case SWITCH_EXPR):  Fix code generation bug.
18369         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
18370         (generate_classfile):  More robust for abstract methods.
18371
18372 1998-11-15  Anthony Green  <green@cygnus.com>
18373
18374         * Makefile.in: jv-scan and jvgenmain all require libiberty.
18375         * Make-lang.in: Ditto.
18376
18377         * jv-scan.c: Remove xmalloc and xstrdup definitions.
18378         * jvgenmain: Ditto.
18379
18380 1998-11-15  Per Bothner  <bothner@cygnus.com>
18381
18382         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
18383
18384         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
18385
18386 1998-11-14  Per Bothner  <bothner@cygnus.com>
18387
18388         Allow uses of interface types to verify.  This is not really
18389         type-safe, but it matches what Sun does, and is OK as long as
18390         there are appropriate run-time checks.
18391         * verify.c (merge_types):  If merging two interface types,
18392         just set the result to java.lang.Object.
18393         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
18394
18395 1998-11-13  Tom Tromey  <tromey@cygnus.com>
18396
18397         * gjavah.c (main): Handle --output-class-directory argument.
18398         * jvspec.c (lang_specific_driver): Translate `-d' into
18399         -foutput-class-dir.
18400         * jcf.h (jcf_write_base_directory): Declare.
18401         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18402         * lang-options.h: Mention -foutput-class-dir.
18403         * jcf-write.c (jcf_write_base_directory): New global.
18404         (make_class_file_name): Put generated .class file into `-d'
18405         directory, or into source directory if -d not given.  Function now
18406         static.
18407         (write_classfile): Free class file name.  Handle case where class
18408         file name is NULL.
18409         (DIR_SEPARATOR): New macro.
18410         Include <sys/stat.h>
18411
18412         * Makefile.in (prefix): New macro.
18413
18414 1998-11-12  Per Bothner  <bothner@cygnus.com>
18415
18416         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
18417         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
18418         here (done in patch_invoke instead).
18419         (case_identity):  Moved here from parse.y.
18420
18421         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
18422         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
18423         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
18424         so they can be efficiently scanned without recursion.
18425         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18426         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
18427         in BLOCK iteratively, rather than recursively.
18428
18429         * parse.y (do_unary_numeric_promotion):  New function.
18430         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
18431
18432         * parse.y (patch_newarray):  Various fixes.
18433
18434         Re-do handling of switch statements (for proper block scoping).
18435         * parse.y:  Add just a single block for the enture switch block,
18436         but don't create any "case blocks".
18437         (group_of_labels):  Rmeoved unneeded non-terminal.
18438         CASE_EXPR and DEFAULT_EXPR are added to current block.
18439         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
18440         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18441         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
18442         * parse.y (wfl_operator, print_int_node): Make non-static.
18443         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
18444         as part of recursive scan of block.
18445         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
18446         (patch_switch_statement):  Most tests move dinto java_complete_tree.
18447
18448         * parse.y:  Make various production be non-typed (void).
18449         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
18450         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
18451         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
18452
18453         * jcf-write.c (struct jcf_handler):  New type.
18454         (struct jcf_switch_state):  New type.
18455         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
18456         (alloc_handler, emit_unop, emit_reloc):  New functions.
18457         (adjust_typed_op):  Add extra parameter ("max type" offset).
18458         (emit_switch_reloc, emit_case-reloc):  New function.
18459         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
18460         (generate_bytecode_insns):  Support REAL_CST, switch statements,
18461         exception handling, method calls, object/array creation, and more.
18462
18463         * class.c:  Remove some unused variables.
18464         * constants.c (find_string_constant):  New function.
18465         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
18466         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
18467         if flag_emit_class_files.
18468
18469 1998-11-12  Tom Tromey  <tromey@cygnus.com>
18470
18471         * jcf-io.c (find_class): Added explanatory comment.
18472
18473         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
18474         trailing slash to `.zip' entries.
18475
18476         * jvspec.c (lang_specific_driver): Correctly handle case where
18477         GC_NAME not defined.
18478
18479 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18480
18481         * jvspec.c (GC_NAME): New define.
18482         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
18483         if required.
18484         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18485
18486 1998-11-11  Per Bothner  <bothner@cygnus.com>
18487
18488         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
18489
18490 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18491
18492         * jcf-dump.c (main): Correctly recognize `--'-style long options.
18493
18494 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18495
18496         * class.c (is_compiled_class): Call safe_layout_class for class
18497         compiled from source.
18498         * conver.h (convert_to_integer, convert_to_real,
18499         convert_to_pointer): Added prototypes.
18500         * decl.c (init_decl_processing): Non longer push the decls of
18501         `methodtable', `constants', `Class', `Field', `dispatchTable'
18502         `jexception' and `Method'.
18503         * expr.c (build_invokeinterface): New function.
18504         (expand_invoke): static variable CLASS_IDENT now in
18505         build_invokeinterface. Use build_invokeinterface.
18506         (expand_java_field_op): Moved code to inline
18507         java.lang.PRIMTYPE.TYPE into a function.
18508         (build_primtype_type_ref): New function.
18509         * java-tree.def (INSTANCEOF_EXPR): New tree code.
18510         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18511         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18512         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18513         (DECL_LOCAL_STATIC_VALUE): New macro.
18514         (build_invokeinterface, build_primtype_type_ref): New function
18515         prototypes.
18516         (java_parse_abort_on_error): Macro rewritten.
18517         * jcf-parse.c (current_method): Add comment to declaration.
18518         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18519         Function prototypes fixed.
18520         (jcf_parse_source): push/pop parser context. save/restore global.
18521         (parse_source_file): Fixed leading comment. Now take a
18522         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18523         classes and pop the parser context anymore.
18524         (yyparse): Push parser context, save globals, parse the source
18525         file, restore globals and pop the parser context when processing a
18526         source file.
18527         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18528         * lex.c (java_parse_doc_section): New function.
18529         (java_lex): Call java_parse_doc_section when appropriate. Build an
18530         operator around INSTANCEOF_TK.
18531         * lex.h (java_lineterminator, java_sprint_unicode,
18532         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18533         Prototypes rewritten.
18534         (java_parse_escape_sequence, java_letter_or_digit_p,
18535         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18536         java_read_unicode, java_store_unicode, java_read_char,
18537         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18538         Added function prototypes.
18539         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18540         define.
18541         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18542         New macros
18543         (struct parser_ctxt): New fields: deprecated,
18544         current_parsed_class_un, gclass_list.
18545         (fix_method_argument_names, issue_warning_error_from_context,
18546         resolve_package, lookup_package_type): New function prototypes.
18547         (resolve_expression_name): Fixed function prototype.
18548         (find_applicable_accessible_methods_list): Fixed indentation, added
18549         extra argument in prototype.
18550         (check_final_assignment, build_null_of_type, check_deprecation,
18551         check_method_redefinition, reset_method_name,
18552         java_check_regular_methods, java_check_abstract_methods,
18553         maybe_build_primttype_type_ref): New function prototype.
18554         * parse.y (conver.h): Include.
18555         (INSTANCEOF_TK): Tagged <operator>.
18556         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18557         (relational_expression:): Build binop for instanceof.
18558         (java_push_parser_context): Remember ctxp->gclass_list across
18559         contexts.
18560         (java_pop_parser_context): Simply return if no context
18561         exists. Remember gclass_list across contexts.
18562         (issue_warning_error_from_context): New function.
18563         (parse_error_context): Don't setup ctxp->elc here. Call
18564         issue_warning_error_from_context instead.
18565         (parse_warning_context): Likewise.
18566         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18567         setup. Link new class/interface to ctxp->gclass_list.
18568         (add_superinterfaces): Register interface as incomplete if not
18569         loaded.
18570         (create_class): Remember class unqualified name in
18571         ctxp->current_parsed_class_un. Check class deprecation.
18572         (register_fields): Check field deprecation. Remember static final
18573         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18574         processing INIT.
18575         (method_header): New local variable ORIG_ARG. Use unqualified
18576         current class name for check on constructor errors. Promote return
18577         type if of record type. Argument list fix moved in
18578         fix_method_argument_names, called here. Check method deprecation.
18579         (fix_method_argument_names): New function.
18580         (method_declarator): Promote record typed arguments.
18581         (safe_layout_class): Check class methods before layout.
18582         (java_complete_class): Compute field layout when patched.
18583         (do_resolve_class): Try to load class after having it renamed
18584         after the package name.
18585         (get_printable_method_name): Use DECL_CONTEXT.
18586         (reset_method_name): New function.
18587         (check_method_redefinition): Use reset_method_name.
18588         (java_check_regular_methods): New local variable
18589         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18590         names for error report. Check for compile-time error when method
18591         found has default (package) access.
18592         (java_check_abstract_methods): Now takes an interface DECL node as
18593         an argument. Also reinstall real name on unchecked
18594         overriding/hiding methods for error report.
18595         (java_check_methods): Fixed leading comment. Get classes to verify
18596         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18597         CLASS_METHOD_CHECKED_P on class verification.
18598         (lookup_java_method2): Get real method name if necessary.
18599         (find_in_imports): Don't check package class access here.
18600         (resolve_package, lookup_package_type): New functions.
18601         (java_layout_classes): Fixed leading comment. Take classes to be
18602         laid out from ctxp->gclass_list.
18603         (java_complete_expand_methods): Don't expand native and abstract
18604         methods.
18605         (java_expand_classes): New function.
18606         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18607         values of static final field of primitive types.
18608         (resolve_field_access): Handles static final field of promotive
18609         type.
18610         (resolve_qualified_expression_name): Handle STRING_CST as
18611         primaries and package name resolution. Check deprecation on found
18612         decls. Set where_found and type_found on non static field resolved
18613         during qualification. Layout non primitive field decl types.
18614         (check_deprecation): New function.
18615         (maybe_access_field): Simplified.
18616         (patch_method_invocation_stmt): Local variable CLASS_TYPE
18617         removed. Reverse method's argument when primary is a type. Don't
18618         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18619         instead. Include abstract class in the list of class searchable
18620         for constructors. Use DECL_CONTEXT of found method for access
18621         checks. Check method deprecation.
18622         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18623         converting arguments. Handle INVOKE_INTERFACE.
18624         (lookup_method_invoke): Search constructor using existing
18625         infrastructure (don't rely on lookup_java_constructor anymore).
18626         (find_applicable_accessible_methods_list): Extra argument flag
18627         LC. Now include constructor in the search.
18628         (qualify_ambiguous_name): Conditional expression are primaries.
18629         (not_initialized_as_it_should_p): static final are always
18630         initialized.
18631         (java_complete_tree): Pass extra NULL argument to
18632         resolve_expression_name. Stricter test to carry on patching
18633         assignments. New case for INSTANCEOF_EXPR.
18634         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18635         (check_final_assignment, maybe_build_primttype_type_ref): New
18636         functions.
18637         (patch_assignment): Detect resolved static finals and carry normal
18638         assignment error check on them. Inline PRIMTYPE.TYPE read access.
18639         (try_builtin_assignconv): Access constant 0 on all primitive
18640         types.
18641         (valid_builtin_assignconv_identity_widening_p): Accept identical
18642         types. Accept all promoted type on int type.
18643         (valid_ref_assignconv_cast_p): Accept a null pointer to be
18644         assigned to a reference.
18645         (valid_method_invocation_conversion_p): Accept to check null
18646         pointers.
18647         (build_binop): Merge declaration and initialization of local
18648         variable BINOP.
18649         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18650         numeric types. Improved validity test for qualify operators on
18651         references.
18652         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18653         and PREINCREMENT_EXPR. Also detect resolved static finals of a
18654         primitive type and issue the appropriate error message.
18655         (resolve_type_during_patch): Mark class loaded when resolved.
18656         (patch_cast): Allow null to be cased to reference types.
18657         (build_null_of_type): New function.
18658         (patch_array_ref): Handle array on references correctly.
18659         (patch_return): Removed unused local variable MODIFY. Force
18660         boolean to be returned as integers. Allows null to be returned by
18661         a function returning a reference.
18662         * typeck.c (convert_to_integer, convert_to_real,
18663         convert_to_pointer): Prototypes moved to convert.h
18664         (lookup_argument_method): Use method real name, if necessary.
18665
18666 1998-10-30  Tom Tromey  <tromey@cygnus.com>
18667
18668         * class.c (build_class_ref): Changed name of primitive classes to
18669         start with `_Jv_'.
18670
18671         * class.c (make_class_data): Renamed fields: nmethods to
18672         method_count, method_count to dtable_method_count.  Always set
18673         `state' field to 0.
18674         * decl.c (init_decl_processing): Likewise.
18675
18676 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18677
18678         * class.c (layout_class): Don't mangle <finit>, produce
18679         __finit<class> instead. Don't verify artificial methods.
18680         * decl.c (finit_identifier_node): New declared global.
18681         (init_decl_processing): finit_identifier_node initialized.
18682         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18683         * java-tree.h (finit_identifier_node): Declared as extern.
18684         (struct lang_decl): New field called_constructor.
18685         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18686         (CLASS_HAS_FINIT_P): New macro.
18687         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18688         explicit constructor invocation.
18689         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18690         CALL_SUPER_CONSTRUCTOR_P): New macros.
18691         (write_classfile): Added prototype.
18692         * jcf-parse.c (jcf_parse_source): Parse and remember for
18693         generation if the file was seen on the command line.
18694         (parse_source_file): Don't write the class file here.
18695         (yyparse): Loop on files rewritten. Set current_jcf.
18696         (parse_zip_file_entries): Parse class file only if it was found.
18697         * lang.c (init_parse): Don't open command line provided filename
18698         here.
18699         (lang_parse): Don't set main_jcf anymore.
18700         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18701         (JCONSTRUCTOR_CHECK): New macro.
18702         (JBSC_TYPE_P): New macro.
18703         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18704         (COMPLETE_CHECK_OP_2): New macro.
18705         (struct parse_ctxt): New field explicit_constructor_p.
18706         (check_class_interface_creation): Fixed prototype indentation.
18707         (patch_method_invocation_stmt): Prototype reflects added argument.
18708         (patch_invoke): Likewise.
18709         (complete_method_declaration, build_super_invocation,
18710         verify_constructor_circularity,
18711         build_this_super_qualified_invocation, get_printable_method_name,
18712         patch_conditional_expr, maybe_generate_finit, fix_constructors,
18713         verify_constructor_super, create_artificial_method,
18714         start_artificial_method_body, end_artificial_method_body,
18715         generate_field_initialization_code): New function prototypes.
18716         * parse.y: Fixed leading comment
18717         (constructor_header:, constructor_body:, block_end:): Rules tagged
18718         <node>.
18719         (type_declaration:): Call maybe_generate_finit.
18720         (method_declaration:): Action for method_body: placed in new
18721         function complete_method_declaration, called here.
18722         (constructor_declaration:): Defined actions. Removed leading
18723         FIXME.
18724         (constructor_header:): New rule with action.
18725         (constructor_body:): Rule rewritten using block_begin: and
18726         block_end:. Defined actions.
18727         (constructor_declarator:, explicit_constructor_invocation:):
18728         Defined actions.
18729         (block:): Use new rules block_begin: block_end:.
18730         (block_begin:, block_end:): New rules and actions.
18731         (block_statements:): Fixed error message for explicit
18732         constructors.
18733         (method_invocation:): Call build_this_super_qualified_invocation
18734         if primary is `this' or `super' was seen.
18735         (conditional_expression:): Action defined.
18736         (extra_ctxp_pushed_p): New static global flag.
18737         (java_parser_context_save_global): Create parser context if
18738         necessary. Use extra_ctxp_pushed_p to remember it.
18739         (java_parser_context_restore_global): Pop extra parser context if
18740         one exists.
18741         (build_array_from_name): Array on primitive types are marked
18742         loaded.
18743         (register_fields): Restore new name in field initializer
18744         expression if type was altered. Non static fields initialized upon
18745         declaration marked initialized.
18746         (maybe_generate_finit): New function.
18747         (maybe_generate_clinit): Use create_artificial_method,
18748         start_artificial_method_body, end_artificial_method_body. Generate
18749         debug info for enclosed initialization statements.
18750         (method_header): Fixed leading comment. Check constructor
18751         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18752         accordingly.
18753         (complete_method_declaration, constructor_circularity_msg,
18754         verify_constructor_circularity): New functions.
18755         (get_printable_method_name): New function.
18756         (check_method_redefinition): Don't rename <finit> methods. Fix
18757         declared constructor names. Error message for
18758         constructors modified.
18759         (java_check_regular_methods): Local variable seen_constructor
18760         renamed saw_constructor. Skip verification on constructors. Create
18761         default constructor with create_artificial_method.
18762         (java_check_methods): Removed unnecessary empty line.
18763         (create_artificial_method, start_artificial_method_body,
18764         end_artificial_method_body): New functions.
18765         (java_layout_classes): Changed leading comment. Reverse fields
18766         list if necessary. Always layout java.lang.Object if being
18767         defined.
18768         (java_complete_expand_methods): Verify constructor circularity.
18769         (java_complete_expand_method): Call fix_constructor on
18770         constructors.  Local variable no_ac_found removed. Restore
18771         bindings if method body expansion failed.
18772         (fix_constructors, verify_constructor_super,
18773         generate_field_initialization_code): New function.
18774         (java_expand_classes): Fixed leading comment. Write class file
18775         here.
18776         (resolve_expression_name): Check for illegal instance variable
18777         usage within the argument scope of an explicit constructor
18778         invocation.
18779         (resolve_qualified_expression_name): Pass extra from_super flag
18780         when invoking patch_method_invocation_stmt. New case for
18781         conditional expression when used as a primary. Check for error
18782         when acquiring super.
18783         (patch_method_invocation_stmt): Added extra argument super. New
18784         local variable is_static_flag. Set class_to_search according to
18785         the nature of the constructor invocation. Don't add `this'
18786         argument when expanding NEW_CLASS_EXPR. Check for illegal method
18787         invocation within the argument scope of explicit constructor
18788         invocation. Set is_static according to is_static_flag. Provide
18789         extra `super' argument to patch_invoke invocation.
18790         (patch_invoke): New argument from_super. Loop on arguments
18791         indentation fixed. Pass from_super to invocation_mode. New switch
18792         case INVOKE_SUPER. Fixed error message in switch default case.
18793         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18794         value.
18795         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18796         (lookup_method_invoke): Fixed prototypes in candidates list. Error
18797         message takes constructors into account.
18798         (find_applicable_accessible_methods_list): Fixed indentation.
18799         (qualify_ambiguous_name): Take explicit constructor invocation
18800         into account. Deal with a conditional expression as a primary to
18801         a method call.
18802         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18803         case. Added extra argument to patch_method_invocation_stmt.
18804         Register calls made to explicit constructor `this'. Don't call
18805         save_expr in ARRAY_REF case when emitting class files. Check for
18806         illegal use of this when expanding explicit constructor invocation
18807         arguments.
18808         (complete_function_arguments): Set and reset parser context
18809         explicit_constructor_p field value when appropriate.
18810         (build_super_invocation, build_this_super_qualified_invocation):
18811         New functions.
18812         (patch_assignment): Fixed typo.
18813         (patch_unaryop): Check on final fields occurs only when a decl
18814         exits.
18815         (patch_return): Take constructors into account.
18816         (patch_conditional_expr): New function.
18817         * typeck.c (build_java_signature): Removed unnecessary empty line.
18818
18819 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18820
18821         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18822
18823 1998-10-28  Tom Tromey  <tromey@cygnus.com>
18824
18825         * decl.c (init_decl_processing): Renamed fields.
18826         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18827         interface_len, msize fields.
18828
18829         * class.c (make_class_data): Removed subclass_head and
18830         subclass_next fields.
18831         * decl.c (init_decl_processing): Removed subclass_head and
18832         subclass_next fields.
18833
18834 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18835
18836         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18837         * mangle.c (emit_unicode_mangled_name): Similarly.
18838
18839 1998-10-26  Nick Clifton  <nickc@cygnus.com>
18840
18841         * jcf-parse.c (get_constant): Place braces around code to compute
18842         'd' when REAL_ARITHMETIC is not defined.
18843
18844 1998-10-25  H.J. Lu  (hjl@gnu.org)
18845
18846         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18847         dependency.
18848
18849 1998-10-23  Tom Tromey  <tromey@cygnus.com>
18850
18851         * lang-specs.h: `.zip' files are input to jc1.
18852
18853 1998-10-22  Per Bothner  <bothner@cygnus.com>
18854
18855         * jvspecs.c:  Add (but don't enable) support for combining multiple
18856         .class and .java input filenames to a single jc1 invocation.
18857         Add support for -C flag (copile to .class files).
18858         Translate -classpath and -CLASSPATH arguments.
18859         * lang-specs.h:  Don't set %2 spec.
18860
18861 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18862
18863         * jcf-path.c (add_entry): Don't add trailing separator if entry is
18864         a .zip file.
18865         (add_path): Don't add trailing separator to non-empty path
18866         elements.
18867
18868         * lang.c (lang_decode_option): Check for -fclasspath and
18869         -fCLASSPATH before examining other `-f' options.
18870
18871         * java-tree.h (finalize_identifier_node): Don't declare.
18872         * class.c (make_class_data): Don't push "final" field.
18873         * decl.c (init_decl_processing): Don't push "final" field.
18874         (finalize_identifier_node): Removed.
18875         (init_decl_processing): Don't set finalize_identifier_node.
18876
18877         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18878
18879 1998-10-11  Anthony Green  <green@cygnus.com>
18880
18881         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18882         (JV_SCAN_SOURCES): New macro.
18883         (JCF_DUMP_SOURCES): Likewise.
18884         (jcf-dump$(exeext)): New target.
18885         (jv-scan$(exeext)): New target.
18886
18887 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18888
18889         * Makefile.in (LEX): Removed.
18890         (LEXFLAGS): Likewise.
18891         (SET_BISON): New macro.
18892         (BISON): Removed.
18893         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
18894         spurious diffs in parse.c.
18895         ($(PARSE_SCAN_C)): Likewise.
18896         (PARSE_DIR): New macro.
18897         (PARSE_C): Use it.
18898         (PARSE_SCAN_C): Likewise.
18899         (PARSE_RELDIR): New macro.
18900
18901         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18902
18903         * jcf-io.c (find_class): Use saw_java_source to determine when to
18904         look for `.java' file.
18905         * jcf-parse.c (saw_java_source): New global.
18906         (yyparse): Set it if `.java' file seen.
18907
18908         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18909         (GCJH_SOURCES): Likewise.
18910         * Makefile.in (datadir): New macro.
18911         (libjava_zip): Likewise.
18912         (JAVA_OBJS): Added jcf-path.o.
18913         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18914         (../gcjh$(exeext)): Likewise.
18915         (jcf-path.o): New target.
18916         * java-tree.h (fix_classpath): Removed decl.
18917         * jcf-parse.c (fix_classpath): Removed.
18918         (load_class): Don't call fix_classpath.
18919         * parse.y (read_import_dir): Don't call fix_classpath.
18920         * lex.h: Don't mention classpath.
18921         * lex.c (java_init_lex): Don't initialize classpath.
18922         * jcf-io.c (classpath): Removed global.
18923         (find_class): Use jcf_path iteration functions.  Correctly search
18924         class path for .java file.
18925         (open_in_zip): New argument `is_system'.
18926         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
18927         classpath-related options.
18928         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18929         and -I.
18930         (lang_init): Call jcf_path_init.
18931         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18932         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
18933         Correctly put braces around second string in each entry.
18934         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
18935         classpath-related options.
18936         (help): Updated for new options.
18937         * jcf.h: Declare functions from jcf-path.c.  Don't mention
18938         `classpath' global.
18939         * jcf-path.c: New file.
18940
18941         * jcf-depend.c: Include jcf.h.
18942
18943         * jcf-write.c (localvar_alloc): Returns `void'.
18944         (localvar_free): Removed unused variable.
18945
18946         * lang.c (OBJECT_SUFFIX): Define if not already defined.
18947         (init_parse): Use OBJECT_SUFFIX, not ".o".
18948
18949 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18950
18951         * class.c (emit_register_classes): Renamed from
18952         emit_register_class.
18953         * java-tree.h (emit_register_classes): Prototype renamed from
18954         emit_register_class.
18955         * jcf-parse.c (yyparse): Call emit_register_classes once before
18956         returning.
18957         * parse.y (java_expand_classes): No longer register classes.
18958
18959 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18960
18961         * class.c (is_compiled_class): New local variable
18962         seen_in_zip. Identify classes found in currently compiled source
18963         file(s).
18964         * decl.c (complete_start_java_method): Fixed typo.
18965         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
18966         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
18967         (CLASS_P): Moved around.
18968         (java_parse_abort_on_error): Macro moved from jcf-parse.c
18969         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
18970         java-tree.h
18971         (jcf_parse_source): Changed leading comment. Removed unnecessary
18972         fclose and CLASS_FROM_SOURCE_P marking.
18973         (parse_source_file): New local variables remember_for_generation
18974         and filename. Mark parsed file name identifier node. Removed block
18975         executed when parse_only was null. Set remember_for_generation.
18976         Use it as an argument to java_pop_parser_context.
18977         (yyparse): New local variables several_files, list, next node and
18978         current_file_list. Split ampersand separated file names into
18979         current_file_list. Iterate through the list and parse accordingly.
18980         * parse.h (java_pop_parser_context): New function prototype.
18981         * parse.y (ctxp_for_generation): New static global variable.
18982         (java_pop_parser_context): New argument generate. Link popped ctxp
18983         to ctxp_for_generation list accordingly.
18984         (java_complete_expand_methods): Fixed indentation.
18985         (java_expand_classes): New function.
18986
18987 1998-10-17  Per Bothner  <bothner@cygnus.com>
18988
18989         * Makefile.in:  Link with libiberty.a instead of memmove.o.
18990
18991 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18992
18993         * lex.c (setjmp.h): No longer included.
18994         * lex.h (setjmp.h): Included.
18995         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
18996         (duplicate_declaration_error_p): Renamed from
18997         duplicate_declaration_error.
18998         (build_array_from_name): New function prototype.
18999         * parse.y (setjmp.h): No longer included.
19000         (variable_declarator_id): Define action.
19001         (build_array_from_name): New function.
19002         (duplicate_declaration_error_p): Renamed from
19003         duplicate_declaration_error.  Fixed leading comment.
19004         (register_fields): Main `for' loop reorganized. Uses
19005         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19006         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19007         build_array_from_name.
19008         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19009         types.
19010         (read_import_dir): Don't try to skip `.' and `..'.
19011         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19012         build_array_from_name. Main `for' loop reorganized.
19013         (resolve_qualified_expression_name): When building access to a
19014         field, use the type where the field was found, not its own type.
19015         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19016         field was found is null.
19017         (qualify_ambiguous_name): Sweep through all successive array
19018         dimensions.
19019
19020 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19021
19022         * java-tree.h (pop_labeled_block, lang_printable_name,
19023         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19024         interface_of_p, inherits_from_p, fix_classpath,
19025         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19026         make_class_data, register_class, alloc_name_constant): New
19027         function prototypes.
19028         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19029         indentation. Added cast to remove warning.
19030         (lang_printable_name): Set v argument unused.
19031         (lang_print_error): Added argument to lang_printable_name call.
19032         (java_dummy_print, print_lang_decl, print_lang_type,
19033         print_lang_identifier, lang_print_xnode): All argument marked
19034         unused.
19035         * lex.c (java_unget_unicode): Removed unnecessary argument.
19036         (java_allocate_new_line): Unused local variable is gone.
19037         (java_read_char): Added parenthesis in expressions to remove
19038         warnings.  Added final return statement.
19039         (java_read_unicode): Added parenthesis in expression to remove
19040         warning.
19041         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19042         (java_parse_escape_sequence): Likewise.
19043         (java_lex): Unused local variables are gone. Fixed
19044         java_unget_unicode invocation.
19045         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19046         defined.
19047         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19048         lang_printable_name invocation in macro.
19049         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19050         Likewise.
19051         (duplicate_declaration_error): Suppressed unused argument in
19052         prototype.
19053         (identical_subpath_p): Function declaration is gone.
19054         (patch_invoke): Suppressed unused argument in prototype.
19055         (patch_cast, build_labeled_block, check_thrown_exceptions):
19056         Likewise.
19057         * parse.y (setjmp.h): Included
19058         (toplev.h): Likewise.
19059         (field_declaration:): Suppressed unused local
19060         (label_decl:): Fixed build_labeled_block invocation.
19061         (java_pop_parser_context): Put extra parenthesis around assignment
19062         in if.
19063         (yyerror): Suppressed unused local variables.
19064         (variable_redefinition_error): Fixed lang_printable_name
19065         invocation.
19066         (create_interface): Suppressed unused local variables.
19067         (create_class): Likewise.
19068         (duplicate_declaration_error): Suppressed unused argument. Fixed
19069         lang_printable_name invocation.
19070         (register_fields): Suppressed unused local variable. Fixed
19071         duplicate_declaration_error invocation.
19072         (method_header): Suppressed unused local variable.
19073         (method_declarator, parser_check_super): Likewise.
19074         (java_complete_class): Suppressed unused local variable. Fixed
19075         fatal error message.
19076         (complete_class_report_errors): Added default: in switch.
19077         (java_check_regular_methods): Fixed lang_printable_name
19078         invocations.
19079         (check_throws_clauses): Likewise.
19080         (java_check_abstract_methods): Suppressed unused local
19081         variable. Fixed lang_printable_name invocation.
19082         (read_import_entry): Added supplemental return statement.
19083         (read_import_dir): Suppressed unused local variables.
19084         (check_pkg_class_access, declare_local_variables): Likewise.
19085         (source_start_java_method): Suppressed unused extern variable
19086         declarations
19087         (expand_start_java_method): Suppressed unused extern and local
19088         variable declarations.
19089         (java_complete_expand_methods): Likewise.
19090         (java_complete_expand_method): Suppressed unused local variables.
19091         (make_qualified_name): Likewise.
19092         (resolve_qualified_expression_name): Added default: in
19093         switch. Fixed lang_printable_name invocation.
19094         (class_instance_creation_expression): Added parenthesis around
19095         expressions.
19096         (patch_method_invocation_stmt): Fixed lang_printable_name and
19097         patch_invoke invocations.
19098         (check_for_static_method_reference): Fixed lang_printable_name
19099         invocation.
19100         (patch_invoke): Suppressed unused arguments and local variables.
19101         (lookup_method_invoke): Suppressed unused local variables.
19102         (qualify_ambiguous_name): Added default: in switch.
19103         (identical_subpath_p): Function removed.
19104         (patch_assignment): Suppressed unused local variables. Suppressed
19105         unnecessary if statement. Fixed lang_printable_name invocations.
19106         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19107         (valid_ref_assignconv_cast_p): Parenthesis around
19108         expression. Suppressed unused local variables.
19109         (build_binop): Suppressed unused local variables. fixed
19110         lang_printable_name invocations.
19111         (string_constant_concatenation): Suppressed unused local
19112         variables.
19113         (patch_unaryop): Fixed lang_printable_name invocation.
19114         (patch_cast): Suppressed unnecessary argument. Fixed
19115         lang_printable_name invocation.
19116         (patch_array_ref): Fixed lang_printable_name invocation.
19117         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19118         (build_labeled_block): Suppressed unused argument.
19119         (generate_labeled_block): Fixed build_labeled_block invocation.
19120         (build_loop_body): Suppressed unused local variables.
19121         (patch_loop_statement): Likewise.
19122         (patch_exit): Fixed lang_printable_name invocation.
19123         (patch_switch_statement): Likewise.
19124         (case_identity): First argument marked unused.
19125         (patch_try_statement): Fixed lang_printable_name invocations.
19126         (patch_synchronized_statement, patch_throw_statement): Likewise.
19127         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19128         lang_printable_name invocations.
19129         (check_thrown_exceptions_do): Suppressed unused argument.
19130
19131 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19132
19133         * jcf-write.c (write_classfile): Add output class file as target.
19134         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19135         * jcf.h: Added declarations for dependency-tracking functions.
19136         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19137         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19138         (finish_parse): Call jcf_dependency_write.
19139         (dependency_tracking): New global.
19140         (DEPEND_SET_FILE): New define.
19141         (DEPEND_ENABLE): New define.
19142         (init_parse): Enable dependency tracking if required.
19143         Include "flags.h".
19144         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19145         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19146         (../gcjh$(exeext)): Likewise.
19147         (jcf-depend.o): New target.
19148         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19149         (GCJH_SOURCES): Likewise.
19150         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19151         dep_name argument.
19152         (find_classfile): Added dep_name argument.
19153         (find_class): Compute name of dependency.
19154         (open_in_zip): Call jcf_dependency_add_file.
19155         * gjavah.c (output_file): No longer global.
19156         (usage): Don't mention "gjavah".
19157         (help): Likewise.
19158         (java_no_argument): Likewise.
19159         (version): Likewise.
19160         (main): Recognize and handle -M family of options.
19161         (print_mangled_classname): Return is void.
19162         (process_file): Handle case where output is suppressed.
19163         (HANDLE_END_FIELD): Likewise.
19164         (HANDLE_METHOD): Likewise.
19165         * jcf-depend.c: New file.
19166
19167 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19168
19169         * java-tree.def: Add missing newline at EOF.
19170
19171 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19172
19173         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19174         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19175         function.
19176         Include <config.h> and "system.h".
19177         (disassemble_method): Undefine RET to avoid clash with
19178         config/i386/i386.h.
19179
19180 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19181
19182         * decl.c (runtime_exception_type_node, error_exception_type_node):
19183         New global variables.
19184         (init_decl_processing): Initialized.
19185         * expr.c (java_lang_expand_expr): Set caught exception type to
19186         null if catch handler argument doesn't exit.
19187         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19188         tree codes.
19189         * java-tree.h (runtime_exception_type_node,
19190         error_exception_type_node): Global variables declared.
19191         (DECL_FUNCTION_THROWS): New macro.
19192         (DECL_FUNCTION_BODY): Modified comment.
19193         (DECL_SPECIFIC_COUNT): Likewise.
19194         (struct lang_decl): New field throws_list.
19195         (IS_UNCHECKED_EXPRESSION_P): New macro.
19196         * lex.c (java_lex): Generate location information for THROW_TK.
19197         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19198         EXCEPTIONS_P): New macros.
19199         (enum jdep_code): New value JDEP_EXCEPTION.
19200         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19201         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19202         PATCH_METHOD_RETURN_ERROR): New macros.
19203         (patch_method_invocation_stmt): Added new argument to prototype.
19204         (patch_synchronized_statement, patch_throw_statement,
19205         check_thrown_exceptions, check_thrown_exceptions_do,
19206         purge_unchecked_exceptions, check_throws_clauses): New function
19207         prototypes.
19208         * parse.y Fixed typo in keyword section.
19209         (throw:): Rule tagged <node>.
19210         (THROW_TK): Keyword tagged <operator>.
19211         (method_header:): Last argument to call to method_header passed
19212         from throws: rule.
19213         (throws:, class_type_list:, throw_statement:,
19214         synchronized_statement:, synchronized:): Defined actions.
19215         (method_header): New local variable current. Register exceptions
19216         from throws clause.
19217         (java_complete_tree): Complete and verify exceptions from throws
19218         clause.
19219         (complete_class_report_errors): Error message on exceptions not
19220         found
19221         (java_check_regular_methods): Fixed typo. Shortcut on private
19222         overriding methods. Changed error message on method
19223         redefinition. Check for throws clause compatibility.
19224         (check_throws_clauses): New function.
19225         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19226         method. Changed error message on method redefinition.
19227         (currently_caught_type_list): New static variable.
19228         (java_complete_expand_methods): Purge unchecked exceptions from
19229         throws clause list. Call PUSH_EXCEPTIONS before walk and
19230         POP_EXCEPTIONS after.
19231         (resolve_qualified_expression_name): Pass new argument as NULL to
19232         patch_method_invocation_stmt.
19233         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19234         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19235         argument list when appropriate. Use new argument if non null to
19236         store selected method decl.
19237         (patch_invoke): Convert if necessary args of builtin types before
19238         forming CALL_EXPR. Argument list no longer reversed here.
19239         (invocation_mode): Treat final methods as static methods.
19240         (java_complete_tree): New cases for THROW_EXPR: and
19241         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19242         function call.
19243         (complete_function_arguments): No more RECORD_TYPE
19244         conversion. Function parameter nodes no longer saved.
19245         (valid_ref_assignconv_cast_p): Avoid handling null type.
19246         (patch_binop): Fixed null constant reference handling.
19247         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19248         BUILD_THROW macros.
19249         (patch_try_statement): Fixed comments. Record caught types in
19250         list, push the list, expand try block and pop the list.
19251         (patch_synchronized_statement, patch_throw_statement,
19252         check_thrown_exceptions, check_thrown_exceptions_do,
19253         purge_unchecked_exceptions): New functions.
19254         * typeck.c (lookup_argument_method): Allow WFL in place of method
19255         DECL_NAME during method definition check
19256
19257 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19258
19259         * gjavah.c (decode_signature_piece): New function.
19260         (print_c_decl): Use it.  Added `name_override' argument.
19261         (print_method_info): Use name_override argument to print_c_decl.
19262         (seen_fields): Removed.
19263         (print_field_info): Don't update seen_fields.
19264         (struct method_name): New structure.
19265         (method_name_list): New global.
19266         (print_method_info): Add new method to list of methods.
19267         (name_is_method_p): New function.
19268         (print_field_info): If field name has same name as method, then
19269         change field name.
19270         (process_file): Parse methods before fields.
19271         (field_pass): New global.
19272         (HANDLE_END_FIELD): Take field_pass into account.
19273
19274 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19275
19276         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19277         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19278
19279 1998-10-03  Anthony Green  <green@cygnus.com>
19280
19281         * jvspec.c: Fix bug in jvgenmain_spec patch.
19282
19283 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19284
19285         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19286         * decl.c (soft_exceptioninfo_call_node): New global variable.
19287         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19288         takes extra integer argument. soft_exceptioninfo_call_node
19289         initialized.
19290         * except.c (java_set_exception_lang_code): New function
19291         (method_init_exceptions): Called here.
19292         (prepare_eh_table_type): New function.
19293         (expand_end_java_handler): Called here.
19294         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19295         one argument. Modified generation of call to
19296         soft_badarrayindex_node to use new argument.
19297         (build_java_arrayaccess): Pass faulty index value to
19298         build_java_throw_out_of_bounds_exception.
19299         (generate_name): New function.
19300         (java_lang_expand_expr): New local variables node, current,
19301         has_finally_p. Expand TRY_EXPR node.
19302         (process_jvm_instruction): Replace top of the stack with thrown
19303         object reference when entering exception handler.
19304         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19305         specific tree codes.
19306         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19307         global.
19308         (DECL_SPECIFIC_COUNT): New macro.
19309         (prepare_eh_table_type, java_set_exception_lang_code,
19310         generate_name): New function declarations.
19311         (match_java_method): Declaration deleted.
19312         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19313         macros.
19314         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19315         * parse.h (redefinition_error, refine_accessible_methods_list,
19316         can_cast_to_p): Function declaration removed.
19317         (classitf_redefinition_error, variable_redefinition_error,
19318         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19319         find_most_specific_methods_list, argument_types_convertible,
19320         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19321         valid_cast_to_p, valid_method_invocation_conversion_p,
19322         try_reference_assignconv, add_stmt_to_compound,
19323         build_jump_to_finally, build_tree_list, patch_try_statement,
19324         java_get_catch_block): New function declarations.
19325         * parse.y (string_buffer_type): Global variable deleted.
19326         (group_of_labels, catches, catch_clause, catch_clause_parameter,
19327         finally): Rules tagged <node>.
19328         (TRY_TK, CATCH_TK): Token tagged <operator>.
19329         (class_body_declaration:, class_member_declaration:,
19330         formal_parameter:, explicit_constructor_invocation:,
19331         interface_member_declaration:, constant_declaration:,
19332         primary_no_new_array:, class_instance_creation_expression:,
19333         array_creation_expression:): Issue error on unsuported JDK1.1
19334         features.
19335         (try_statement:, catches:, finally:): Define actions.
19336         (catch_clause_parameter): New rule.
19337         (catch_clause:): Use new rule catch_clause_parameter.
19338         (parse_jdk1_1_error): New function.
19339         (redefinition_error): Renamed classitf_redefinition_error.
19340         (variable_redefinition_error): New function.
19341         (check_class_interface_creation): Call
19342         classitf_redefinition_error.
19343         (java_complete_tree): Added error message on JDEP_TYPE: case.
19344         (complete_class_report_errors): Fixed indentation.
19345         (declare_local_variables): Call variable_redefinition_error.
19346         (source_end_java_method): Call java_set_exception_lang_code and
19347         emit_handlers where appropriate.
19348         (java_method_add_stmt): Call add_stmt_to_block.
19349         (add_stmt_to_block): New function.
19350         (lookup_method_invoke): Fixed outside comment. new local variable
19351         candicates.  Call find_applicable_accessible_methods_list and
19352         find_most_specific_methods_list when searching for a
19353         method. Modified error report to list possible candidates when
19354         applicable.
19355         (find_applicable_accessible_methods_list,
19356         find_most_specific_methods_list, argument_types_convertible): New
19357         function.
19358         (refine_accessible_methods_list): Function deleted.
19359         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19360         expr (if applicable) before calling patch_array_ref.
19361         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19362         (enter_block): Fixed comment.
19363         (enter_a_block): New function.
19364         (patch_assignment): Reorganized. Call try_reference_assignconv for
19365         references. Call valid_cast_to_p instead of can_cast_to_p.
19366         (try_reference_assignconv,
19367         valid_builtin_assignconv_identity_widening_p): New functions.
19368         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19369         (valid_cast_to_p, valid_method_invocation_conversion_p): New
19370         functions.
19371         (build_string_concatenation): Don't resolve StringBuffer.
19372         (patch_cast): Fixed inverted arguments.
19373         (patch_array_ref): Code to save array expr deleted. Call
19374         valid_cast_to_p instead of can_cast_to_p.
19375         (generate_labeled_block): Call generate_name.
19376         (build_jump_to_finally, build_try_statement, java_get_catch_block,
19377         patch_try_statement): New functions.
19378         * typeck.c (match_java_method): Function deleted.
19379
19380 1998-10-02  Anthony Green  <green@cygnus.com>
19381
19382         * jvspec.c: jvgenmain_spec uses different temporary file names.
19383
19384 1998-10-02  Anthony Green  <green@cygnus.com>
19385
19386         * jvspec.c (lang_specific_driver): Fail if user specifies
19387         --main= when not linking.
19388
19389 1998-09-28  Tom Tromey  <tromey@cygnus.com>
19390
19391         * class.c (make_class_data): Push value for `thread' field.
19392         * decl.c (init_decl_processing): Added `thread' field to class.
19393
19394         * class.c (add_field): Always make static fields externally
19395         visible.
19396
19397 1998-09-26  Anthony Green  <green@cygnus.com>
19398
19399         * expr.c (build_java_athrow,
19400         build_java_throw_out_of_bounds_exception, expand_invoke,
19401         build_newarray, expand_java_multianewarray, build_java_monitor):
19402         Update comments to reflect _Jv_* function names.
19403
19404 1998-09-25  Per Bothner  <bothner@cygnus.com>
19405
19406         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
19407         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
19408         * parse.y (expand_start_java_method):  Likewise.
19409
19410 1998-09-24  Per Bothner  <bothner@cygnus.com>
19411
19412         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
19413
19414         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19415         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
19416         * expr.c:  Remove no-longer-needed calls to promote_type.
19417         * decl.c (give_name_to_locals):  Liekwise.
19418         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
19419         * parse.y:  Add/remove promote_type calls as appropriate.
19420         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
19421         (parse_signature_string):  Likewise.
19422         (build_java_array_type):  Fix for now signature convenions.
19423
19424         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
19425
19426 1998-09-23  Tom Tromey  <tromey@cygnus.com>
19427
19428         * class.c (init_class_processing): libjava function renamed to
19429         _Jv_RegisterClass.
19430
19431 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19432
19433         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19434         * java-tree.def: Fixed DEFTREECODE third argument.
19435         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19436         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19437         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19438         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19439         JAVA_THIS_EXPR): Now replaced by tree code definitions.
19440         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19441         * lang.c (java_tree_code_type, java_tree_code_length,
19442         java_tree_code_name): New arrays.
19443         (lang_init): Append Java tree node definitions to Gcc ones.
19444         * lex.c (expression_obstack): Declared as extern when JC1_LITE
19445         defined.
19446         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19447         wfl_to_string.
19448         (java_lex): Allow declaration of empty string constants. Retain
19449         location information on CASE_TK and DEFAULT_TK.
19450         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19451         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19452         Modified to be more robust.
19453         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19454         (build_new_invocation, try_builtin_assignconv,
19455         patch_switch_statement, string_constant_concatenation,
19456         build_string_concatenation, patch_string_cst, patch_string,
19457         java_expand_switch): New function declarations.
19458         * parse.y: Rules related to switch and EH tagged <node>.
19459         (label_id): Set to NULL_TREE
19460         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19461         tree nodes.
19462         (this_or_super:): Fixed indentation.
19463         (statement:, statement_nsi:, statement_without_trailing_substatement:,
19464         statement_expression:): Removed call to RULE on all sub-rules.
19465         (switch_expression:, switch_labels:): New rules.
19466         (switch_statement:, switch_block:, switch_block_statement_groups:,
19467         switch_block_statement_group:, switch_labels:, switch_label:):
19468         Defined actions.
19469         (throw_statement:, synchronized_statement:, try_statement:):
19470         Defined temporary actions.
19471         (class_instance_creation_expression:): Call
19472         build_new_invocation. Fixed indentation.
19473         (field_access): Fixed indentation.
19474         (method_invocation): Likewise.
19475         (make_qualified_primary): Use THIS_EXPR.
19476         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19477         resolving from SUPER, set *type_found.
19478         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19479         (java_complete_tree): Removed unused local variable `location'. Case
19480         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19481         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19482         on MODIFY_EXPR: and all binary operator tree code cases. Removed
19483         STRING_CST: case. default: checks for patchable strings.
19484         (complete_function_arguments): Transform string constant or
19485         crafted StringBuffer if necessary.
19486         (build_method_invocation): Fixed comments.
19487         (build_new_invocation): New function.
19488         (patch_assignment): Call try_builtin_assignconv to figure a valid
19489         assignment conversion between builtin types.
19490         (try_builtin_assignconv): New function.
19491         (build_binop): Use URSHIFT_EXPR directly to call build.
19492         (operator_string): Use UNARY_PLUS_EXPR.
19493         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19494         operator.
19495         (do_merge_string_cste, merge_string_cste,
19496         string_constant_concatenation, build_string_concatenation,
19497         patch_string, patch_string_cst): New function.
19498         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19499         (patch_unaryop): Likewise. New test of valid ++/-- operands.
19500         (build_newarray_node): Use NEW_ARRAY_EXPR.
19501         (build_this): Use THIS_EXPR.
19502         (build_return): Enable debug information on return statement.
19503         (build_if_else_statement): Likewise.
19504         (complete_labeled_statement): Fixed related comment.
19505         (build_loop_body): Fixed comment.
19506         (build_bc_statement): Enable debug information on break/continue
19507         statements.
19508         (patch_bc_statement): Fixed typos. Handle SWITCH statement
19509         context.
19510         (patch_switch_statement, case_identity, java_expand_switch): New
19511         functions.
19512
19513 1998-09-21  Per Bothner  <bothner@cygnus.com>
19514
19515         * buffer.h (BUFFER_INIT):  New macro.
19516         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19517         Pass (struct jcf_partial *state) to most functions.
19518         (jcf_block, jcf_relocation):  New types.
19519         Support labels, branches, conditionals, loops.
19520
19521 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19522
19523         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19524
19525 1998-09-21  Per Bothner  <bothner@cygnus.com>
19526
19527         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19528         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19529         not integer_type_node (INT_TYPE_SIZ bits).
19530
19531         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19532
19533         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19534         * jcf-dump.c (print_exception_table):  New function.
19535         (disassemble_method):  Better handling of wide instructions.
19536         Make more robust for bad input.
19537
19538 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19539
19540         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19541         FreeBSD.
19542
19543 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19544
19545         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19546
19547 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19548
19549         * Makefile.in ($(PARSE_H)): Removed target.
19550
19551 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19552
19553         * Makefile.in (JAVA_OBJS): Add memmove.o
19554         (memmove.o): New target & rules.
19555
19556 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19557
19558         * expr.c (expand_invoke): Don't generate a call to the class init
19559         code.
19560
19561 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19562
19563         * Makefile.in: Add many missing dependencies.
19564         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19565         as appropriate.
19566         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19567         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19568
19569 1998-09-11  Per Bothner  <bothner@cygnus.com>
19570
19571         * decl.c (complete_start_java_method):  If method is static (and
19572         not private) call _Jv_InitClass.
19573         * expr.c (expand_invoke):  Don't call build_class_init.
19574
19575         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19576
19577 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19578
19579         * Make-lang.in (GCJ): Define before using.
19580
19581 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19582
19583         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19584         losing due to namespace pollution in GNU getopt.h
19585
19586 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19587
19588         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19589         (java.all.cross): Likewise.
19590         (java.rest.encap): Likewise.
19591
19592 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19593
19594         * gjavah.c (print_class_decls): Fix thinko in arglist
19595         * jcv-io.c (find_classfile): Similarly.
19596
19597 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19598
19599         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19600
19601 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19602
19603         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19604         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19605         * Makefile.in (PARSE_C): New macro.
19606         (PARSE_H): Likewise.
19607         (PARSE_SCAN_C): Likewise.
19608         ($(PARSE_C)): Target renamed from parse.c.
19609         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19610         (clean): Remove parse-scan.c as well.
19611         (parse.o): Depend on $(PARSE_C).
19612
19613 1998-09-05  Anthony Green  <green@cygnus.com>
19614
19615         * README, license.terms: Removed.
19616
19617         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19618         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19619         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19620         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19621         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19622         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19623         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19624         and Java trademark attribution.
19625
19626 1998-09-04  Tom Tromey  <tromey@cygnus.com>
19627
19628         * Makefile.in: Use gcjh, not gjavah.
19629         * config-lang.in (stagestuff): Use gcjh, not gjavah.
19630         * Make-lang.in: Changed gjavah to gcjh everywhere.
19631
19632 1998-09-03  Per Bothner  <bothner@cygnus.com>
19633
19634         * gjavah.c:  Support new -prepend -add -append flags.
19635         (print_method_info):  Method is not virtual if class is final.
19636
19637 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19638
19639         * jv-scan.c: Fixed copyright assignment.
19640         * keyword.gperf: Likewise.
19641         * keyword.h: Likewise.
19642         * lex.c: Fixed copyright assignment.
19643         (java_lex): Push unicode back when parsing '<'.
19644         * lex.h: Fixed copyright assignment.
19645         * parse-scan.y: Likewise.
19646         * parse.h: Fixed copyright assignment.
19647         (build_debugable_stmt, complete_for_loop): New function prototypes.
19648         * parse.y: Fixed copyright assignment.
19649         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19650         size_zero_node when completing a loop with no exit condition.
19651         (for_statement_nsi:): Define action.
19652         (for_init:, for_update:): Return size_zero_node when empty.
19653         (declare_local_variables): Call build_debugable_stmt.
19654         (build_debugable_stmt): New function.
19655         (build_loop_body): Build debugable statement around loop
19656         condition part.
19657         (complete_loop_body): Take into account the debugable statement
19658         around the EXIT_EXPR.
19659         (complete_loop_body): New function.
19660         (patch_exit_expr): Fixed condition inversion.
19661
19662 1998-09-02  Tom Tromey  <tromey@cygnus.com>
19663
19664         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19665         name of thread define.
19666         * jvspec.c (THREAD_NAME): New macro.
19667         (GCLIB): Likewise.
19668         (THREADLIB): Likewise.
19669         (lang_specific_driver): Recognize attempt to link with thread
19670         library or gc library.  Recognize -ljava on command line so it
19671         isn't linked against more than once.
19672
19673 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19674
19675         * parse-scan.y (report_main_declaration): Name of the class
19676         containing `main' can be a qualified name.
19677
19678 1998-08-31  Tom Tromey  <tromey@cygnus.com>
19679
19680         * config-lang.in: Changed gjavac to gjc everywhere.
19681         * Make-lang.in: Changed gjavac to gjc everywhere.
19682
19683 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19684
19685         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19686         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19687         and install the files.
19688         * Makefile.in (JAVA_OBJS_LITE): New variable.
19689         (compiler:): Now include jv-scan as a dependency.
19690         (../jv-scan$(exeext), parse-scan.c): New targets.
19691         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19692         * config-lang.in (compilers): Removed gcj, gjavah from the list.
19693         * jcf-parse.c (parse_source_file): Call java_layout_classes and
19694         check for errors even if parse_only.
19695         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19696         defined.
19697         (yylex): New function. Uses java_lex body.
19698         (java_lex): Removed commented out statement. Remove local variable
19699         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19700         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19701         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19702         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19703         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19704         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19705         where appropriate.
19706         (java_lex_error): Empty if JC1_LITE is defined.
19707         (java_get_line_col): Return 0 if JC1_LITE is defined.
19708         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19709         SET_MODIFIER_CTX): Moved into the section containing the macros
19710         conditionally defined by JC1_LITE.
19711         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19712         argument if JC1_LITE is defined.
19713         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19714         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19715         is defined.
19716         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19717         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19718         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19719         to different values according to JC1_LITE.
19720         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19721         declared if JC1_LITE set.
19722         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19723         defined if JC1_LITE not set.
19724         (struct parser_ctx): Reorganized and skip the jc1 front end part
19725         if JC1_LITE set.
19726         (java_layout_classes): New function definition.
19727         (java_push_parser_context, java_init_lex, yyparse, yylex,
19728         yyerror): Prototype always declared. All other static function
19729         prototypes declared only if JC1_LITE is not set.
19730         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19731         declared in parse.h.
19732         (java_layout_classes): New function.
19733         (java_complete_expand_methods): No longer layout the class here.
19734         * parse-scan.y: New file.
19735         * jv-scan.c: New file.
19736
19737 1998-08-25  Tom Tromey  <tromey@cygnus.com>
19738
19739         * gjavah.c (main): Handle -friend option.
19740         (friend_specs): New global.
19741         (generate_access): Handle friend_specs.
19742         (process_file): Likewise.
19743         (MAX_FRIENDS): New macro.
19744         (friend_count): New global.
19745         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
19746         Changed all callers.
19747
19748 1998-08-24  Per Bothner  <bothner@cygnus.com>
19749
19750         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
19751         (main):  Handle processing all the entries of a named .zip archive.
19752         * jcf-io.c (jcf_trim_old_input):  New function.
19753         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
19754
19755 1998-08-24  Per Bothner  <bothner@cygnus.com>
19756
19757         * lang.c (flag_assume_compiled):  Make default be on.
19758
19759 1998-08-21  Per Bothner  <bothner@cygnus.com>
19760
19761         * jcf-dump.c:  Add bunches of flags to control output more.
19762         (process_class):  New function;  support printing more than one class.
19763         (main): Support new --print-main and --javap flags.
19764         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
19765         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
19766
19767 1998-08-20  Per Bothner  <bothner@cygnus.com>
19768
19769         Change mangling of dispatch table to match C++ vtable (w/thunks).
19770         * class.c (build_dtable_decl), java-tree.h:  New function.
19771         (make_class_data):  Call it.
19772         * decl.c (init_decl_processing):  Likewise.
19773
19774 1998-08-19  Warren Levy  <warrenl@cygnus.com>
19775
19776         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19777         soft_anewarray; adjust args passed.
19778         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19779         match _Jv_NewObjectArray.
19780
19781 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19782
19783         * decl.c (push_labeled_block, pop_labeled_block): New functions.
19784         * expr.c (loopup_label): Call create_label_decl.
19785         (create_label_decl): New function.
19786         (java_lang_expand_expr): Call expand_start_bindings with argument
19787         set to zero.
19788         * java-tree.h Added space after PROTO in function declarations
19789         when necessary.
19790         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19791         (create_label_decl, push_labeled_block): New function
19792         declarations.
19793         * lex.c (label_id): Initialize.
19794         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19795         switch.
19796         * parse.h Added space after PROTO in function declarations when
19797         necessary.
19798         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19799         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19800         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19801         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19802         macros.
19803         (struct parser_ctxt): New fields current_loop,
19804         current_labeled_block.
19805         (build_if_else_statement, patch_if_else_statement,
19806         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19807         generate_labeled_block, complete_labeled_statement,
19808         build_bc_statement, patch_bc_statement, patch_loop_statement,
19809         build_new_loop, build_loop_body, complete_loop_body): New function
19810         declarations.
19811         * parse.y (java_warning_count): New global variable.
19812         (label_id): New static variable.
19813         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19814         (block:): Return size_zero_node when block is empty.
19815         (empty_statement:): Return size_zero_node.
19816         (statement:): Implement supplemental action when for_statement: is
19817         reduced.
19818         (label_decl:): New rule.
19819         (labeled_statement:): Rewritten using label_decl. Actions
19820         implemented.
19821         (labeled_statement_nsi:): Likewise.
19822         (if_then_statement): Actions implemented.
19823         (while_expression): New rule.
19824         (while_statement:): Rewritten using while_expression. Actions
19825         implemented.
19826         (while_statement_nsi:): Likewise.
19827         (do_statement_begin:): New rule.
19828         (do_statement:): Rewritten using do_statement_begin. Actions
19829         implemented.
19830         (for_statement:): Rewritten using for_begin. Actions implemented.
19831         (for_statement_nsi:): Likewise.
19832         (for_header:, for_begin:): New rules.
19833         (for_init:): Actions implemented.
19834         (statement_expression_list:, break_statement:,
19835         continue_statement:): Likewise.
19836         (yyerror): Count number of issued warning(s).
19837         (java_report_errors): Report error(s) and/or warning(s).
19838         (java_complete_class): Use build_java_argument_signature to
19839         recompute completed method signature.
19840         (java_check_regular_methods): New locals method_wfl and aflags.
19841         Use method_wfl instead of lookup_cl during error reports. Fixed
19842         indentation and modified some error messages. Use
19843         lang_printable_name in method instead of the DECL_NAME. New code
19844         to issue warnings on methods not overriding corresponding methods
19845         private to a different package.
19846         (java_method_add_stmt): Call add_stmt_to_compound.
19847         (add_stmt_to_compound): New function.
19848         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19849         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19850         (build_if_else_statement, patch_if_else_statement,
19851         build_labeled_block, generate_labeled_block,
19852         complete_labeled_statement, build_new_loop, build_loop_body,
19853         complete_loop_body, patch_loop_statement, build_bc_statement,
19854         patch_bc_statement, patch_exit_expr): New functions.
19855         * typeck.c (build_java_signature): Build argument signature before
19856         enclosing it in between parenthesis.
19857
19858 1998-08-17  Warren Levy  <warrenl@cygnus.com>
19859
19860         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19861         (JAVA_OBJS): Added reminder comment
19862
19863 1998-08-13  Nick Clifton  <nickc@cygnus.com>
19864
19865         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19866         be interpreted as a long long.
19867
19868 1998-08-13  Warren Levy  <warrenl@cygnus.com>
19869
19870         * decl.c (init_decl_processing): Use _Jv_InitClass, not
19871         soft_initialise_class.  Use _Jv_NewMultiArray, not
19872         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
19873         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
19874         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
19875         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19876
19877 1998-08-12  Per Bothner  <bothner@cygnus.com>
19878
19879         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19880         length_identifier_node):  New global tree node constants.
19881         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
19882         Replace uses by super_identifier_node etc.
19883         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
19884
19885         * parse.y (resolve_field_access):  Don't special-case ".length" if
19886         flag_emit_class_files.
19887         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
19888         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
19889         and ARRAY.length.
19890
19891 1998-08-11  Per Bothner  <bothner@cygnus.com>
19892
19893         * decl.c (init_decl_processing): Remove unused method_type_node fields.
19894         * class.c (make_method_value):  Remove init for removed fields.
19895
19896         * class.c (layout_class):  Use build_java_argument_signature.
19897         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
19898
19899         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
19900         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
19901         (build_java_signature):  Don't use push_java_argument_signature.
19902
19903         * typeck.c (lookup_argument_method):  New function.
19904         * parse.y (java_check_regular_methods):  Use lookup_argument_method
19905         instead of lookup_java_method2 followed by lookup_java_method.
19906
19907         * parse.y (check_method_redefinition):  Minor optimization.
19908
19909         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
19910         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19911
19912 1998-08-10  Tom Tromey  <tromey@cygnus.com>
19913
19914         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19915         c-pragma.o.
19916
19917         * gjavah.c (java_float_finite): Use K&R-style definition.
19918         (java_double_finite): Likewise.
19919         (generate_access): Now returns void.  Changed all callers.
19920         (last_access_generated): Removed.
19921         (process_file): Only make a single pass over the .class file.
19922
19923 1998-07-29  Per Bothner  <bothner@cygnus.com>
19924
19925         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
19926         for compatibility for G++ (with -fvtable-thunks).
19927         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
19928
19929         * gjavah.c (process_file):  Use public inheritance for super-class.
19930
19931 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19932
19933         * lex.c (java_init_lex): Initialize ctxp->package.
19934         * parse.h (struct parser_ctxt): package and package_len replaced
19935         by tree package, an identifier node. Field method_decl_list is
19936         gone. Fixed comments.
19937         (lookup_field_wrapper, merge_qualified_name, not_accessible,
19938         class_in_current_package): New function prototypes.
19939         * parse.y (array_type:): Set class loaded flag on primitive type
19940         arrays.
19941         (package_declaration:): Assign ctxp->package to the
19942         identifier node.
19943         (method_invocation:): Handle invocation of method qualified by
19944         `super'.
19945         (single_type_import_declaration:): Removed ambiguity check.
19946         (java_pop_parser_context): New local variable `next'. Reset and
19947         set IMPORT_CLASSFILE_NAME flags on current and previous import
19948         list.
19949         (java_accstring_lookup): Use new local macro COPY_RETURN.
19950         (lookup_field_wrapper): New function.
19951         (parser_qualified_classname): Use merge_qualified_name.
19952         (parser_check_super_interface): Broaden error message.
19953         (do_resolve_class): Check for qualified class name in the current
19954         compilation unit if appropriate.
19955         (process_imports): Check for already defined classes.
19956         (check_pkg_class_access): Got rid of call to
19957         get_access_flags_from_decl.
19958         (java_complete_expand_methods): Call safe_layout_class based on
19959         the current class size.
19960         (make_qualified_primary): Build a WFL qualification on primary if
19961         none exists.
19962         (merge_qualified_name): New function.
19963         (make_qualified_name): Use merge_qualified_name.
19964         (resolve_expression_name): Use safe_lookup_field.
19965         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
19966         (resolve_qualified_expression_name): Likewise. Check on resolved
19967         element accessibility.
19968         (not_accessible_p, class_in_current_package): New functions.
19969         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
19970         (patch_method_invocation_stmt): Merged common pieces. Check
19971         accessibility of invoked method.
19972         (check_for_static_method_reference): Add returned type in error
19973         message.
19974         (invocation_mode): Get rid of bogus check on PRIVATE methods.
19975         (refine_accessible_methods_list): Merged two conditions in test.
19976         (java_complete_class): Sanity check on stabilize_ref gone.
19977         * zextract.c (read_zip_archive): Cast lseek second argument to long.
19978
19979 1998-07-28  Per Bothner  <bothner@cygnus.com>
19980
19981         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
19982
19983 1998-07-24  Tom Tromey  <tromey@cygnus.com>
19984
19985         * gjavah.c (F_NAN): Removed.
19986         (F_NAN_MASK): New macro.
19987         (F_POSITIVE_INFINITY): Removed.
19988         (F_NEGATIVE_INFINITY): Likewise.
19989         (java_float_finite): Rewrote.
19990         (D_NAN_MASK): Renamed.
19991         (java_double_finite): Rewrote.
19992         (D_POSITIVE_INFINITY): Removed.
19993         (D_NEGATIVE_INFINITY): Likewise.
19994
19995         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
19996         If verbose, print underlying representation of value in hex.
19997
19998 1998-07-24  Per Bothner  <bothner@cygnus.com>
19999
20000         * buffer.h, buffer.c:  New files.
20001         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20002
20003         Support locals variables and writing their debug entries to .class.
20004         * jcf-write.c:  Simplify some by user new buffer type.
20005         (vode_buffer_grow):  Removed.
20006         (struct localvar_info):  New type.
20007         (localsvars, localvartable):  New buffers.
20008         (localvar_alloc, localvar_free):  New functions.
20009         (generate_bytecode_insns):  Handle local variables.
20010         (generate_classfile):  Write LocalVariableTable attribute.
20011
20012 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20013
20014         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20015         * zipfile.h (ZIPMAGIC): New macro.
20016
20017 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20018
20019         * Makefile.in (gjavah.o): Updated dependencies.
20020         (jcf-dump.o): Likewise.
20021         (all.indirect): Use ../gjavah.
20022         (../gjavah$(exeext)): Likewise.
20023         (clean): Don't remove gjavah.
20024         (clean): Remove parse.c, not java/parse.c.
20025         * Make-lang.in (java): Added gjavah.
20026         (gjavah$(exeext)): New target.
20027         (GJAVAH_SOURCES): New macro.
20028         (java.all.build): Added gjavah.
20029         (java.all.cross): Likewise.
20030         (java.rest.encap): Likewise.
20031         * config-lang.in (compilers, stagestuff): Added gjavah.
20032
20033 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20034
20035         * gjavah.c (java_float_finite): New function.
20036         (java_double_finite): Likewise.
20037         (F_POSITIVE_INFINITY): New macro.
20038         (F_NEGATIVE_INFINITY): Likewise.
20039         (F_NAN): Likewise.
20040         (D_POSITIVE_INFINITY): Likewise.
20041         (D_NEGATIVE_INFINITY): Likewise.
20042         (D_NAN): Likewise.
20043         (print_field_info): Use java_float_finite and java_double_finite.
20044
20045 1998-07-23  Per Bothner  <bothner@cygnus.com>
20046
20047         * parse.y (method_header):  Name "this" implicit argument.
20048
20049 1998-07-22  Per Bothner  <bothner@cygnus.com>
20050
20051         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20052         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20053         (put_linenumber):  New function.
20054         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20055
20056 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20057
20058         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20059         (lookup_name, build_known_method_ref, build_class_init,
20060         build_invokevirtual, invoke_build_dtable, match_java_method,
20061         build_field_ref, pushdecl_force_head, build_java_binop,
20062         binary_numeric_promotion, build_decl_no_layout,
20063         build_java_arrayaccess, build_newarray, build_anewarray,
20064         build_java_array_length_access, build_java_arraynull_check): New
20065         extern function prototypes.
20066         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20067         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20068         java-tree.h.
20069         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20070         to NULL
20071         * jcf.h (jcf_out_of_synch): New extern function prototype.
20072         * parse.h: Static/global function implemented in parse.y
20073         prototyped and declarations moved at the end of the file.
20074         (DECL_P): Check that the argument isn't null.
20075         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20076         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20077         (QUAL_DECL_TYPE): New macro.
20078         (PARAMS): Macro definition removed.
20079         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20080         (return_statement:): Call build_return.
20081         (field_access:): Call make_qualified_primary in sub rule.
20082         (method_invocation:): Build method invocation and call
20083         make_qualified_primary when processing primaries.
20084         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20085         get_type_from_signature.
20086         (java_check_regular_method): Extra integer 0 argument when calling
20087         lookup_java_method2.
20088         (lookup_java_interface_method2): Extra method DECL argument when
20089         calling lookup_java_interface_method2.
20090         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20091         COMPOUND_EXPR node.
20092         (java_complete_expand_method): Layout current class iff not
20093         already done. Don't process interface's methods.
20094         (java_complete_expand_method): Use super class only if it
20095         exists. Use current class otherwise.
20096         (make_qualified_primary): New function.
20097         (resolve_expression_name): Process qualified expression or
20098         expression from primary the same way.
20099         (resolve_expression_name): Two last arguments to
20100         resolve_field_access are now NULL_TREEs.
20101         (resolve_field_access): New variable is_static. Local field must
20102         be DECLs. is_static computed on field DECLs only. Append code in
20103         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20104         to initialize field_type.
20105         (resolve_qualified_expression_name): New local variable,
20106         previous_call_static and is_static. Handle primaries with function
20107         calls, casts, array references and `this'. `super' now handled as
20108         `(super_class)this'. Use is_static to clarify boolean expressions.
20109         Added code to handle case where a proper handle is required to
20110         access a field. Use QUAL_DECL_TYPE where applicable.
20111         (maybe_access_field): New function.
20112         (patch_method_invocation_stmt): New arguments primary, where,
20113         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20114         deleted. Use `where' as a type to search from if specified. Check
20115         for static method reference where forbidden. Append primary or
20116         current_this to the argument list if not calling constructor nor
20117         static methods.
20118         (check_for_static_method_reference): New function.
20119         (patch_invoke): Layout the class on which new is done if
20120         necessary.
20121         (lookup_method_invoke): Changed format to report errors on
20122         methods.
20123         (qualify_ambiguous_name): New local variable this_found. Now
20124         handle things from primaries. Method call are considered
20125         expression names.
20126         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20127         changed into NULLs.
20128         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20129         (java_complete_tree): New case fo RETURN_EXPR. Process function
20130         call arguments in separate function.
20131         (complete_function_arguments): New function.
20132         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20133         anymore.
20134         (patch_assignment): Take the return function slot into account as
20135         a RHS. Distinguish assignment from a return.
20136         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20137         when checking methods in interfaces.
20138         (resolve_type_during_patch): NULL argument to unresolve_type_p
20139         instead of NULL_TREE.
20140         (patch_newarray): Fixed typo in comment.
20141         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20142         (build_return, patch_return): New functions.
20143         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20144
20145 1998-07-21  Per Bothner  <bothner@cygnus.com>
20146
20147         * constants.c (find_name_and_type_constant, find_fieldref_index,
20148         find_methodref_index):  New methods.
20149         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20150         just return given method.  Also, rename to build_known_method_ref.
20151         (expand_invoke):  Rename call to build_invoke_non_interface.
20152         * java-tree.h, parse.h:  Update prototype.
20153         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20154         (such as expand_expr_stmt) if flag_emit_class_files.
20155         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20156         STACK_TARGET, IGNORE_TARGET):  New macros.
20157         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20158         (generate_bytecode_insn):  New function to generate method's bytecode.
20159         (generate_classfile):  Node generate Code attribute for a method.
20160         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20161         push_long_const, field_op, adjust_typed_op, maybe_wide):
20162         New functions used by generate_bytecode_insn.
20163
20164         * typeck.c (signature_include_return):  Remove variable.
20165         (push_java_argument_signature, build_java_argument_signature):  New.
20166         (build_java_signature):  Use push_java_argument_signature.
20167         * parse.y:  Use build_java_argument_signature instead of fiddling
20168         with signature_include_return.
20169
20170 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20171
20172         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20173         types.
20174
20175         * Makefile.in (all.indirect): Added gjavah$(exeext).
20176         (gjavah$(exeext)): Added $(exeext).
20177         (clean): Likewise.
20178
20179 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20180
20181         * class.c (layout_class): Call to java_layout_parsed_class replace
20182         by safe_layout_class.
20183         * expr.c (build_java_array_length_access): Removed static storage
20184         class in the function definition.
20185         (build_java_arraynull_check): Likewise.
20186         Also fixed typos in two comments.
20187         * lex.c (java_init_lex): Initialize static global kw_length.
20188         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20189         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20190         java_lex_error.
20191         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20192         * parse.h (resolve_no_layout): New static function declaration.
20193         (get_identifier_in_static): Declaration removed.
20194         (java_layout_parsed_class): Function name declaration changed to
20195         safe_layout_class.
20196         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20197         not_initialized_as_it_should_p, build_this): New static function
20198         declarations.
20199         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20200         binary_numeric_promotion, stabilize_reference,
20201         build_decl_no_layout, build_java_arrayaccess): Extern function
20202         declarations moved into their own section.
20203         (build_newarray, build_anewarray, build_java_array_length_access,
20204         build_java_arraynull_check): New extern function declarations.
20205         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20206         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20207         fake tree codes.
20208         (CALL_CONSTRUCTOR_P): New macro.
20209         * parse.y (kw_length): New static global tree node.
20210         (return_statement): Tagged <node>.
20211         (RETURN_TK): Tagged <operator>.
20212         (variable_declarator_id:): Build variable declaration with an
20213         empty initialization value if a syntax error was found in the
20214         initialization part of the variable declaration.
20215         (statement_without_trailing_substatement:): return_statement: now
20216         uses the default rule.
20217         (return_statement:): Temporarily fixed to return NULL_TREE.
20218         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20219         (class_instance_creation_expression:): Class creation rules now
20220         call build_method_invocation upon reduction.
20221         (array_creation_expression:): Rules call build_newarray_node upon
20222         reduction.
20223         (dim_exprs:): Build a list of dimension expressions.
20224         (dim_expr:): Store location of the OSB_TK in the dimension
20225         expression node.
20226         (method_invocation:): Added a new error rule.
20227         (build_unresolved_array_type): WFL argument may also be an array
20228         on a primitive type. Name of the argument changed to reflect this.
20229         (method_declarator): Insert argument type at the beginning of the
20230         argument type list and later reverse the list.
20231         (unresolved_type_p): Argument 'returned' may be optionally
20232         NULL_TREE.
20233         (java_layout_class_from_source): Function renamed
20234         safe_layout_class.
20235         (resolve_and_layout): Now call resolve_no_layout and
20236         safe_layout_class.
20237         (resolve_no_layout): New function.
20238         (purify_type_name): New function.
20239         (complete_class_report_errors): Call purify_type_name during error
20240         report on a type not found.
20241         (process_imports): error_found local variable doesn't need to be
20242         initialized to zero.
20243         (declare_local_variables): New local type_wfl. Fixed typo in error
20244         message. type_wfl assigned to unresolved type and used to register
20245         incomplete type. Build a WFL around the variable initialization
20246         statement so that debug info can be generated on it.
20247         (source_start_java_method): Reverse argument list after they've
20248         been processed.
20249         (current_this): New static global variable.
20250         (java_complete_expand_methods): Set current_this when appropriate.
20251         (resolve_expression_name): Build correct static and non static
20252         field access bearing a simple name.
20253         (resolve_field_access): Resolve the length field of arrays. Handle
20254         f.m() cases.
20255         (patch_method_invocation_stmt): Set the type of the method
20256         invocation to error_mark_node. This value is later overridden by a
20257         valid type, if any. Don't handle qualified constructor invocation
20258         as qualified method invocation. Call lookup_method_invoke with its
20259         new flag. It's no longer necessary to access the selected method
20260         as the value of a tree list. Handle constructor invocation.
20261         (patch_invoke): Reverse argument list when invoking non interface
20262         methods. Insert call to new as the first argument of the
20263         constructor.
20264         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20265         defined within a final class. Return INVOKE_STATIC if the invoked
20266         method is a constructor.
20267         (lookup_method_invoke): New lc argument is a flag to indicate a
20268         constructor lookup. Now handle constructor lookup. Choose the most
20269         specific method in case several were matching the invocation
20270         requirements. Return a method decl instead of a tree list featuring
20271         one single method decl element.
20272         (refine_accessible_methods_list): New lc flag argument to
20273         indicate that a constructor is being looked up.
20274         (not_initialized_as_it_should_p): New function.
20275         (java_complete_tree): Now process fake tree codes
20276         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20277         save_expr on resolved function call arguments. Case on
20278         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20279         (patch_assignment): LHS can be a field access expression. When
20280         dealing with reference, lhs_type is the promoted type of the
20281         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20282         applicable.
20283         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20284         (patch_binop): Use not_initialized_as_it_should_p where
20285         applicable.
20286         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20287         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20288         where applicable.
20289         (resolve_type_during_patch): New function.
20290         (patch_cast): Call resolve_type_during_patch to resolve type and
20291         report error accordingly.
20292         (patch_array_ref): Use not_initialized_as_it_should_p where
20293         applicable. Array base expression is saved before being
20294         used. Promote the type of an array elements if it contains non
20295         builtin types.
20296         (build_newarray_node, patch_newarray, build_this): New functions.
20297
20298 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20299
20300         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20301         increment it in `for' statement.
20302         (print_field_info): If number is inf or nan, don't print it.
20303         (print_method_info): If method name is `delete', just ignore it.
20304         (print_c_decl): Special-case jstringArray.
20305
20306         * gjavah.c (help): New function.
20307         (no_argument): New function.
20308         (usage): Changed text.
20309         (main): Rewrote argument handling.  Now handles -v, --help,
20310         --version.
20311         (version): New function.
20312         (found_error): New global.
20313         (main): Return found_error.
20314         (generate_access): Set found_error.
20315         (print_c_decl): Likewise.
20316
20317 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20318
20319         * gjavah.c (print_c_decl): Don't print "," when examining field.
20320         Skip type name when looking at "[L" types.
20321         (process_file): Now static.
20322         (generate_access): Now returns int.
20323         (last_access_generated): New global.
20324         (process_file): Clear last_access_generated; make multiple passes
20325         over the class.
20326         (print_field_info): Just return if generate_access returns true.
20327         (print_method_info): Likewise.  Also, allow <init> functions to
20328         pass through.
20329         (print_c_decl): Added is_init argument.  Print constructors
20330         properly.
20331         (print_cxx_classname): Use UTF8_GET to extract characters from
20332         string.
20333         (print_base_classname): New function.
20334         (print_class_decls): New function.
20335         (process_file): Use it.
20336         (utf8_cmp): New function.
20337
20338 1998-07-13  Nick Clifton  <nickc@cygnus.com>
20339
20340         * lang-options.h: Format changed to match changes in gcc/toplev.c
20341         to implement a --help option.
20342
20343 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
20344
20345         * decl.c (init_decl_processing): Revert change to dtable_type.
20346
20347 1998-07-09  Per Bothner  <bothner@cygnus.com>
20348
20349         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20350
20351 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
20352
20353         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20354
20355         * lang.c (lang_init): Default flag_exceptions to 1, without
20356         checking to see if it's 2 first.
20357
20358 1998-07-08  Jeffrey A Law  (law@cygnus.com)
20359
20360         * constants.c: Include "system.h".
20361         * decl.c: Likewise.
20362         * lang.c (flag_new_exceptions): Get via extern now.
20363         (lang_init_options): New functions.  Turn on flag_new_exceptions.
20364
20365 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20366
20367         * lex.c (java_lex): Return 0 when we see an invalid character in
20368         the input.
20369
20370         * lex.c (java_read_char): Specify extra argument when calling
20371         java_lex_error.
20372         (java_read_unicode, java_parse_end_comment,
20373         java_parse_escape_sequence): Likewise,
20374         (java_lex): Specify extra argument when calling
20375         java_lex_error. Test that IDs are beginning with a legal character
20376         for IDs. Handle invalid characters with an error message and a
20377         call to java_lex_error.
20378         (java_lex_error): Adjust column position by new argument
20379         `forward'. Issue an error even if in the middle of reporting an
20380         other error.
20381
20382 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
20383
20384         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20385         we don't explicitly put a null pointer when we're copying it.
20386
20387 1998-07-07  Tom Tromey  <tromey@cygnus.com>
20388
20389         * gjavah.c (print_cxx_classname): New function.
20390         (super_class_name): Likewise.
20391         (print_super_fields): Removed.
20392         (in_super): Removed.
20393         (print_field_info): Never generate #defines.
20394         (print_c_decl): Changed generated types to match JNI.  No longer
20395         print class name before method name.
20396         (print_method_info): Print "static" before static methods.
20397         Print "virtual" before non-final methods.
20398         (usage): Use exit(1), not exit(-1).
20399         (main): Likewise.
20400         (print_field_info): Use %.17g to print a double.
20401         (last_access): New globals.
20402         (process_file): Initialize last_access.
20403         (usage): Now static.
20404         (ACC_VISIBILITY): New define.
20405         (generate_access): New function.
20406         (print_field_info): Call it.
20407         (print_method_info): Likewise.  Also, generate information for all
20408         methods, not just native methods.  Return void.
20409         (print_c_decl): Return void.
20410         (print_field_info): Return void.
20411
20412 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20413
20414         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20415         processing the jc1 grammar file. Prefix bison functions and
20416         variables with java_.
20417         (parse.c): Dependencies on parse.h and lex.h
20418         * expr.c (build_java_arrayaccess): Function now global.
20419         * java-tree.h: Comment reorganized to carry on previous
20420         classification effort.
20421         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20422         RESOLVE_TYPE_NAME_P): New flags on WFLs.
20423         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20424         java_parse (new prefix java_ generated by bison).
20425         (java_layout_parsed_class, java_register_parsed_class): Function
20426         call removed.
20427         (yyparse): Removed unnecessary call to init_outgoing_cpool.
20428         * lex.c (static tree wfl_op): Variable deleted.
20429         (java_init_lex): Initialize kw_super and kw_this. Initialize more
20430         ctxp fields to NULL_TREE.
20431         (java_lex): No longer create WFL for operators. Filename caching
20432         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20433         created as STRING_CST and later expanded. Removed extra argument
20434         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20435         and SUPER.
20436         (build_wfl_node): Removed code in comments.
20437         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20438         store token and location data in the current bison token.
20439         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20440         static/extern function declaration at the beginning of the file.
20441         (struct qualification): Data structure definition deleted.
20442         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20443         (qualify_ambiguous_name): Function declaration modified. Function
20444         now returns nothing.
20445         (build_array_ref, patch_array_ref, make_qualified_name,
20446         resolve_qualified_expression_name, maybe_generate_clinit,
20447         resolve_field_access): New static function declarations.
20448         (build_java_arrayaccess): New extern function declaration.
20449         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20450         (CALL_EXPR_PRIMARY): Macro deleted.
20451         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20452         (struct parser_ctxt): Field initialized_final
20453         removed. non_static_initialized, static_initialized: New fields.
20454         * parse.y (static tree kw_super, static tree kw_this): New global
20455         static.
20456         (%union): tree wfl field of operator member replaced by int
20457         location. WFLs are non longer created for operators.
20458         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20459         (qualified_name:): Now calls make_qualified_name to build the
20460         identifier.
20461         (type_declaration:): Consider generating <clinit> when class
20462         parsing completed.
20463         (variable_declarator:): Directly build an assignment node when the
20464         variable is initialized when declared.
20465         (this_or_super:): Build a WFL and set current location when THIS
20466         or SUPER are parsed.
20467         (expression_statement:): Wrap statement around a WFL.
20468         (primary_no_new_array:): Fixed typo. Changed value returned by
20469         THIS_TK because of its new type (temporary).
20470         (dim_exprs:): Temporary fix because of OSB_TK's new type.
20471         (field_access:): Build qualified name with SUPER.
20472         (method_invocation:): Fixed returned value because of SUPER's new
20473         type.
20474         (array_access:): Use OSB_TK location information.
20475         (post_increment_expression:, post_decrement_expression:,
20476         unary_expression:, pre_increment_expression:,
20477         pre_decrement_expression:, unary_expression_not_plus_minus:,
20478         cast_expression:, multiplicative_expression:,
20479         additive_expression:, shift_expression:, relational_expression:,
20480         equality_expression:, and_expression:, exclusive_or_expression:,
20481         inclusive_or_expression:, conditional_and_expression:,
20482         conditional_or_expression:, assignment:): Use new location/token
20483         information available on operators.
20484         (create_class): Set super_decl_type to NULL_TREE when processing
20485         java.lang.Object.
20486         (register_fields): Field initialization is now a MODIFY_EXPR
20487         node. Chain initialization code to the matching lists (according
20488         to the field declaration modifiers).
20489         (maybe_generate_clinit): New function.
20490         (method_header): Don't set method's DECL_NAME to a WFL when adding
20491         methods to java.lang.Object.
20492         (resolve_and_layout): Now can return NULL_TREE if the type
20493         resolution fails. Otherwise, return the class DECL instead of its
20494         TYPE.
20495         (check_method_redefinition): Don't patch method DECL_NAME if it
20496         belongs to java.lang.Object.
20497         (process_imports): Simply assign error_found to the value returned
20498         by check_pkg_class_access.
20499         (declare_local_variables): Don't use their init statements (if
20500         any) when parsing error were previously found. Reuse MODIFY_EXPR
20501         build during parsing as an init statement.
20502         (java_method_add_stmt): Now return the current method body.
20503         (java_layout_parsed_class, java_register_parsed_class): Functions
20504         removed.
20505         (java_complete_expand_methods): Initialize the constant pool on a
20506         per class basis. Layout the classes before expanding their method
20507         bodies. Don't try expand artificial constructor code if error were
20508         found. Make the classes data and register them if no error were
20509         found.
20510         (java_complete_expand_method): Retrieve an artificial constructor
20511         argument list before entering its body. Assign the top block to
20512         the artificial constructor function body and set types of declared
20513         blocks and compound statements to void. Walk method body if not an
20514         artificial constructor.
20515         (make_qualified_name, cut_identifier_in_qualified): New functions.
20516         (resolve_expression_name): Fixed comments. Save/restore the
20517         current class CLASS_LOADED_P flag value. Build non qualified
20518         static field access and handle qualified expression names.
20519         (resolve_field_access, resolve_qualified_expression_name): New
20520         functions.
20521         (patch_method_invocation_stmt): Use the new expression resolution
20522         scheme, calling resolve_field_access when the function call is
20523         resolved as an expression.
20524         (qualify_ambiguous_name): Function rewritten to work on qualified
20525         expression produced by make_qualified_name.
20526         (java_complete_tree): Promote type when function's argument are
20527         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20528         the assignment to discover further errors if RHS is a expression
20529         name that fails to evaluate. Declare LHS initialized even though
20530         the assignment failed. Don't use the location variable and removed
20531         extra argument in patch function calls. Now handle the ARRAY_REF
20532         case and build internal string representation when STRING_CSTs are
20533         walked.
20534         (build_method_invocation): Don't wrap function call around a WFL.
20535         (build_assignment): Likewise. Use the operator location
20536         information.
20537         (patch_assignment): Handle array access LHSs. Handle error
20538         provenance, resulting in a better error report.
20539         (build_binop): Use op_location from operator as binop location
20540         information.
20541         (build_unaryop, build_incdec, build_cast): Likewise.
20542         (patch_binop): Extract location information from the node. Fixed
20543         typo in error message.
20544         (patch_unary_op): Extract location information from the node.
20545         (build_array_ref, patch_array_ref): New functions.
20546
20547 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20548
20549         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20550         match _Jv_IsInstanceOf.
20551         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20552         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20553
20554 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20555
20556         * decl.c (init_decl_processing): Functions are now named
20557         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20558
20559 1998-06-29  Per Bothner  <bothner@cygnus.com>
20560
20561         * java-tree.h (load_class):  Add prototype.
20562         * class.c (is_compiled_class):  Add missing arg to load_class.
20563         * expr.c (expand_java_NEW):  Call load_class.
20564         * parse.y (process_import):  Removed bogus use of void return value.
20565
20566 1998-06-25  Per Bothner  <bothner@cygnus.com>
20567
20568         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20569         Function name is "_Jv_Throw" instead of "soft_athrow".
20570         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20571         Function name is "_Jv_AllocObject" instead of "soft_new".
20572         Takes an extra parameter (object size).
20573         * expr.c:  Update calls.
20574
20575 1998-06-24  Per Bothner  <bothner@cygnus.com>
20576
20577         * lex.c (java_get_line_col):  Handle end-of-file.
20578         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20579
20580 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20581
20582         * lang.c (lang_init): Make -fexceptions the default.
20583         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20584         exception handling is not turned on.
20585
20586 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20587
20588         * lang.c (flag_new_exceptions): Make this this default.
20589         * decl.c (end_java_method): Call emit_handlers.
20590         * except.c (method_init_exceptions): Set language code and version.
20591         (expand_start_java_handler): Enable exception, and call
20592         expand_eh_region_start.
20593         (expand_end_java_handler): Enable exception, and set up catch blocks.
20594         (emit_handlers): New routine to generate the saved handlers.
20595         * java-except.h (emit_handlers): Add prototype.
20596
20597 1998-06-12  Per Bothner  <bothner@cygnus.com>
20598
20599         We used to have three different representations of the constant pool:
20600         the CPool structure, the tree_constant_pool, and the constructures
20601         used to build the Class object (which may need class and string
20602         constants) in compiled code.  None were appropriate for compiling
20603         to .class files, so I did a major overhaul.
20604
20605         First, the tree_constant_pool array was removed.  Things were
20606         modified to the CPool structure in the JCF could be used.
20607         Second, a "capacity" field was added to the CPool, and functions
20608         written to search for a matching constant, adding one if not found.
20609         The code that generated the Class object was changed to use a CPool.
20610         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20611         the static Class object are now only in build_constants_constructor.
20612         Finally, I wrote code which can generate a .class file (including its
20613         constant pool) from the RECORD_TYPE of a class.  This is a big step
20614         on the way to compiling Java source into .class files.
20615
20616         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
20617         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
20618
20619         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20620         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
20621         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20622         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20623         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
20624         (lang_type):  Removed constant_pool field.
20625         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
20626         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20627         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
20628         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20629
20630         * constants.c (current_constant_pool_tags, current_constant_pool_data,
20631         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20632         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
20633         (set_constant_entry, find_constant1, find_constant2,
20634         find_class_constant, count_constant_pool_bytes, write_constant_pool,
20635         find_utf8_constant, find_class_or_string_constant):  New functions.
20636
20637         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
20638         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
20639         (give_name_to_class, get_class_constant):  Likewise.
20640         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
20641         (get_name_and_type_constant, get_ref_constant):  Removed.
20642         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
20643         * parse.y:  Don't save/restore tree_constant_pool.
20644         * verify.c (verify_jvm_instructions):  Update for new approach.
20645         * expr.c (expand_invoke, expand_java_field_op): Likewise.
20646
20647         * lang-options.h:  Added -femit-class-file, -femit-class-files.
20648         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
20649         (lang_f_options):  Added "emit-class-file(s)".
20650
20651         * expr.c (build_java_arrayaccess):  Generate more efficient array
20652         bounds checking, by using unsigned compare.
20653
20654         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
20655
20656 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20657
20658         * parse.h: New comment on the handling of unresolved type
20659         identifiers. JDEPs are now part of the jdep_code enum.
20660         (typedef struct jdep): Now use enum jdep_code or int, depending on
20661         availability. Both are narrowed down to an 8 bits bitfield.
20662         (CALL_EXPR_PRIMARY): Fixed comment.
20663
20664 1998-06-10  Tom Tromey  <tromey@cygnus.com>
20665
20666         * Make-lang.in (java): Added gjavac and jvgenmain.
20667         (java.start.encap): Depend on gjavac.
20668         (java.rest.encap): Depend on jvgenmain.
20669
20670         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20671         (JAVA_CROSS_NAME): Likewise.
20672         (java.all.build): Depend on jvgenmain and gjavac.
20673         (java.all.cross): Depend on jvgenmain and gjavac-cross.
20674         (jvgenmain$(exeext)): New target.
20675         (java.install-common): Wrote.
20676         * config-lang.in (compilers, stagestuff): Added gjavac and
20677         jvgenmain.
20678
20679 1998-06-10  Dave Brolley  <brolley@cygnus.com>
20680
20681         * lang.c (lang_decode_option): New argc/argv interface.
20682
20683 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20684
20685         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20686         * decl.c (build_decl_no_layout): New function.
20687         * expr.c (java_lang_expand_expr): Layout declarations found in
20688         blocks before they're pushed.
20689         * jcf-parse.c (load_class): Save current line when parsing class
20690         file.
20691         (parse_source_file): Register class before expanding their
20692         methods.
20693         * lang.c (put_decl_node): Produce `null' when `void *' is
20694         processed.
20695         * lex.c (static tree wfl_op): New static global, for error report
20696         on casts.
20697         (java_init_lex): wfl_operator and wfl_op initialized
20698         here. Filename caching added for wfl_op. Return wfl_op when `(' is
20699         parsed.
20700         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20701         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20702         build_unresolved_array_type): New static function definitions.
20703         (build_decl_no_layout): New extern function declared.
20704         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20705         faulty modifier exists.
20706         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20707         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20708         (UNARY_PLUS_EXPR): New fake operator.
20709         (struct parser_ctxt): New field osb_number.
20710         * parse.y (static tree wfl_operator): New static WFL for operator
20711         bound error messages.
20712         (DECR_TK, INCR_TK): Moved.
20713         (OP_TK): Tagged <operator>.
20714         (array_type:): Now call build_unresolved_array_type.
20715         (dim_expr:): Count the number of '[' seen.
20716         (post_increment_expression, post_decrement_expression,
20717         pre_increment_expression, pre_decrement_expression,
20718         unary_expression_not_plus_minus, unary_expression:): Actions are
20719         now building the corresponding unary expressions.
20720         (cast_expression:): Actions are now building cast expressions.
20721         (build_unresolved_array_type): New function.
20722         (create_interface): Reset the number of declared interfaces.
20723         (create_class): Likewise.
20724         (method_header): Methods declared within the scope of an interface
20725         are now implicitly set public and abstract.
20726         (java_complete_class): Variable's and parameter's type are patched
20727         with a promoted type.
20728         (declare_local_variables): Resolved non builtin types are promoted
20729         before being used to build a variable decl. Removed type patch
20730         posted on variable initialization statement.
20731         (source_start_java_method): Use build_decl_no_layout to build the
20732         decl of a parameter of incomplete type.
20733         (java_register_parsed_class): Process interfaces too. Call
20734         rest_of_decl_compilation on each processed class declarations.
20735         (java_complete_expand_methods): Don't attempt to expand things in
20736         interfaces.
20737         (java_complete_tree): Process CONVERT_EXPR, even though it always
20738         has a type. Propagate error_mark_node to node's type too. Promote
20739         method's call argument type and return error_mark_node if
20740         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20741         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20742         handle unary operator nodes.
20743         (build_assignment): Added comment.
20744         (print_int_node): New function.
20745         (patch_assignment): New second argument. New error handling. Use
20746         print_int_node. Handle references. Use can_cast_to_p to issue
20747         different error message according to the context and check upon
20748         the initialization of the RHS.
20749         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20750         (operator_string): Handle more operators.
20751         (patch_binop): No longer use a function static
20752         wfl_operator. Improved error message on shift distance.
20753         (build_unaryop, build_incdec, build_cast, patch_unaryop,
20754         patch_cast): New functions.
20755
20756 1998-06-05  Per Bothner  <bothner@cygnus.com>
20757
20758         * jvspec.c:  New file.
20759         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
20760
20761         * java-tree.h (identifier_subst):  Add declaration.
20762
20763 1998-06-04  Tom Tromey  <tromey@cygnus.com>
20764
20765         * jvgenmain.c (main): Generate call to JvRunMain.
20766
20767         * class.c (make_class_data): Push value for "sync_info" field.
20768         * decl.c (init_decl_processing): Push "sync_info" field.
20769
20770 1998-06-03  Per Bothner  <bothner@cygnus.com>
20771
20772         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
20773         Java (source) name, not signature.
20774         Set TYPE_ALIGN to (at least) that of element_type.
20775
20776 1998-06-02  Per Bothner  <bothner@cygnus.com>
20777
20778         * class.c:  Moved classname-mangling-rekated code to ...
20779         * mangle.c:  ... this new file.
20780         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
20781         * Makefile.in:  Update for above changes.
20782
20783 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20784
20785         * expr.c (truthvalue_conversion): Convert integer and floating
20786         point value to their truth value.
20787         * lex.c (java_lex): Handle the `null' literal.
20788         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20789         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20790         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20791         New macros.
20792
20793         * parse.y: Reorganization/documentation on token declaration.
20794         (binop_lookup[]): New added new tree codes.
20795         (relational_expression): Build corresponding binary operators.
20796         (equality_expression, conditional_and_expression,
20797         conditional_or_expression): Likewise.
20798         (java_complete_class): Fix crash in debug message.
20799         (java_complete_tree): Check initialization of method call
20800         arguments. Further bogus node evaluation to detect more error
20801         during assignments. Handles more binary operators.
20802         (patch_assignment): Use DECL_P.
20803         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20804         code.
20805         (operator_string): Handle more case. Compacted source.
20806         (patch_binop): Changed function comment. Checking for
20807         uninitialized first operand takes the compound assignment into
20808         account and uses DECL_P. Checking for uninitialized second operand
20809         delayed to routine's end. Use macros to issue type bound error
20810         messages and issue messages on both operands if their types are
20811         different. Force fixed type into node. Handle all binary
20812         operators.
20813
20814 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20815
20816         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20817         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20818         build operator node and return tokens.
20819         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20820         * parse.h (java_complete_tree): Changed returned type in prototype.
20821         (build_method_invocation, build_assignment, patch_assignment,
20822         patch_binop): New static function declarations.
20823         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20824         BUILD_EXPR_WFL): New macros.
20825         * parse.y (enum tree_code binop_lookup[]): New static for token to
20826         TREE_CODE lookup.
20827         (%union): Parser union has new sub-structure `operator'.
20828         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20829         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20830         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20831         ASSIGN_ANY_TK): Tokens tagged `operator'.
20832         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20833         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20834         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20835         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20836         (assignment_operator:): Rule tagged `operator'.
20837         (expression_statement:): Re-installed default rule.
20838         (method_invocation:): Sub rules call build_method_invocation.
20839         (postfix_expression:): Don't attempt to resolve name here. Just
20840         return an ID.
20841         (multiplicative_expression:): Sub-rules build corresponding binop
20842         expression node.
20843         (additive_expression:, shift_expression:, and_expression:,
20844         exclusive_or_expression:, inclusive_or_expression:): Likewise.
20845         (assignment:): Sub rule invoke build_assignment.
20846         (assignment_operator:): Default rules on sub rules.
20847         (force_error): Added documentation on this variable.
20848         (declare_local_variables): Build initialization calling
20849         build_assignment.
20850         (expand_start_java_method): Removed unused rtx declaration. Mark
20851         arguments as already initialized.
20852         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20853         (java_complete_expand_methods): Don't process next method if
20854         completion of the previous one triggered errors.
20855         (java_complete_expand_method): Call source_end_java_method if no
20856         error were found during completion.
20857         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20858         locals declaratilon. Handle names found within a class. Return
20859         error_mark_node when things aren't found.
20860         (patch_method_invocation_stmt): Return error_mark_node on failures.
20861         (patch_invoke): Removed unused local. Return the correct node.
20862         (java_complete_tree): Now returns a value. The BLOCK section binds
20863         local identifiers and the type of a BLOCK is now void. Assign the
20864         result of operand completion on COMPOUND_EXPR. Assign the
20865         encapsulated node of a WFL to the result of its completion, except
20866         when the node is an identifier. Now handle MODIFY_EXPR and several
20867         binary operators. Return error_mark_node on errors.
20868         (build_method_invocation, build_assignment, patch_assignment,
20869         build_binop, operator_string, patch_binop): New functions.
20870         * typeck.c (binary_numeric_promotion): New function.
20871
20872 1998-05-21  Per Bothner  <bothner@cygnus.com>
20873
20874         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
20875         Replace most uses of ident_subst by identifier_subst.
20876
20877         * class.c (push_class_static_dummy_field):  Removed function.
20878         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
20879         instead of looking got "class" static field.  Create that decl here.
20880         (class_identifier_node):  Removed;  no longer needed.
20881         (init_class_processing):  Don't init class_identifier_node.
20882         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
20883         Do nreverse 0 times (instead of twice) for Object and Class.
20884         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20885
20886 1998-05-20  Per Bothner  <bothner@cygnus.com>
20887
20888         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
20889         while initializing linenumber_count and linenumber_table.
20890         Do it before init_function_start (which calls emit_line_note).
20891         * expr.c (expand_byte_code):  Don't need to clear lineno here.
20892
20893 1998-05-18  Tom Tromey  <tromey@cygnus.com>
20894
20895         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20896         then mangle number as _N_.
20897
20898         * class.c (mangle_class_field): New function.
20899         (build_class_ref): Set assembler name of class reference using
20900         mangle_class_field.
20901         (push_class_static_dummy_field): Likewise.
20902
20903 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
20904
20905         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20906         of assigning to TREE_CODE.  The latter method exploits a feature
20907         of GCC that is not ANSI compliant.
20908
20909 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20910
20911         * decl.c (pushdecl_force_head): New function.
20912         (pushlevel): Removed conditional printf.
20913         (complete_start_java_method): Don't enter local variable scope if
20914         function is compiled from source code.
20915         * expr.c: parse.h now included
20916         (java_lang_expand_expr): New function.
20917         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20918         printf. Terminate buffer when doing directories.
20919         * jcf-parse.c (parse_source_file): Call lang_init_source before
20920         parsing and before code generation.
20921         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20922         use printf if the macro is defined.
20923         * lang.c (lang_init): Install lang_expand_expr hook on
20924         java_lang_expand_expr.
20925         (java_dummy_print): New function.
20926         (lang_init_source): New function.
20927         * lex.c (java_lex): Remember location of an opening brace at the
20928         second nesting level.
20929         (java_is_eol): Unget character seen after a CR if it is EOF.
20930         * parse.h: Now includes lex.h
20931         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20932         printf if the macro is defined.
20933         (expand_start_java_method, build_expr_block, enter_block,
20934         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20935         New static function declarations.
20936         (pushdecl_force_head): New extern function declaration.
20937         (INCOMPLETE_TYPE_P): New macro.
20938         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20939         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
20940         BLOCK_EXPR_ORIGIN): New macros.
20941         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
20942         DECL_SOURCE_LINE_LAST): New macros.
20943         (struct parser_ctxt): Removed field current_method_decl, redundant
20944         with the field current_function_decl. Added fields
20945         first_ccb_indent1 and pending_block.
20946         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
20947         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
20948         tagged <node>
20949         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
20950         (compilation_unit:): Cosmetic on sub rule.
20951         (type_declaration:): Cosmetic on sub rules. Added an error rule.
20952         (variable_initializer:): Installed default rule on expression:.
20953         (method_declaration:): method_header: starts a new
20954         method. method_body: installs the function body, absorbs blocks
20955         emitted for temporary variable scopings, pops function's body block
20956         and merges function's last statement lineno in DECL_SOURCE_LINE.
20957         (method_body:): Installed default rules.
20958         (block:): Call enter_block when an opening brace is seen.  Absorb
20959         scoping blocks and call exit_block when a closing brace is seen.
20960         (block_statement:): Cosmetic changes.
20961         (method_invocation:): Create WFL around CALL_EXPR node.
20962         (patch_stage): Added comment around definition.
20963         (method_header): Try to use first_ccb_indent1 as the first line of
20964         the method, so BP debug info are emitted at the first opening
20965         brace of the function. If the function has no body, use the
20966         location of the function's name. Override currently defined method
20967         name with the matching WFL so we can point redefinition errors
20968         using the location where the function's name was declared.
20969         (check_abstract_method_header): Interprets DECL_NAME as an
20970         identifier or as a WFL, accordingly.
20971         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
20972         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
20973         location and name information out of it and reinstall DECL_NAME to
20974         its original identifier node value.
20975         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
20976         function's source code).
20977         (read_import_dir): Test the value returned by find_class and issue
20978         a fatal accordingly.
20979         (declare_local_variables): Push a new block for the scope of the
20980         new variable(s) if code has been already generated at that nesting
20981         level. Pinpoint redefinition errors using the variable id
20982         WFLs. Generate initialization code if necessary. If the variable
20983         type is incomplete, register a patch on its decl.
20984         (source_start_java_method): Rewritten. Define a new block for the
20985         function's parameters. Build parameter decl out of function's
20986         arguments and register them for a patch if their types are
20987         incomplete.
20988         (expand_start_java_method): Includes the part of
20989         source_start_java_method that was pushing the parameter decls and
20990         completing the method start code.
20991         (source_end_java_method): Removed call the expand_end_bindings and
20992         poplevel (already taken care of). Reinstall function's arguments
20993         and get function's last line of code before calling
20994         expand_function_end.
20995         (java_method_add_stmt): New comment before the function's
20996         code. Complement the second operand of the current COMPOUND_EXPR
20997         if necessary.
20998         (java_complete_expand_methods): Don't generate debug info on line
20999         zero when expanding a generated constructor.
21000         (java_complete_expand_method): Set start and end line numbers for
21001         a artificially generated constructor to one and manually call
21002         enter_block and exit_block when defining it. For all methods:
21003         expand function's start calling the new expand_start_java_method
21004         and invoke java_complete_tree on the effective method's body, if
21005         any.
21006         (resolve_expression_name): Now use lookup_name_in_blocks to search
21007         local variable decls and print out an error when variables are
21008         undefined.
21009         (patch_method_invocation_stmt): Inserted comment before the
21010         function's code.
21011         (lookup_method_invoke): Chain method's arguments using chainon
21012         with the current arg list as a second argument. Inserted missing
21013         IDENTIFIER_POINTER when reporting an error on methods not found.
21014         (refine_accessible_methods_list): Don't retain constructors.
21015         (patch_arguments): Function removed.
21016         (java_complete_tree): Inserted comment before the function's
21017         code. New case for BLOCKs. Moved the WFL case a bit
21018         further. Complete function's arguments.
21019         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21020         maybe_absorb_scoping_blocks): New functions.
21021
21022 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21023
21024         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21025         previously set.
21026         * jcf-parse.c (parse_source_file, java_error_count): New forward
21027         and extern declarations.
21028         (java_parse_abort_on_error): Macro moved.
21029         (jcf_parse_source): fatal called if fopen fails. Now calls
21030         parse_source_file.
21031         (parse_source_file): New parse_only parameter. Reflects the
21032         elimination of the second pass.
21033         (yyparse): parse_source_file called with argument set to 0.
21034         * jcf.h (JCF_ZERO): Sets java_source to zero.
21035         * lex.c (java_init_lex): pass argument is gone. Function modified
21036         to be called once during the analysis of a file.
21037         (java_unget_unicode): Fixed typo in fatal message.
21038         (java_get_line_col): Likewise.
21039         (java_lval): Likewise. String literals no longer built during
21040         second pass.
21041         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21042         account.
21043         * parse.h (MODIFIER_WFL): New macro.
21044         (parse_check_super, parser_check_super_interface): Now return int.
21045         (parser_chain_incomplete_item, not_builtin_p,
21046         complete_method_decl): Declarations removed.
21047         (build_method_invocation_stmt, build_invoke): Renamed using the
21048         `patch' instead of `build'
21049         (register-incomplete_type, obtain_incomplete_type,
21050         java_complete_tree, java_complete_expand_method,
21051         unresolved_type_p, create_jdep_list): New function declarations.
21052         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21053         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21054         (jdep): New typedef on new struct _jdep.
21055         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21056         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21057         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21058         JDEP_RESOLVED_P): New macros.
21059         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21060         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21061         JDEP_VARIABLE): New enum values and jdep kinds.
21062         (jdeplist): New typedef on struct _jdeplist.
21063         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21064         macros.
21065         (CALL_EXPR_PRIMARY): New macro.
21066         (struct parser_ctxt): Fields java_pass, current_method_decl,
21067         method_decl_list deleted. New field jdeplist.
21068         (INCOMPLETE_P): Macro deleted.
21069         * parse.y (single_type_import_declaration:): Removed pass switch.
21070         (type_import_on_demand_declaration): Likewise.
21071         (field_declaration:): Removed pass switch on all sub rules.
21072         (class_declaration:): Call the complete_class_decl removed on
21073         class_body rules.
21074         (method_declaration:): Removed second pass switch. No longer chain
21075         methods decl when method_header reduced.
21076         (method_header:): Sub rules no longer depend on pass switch.
21077         (method_declarator:): Likewise.
21078         (method_body:): Likewise.
21079         (abstract_method_declaration:): Likewise.
21080         (block_statement:): Likewise.
21081         (local_variable_declaration:): Likewise.
21082         (argument_list:): Likewise.
21083         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21084         removed. Partial CLASS_EXPR tree node built instead.
21085         (postfix_expression:): Removed pass switch on all sub rules.
21086         (java_pop_parser_context): Free classd_list content.
21087         (yyerror): Call obstrack_grow0 to finalize error message.
21088         (check_class_interface_creation): Comment modified to reflect new
21089         returned value meaning. Removed second pass switch. Return 1 if an
21090         error was found, 0 otherwise. Adjust pointer on filename if a
21091         leading path separator was found.
21092         (maybe_create_class_interface_decl): Removed first pass switch
21093         when linking the class decl to the class_list. Install a new
21094         jdep_list for the class.
21095         (add_superinterfaces): List of unresolved interfaces is
21096         gone. Unresolved interfaces are directly added to the current
21097         dependencies list.
21098         (create_interface): Second pass shortcut removed.
21099         ctpx->modifier_ctx access through MODIFIER_WFL.
21100         (create_class): Second pass shortcut removed. Call to
21101         register_incomplete_type replaces the call to
21102         parser_chain_incomplete_item.
21103         (complete_class_decl): Function removed.
21104         (duplicate_declaration_error): New way of retrieving redeclared
21105         item type.
21106         (register_fields): Call to lookup_modifier_cl replaced by
21107         MODIFIER_WFL. New way of handling unresolved type, using
21108         unresolved_type_p and obtain_incomplete_type.
21109         register_incomplete_type replaces call to parser_chain_incomplete_item.
21110         (patch_stage): New static global variable.
21111         (method_header): New way of handling unresolved type, using
21112         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21113         indicates that the method decl needs to be patched.
21114         (check_abstract_method_header): Call to lookup_modifier_cl
21115         replaced by MODIFIER_WFL.
21116         (method_declarator): Incomplete argument type are registered
21117         calling register_incomplete_type. Patch on the declared method is
21118         issued in that case.
21119         (unresolved_type_p): New function.
21120         (parser_check_super_interface): New comment to reflect function's
21121         modified returned type (int). Function and has a new argument
21122         this_wfl. Call to parse_error_context uses this_wfl instead of
21123         relying on lookup_cl.
21124         (parser_check_super): Comment reflects function's new returned
21125         type (int). Function returns nonzero value on error.
21126         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21127         register_incomplete_type, jdep_resolve_class): New functions to
21128         handle incomplete types in declarations.
21129         (java_complete_class): Rewritten to work with the new incomplete
21130         type handling scheme.
21131         (complete_class_report_errors): Likewise.
21132         (complete_method_decl): Removed: it jobs is now handled by
21133         java_complete_class.
21134         (do_resolve_class): Class loaded in not already loaded and not
21135         found in Java source code.
21136         (java_check_regular_methods, java_check_abstract_methods): Don't
21137         call complete_method_decl anymore.
21138         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21139         (read_import_dir): Got rid of the pass number dependency.
21140         (declare_local_variables): New handling of unresolved types (patch
21141         issued).
21142         (source_start_java_method): New parameter level. Function called
21143         with level set to 1 when argument types are potentially
21144         unresolved.  Called to complete the job with level set to 2 once
21145         types are complete.
21146         (source_end_java_method): Call to permanent_allocation
21147         removed. Waiting to be replaced by a more suitable obstack
21148         management.
21149         (java_complete_expand_methods, java_complete_expand_method,
21150         java_expand_finals): New functions.
21151         (build_method_invocation_stmt): Renamed
21152         patch_method_invocation_stmt. Extracts function call expression
21153         (wfl) and arguments (args) from CALL_EXPR tree operands.
21154         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21155         call. Patch the function and argument operand of the CALL_EXPR
21156         tree argument.
21157         (patch_argument, java_complete_tree): New functions.
21158
21159 1998-04-20  Per Bothner  <bothner@cygnus.com>
21160
21161         Recover from missing fields and methods (i.e. error instead of fatal).
21162         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21163         * expr.c (expand_invoke):  Recover from missing method.
21164         (expand_java_field_op):  Recover from missing field.
21165         Inline references to java.lang.{Integer,Char,...}.TYPE.
21166         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21167         * class.c (add_method):  Use get_type_from_signature.
21168         (build_class_ref):  Handle a class that was not found.
21169         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21170         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21171         instead of lookup_field to handle missing fields.
21172
21173         * jcf-parse.c (process_zip_dir):  Set java_source.
21174
21175 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21176
21177         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21178
21179 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21180
21181         * jcf-parse.c (load_class): Don't change input_filename before
21182         calling jcf_parse_source (but still do it before calling
21183         jcf_parse).
21184         (jcf_parse_source): Assign input_filename after having saved the
21185         parser context.
21186         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21187         list. ctxp->modifier_ctx zeroed according to its new
21188         definition. ctxp->filename initialized. Removed
21189         JAVA_MODIFIER_CTX_UNMARK.
21190         (java_unget_unicode): Update the character based column position.
21191         (java_allocate_new_line): ref_count not used anymore. Always free
21192         ctxp->p_line. Initialize c_line->char_col to 0.
21193         (java_get_unicode): Update the character based column position.
21194         (java_lex): Use ctxp->elc to store current position in source
21195         file, at the beginning of the parsed token. Set modifier_ctx entry
21196         corresponding to the parse modifier to a WFL node. Return a WFL
21197         node when an identifier is parsed.
21198         (java_lex_error): Now uses ctxp->elc to store current position in
21199         source.
21200         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21201         * lex.h (build_wfl_node): New function definitions.
21202         (struct java_line): ref_count and next fields are gone. New field
21203         char_col.
21204         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21205         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21206         (JAVA_COLUMN_DELTA): New macro.
21207         (java_lc): New typedef on new struct _java_lc.
21208         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21209         (parse_error_context, parse_warning_context): Changed prototypes.
21210         (java_get_line_col): Added as an available global function.
21211         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21212         (IC_DECL): Replaced by macro IC_TYPE
21213         (DEPEND_WFL): New macro.
21214         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21215         wrong modifier.
21216         (exit_java_complete_class): Removed a commented out statement.
21217         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21218         now an array of tree nodes. Deleted fields line_list and
21219         e_line. New field elc, to replace e_line.
21220         * parse.y (array_type:): Build WFL node.
21221         (qualified_name:): Build a single WFL node out of two. Retain
21222         the location information of the first node in the resulting node.
21223         (package_declaration:): Use package name as a WFL node
21224         (single_type_import_declaration:): Use imported name as a WFL node.
21225         (type_import_on_demand_declaration:): Use root of the imported
21226         packages as a WFL node.
21227         (field_declaration:): Removed unused local variable cl.
21228         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21229         (yyerror): New static elc. Removed static error_line, error_pos.
21230         New local code_from_source. Save ctxp->elc into elc at the first
21231         pass. Call java_get_line_col to get a string of the line where
21232         the error occurred.
21233         (debug_line): Removed static function.
21234         (parse_error_context, parse_warning_context): Parameter cl is now
21235         a WFL node. Use its value to initialize ctxp->elc.
21236         (redefinition_error): Parameter cl is now a WFL node.
21237         (parse_add_interface): New parameter wfl. No longer call
21238         lookup_cl, use wfl instead.
21239         (check_class_interface_creation): Parameter cl is now a WFL node.
21240         (maybe_create_class_interface_decl): Likewise.
21241         (add_superinterfaces): New function.
21242         (create_interface): Removed local cl, node, super_decl,
21243         super_decl_type.  Function now uses id as a WFL node. Better
21244         warning/error report on obsolete or forbidden mix of
21245         modifiers. Now calls add_superinterfaces to register interfaces.
21246         (create_class): Removed local cl, node. Local variable id is used
21247         as a WFL node. Better error report on forbidden modifier
21248         mix. Uses add_superinterfaces to register interfaces.
21249         (find_field): Argument cl is now a WFL node. Now store the WFL
21250         node of a fields that needs to be checked for their
21251         initialization.
21252         (method_header): Local variable node non longer used. Local
21253         variable id replaces cl.
21254         (check_modifiers_consistency): Local variable cl is now a WFL
21255         node.
21256         (method_declarator): Local variable cl replaced by parameter id.
21257         (parser_qualified_name): Now uses parameter name as a WFL node.
21258         (parser_check_super_interface): New parameter wfl, for achieve
21259         greater accuracy during error reports.
21260         (parser_chain_incomplete_item): New parameter named location. Used,
21261         along the decl, to construct the incomplete item node.
21262         (java_complete_class): resolve_class now uses WFL node extracted
21263         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21264         where appropriate.
21265         (complete_method_decl): Unresolved function's argument types are WFL.
21266         (resolve_class): Parameter cl is now a WFL node.
21267         (resolve_and_layout): Likewise.
21268         (do_resolve_class): Likewise. Try first to use cl and then do the
21269         lookup on the decl when calling check_pkg_class_access.
21270         (complete_class_report_errors): Use IC_TYPE in place of
21271         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21272         instead of doing a lookup over the decl.
21273         (java_check_final): Use WFL info from field tree list.
21274         (lookup_cl): Rewritten and returns a statically defined WFL node.
21275         (lookup_modifier_cl): Now uses information from WFL nodes.
21276         (process_imports): Likewise.
21277         (read_import_dir): name and cl arguments replaced by a single WFL
21278         node. Function modified accordingly.
21279         (find_in_imports_on_demand): Now uses WFL node.
21280         (check_pkg_class_access): cl argument is now a WFL node.
21281         (declare_local_variables): Fixed to use WFL nodes.
21282         (resolve_expression_name): Likewise.
21283         (build_method_invocation_stmt): name_combo argument renamed
21284         wfl. Function modified to use WFL nodes.
21285         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21286         (lookup_method_invoke): cl is now a WFL node. Added missing
21287         IDENTIFIER_POINTER to class type decl name.
21288
21289 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21290
21291         * lang.c (init_parse): Now returns char* containing the filename.
21292
21293 1998-04-10  Per Bothner  <bothner@cygnus.com>
21294
21295         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21296
21297         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21298         * class.c (make_class_data):  If flag_assume_compiled, initial class
21299         state is CSTATE_PREPARED; make superclass and interfaces direct
21300         references, rather than constant pool indexes.
21301
21302 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21303
21304         * parser.y: Include flags.h. Removed debug variable pl.
21305         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21306         (block:): Likewise.
21307         (labeled_statement_nsi:): Generate debug info when reducing
21308         expression_statement:.
21309         (check_pkg_class_access): get_access_flags_from_decl invocation
21310         fixed for new CLASS_* flags location.
21311         (source_end_java_method): Save/restore parser context when
21312         entering/leaving this routine. Restore lineno to its right value
21313         before calling expand_end_bindings.
21314         (build_method_invocation_stmt): build_invoke called with the
21315         current line information.
21316         (build_invoke): New argument cl. Wrap the function call around a
21317         wfl node.
21318         (refine_accessible_methods_list): Changed comment, removed
21319         unnecessary code.
21320         * parse.h: Fixed typo in comments.
21321         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21322         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21323         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21324         parser_ccb_indent.
21325         * lex.c (java_lex): Record the last closing curly bracket of a
21326         function.
21327         * jcf-parse.c (jcf_parse_source): Now calls
21328         java_check_methods. Clarified comment, fixed typo.
21329
21330 1998-04-09  Dave Brolley  <brolley@cygnus.com>
21331
21332         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21333         (finish_parse): Expose for non USE_CPPLIB builds.
21334
21335 1998-04-08  Jeffrey A Law  (law@cygnus.com)
21336
21337         * lang.c (lang_print_xnode): New function.
21338
21339 1998-04-03  Per Bothner  <bothner@cygnus.com>
21340
21341         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
21342         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
21343         used to build a class's dispatch table.
21344         (make_class_data):  Generate dispatch table if flag_assume_compiled.
21345         Set dtable of class object to address of class_dtable_decl.
21346
21347         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
21348         be volatile and have side effects - generates better code.
21349
21350         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
21351         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21352
21353         * expr.c (expand_invoke):  If class is final, method is
21354         effectively final, so can call it directly.
21355
21356         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
21357
21358         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
21359
21360 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21361
21362         * parse.y (build_method_invocation_stmt): Removed extra argument
21363         to build_invoke.
21364
21365 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21366
21367         * expr.c (dtable_indent): Now static global.
21368         (expand_invoke): Now call invoke_build_dtable and
21369         build_invokevirtual.
21370         (invoke_build_dtable, build_invokevirtual): New functions.
21371         * jcf-io.c (find_class): Defer issuing a warning by setting
21372         jcf->outofsynch to 1.
21373         * jcf-parse.c (jcf_out_of_synch): New function.
21374         (load_class): Test this_jcf.outofsynch flag and call
21375         jcf_out_of_synch accordingly.
21376         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21377         comment indentation.
21378         * lex.c (java_get_unicode): Fixed code indentation.
21379         (java_lex): Create string literal. Fixed typo. Removed several
21380         premature obstack_free.
21381         * parse.h: New enums for name resolution and invocation mode.
21382         (struct qualification): New data structure.
21383         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21384         (do_resolve_class, build_method_invocation_stmt,
21385         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21386         debug_line, identical_subpath_p, invocation_mode,
21387         refine_accessible_methods_list, build_invoke,
21388         lookup_method_invoke): New functions declared.
21389         (build_invokevirtual, invoke_build_dtable, match_java_method,
21390         build_field_ref, jcf_out_of_synch): New references to external
21391         functions.
21392         (struct parse_ctxt): Removed artificial_constructor field.
21393         * parse.y: (array_type:): Type defined for this rule.
21394         (class_type:): Installed default rule for interface_type:.
21395         (array_type:): Now build Java array type.
21396         (qualified_name:): Now use obstack_grow0.
21397         (method_declaration:): Skip the artificial constructor added to
21398         the list, if any.
21399         (abstract_method_declaration:): Execute the code only during pass 1.
21400         (block:): Installed default rule in block_statements:.
21401         (block_statement:): Add the statement to the method during pass 2.
21402         (statement_expression): Installed default rule for
21403         method_invocation:.
21404         (argument_list:): Added code to build the argument list.
21405         (method_invocation:): Added call to create the method invocation
21406         node.
21407         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21408         (debug_line): New function for debug.
21409         (complete_class_decl): No longer do something during pass 1.
21410         (method_header): Use BUILD_PTR_FROM_NAME.
21411         (parser_qualified_classname): Use obstack_grow0. Removed bogus
21412         obstack_free.
21413         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21414         function's main comment.
21415         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21416         classes.
21417         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21418         (resolve_class): Now works with arrays.
21419         (do_resolve_class, resolve_and_layout): New functions.
21420         (java_check_regular_methods): Reverse method list before and after
21421         having processed it. No longer set ctxp->artificial_constructor.
21422         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21423         accordingly. Fixed typo in issued error message. Now use
21424         obstack_grow0.
21425         (find_in_imports_on_demand): Now use obstack_grow0.
21426         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21427         (source_end_java_method): Call expand_expr_stmt instead of
21428         expand_expr. Calls it before calling expand_function_end.
21429         (java_method_add_stmt): Do nothing if errors were found during
21430         parsing.
21431         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21432         (build_method_invocation_stmt, build_invoke, invocation_mode,
21433         lookup_method_invoke, refine_accessible_methods_list,
21434         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21435         New functions.
21436         * typeck.c (build_java_signature): Properly end method signature
21437         if return type skipped.
21438         (match_java_method): New function.
21439
21440 1998-03-16  Per Bothner  <bothner@cygnus.com>
21441
21442         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
21443
21444 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21445
21446         * expr.c (build_invoke_non_interface): New function.
21447         (methods_ident, ncode_ident): Now static globals.
21448         (expand_invoke): Use build_invoke_non_interface.
21449         * java-tree.h (struct lang_decl): New field function_decl_body.
21450         (DECL_FUNCTION_BODY): New macro.
21451         * jcf-parse.c (jcf_parse_source): Deeper check before setting
21452         CLASS_FROM_SOURCE_P.
21453         (parse_source_file): Fixed typos. Call java_layout_parsed_class
21454         before starting pass 2. Call to java_generate_parsed_class replaced
21455         by java_register_parsed_class.
21456         * lex.c: Fixed typo in header. Some line width related formating.
21457         * lex.h: Some line width related formating.
21458         * parse.h (source_end_java_method, resolve_expression_name,
21459         complete_class_decl, maybe_create_class_interface_decl,
21460         check_class_interface_creation): New static function declarations.
21461         (java_layout_parsed_class, java_method_add_stmt): New function
21462         declarations.
21463         (struct parser_ctxt): Field mark_class_generate removed. New
21464         fields class_list and artificial_constructor.
21465         * parse.y: Fixed typo in header.
21466         (class_declaration:): Call complete_class_decl when class body
21467         parsed.
21468         (method_declaration:): Call source_end_java_method in pass 2 when
21469         the method body is defined.
21470         (postfix_expression:): Do expression name resolution on sub-rule
21471         name during pass 2.
21472         (create_class, create_interface): Merged common pieces.
21473         (check_class_interface_creation, maybe_create_class_interface_decl):
21474         New functions.
21475         (complete_class_decl): New function.
21476         (register_fields): Fixed line width related typo.
21477         (method_header): Correctly skip first argument when fixing
21478         argument line. Changed the loop.
21479         (java_check_circular_reference): Now use ctxp->class_list.
21480         (java_complete_class): Removed start/stop marking.
21481         (java_check_regular_methods): Now takes a class decl as an
21482         argument.  Add default constructor if none were encountered.
21483         (java_check_methods): Now use ctxp->class_list. Changed call to
21484         java_check_regular_methods.
21485         (source_start_java_method): Set DECL_ARG_TYPE for each function
21486         arguments.
21487         (source_end_java_method, java_method_add_stmt): New functions.
21488         (java_generate_parsed_class): No longer exists.
21489         (java_layout_parsed_class, java_register_parsed_class): New functions.
21490         (resolve_expression_name): New function.
21491
21492 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21493
21494         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21495         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21496         until pass initializations are done. Call read_import_dir with
21497         pass set to 0.
21498         * parse.h: (lookup_modifier_cl): New function declared.
21499         (INTERFACE_FIELD_MODIFIERS): New macro.
21500         (OBSOLETE_MODIFIER_WARNING): New macro.
21501         * parse.y: (register_fields): Class type and current field name in
21502         local variables. Check modifier(s) if adding field(s) to an interface.
21503         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21504         and report errors using the faulty modifier line context.
21505         (lookup_modifier_cl): New function.
21506         (read_import_dir): Detect and report default import processing
21507         failure.
21508
21509 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
21510
21511         Add a pair of -fassume-compiled/-fno-assume-compiled options.
21512         * class.c (is_compiled_class): Return 1 after making sure it
21513         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21514         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21515         * java-tree.h (flag_assume_compiled): Add decl.
21516         * lang.c (lang_f_options): Add the flag.
21517         (flag_assume_compiled): Add decl, default to 0.
21518
21519 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21520
21521         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21522         (is_compiled_class): Likewise.
21523         (layout_class): Likewise.
21524         (layout_class): Detect and lay out classes defined in source code.
21525         (interface_of_p, add_interface_do, may_add_interface): New
21526         function.
21527         (add_interface): Now use add_interface_do.
21528         (add_method_1): New function.
21529         (add_method): Now use add_method_1.
21530         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21531         (complete_start_java_method): New function.
21532         (start_java_mehod): Now call complete_start_java_method.
21533         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21534         (expand_invoke): Likewise and fixed typo.
21535         *gjava.c: (print_super_field): Use new argument to find_class
21536         DO_CLASS_FILE.
21537         (main): Likewise.
21538         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21539         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21540         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21541         IDENTIFIER_NODE.
21542         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21543         (add_method_1, push_class): New prototypes.
21544         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21545         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21546         directory where the class was found.
21547         (find_class): New argument DO_CLASS_FILE. Function find_class
21548         modified accordingly.
21549         *jcf-parse.c: (fix_class_path): New function.
21550         (load_class): Use new VERBOSE argument. load_class now finds and
21551         loads/parses .class/.java files. Save read_state of current_jcf
21552         if necessary.
21553         (java_parser_abort_on_error): New macro.
21554         (jcf_parse_source, parse_source_file): New function.
21555         (jcf_parse): Fixed typo.
21556         (yyparse): Call parse_source_file () only.
21557         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21558         writing the real class name back in the zip directory entry.
21559         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21560         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21561         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21562         (find_class): Prototype fixed.
21563         *lex.c: Added 1998 time stamp.
21564         Removed all static global variables, moved into the parser
21565         context data structure.. Now include unistd.h if SEEK_SET not
21566         defined.
21567         (java_init_lex): Rewritten.
21568         (java_sneak_unicode): Modified current unicode access in current line.
21569         (java_unget_unicode): Likewise.
21570         (java_allocate_new_line): New allocation management.
21571         (java_read_char): Modified access and storage of unget_utf8_value.
21572         New way of processing current unicode.
21573         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21574         (java_get_unicode): Now use the parser context.
21575         (java_lineterminator): Likewise.
21576         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21577         of the reentrant parser implementation. Function now use the
21578         parser context data structure and java_lval. Fixed production of
21579         the float and double constant "out of range" error message. Fixed
21580         obstack use. Return integer value when hitting a modifier. Now
21581         return type for TRUE, FALSE and other predefined types. Return
21582         identifier as a TREE_LIST list containing the current line context
21583         as the TREE_VALUE sub-node.
21584         (java_unicode_2_utf8): Fixed typo in declaration.
21585         (java_lex_error): Now use the parser context data structure.
21586         *lex.h: Added 1998 time stamp.
21587         (struct java_line): New fields ref_count and next.
21588         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21589         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21590         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21591         *parse.h: Added 1998 time stamp.
21592         (java_parse_source_file): Renamed from parse_source_file.
21593         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21594         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21595         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21596         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21597         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21598         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21599         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21600         (struct parser_ctxt): New data structure to keep the parser context.
21601         *parse.y: Added 1998 time stamp, got rid of static global variables.
21602         (java_error_count, ctxp): New global variables.
21603         (%union): New value field.
21604         (numeric_type, integral_type): Rules removed.
21605         (primitive_type): Rule defined to handle integral, float, double and
21606         boolean types.
21607         (qualified_name, package_declaration,
21608         single_type_import_declaration, type_import_on_demand_declaration,
21609         modifiers, class_declaration, super, interfaces,
21610         interface_type_list, class_body, field_declaration,
21611         field_declaration, variable_declarators, variable_declarator,
21612         variable_declarator_id, method_declaration, method_header,
21613         formal_parameter_list, formal_parameter, method_body, block,
21614         static, interface_declaration, extends_interfaces,
21615         abstract_method_declaration, local_variable_declarators): Rules now
21616         define actions.
21617         (force_error, do_warning): New global statics.
21618         (push_parser_context, parser_context_save_global,
21619         parser_context_restore_global, pop_parser_context): New functions.
21620         (yyerror): Now uses the global parser context. Fixed use of obstack.
21621         (parse_error, parse_error_context, parse_warning_context,
21622         java_accstring_lookup, redefinition_error, check_modifiers,
21623         parser_add_interface, create_interface, create_class, find_field,
21624         duplicate_declaration_error, register_fields, method_header,
21625         check_modifiers_consistency, check_abstract_method_header,
21626         method_declarator, parser_qualified_classname,
21627         parser_check_super_interface, parser_check_super,
21628         parser_chain_incomplete_item, java_check_circular_reference,
21629         layout_class_from_source, java_complete_class,
21630         complete_method_decl, resolve_class, complete_class_report_errors,
21631         java_check_final, check_method_redefinition,
21632         java_check_regular_methods, java_check_abstract_methods,
21633         java_check_methods, lookup_java_interface_method2,
21634         lookup_java_method2, lookup_cl, find_name_in_single_imports,
21635         process_imports, find_in_imports, read_import_entry,
21636         read_import_dir, find_in_imports_on_demand,
21637         check_pkg_class_access, not_builtin_p, declare_local_variables,
21638         source_start_java_method, java_generate_parsed_class): New
21639         functions.
21640         *typeck.c: (signature_include_return): New global variable.
21641         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21642         to add the function returned type in the signature.
21643
21644 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
21645
21646         * jcf-io.c (open_in_zip): Use strncmp and LEN.
21647
21648 1998-01-29  Dave Brolley  <brolley@cygnus.com>
21649
21650         * Make-lang.in (java.info): Added.
21651         (java.install-info): Added
21652
21653 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
21654
21655         * Makefile.in (clean): Also remove java/parse.c.
21656
21657 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
21658
21659         Add a pair of -fbounds-check/-fno-bounds-check options.
21660         * lang.c (lang_decode_option): Add code to grok arguments.
21661         (flag_bounds_check): Add decl.
21662         (lang_f_options): New array w/ the option in it.
21663         * java-tree.h (flag_bounds_check): Add decl.
21664         * lang-options.h: New file.
21665         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21666         of a static macro value.
21667         (JAVA_ARRAY_EXCEPTION): Delete macro.
21668
21669 1998-01-23  Per Bothner  <bothner@cygnus.com>
21670
21671         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
21672         * expr.c (build_anewarray):  Add missing promote_type.
21673
21674 1998-01-22  Per Bothner  <bothner@cygnus.com>
21675
21676         Add array types with known length to optimize bounds checking.
21677         * typeck.c (build_java_array_type):  Take length parameter.
21678         (java_array_type_length, build_prim_array_type):  New functions.
21679         * java-tree.h:  Update for new functions.
21680         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21681         * class.c:  Use build_prim_array_type.
21682         * expr.c (can_widen_reference_to):  Handle known-length array types.
21683         (verify_jvm_instructions):  Keep track of integer push instructions
21684         followed by newarray/anewarray, so we can build known-length arrays.
21685         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
21686         (java_array_data_offset):  New function.
21687         (build_java_array_length_access):  New function.  Optimize if constant.
21688         (build_java_arrayaccess):  Constant fold bounds check.
21689         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
21690         (build_newarray, build_anewarray):  New functions.
21691         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
21692         * verify.c (merge_types):  Handle known-lengh array types.
21693
21694 1998-01-19  Per Bothner  <bothner@cygnus.com>
21695
21696         * expr.c (expand_byte_code):  Fix performace bug, which caused
21697         searching linenumber_table to be linear rather than constant.
21698
21699 1997-12-12  Per Bothner  <bothner@cygnus.com>
21700
21701         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
21702
21703         * decl.c, java-tree.h (soft_fmod_node):  New global.
21704         * decl.c (init_decl_processing):  Define __builtin_fmod.
21705         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
21706         using __builtin_fmod.
21707
21708 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21709
21710         * keyword.h: New file, output of keyword.gperf as processed by
21711         gperf.
21712         * lex.c (java_lex_init): Initialize java_error_flag.
21713         * parse.c (YYERROR_NOW): Uses java_error_flag.
21714         * parse.y: New static java_error_flag. Useless definition of
21715         buffer_error gone.
21716         * parse.y (java_error): Portable error recovery using
21717         java_error_flag (not yet completely tuned).
21718
21719 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
21720
21721         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21722
21723 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21724
21725         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21726         (parse.c, lex.c, keyword.h): New rules for Java source code
21727         front-end.
21728         * parse.c: Renamed into jcf-parse.c.
21729         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21730         * keyword.gperf: New file, Java keywords.
21731         * parse.y: New file, Java language grammar.
21732         * parse.h: New file, Java language grammar definitions.
21733         * lex.c: New file, Java language lexer.
21734         * lex.h: New file, Java language lexer definitions.
21735
21736 1997-12-03  Per Bothner  <bothner@cygnus.com>
21737
21738         * decl.c (clinit_identifier_node), java-tree.h:  New global.
21739         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
21740         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
21741         * expr.c (expand_java_field_op):  Check for invalid assignment
21742         to final field.
21743
21744         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
21745
21746 1997-10-27  Per Bothner  <bothner@cygnus.com>
21747
21748         * verify.c (verify_jvm_instructions):  When processing a handler,
21749         attempt to set the current_subr to the right value.
21750         (More complicated code combines Sep 17 and Oct 22 versions.)
21751
21752 1997-10-24  Per Bothner  <bothner@cygnus.com>
21753
21754         * class.c (push_class):  Figure out (guess) name of source file.
21755         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
21756         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
21757         (parse_class_file):  Change return type from int to void.
21758         Call debug_start_source_file/debug_end_source_file.
21759
21760         * expr.c (build_java_binop):  Fix masking 2nd operand.
21761         * decl.c (init_decl_processing):  Set sizetype first.
21762
21763 1997-10-22  Per Bothner  <bothner@cygnus.com>
21764
21765         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
21766         (Revert Sep 17 change.)
21767
21768 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21769
21770         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21771         .class extension in their name and fix thing so we don't process
21772         them parse_zip_file_entries().
21773         (parse_zip_file_entries): Cleaned unused local variables.
21774
21775 1997-10-20  Per Bothner  <bothner@cygnus.com>
21776
21777         * expr.c (can_widen_reference_to):  Allows equal array element types.
21778         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
21779         * jcf-dump.c (RET):  Get (and print) index.
21780
21781         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21782         Promote element type to POINTER_TYPE.
21783
21784 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21785
21786         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21787         find_in_current_zip, jcf_figure_file_type): Moved from
21788         jcf-reader.c to parse.c.
21789         * zextract.c: (read_zip_archive): takes file_comment_length possible
21790         field into account.
21791
21792 1997-10-20  Per Bothner  <bothner@cygnus.com>
21793
21794         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
21795
21796         * verify.c (merge_types):  Handle array types even better ...
21797
21798 1997-10-17  Per Bothner  <bothner@cygnus.com>
21799
21800         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
21801
21802         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
21803         * class.c (make_class_data):  Don't build fields_decl if no fields.
21804         When building fields_decl, skip if DECL_ARTIFICIAL.
21805
21806         * expr.c (java_stack_swap):  Update stack_type_map.
21807         * verify.c (merge_types):  Handle array types better.
21808
21809 1997-10-15  Per Bothner  <bothner@cygnus.com>
21810
21811         * class.c (add_field):  Don't promote short integral fields to
21812         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21813         * expr.c (push_value):  Promote and convert short integral values.
21814
21815         * decl.c, java-tree.h (integer_two_node):  New constant node.
21816         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
21817
21818 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21819
21820         * class.c (append_gpp_mangled_type): Use function argument
21821         unpromoted type to generate mangled name.
21822
21823 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21824
21825         * constants.c (build_constant_data_ref): Now uses current_class
21826         instead of main_class.
21827         (build_constants_constructor): Now uses current_class instead of
21828         main_class.
21829         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21830         of the global variable SeepZipFiles done here.
21831         * zextract.c (read_zip_archive): extra_field optional field taken
21832         into account while computing the position of the class file in the
21833         archive.
21834         * verify.c (verify_jvm_instructions): Use current_jcf to search
21835         the constant pool.
21836         * parse.c (load_class): First search for the class to load in the
21837         current zip file. Saves current_jcf (restored before returning
21838         from that function). Don't call JCF_FINISH in the class was found
21839         in the current ZIP file.
21840         (jcf_parse): If the class was found in the current ZIP file, save
21841         its tree_constant_pool (for later reuse).
21842         (parse_class_file): New function. Process each method defined in
21843         the current class and record the class as to be later registered.
21844         (yyparse): Rewritten. Figure the type of the current file and switch
21845         accordingly.
21846         * lang.c: New global variable current_jcf.
21847         (lang_init): Removed compiling_from_source test (done later, in
21848         yyparse). Removed call the jcf_parse ().
21849         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21850         (typedef struct JCF): New fields seen_in_zip (to mark a class found
21851         in the current ZIP file) and zip_offset (offset to the class data in
21852         the current zip file).
21853         * jcf-reader.c: zipfile.h included.
21854         localToFile: New ZipFileCache static global variable
21855         (parse_zip_file_entries): New function. Browse the current ZIP
21856         file directory and process each class found.
21857         (process_zip_dir): New function. Register each class found in the
21858         ZIP file directory. The class aren't parsed but a valid JCF is
21859         link to each of them.
21860         (find_in_current_zip): New function. Search for a class in the
21861         current ZIP file directory. If found, prepare the class so that it
21862         can be loaded.
21863         (jcf_figure_file_type): New function. Examine the file structure
21864         to figure a class file, a ZIP file. If none of these categories are
21865         matched, a source file is assumed.
21866         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21867         SeenZipFile: New global variable.
21868         (open_in_zip): Use zipmember's length to accelerate the search for
21869         a member. If zipmember was NULL and zip file successfully read,
21870         return 0.
21871         * java-tree.h: New global variable current_jcf declared.  Added
21872         declaration for current_constant_pool_tags, current_constant_pool_data,
21873         current_constant_pool_length, current_constant_pool_data_ref.
21874         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21875         store the JCF of classes seen in a zip file) and tree *constant_pool
21876         (to save a loaded class constant pool). current_class declared here.
21877         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21878         retrieve method_ref_constant.
21879         (PUSHC): java_push_constant_from_pool now uses current_jcf.
21880         (OBJECT): get_class_constant now uses current_jcf.
21881         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21882         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21883         (expand_invoke): Now uses current_class instead of main_class
21884         (build_class_init): Now uses current_class instead of main_class
21885         * class.c: New static global variable registered_class.
21886         (register_class): New function.
21887         (emit_register_class): Modified to use registered_class instead of
21888         main_class
21889         (is_compiled_class): Now take into account class seen in the archive.
21890
21891 1997-10-06  Per Bothner  <bothner@cygnus.com>
21892
21893         * except.h:  Renamed to: java-except.h.
21894         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
21895         * except.c:  Add semi-working (commented out) implementation.
21896
21897         * expr.c (expand_iinc):  Add needed flush_quick_stack.
21898         * parse.c (set_source_filename):  New function.
21899         (give_name_to_class):  Set input_filename from package.classname.java.
21900
21901         * jcf-io.c (find_class):  Don't look first in ".".
21902
21903 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21904
21905         * zextract.c (read_zip_archive): Now takes into account the
21906         extra_field field.
21907         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21908
21909 1997-09-20  Per Bothner  <bothner@cygnus.com>
21910
21911         * constants.c, java-tree.h (build_internal_class_name):  New function.
21912         (alloc_class_constant):  Re-implement using build_internal_class_name.
21913         * class.c (make_class_data):  Likewise.
21914         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
21915
21916 1997-09-17  Per Bothner  <bothner@cygnus.com>
21917
21918         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
21919         to NULL before pushing an exception handler target.
21920
21921         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
21922         (java_stack_swap, java_stack_dup):  Re-write to be safe from
21923         clobbering registers.
21924         (build_class_init):  New function.
21925
21926 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21927
21928         * typeck.c (build_java_array_type): Temporary use
21929         permanent_obstack to create the array 'length' field.
21930         * expr.c (lookup_label): Temporay use permanent_obstack to create
21931         label if not found.
21932         * class.c (push_super_field): Tempory use permanent_obstack.
21933
21934 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21935
21936         * typeck.c (type_for_mode): Now handles double_type_node and
21937         float_type_node.
21938         * verify.c (verify_jvm_instructions): The instruction following
21939         the wide bytecode is checked. OPCODE_ret added to the list of
21940         wide.
21941
21942 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21943
21944         * class.c (make_class): Temporary use permanent_obstack. Set the
21945         class CLASS_P field to 1.
21946         (push_class): Temporary use permanent_obstack.
21947         (set_super_info): Temporary use permanent_obstack.
21948         (add_method): Temporary use permanent_obstack, set
21949         METHOD_TRANSIENT().
21950         (add_field): Temporary use permanent_obstack. Sets
21951         FIELD_VOLATILE() and FIELD_TRANSIENT().
21952         (build_class_ref): Temporary use permanent_obstack if the class
21953         isn't compiled.
21954         (build_static_field_ref): Temporary use permanent_obstack when
21955         creating field's rtl.
21956         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
21957         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
21958         and fields. Function finalized, as far as flag handling.
21959         (push_class_static_dummy_field): Temporary use permanent_obstack.
21960         (emit_register_class): Force generation of class registration at
21961         -O3 or deeper.
21962         * decl.c (end_java_method): Call permanent_allocation() before
21963         returning.
21964         * expr.c (can_widen_reference_to): Added comment to interface
21965         handling, fixed typo.
21966         (lookup_field): Now uses CLASS_P() to correct FIXME
21967         (expand_invoke): Verification on public && !static &&
21968         !abstract moved into soft_lookupinterfacemethod (kaffe).
21969         Use Object class dtable if objectref is an array when expanding
21970         invokeinterface.
21971         (java_push_constant_from_pool): Temporary use permanent_obstack
21972         for CONSTANT_string
21973         * parse.c (get_ref_constant): Temporary use permanent_obstack to
21974         create constant references.
21975         (get_constant): Temporary use permanent_obstack to create constant.
21976         (load_class): Temporary use permanent_obstack to load class.
21977         (jcf_parse): Temporary use permanent_obstack to perform class
21978         layout.
21979         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
21980         (build_java_signature): Temporary use permanent_obstack.
21981         * verify.c: (verify_jvm_instruction): removed unnecessary verification
21982         on ACC_SUPER flag.
21983         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
21984         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
21985         (CLASS_P): Defined
21986
21987 1997-09-11  Per Bothner  <bothner@cygnus.com>
21988
21989         * class.c (append_gpp_mangled_type):  Fix typo.
21990         (emit_register_class):  Use main_class to get class object, rather
21991         than looking for no-longer-existing static decl starting with _CL.
21992         * typeck.c (parse_signature_type):  Promote array element type
21993         if it is a RECORD_TYPE.
21994
21995 1997-09-10  Per Bothner  <bothner@cygnus.com>
21996
21997         * class.c (push_class_static_dummy_field):  New function.
21998         (mangle_static_field):  New. Do G++-style mangling of static fields.
21999         (layout_class):  Mandle static fields here, not in add_field.
22000         (build_class_ref):  The class object is now a dummy static field.
22001         * decl.c (find_local_variable):  Look for best, instead of first match.
22002         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22003         (build_java_athrow):  Don't check here if exception is Throwable.
22004         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22005         (TYPE_USED):  Removed.  No longer used ...
22006         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22007         * verify.c (push_pending_label):  New function.
22008         (push_pending_block):  Renamed to check_pending_block.
22009         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22010         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22011         re-checking possible handlers) after a store (less wasted work).
22012         Check for null handler (finally) before calling add_handler.
22013         Various changes to (finally?) correctly handle try/finally.
22014
22015 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22016
22017         * class.c: Include stdio.h.
22018
22019 1997-09-04  Per Bothner  <bothner@cygnus.com>
22020
22021         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22022         to make sure class is initialized before static/special invoke.
22023
22024         * verify.c (verify_jvm_instructions):  On a store instruction,
22025         call find_local_variable to force pre-allocation of decl and rtx.
22026         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22027
22028 1997-09-03  Per Bothner  <bothner@cygnus.com>
22029
22030         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22031         (make_field_value): Call build_java_signature when needed.
22032         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22033         * expr.c (build_java_athrow):  Don't push_value of exception.
22034         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22035         match specification of [fd]cmp[lg] for NaNs.
22036         (expand_byte_code):  Add support for exception handler ranges.
22037         * except.c:  Add skeleton for EH code-generation.
22038         * verify.c (merge_types):  Treat all promoted integral types as equal.
22039         * constants.c (build_constants_constructor):  To force creation of
22040         current_constant_pool_data_ref, call build_constant_data_ref.
22041
22042         * javaop.def (lload):  Fix typo.
22043         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22044
22045 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22046
22047         * parse.c: Don't include function.h.
22048
22049 1997-08-27  Per Bothner  <bothner@cygnus.com>
22050
22051         * except.[ch]:  New files.
22052         * Makefile.in (JAVA_OBJS):  Add except.o
22053         * expr.c:  Temporary warning about unimplemented exceptions.
22054         * verify.c:  Verify exception handlers.
22055
22056         * jcf-dump.c (disassemble_method):  Print exception table.
22057
22058 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22059
22060         * expr.c (verify_jvm_instructions): Started a thorough
22061         verification of invoke* bytecodes.
22062         (expand_byte_code): flush quick stack if PC is the target of a
22063         branch.  and undef RET (conflicting with config/i386/i386.h).
22064         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22065         used.
22066         (expand_invoke): Now handles invokeinterface and do more
22067         verification according to the bytecode.
22068         (lookup_field): Don't try to load the class if processing
22069         dtable_type.
22070         (can_widen_reference_to): Now handles interfaces.
22071         * decl.c (init_decl_processing): New global variable
22072         soft_lookupinterfacemethod_node, declared in java-tree.h.
22073         Call set_super_info on string_type_node.
22074         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22075         defined.
22076         * class.c (set_super_info): Fills the CLASS_* flags according to
22077         access_flags.
22078         (get_access_flags_from_decl): Handles all class flags.
22079
22080 1997-08-26  Per Bothner  <bothner@cygnus.com>
22081
22082         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22083         * parse.c (yyparse):  Check for abstract method, and missing code.
22084         * expr.c (expand_byte_code):  Change interface.
22085         * lang.c (put_decl_node):  Print promoted types prettier.
22086         * verify.c (verify_jvm_instruction):  Change interface.
22087         Partial support for scanning exception table.
22088         For load instructions, handle promoted integral types.
22089
22090 1997-08-21  Per Bothner  <bothner@cygnus.com>
22091
22092         * verify.c:  New file, with contents moved from expr.c.
22093         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22094         * typeck.c (is_array_type_p):  Moved here from expr.c.
22095         * java-tree.h:  Add some now-needed function declarations.
22096         * Makefile.in (JAVA_OBJS): Added verify.o.
22097
22098 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22099
22100         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22101         METHOD_ABSTRACT flag.
22102
22103         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22104         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22105         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22106
22107         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22108         variables.
22109         (start_java_method): Hook for SYNCHRONIZED methods.
22110
22111         * expr.c (build_java_jsr, build_java_ret): New functions
22112         (JSR,PRE): New macros
22113         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22114         (verify_jvm_instructions): tableswitch, lookupswitch,
22115         monitorenter, monitorexit, goto_w: verified.
22116         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22117         (build_java_monitor): New function.
22118         (MONITOR_OPERATION): Modified to call build_java_monitor()
22119         (verify_jvm_instructions): Started a thorough verification of
22120         invoke* bytecodes.
22121
22122 1997-08-19  Per Bothner  <bothner@cygnus.com>
22123
22124         Support verification of jsr/ret subroutines (used for try/finally).
22125         * decl.c (return_address_type_node):  New type node.
22126         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22127         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22128         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22129         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22130         TYPE_USED):  New macros for special types in type_map.
22131
22132         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22133         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22134         BCODE_JUMP_TARGET.
22135         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22136
22137         * expr.c (can_widen_reference_to):  New function.
22138         (pop_type):  Use it.
22139         (merge_type_state):  Support handling start of subroutine.
22140         (push_pending_block):  Return char* error message, instead of calling
22141         fatal on an error.  Also handle subroutines.
22142         (verify_jvm_instructions):  Handle errors from push_poending_block.
22143         Support jsr and ret instructions.
22144
22145 1997-08-19  Per Bothner  <bothner@cygnus.com>
22146
22147         * jcf-io.c (find_classfile):  Fix thinko.
22148         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22149
22150 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22151
22152         * Makefile.in (BISON): Remove.
22153
22154 1997-08-07  Per Bothner  <bothner@cygnus.com>
22155
22156         * Makefile.in:  Convert to autoconf.
22157         * config-lang.in (outputs):  Added java/Makefile.
22158
22159         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22160         Rename cc1java to jc1.
22161
22162         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22163         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22164
22165         * class.c (class_depth):  Do load_class if needed.
22166
22167         Mostly better verification.
22168         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22169         (init_decl_processing):  Change return type of soft_checkcast.
22170         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22171         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22172         lang_print_error):  New functions.
22173         (lang_init):  Set global hook print_error_function to lang_print_error.
22174         * expr.c:  In the type_map ptr_type_node is only used for null now.
22175         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22176         (merge_types):  Dererence pointer to record types before comparing.
22177         (decode_newarray_type, merge_types):  On error just return NULL.
22178         (build_java_binop):  Add preliminary implementation (with warning)
22179         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22180         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22181         (expand_compare, expand_java_goto, expand_java_call):  Don't
22182         push_pending_block, since that only makes sense when verifying.
22183         (merge_type_state):  Different return codes.
22184         (push_pending_block):  A block may need to be verified more than once.
22185         (expand_byte_code):  Warn about unused code at code generation time.
22186         (verify_jvm_instruction):  Changed logic, since code may need to be
22187         re-verified if type-state has changed.  Also, better error handling.
22188         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22189         Improve newarray, anewarray, ?aload, athrow,
22190         * java-tree.h (LABEL_CHANGED):  New macro.
22191
22192 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22193
22194         * decl.c (soft_athrow_node): New global variable initialized.
22195         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22196         * typeck.c (convert): Added support for REAL_TYPE.
22197         (convert_to_char): New function.
22198         (convert): Handle CHAR_TYPE.
22199         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22200         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22201         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22202         promoted type.
22203         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22204         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22205         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22206         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22207         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22208         to Use The Right Things.
22209         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22210         compatible with INT. BOOLEAN is made equivalent to BYTE.
22211         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22212         OPCODE_ifnonnull): Now supported.
22213         (build_java_athrow): New function.
22214
22215 1997-08-04  Per Bothner  <bothner@cygnus.com>
22216
22217         Rename method name <init> to match G++ (and fix mangling).
22218         * class.c (layout_class):  Replace method name of <init> by class name.
22219         (make_method_value):  Do inverse renaming of constructor from <init>.
22220         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22221         * typeck.c (lookup_java_constructor):  New function.
22222         * expr.c (expand_invoke):  If method_name is <init>, call
22223         lookup_java_constructor to find constructor.
22224
22225         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22226
22227 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22228
22229         * parse.c (get_class_constant): Modified to handle array "classes"
22230         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22231         wide type.
22232         (convert): Modified to handle real type.
22233         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22234         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22235         variables declared.
22236         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22237         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22238         global variables initialized.
22239         (find_local_variable): Handles the case of a pointer
22240         (end_java_method): Restore the use of one more scope
22241         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22242         build_java_array_length_access, expand_java_arrayload,
22243         expand_java_arraystore, expand_java_array_length,
22244         expand_java_multianewarray, expand_java_anewarray,
22245         build_java_check_indexed_type, is_array_type_p,
22246         build_java_throw_out_of_bound_exception): New functions.
22247         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22248         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22249         OPCODE_<t>aload): Implemented code for verification.
22250         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22251         ARRAY_NEW_MULTI): Macro defined.
22252         (CONVERT): Modified to invoke convert().
22253         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22254
22255 1997-07-31  Per Bothner  <bothner@cygnus.com>
22256
22257         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22258         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22259         (make_class_data):  Field name needs '/' as package prefix.
22260         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22261
22262 1997-07-25  Per Bothner  <bothner@cygnus.com>
22263
22264         Implement debug information for local variables.
22265         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22266         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22267         DECL_LOCAL_SLOT_CHAIN):  New macros.
22268         (struct lang_decl_var):  New type.
22269         * parse.c (give_name_to_locals):  Move to decl.c.
22270         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22271         (start_java_method):  Re-write parameter handling.
22272         (pending_local_decls):  New global variable.
22273         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22274         (find_local_variable):  Accept pc so we can skips decls not in range.
22275         (struct binding_level):  Add end_pc field.
22276         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22277         (various):  Change so current pc gets passed to find_local_variable.
22278
22279         * decl.c (init_decl_processing):  Re-arrange fields in
22280         class_type_node and and method_type_node to match kaffe 0.9.1.
22281         * class.c (make_method_value, make_class_data):  Update
22282         initializations to match.
22283
22284 1997-07-16  Per Bothner  <bothner@cygnus.com>
22285
22286         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22287         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22288         (push_super_field):  New function.
22289         (make_class_data):  Handle inheritance of class static initializer.
22290         (layout_class):  New name mangling.
22291         * constants.c (build_constant_data_ref):  Init type of data array
22292         to a one-element array.
22293         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22294         * decl.c:  Rename class_type, object_type etc to class_type_node,
22295         object_type_node etc.  Make former inherit from latter.
22296         * expr.c (expand_invoke):  Add cast of function address.
22297         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22298         * parse.c (yyparse):  Don't call layout_class here.
22299         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22300
22301 1997-06-14  Per Bothner  <bothner@cygnus.com>
22302
22303         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22304         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22305         (alloc_class_constant):  New.
22306         * expr.c (expand_invoke):  Make sure method's class is initialized.
22307         * class.c (interits_from_p, emit_register_class):  New functions.
22308         * parse.c (yyparse):  Call emit_register_class.
22309
22310 1997-06-09  Per Bothner  <bothner@cygnus.com>
22311
22312         * constants.c:  New file, to handle constant pool.
22313         * Makefile.in (JAVA_OBJS):  Add constants.o.
22314         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22315         (pushdecl_top_level):  New.
22316         * parse.c (layout_class):  Moved to class.c.
22317         * expr.c (java_push_constant_from_pool):  New function.
22318         * class.c (build_class_ref):  Make work fully
22319         (make_class_data):  Emit super-class, constant pool, interface vector.
22320
22321 1997-06-03  Per Bothner  <bothner@cygnus.com>
22322
22323         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
22324         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
22325         * class.c (class_depth):  New function.
22326         (lookup_named_class):  Replaced by new function lookup_class.
22327         * decl.c (object_type_node, string_type_node):  New.
22328         Remove various types that we no longer need.
22329         * expr.c (verify_jvm_instructions):  New separate verifier pass.
22330         (push_type, pop_type):  New functions for verifier.
22331         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
22332         (expand_byte_code):  Simplify, since we assume already verified.
22333         (expand_invoke):  Now mostly works.
22334         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22335         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
22336         * parse.c:  Wait to allocate class object until we know its name.
22337         (layout_class):  Calculate DECL_VINDEX for each virtual method.
22338         * typeck.c (get_array_type):  Rename to ...
22339         (build_java_array_type):  ... and provide working implementation.
22340         (build_java_signature):  New function - build Java signature of type.
22341         (set_java_signature):  New function - cache signature with type.
22342         (lookup_java_method):  New function.
22343
22344 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
22345
22346         * class.c (ident_subst):  Take extra SUFFIX parameter.
22347         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
22348         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
22349         (build_class_ref):  Actually implement.
22350         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
22351         * decl.c (builtin_function):  New.
22352         (init_decl_processing):  Update for current Kaffe.  Declare some
22353         builtin Kaffe functions.
22354         * expr.c (build_address_of):  New.
22355         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22356         Renamed (from expand_java_new etc), and added working implementations.
22357         (build_field_ref):  Now also handle static fields.
22358         (expand_invoke):  Implement invokestatic, and start implement rest.
22359         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
22360         * javaop.def:  Rename invokevirt -> invokevirtual.
22361         * lang.c (use_handles):  Removed.
22362         * parse.c:  Add support for ConstantValue attribute.
22363         Handle nested loading of a class.  (JPOOL_UTF):  New.
22364
22365 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
22366
22367         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
22368
22369 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
22370
22371         * Make-lang.in (java.install-man):  New empty rule.
22372         * typeck.c (set_local_type):  New function.
22373         * expr.c (STORE_INTERNAL):  Call find_local_variable,
22374         not find_stack_slot.  Call set_local_type.
22375
22376 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
22377
22378         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
22379         and building RECORD_TYPE CONSTRUCTORs.
22380         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22381
22382         * lang.c (use_handles):  Change the default to 0.
22383         * decl.c:  Define and build class_type, field_type, utf8const_type.
22384         * class.c (make_class_data, make_field_value,
22385         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22386         hashUtf8String, strLengthUtf8, mangled_classname:
22387         Functions to build reflective data structures.
22388         * parse.c (yyparse):  Call make_class_data.
22389
22390         * jcf-io.c (open_class, find_classfile):  New functions.
22391         * jcf-dump.c:  Support reading classfile from explicitly-named
22392         class file (without CLASSPATH searching).
22393
22394 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22395
22396         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
22397         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22398         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22399         (get_constant):  Now trivial for CONSTANT_Utf8.
22400
22401         * jcf.h:  Make NEW_CPOOL the default.
22402         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
22403
22404 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22405
22406         New directory.
22407
22408 \f
22409 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22410 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22411
22412 Copying and distribution of this file, with or without modification,
22413 are permitted in any medium without royalty provided the copyright
22414 notice and this notice are preserved.