OSDN Git Service

gcc/ada/
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
2
3         * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
4
5 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
6
7         * java-tree.h (union lang_tree_node): Check for TS_COMMON before
8         calling TREE_CHAIN.
9
10 2011-04-11  Martin Jambor  <mjambor@suse.cz>
11
12         * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
13         cgraph_node and handle returned NULL.
14
15 2011-03-25  Kai Tietz  <ktietz@redhat.com>
16
17         * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
18         instead of strcmp.
19         (set_source_filename): Likewise.
20         * win32-host.c (jcf_open_exact_case): Likewise.
21
22 2011-03-21  Kai Tietz  <ktietz@redhat.com>
23
24         PR target/12171
25         * lang.c (java_attribute_table): Adjust table.
26
27 2011-02-13  Joseph Myers  <joseph@codesourcery.com>
28
29         * jvspec.c (jvgenmain_spec): Remove %{a*}.
30
31 2011-01-21  Kai Tietz  <kai.tietz@onevision.com>
32
33         PR bootstrap/47215
34         * decl.c (java_init_decl_processing): Remove
35         va_list_type_node related type initializations.
36
37 2011-01-11  Kai Tietz  <kai.tietz@onevision.com>
38
39         PR bootstrap/47215
40         * decl.c (java_init_decl_processing): Initialize
41         long_integer_type_node.
42
43 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
44
45         PR bootstrap/47215
46         * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
47
48 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
49
50         * decl.c (java_init_decl_processing): Setup va_list_type_node.
51
52 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
53
54         * jcf-dump.c (version): Update copyright notice dates.
55
56 2010-12-15  Dave Korn  <dave.korn.cygwin@gmail.com>
57
58         * decl.c (java_init_decl_processing): Initialise integer_three_node.
59         * lang.c (put_decl_node): Handle nested function decls.
60
61 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
62
63         * jcf-parse.c: Don't include assert.h.
64         (java_parse_file): Use gcc_assert.
65
66 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
67
68         * lang.opt (static-libgcj): New option.
69
70 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
71
72         * jcf-parse.c: Don't include toplev.h.
73         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
74
75 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
76
77         * boehm.c: Don't include toplev.h.
78         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
79
80 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
81
82         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
83         verify-glue.c: Don't include toplev.h.
84         * Make-lang.in: Dependencies for above files changed to remove
85         toplev.h.
86
87 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
88
89         * boehm.c: Include "config.h" instead of <config.h>.
90         * builtins.c: Don't include <stdarg.h>.
91         * class.c: Don't include "stdio.h".
92         (O_BINARY): Don't define here.
93         * jcf-depend.c: Don't include <assert.h>.
94         (jcf_dependency_set_dep_file, jcf_dependency_init,
95         jcf_dependency_write): Use gcc_assert.
96         * jcf-io.c (O_BINARY): Don't define here.
97         * jcf-path.c: Don't include "tm.h".
98         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
99         * resource.c: Don't include "stdio.h".
100         (O_BINARY): Don't define here.
101         * verify-impl.c: Don't include <stdio.h>.
102
103 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
104
105         * jcf-parse.c (java_parse_file): Take no arguments.
106         * java-tree.h (java_parse_file): Update prototype.
107
108 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
109             Andrew Haley  <aph@redhat.com>
110
111         PR java/46386
112         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
113
114 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
115
116         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
117         * lang.c (java_handle_option): Take location_t parameter.
118
119 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
120
121         * expr.c (expand_java_field_op): Use %' in diagnostic.
122         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
123         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
124         * lang.c (java_post_options): Use %' in diagnostics.
125
126 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
127
128         PR middle-end/46314
129         * class.c: Include target.h.
130         (make_local_function_alias):
131         Use targetm.asm_out.generate_internal_label.
132         * expr.c (lookup_label, generate_name): Likewise.
133
134 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
135
136         PR bootstrap/44335
137         * jfc-parse.c (target.h): Include.
138         (handle_constant): Use targetm.words_big_endian and
139         targetm.float_words_big_endian.
140         (get_constant): Use targetm.float_words_big_endian.
141
142 2010-10-13  Richard Henderson  <rth@redhat.com>
143
144         * lang.c (java_eh_personality): Update call to
145         build_personality_function.
146
147 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
148
149         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
150         options.h.
151
152 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
153
154         * decl.c (java_init_decl_processing): Use build_function_type_list
155         instead of build_function_type.
156         * jcf-parse.c (java_emit_static_constructor): Likewise.
157         * builtins.c (initialize_builtins): Likewise.
158
159 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
160
161         * lang.c (java_init_options_struct): New.  Split out from
162         java_init_options.
163         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
164
165 2010-10-04  Andi Kleen <ak@linux.intel.com>
166
167         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
168         Add + to build rule.
169
170 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
171
172         * lang.opt: Don't use VarExists.
173
174 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
175
176         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
177         flag_force_classes_archive_check, flag_redundant, flag_newer,
178         flag_use_divide_subroutine, flag_use_atomic_builtins,
179         flag_use_boehm_gc, flag_hash_synchronization,
180         flag_check_references, flag_optimize_sci, flag_indirect_classes,
181         flag_indirect_dispatch, flag_store_check,
182         flag_reduced_reflection): Remove.
183         * jcf-dump.c (flag_newer): Remove.
184         * jcf.h (quiet_flag): Remove.
185         * parse.h (quiet_flag): Remove.
186
187 2010-09-28  Richard Henderson  <rth@redhat.com>
188
189         * lang.c: Include "target.h".
190         (java_eh_personality): Use targetm.except_unwind_info.
191         * Make-lang.in (lang.o): Update deps.
192
193 2010-09-27  Andrew Haley  <aph@redhat.com>
194
195         PR java/45773
196         * jvgenmain.c (main): Fix arg processing.
197
198 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
199
200         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
201         OPT_fhelp.
202         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
203         -dependencies, -encoding, -extdirs, -include-directory,
204         -include-directory=, -output-class-directory,
205         -output-class-directory=, -resource, -resource=,
206         -user-dependencies): New.
207
208 2010-09-16  Richard Guenther  <rguenther@suse.de>
209
210         * jcf-parse.c (current_file_list): Remove.
211         (java_parse_file): Use build_translation_unit_decl.  Adjust.
212
213 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
214
215         * lang.opt (d): New.
216
217 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
218
219         PR java/45504
220         * jvgenmain.c (main): Check "-D XXX=YYY".
221
222 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
223
224         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
225
226 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
227
228         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
229         fCLASSPATH=): Mark as Java options and as aliases.
230         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
231         (lang_specific_driver): Don't handle options marked as aliases.
232         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
233
234 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
235
236         * Make-lang.in (jvspec.o): Update dependencies.
237         * jvspec.c: Include opts.h.
238         (PARAM_ARG): Remove.
239         (find_spec_file): Do not add leading -specs=.
240         (lang_specific_driver): Use cl_decoded_option structures.
241         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
242         extdirs, fmain=, s-bc-abi): New options.
243
244 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
245
246         * class.c: Use FOR_EACH_VEC_ELT.
247         * expr.c: Likewise.
248         * jcf-parse.c: Likewise.
249         * resource.c: Likewise.
250
251 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
252
253         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
254
255 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
256
257         * class.c (build_utf8_ref): Fix code formatting from previous commit.
258
259 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
260
261         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
262
263 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
264
265         * lang.c (java_handle_option): Update prototype and return value
266         type.
267
268 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
269
270         * lang.c (java_option_lang_mask): New.
271         (java_init_options): Update prototype.
272         (LANG_HOOKS_OPTION_LANG_MASK): Define.
273
274 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
275
276         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
277         * boehm.c: Likewise.
278         * class.c: Likewise.
279         * decl.c: Likewise.
280         * expr.c: Likewise.
281         * jcf-parse.c: Likewise.
282         * typeck.c: Likewise.
283         * verify-glue.c: Likewise.
284
285 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
286
287         * boehm.c: Include diagnostic-core.h in every file that includes
288         toplev.h.
289         * class.c: Likewise.
290         * constants.c: Likewise.
291         * decl.c: Likewise.
292         * except.c: Likewise.
293         * expr.c: Likewise.
294         * jcf-parse.c: Likewise.
295         * mangle.c: Likewise.
296         * mangle_name.c: Likewise.
297         * resource.c: Likewise.
298         * typeck.c: Likewise.
299         * verify-glue.c: Likewise.
300
301 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
302
303         PR bootstrap/44825
304         * class.c (make_class_data): Cast result of VEC_length calls to int.
305
306 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
307
308         * constants.c (build_constants_constructor): Use build_constructor
309         instead of build_constructor_from_list.
310         * class.c (make_method_value): Likewise.
311         (get_dispatch_table): Likewise.
312         (make_class_data): Likewise.
313         (emit_indirect_register_classes): Likewise.
314         (emit_symbol_table): Likewise.
315         (add_assertion_table_entry): Likewise.
316         (emit_assertion_table): Likewise.
317         (make_field_value): Use build_constructor_single instead of
318         build_constructor_from_list.
319
320 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
321
322         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
323         VEC.
324         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
325         instead of tree_cons.
326         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
327         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
328
329 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
330
331         * lang.c: Do not include except.h
332         * except.c: Likewise.
333         (doing_eh): New, moved from except.c (in gcc/) but removed the
334         do_warning flag.
335         (maybe_start_try): Update doing_eh call.
336         * Make-lang.in: Update dependencies.
337
338 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
339
340         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
341         of build_int_cst_wide.
342         * boehm.c (set_bit): Remove.
343         (mark_reference_fields): Use double_int type for 'mask' argument.
344         Use double_int_setbit instead of set_bit.
345         (get_boehm_type_descriptor): Use double_int_setbit instead of
346         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
347
348 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
349
350         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
351
352 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
353
354         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
355
356         * jcf-parse.c (java_parse_file): Likewise.
357         (process_zip_dir): Likewise.
358
359         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
360         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
361
362         * expr.c (add_type_assertion): Likewise.
363
364         * decl.c (make_binding_level): Likewise.
365         (java_dup_lang_specific_decl): Likewise.
366
367         * constants.c (set_constant_entry): Likewise.
368         (cpool_for_class): Likewise.
369
370         * class.c (add_method_1): Likewise.
371         (java_treetreehash_new): Likewise.
372
373         * java-tree.h (struct lang_type): Add variable_size GTY option.
374         (struct lang_decl): Likewise.
375
376         * jch.h (struct cpool_entry): Likewise.
377
378         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
379
380         * except.c (prepare_eh_table_type): Update
381         java_treetreehash_create call.
382
383         * class.c (add_method_1): Update java_treetreehash_create call.
384         (java_treetreehash_create): Remove parameter gc.  Use
385         htab_create_ggc.
386
387 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
388
389         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
390         diagnostics.
391
392 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
393
394         * except.c: Include tm.h.
395
396 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
397
398         * jvspec.c (lang_specific_driver): Use fatal_error instead of
399         fatal.  Use warning instead of error for warnings.
400
401 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
402
403         * expr.c (get_symbol_table_index): Add spaces in expression.
404
405 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
406
407         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
408         (struct lang_type): Change type of otable_methods, atable_methods, and
409         itable_methods to VECs.  Fix comment for atable_methods.
410         (emit_symbol_table): Take a VEC instead of a tree.
411         (get_symbol_table_index): Take a VEC * instead of a tree *.
412         * class.c (add_table_and_syms): Take a VEC instead of a tree.
413         (emit_symbol_table): Update for changed parameter type.
414         * expr.c (get_symbol_table_index): Likewise.
415
416 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
417
418         * buildings.c: Pretend to be a backend file by undefining
419         IN_GCC_FRONTEND (still need rtl.h here).
420
421 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
422
423         * java-tree.h (struct lang_decl_func): Change type of throws_list
424         field to a VEC.
425         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
426         of DECL_FUNCTION_THROWS.
427         * class.c (make_method_value): Likewise.
428
429 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
430
431         * class.c (utf8_decl_list): Delete.
432         (build_utf8_ref): Remove references to it.
433         * java-tree.h (all_class_list): Delete.
434         (predef_filenames): Delete.
435         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
436         Delete.
437         * jcf-parse.c (parse_roots): Decrease size to 2.
438         (current_file_list): Convert to a VEC.
439         (all_class_list): Declare.
440         (jcf_parse): Adjust for new type of all_class_list.
441         (java_layout_seen_class_methods): Likewise.
442         (predefined_filenames): Declare.
443         (add_predefined_file): Use it.
444         (predefined_filename_p): Likewise.
445         (java_parse_file): Adjust for new type of current_file_list.                                                                                                                                                     *
446
447 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
448
449         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
450         for interfaces.
451
452         PR debug/43260
453         * java-tree.h (pending_static_fields): New extern declaration.
454         (java_write_globals): New prototype.
455         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
456         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
457         of a static field push it into pending_static_fields vector.
458         * class.c (pending_static_fields): New variable.
459         (add_field): If static field is not DECL_EXTERNAL, push it into
460         pending_static_fields vector.
461         (java_write_globals): New function.
462
463 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
464
465         * expr.c (quick_stack): Change type to a VEC.  Update comment.
466         (tree_list_free_list): Delete.
467         (flush_quick_stack): Update for quick_stack type change.
468         (push_value): Likewise.
469         (pop_value): Likewise.
470
471 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
472
473         * java-gimplify.c: Do not include tm.h, toplev.h.
474         * typeck.c: Do not include tm.h.
475         * mangle_name.c: Do not include tm.h.
476         * jcf-dump.c: Do not include tm.h, ggc.h.
477         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
478         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
479         and timevar.h.
480         * jcf-parse.c: Do not include tm.h and tm_p.h.
481         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
482         target.h, and expr.h.
483         * except.c: Do not include tm.h, rtl.h, function.h.
484         * builtins.c: Do not include convert.h.  Explain why RTL headers
485         have to be included here.
486         * verify-glue.c: Do not include tm.h.
487         * jcf-depend.c: Do not include tm.h.
488         * jcf-reader.c: Include ggc.h.
489         * jcf-io.c: Do not include tm.h, toplev.h.
490         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
491         gimple.h.
492         * lang.c: Do not include rtl.h, expr.h.
493         * Make-lang.in: Update dependencies.
494
495 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
496
497         * jcf-parse.c: Include bitmap.h.
498         * Make-lang.in: Update dependencies.
499
500 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
501
502         PR debug/43521
503         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
504         PARM_DECL.
505
506 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
507
508         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
509         build_int_cst_wide_type.
510
511 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
512
513         * expr.c (pop_arguments): Fix use of undeclared variable.
514
515 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
516
517         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
518         build_call_list.
519         (pop_arguments): Return a VEC instead of a tree.  Take a method type
520         rather than a list of argument types.
521         (rewrite_rule): Change signature. of rewrite_arglist member.
522         (rewrite_arglist_getcaller): Update signature.
523         (rewrite_arglist_getclass): Likewise.
524         (maybe_rewrite_invocation): Update for rewrite_arglist change.
525         (build_known_method_ref): Take a VEC instead of a tree.
526         (invoke_build_dtable): Likewise.
527         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
528         instead of build_call_list.
529         (build_jni_stub): Use build_call_vec instead of build_call_list.
530         * java-tree.h (maybe_rewrite_invocation): Update declaration.
531         (build_known_method_ref): Likewise.
532         (invoke_build_dtable): Likewise.
533
534 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
535
536         PR 44103
537         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
538         vector.  Move call to build_constructor...
539         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
540         TREE_CONSTANT on the constructor.
541         (PUSH_SUPER_VALUE): Change first argument to a vector.
542         (PUSH_FIELD_VALUE): Likewise.
543         * resource.c (compile_resource_data): Update calls to above macros.
544         * constants.c (build_constants_constructor): Likewise.
545         * class.c (build_utf8_ref): Likewise.
546         (make_field_value): Likewise.
547         (make_method_value): Likewise.
548         (add_table_and_syms): New function.
549         (make_class_data): Call it.  Update calls to above macros.
550         (build_symbol_table_entry): New function.
551         (build_symbol_entry): Call it.  Update calls to above macros.
552         (emit_symbol_table): Likewise.
553         (make_catch_class_record): Update calls to above macros.
554         (build_assertion_table_entry): New function.
555         (add_assertion_table_entry): Call it.
556         (emit_assertion_table): Likewise.
557
558 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
559
560         PR 40989
561         * lang.c (java_handle_option): Add argument kind.
562
563 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
564
565         * decl.c (java_init_decl_processing): Remove argument in call to
566         initialize_sizetypes
567
568 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
569
570         * exception.cc (_Jv_Throw): Avoid set but not used warning.
571         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
572         sizeof to avoid set but not used warnings.
573
574 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
575
576         * lang.c (java_post_options): Constify variable "dot".
577
578         * jcf-parse.c (set_source_filename): Constify variable "dot".
579         (load_class): Constify variable "separator".
580         Use get_identifier_with_length.
581
582         * jvspec.c (lang_specific_driver): Constify two variables named "p".
583
584 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
585
586         * jcf-dump.c (version): Update copyright notice dates.
587
588 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
589
590         * jvspec.c (lang_specific_driver): Remove unused
591         saw_verbose_flag variable.
592         * jcf-dump.c (main): Remove unused general_purpose_bits
593         variable.
594         * builtins.c (initialize_builtins): Remove unused float_ftype_float
595         variable.
596         * expr.c (java_stack_pop): Remove unused val variable.
597         (build_jni_stub): Remove unused res_type variable.
598         * verify-impl.c (check_field_constant): Remove unused len variable.
599
600 2009-10-20  Joel Dice <dicej@mailsnare.net>
601
602         PR java/28474
603         * mangle_name.c (append_unicode_mangled_name): Fix mangling
604         of names with multiple underscores and "U".
605         (unicode_mangling_length): Likewise.
606
607 2009-10-03  Simon Baldwin  <simonb@google.com>
608
609         * config-lang.in (lang_dirs): Remove zlib.
610
611 2009-09-28  Richard Henderson  <rth@redhat.com>
612
613         * builtins.c (initialize_builtins): Update call to
614         build_common_builtin_nodes.
615         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
616
617 2009-09-14  Richard Henderson  <rth@redhat.com>
618
619         * builtins.c (initialize_builtins): Update call to
620         build_common_builtin_nodes.
621         * decl.c (java_init_decl_processing): Don't call
622         default_init_unwind_resume_libfunc.
623         * except.c: Include tree-iterator.h.
624         (build_exception_object_var): New.
625         (build_exception_object_ref): Use it.
626         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
627         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
628         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
629
630 2009-09-13  Richard Guenther  <rguenther@suse.de>
631         Rafael Avila de Espindola  <espindola@google.com>
632
633         * decl.c (do_nothing): Remove.
634         (java_init_decl_processing): Do not set lang_eh_runtime_type.
635         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
636         * lang.c (java_eh_personality): New.
637         (java_eh_personality_decl): Likewise.
638         (LANG_HOOKS_EH_PERSONALITY): Define.
639
640 2009-09-03  Diego Novillo  <dnovillo@google.com>
641
642         * lang.c (lang_hooks): Remove const qualifier.
643
644 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
645
646         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
647         type.
648
649 2009-09-01  Richard Guenther  <rguenther@suse.de>
650
651         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
652         * java-tree.h (java_mark_addressable): Likewise.
653         * typeck.c (java_mark_addressable): Likewise.
654
655 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
656
657         * Make-lang.in (java.install-pdf): Install gcj.pdf in
658         $(pdfdir)/gcc, alongside the other manuals.
659
660 2009-08-12  Andrew Haley  <aph@redhat.com>
661
662         * builtins.c (compareAndSwapInt_builtin): Use
663         flag_use_atomic_builtins.
664         (compareAndSwapLong_builtin): Likewise.
665         (compareAndSwapObject_builtin): Likewise.
666         * jvspec.c: Add flag_use_atomic_builtins.
667         * gcj.texi: Likewise.
668         * java-tree.h: Likewise.
669         * lang.opt: Likewise.
670
671 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
672
673         PR debug/40990
674         * lang.c (put_decl_node): Outputs different level of information
675         depending on the verbosity level.
676
677 2009-07-31  Andrew Haley  <aph@redhat.com>
678
679         PR java/40867
680         * decl.c (java_replace_references): Set EXPR_LOCATION on all
681         generated expressions.
682         (binding_level.loc): new field.
683         (clear_binding_level): Initialize loc.
684         (set_input_location): New function.
685         (pushlevel): Set new binding_level.loc.
686         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
687         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
688         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
689
690 2009-07-17  Richard Guenther  <rguenther@suse.de>
691
692         PR c/40401
693         * java-gimplify.c (java_genericize): Do not gimplify here.
694         But replace all local references.
695         (java_gimplify_expr): Do not replace local references here.
696         (java_gimplify_modify_expr): Likewise.
697         * jcf-parse.c (java_parse_file): Do not finalize the CU or
698         optimize the cgraph here.
699         * decl.c (java_replace_reference): Make static.
700         (java_replace_references): New function.
701         (end_java_method): Clear base_decl_map.
702         * java-tree.h (java_replace_references): Declare.
703         (java_replace_reference): Remove.
704
705 2009-07-14  Taras Glek  <tglek@mozilla.com>
706             Rafael Espindola  <espindola@google.com>
707
708         * Make-lang.in (java.install-plugin): New target for
709         installing plugin headers.
710
711 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
712
713         * class.c: Replace %J by an explicit location. Update all calls.
714         
715 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
716
717         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
718
719 2009-06-29  Andrew Haley  <aph@redhat.com>
720
721         PR java/40590
722         * java-tree.h (cxx_keyword_p): New declaration.
723         * mangle_name.c (utf8_cmp): Move here from mangle.c.
724         (cxx_keywords): Likewise.
725         (cxx_keyword_p): Likewise.
726         (MANGLE_CXX_KEYWORDS): New macro.
727         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
728         (append_gpp_mangled_name): Likewise.
729         * mangle.c: Move code to mangle_name.c. 
730         (mangle_member_name): Don't call cxx_keyword_p.
731
732 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
733
734         * java-gimplify.c (java_gimplify_block): New argument to
735         build_empty_stmt.
736         * expr.c (force_evaluation_order): Same.
737         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
738         * class.c: Same.
739         * decl.c: Same.
740         * jcf-parse.c: Same.
741         * constants.c: Same.
742         * resource.c: Same.
743         * except.c: Same.
744         * builtins.c: Same.
745         * expr.c: Same.
746         * java-tree.h (PUSH_FIELD): Add location field.
747         
748 2009-06-09  Ian Lance Taylor  <iant@google.com>
749
750         * verify.h: Remove extern "C".
751
752 2009-06-07  Ian Lance Taylor  <iant@google.com>
753
754         * jcf-parse.c (handle_constant): Change local variable 'kind' to
755         unsigned int.
756
757 2009-06-01  Ian Lance Taylor  <iant@google.com>
758
759         * jcf-io.c (find_class): Use CONST_CAST.
760
761 2009-05-27  Ian Lance Taylor  <iant@google.com>
762
763         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
764         $(LINKER).
765         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
766
767 2009-05-26  Ian Lance Taylor  <iant@google.com>
768
769         * Make-lang.in (jvspec.o): Use $(COMPILER).
770         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
771         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
772
773 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
774
775         * Make-lang.in (GCJ): Renamed to...
776         (XGCJ): ... this.
777
778 2009-04-27  Ian Lance Taylor  <iant@google.com>
779
780         * builtins.c (java_builtins): Add casts to enum type.
781         * verify-impl.c (check_class_constant): Add cast to enum type.
782         (check_constant, check_wide_constant): Likewise.
783
784 2009-04-27  Richard Guenther  <rguenther@suse.de>
785
786         PR java/38374
787         * constants.c (build_constants_constructor): Retain the old
788         pointer type as valid TYPE_POINTER_TO after patching the
789         type of the constant pool decl.
790
791 2009-04-24  Ian Lance Taylor  <iant@google.com>
792
793         * jcf-parse.c (handle_constant): Add cast to enum type.
794
795 2009-04-21  Taras Glek <tglek@mozilla.com>
796
797         * builtins.c: Update GTY annotations to new syntax
798         * decl.c: Likewise
799         * java-tree.h: Likewise
800         * jcf.h: Likewise
801         * lang.c: Likewise
802
803 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
804
805         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
806         license notices.
807
808 2009-04-18  Ian Lance Taylor  <iant@google.com>
809
810         * verify-impl.c (verify_instructions_0): Add cast to enum type.
811
812 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
813
814         * builtins.c (compareAndSwapLong_builtin,
815         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
816         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
817
818 2009-03-31  Richard Guenther  <rguenther@suse.de>
819
820         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
821         the first operand of binary and comaprison expressions.
822
823 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
824
825         PR rtl-optimization/323
826         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
827         Give an error for -fexcess-precision=standard for processors where
828         the option is significant.
829
830 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
831
832         * lang.opt: Unify help text for -Wdeprecated.
833
834 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
835
836         * jcf-dump.c (version): Update copyright notice dates.
837
838 2009-01-16  Richard Guenther  <rguenther@suse.de>
839
840         PR tree-optimization/38835
841         PR middle-end/36227
842         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
843
844 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
845
846         PR bootstrap/38262
847         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
848
849 2008-11-04  Andrew Haley  <aph@redhat.com>
850
851         PR java/37068
852         * jcf-parse.c (java_emit_static_constructor): Don't call
853         cgraph_build_static_cdtor.  Rewrite.
854
855 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
856
857         * Make-lang.in (check-java-subtargets): New target.
858
859 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
860
861         PR target/35483
862         * Make-lang.in (class.o): Depend on $(TM_P_H).
863         (expr.o): Same.
864         * class.c: Include tm_p.h.
865         * expr.c: Include tm_p.h.
866
867 2008-10-14  Andrew Haley  <aph@redhat.com>
868
869         * constants.c (build_constant_data_ref): Make sure we only build
870         one copy of the decl for the constant pool.
871
872 2008-09-22  Andrew Haley  <aph@redhat.com>
873
874         * expr.c (rules): Add new rule for
875         gnu.java.lang.VMCPStringBuilder.toString.
876         (rewrite_rule.new_classname): New field.
877         (maybe_rewrite_invocation): Use new_classname field instead of
878         DECL_CONTEXT (*method_p).
879         Allow rewrite_arglist to be NULL.
880
881 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
882
883         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
884         (java_get_callee_fndecl): Kill.
885
886 2008-09-17  Jan Hubicka  <jh@suse.cz>
887
888         PR c++/18071
889         * class.c (add_method_1): Do not initialize DECL_INLINE.
890         (make_local_function_alias): Likewise.
891         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
892         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
893
894 2008-09-09  Richard Guenther  <rguenther@suse.de>
895
896         * decl.c (build_result_decl): Remove no longer applicable
897         promotion.
898
899 2008-09-05  David Daney  <ddaney@avtrex.com>
900
901         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
902
903 2008-08-21  David Daney  <ddaney@avtrex.com>
904
905         * class.c (make_class_data): Don't add field_index when
906         flag_reduced_reflection set.
907
908 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
909
910         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
911
912 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
913
914         PR 28875
915         * lang.c (java_handle_option): Replace set_Wunused with
916         warn_unused.
917
918 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
919
920         * gcj.texi: Update copyright years.  Do not list GPL as
921         Invariant Section.
922
923 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
924
925         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
926         from ctype's sizes.
927
928         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
929         alignment.
930
931 2008-07-29  Jan Hubicka  <jh@suse.cz>
932
933         * lang.c (java_post_options): Remove handling of flag_no_inline.
934
935 2008-07-28  Richard Guenther  <rguenther@suse.de>
936
937         Merge from gimple-tuples-branch.
938
939         2008-07-18  Richard Guenther  <rguenther@suse.de>
940
941         * expr.c: Include tree-iterator.h.
942         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
943
944         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
945
946         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
947         * expr.c: Same.
948
949         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
950
951         * java-gimplify.c (java_gimplify_expr): Same.
952         (java_gimplify_modify_expr): Same.
953         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
954
955         2008-05-02  Diego Novillo  <dnovillo@google.com>
956
957         * expr.c (build_java_throw_out_of_bounds_exception): Fix
958         mixed declarations and code.
959
960         2008-05-02  Doug Kwan  <dougkwan@google.com>
961         
962         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
963         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
964
965         2008-02-19  Diego Novillo  <dnovillo@google.com>
966
967         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
968
969         * java-gimplify.c (java_gimplify_self_mod_expr): Change
970         gimple_seq arguments to gimple_seq *.  Update all users.
971
972         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
973
974         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
975         sequences.
976         (java_gimplify_self_mod_expr): Same.                                    
977         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
978         sequences.
979
980 2008-07-24  Jan Hubicka  <jh@suse.cz>
981
982         * java/decl.c: Include cgraph.h
983         (end_java_method): Remove non-unit-at-a-time code.
984         (java_mark_decl_local): Likewise; sanity check that we don't touch
985         finalized nodes.
986
987 2008-07-15  Jan Hubicka  <jh@suse.cz>
988
989         * lang.c (java_init_options): Enable unit-at-a-time by default.
990
991 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
992
993         * Make-lang.in (jvspec.o): Fix dependencies.
994
995 2008-07-06  Tom Tromey  <tromey@redhat.com>
996
997         * Make-lang.in (java/parse.o-warn): Remove.
998         (java/jcf-io.o-warn): Remove.
999
1000 2008-07-05  Tom Tromey  <tromey@redhat.com>
1001
1002         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
1003         (compare_path): Remove.
1004         (java_or_class_file): Likewise.
1005         (memoized_dirlist_entry): Likewise.
1006         (memoized_dirlist_hash): Likewise.
1007         (memoized_dirlist_lookup_eq): Likewise.
1008         (memoized_dirlists): Likewise.
1009         (caching_stat): Likewise.
1010         (find_class): Use stat.
1011         * jcf.h (JCF_USE_SCANDIR): Remove.
1012
1013 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
1014
1015         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1016         doc/rebuild-gcj-db.1
1017         (java.uninstall): Likewise.
1018         (java.maintainer-clean): Likewise.
1019         (aot-compile.pod): New rule.
1020         (rebuild-gcj-db.pod): New rule.
1021         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1022         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1023
1024 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1025
1026         * Make-lang.in (java/jcf-io.o-warn): New.
1027
1028 2008-06-24  Tom Tromey  <tromey@redhat.com>
1029
1030         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1031         * expr.c (add_type_assertion): Rename argument.
1032         (build_java_arrayaccess): Don't name variable 'throw'.
1033         (ARRAY_NEW_MULTI): Don't name variable 'class'.
1034         * jcf-io.c (find_class): Don't name variable 'class'.
1035         * mangle.c (compression_table_add): Don't name variable 'new'.
1036         * constants.c (cpool_for_class): Rename argument.
1037         (alloc_constant_fieldref): Likewise.
1038         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1039         'class'.
1040         (read_class): Likewise.
1041         (parse_zip_file_entries): Likewise.
1042         (process_zip_dir): Likewise.
1043         * decl.c (java_mark_class_local): Rename argument.
1044         * class.c (GEN_TABLE): Use type_name, not typename.
1045         (gen_indirect_dispatch_tables): Likewise.
1046         (add_field): Rename argument.
1047         (is_compiled_class): Likewise.
1048         (safe_layout_class): Likewise.
1049         (emit_assertion_table): Likewise.
1050         * typeck.c (has_method): Rename argument.
1051
1052 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1053
1054         * class.c (ident_subst, mangled_classname, unmangle_classname,
1055         gen_indirect_dispatch_tables, add_method_1,
1056         build_fieldref_cache_entry, make_local_function_alias,
1057         layout_class, java_treetreehash_find, java_treetreehash_new,
1058         split_qualified_name): Fix for -Wc++-compat.
1059         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1060         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1061         start_java_method): Likewise.
1062         * except.c (prepare_eh_table_type): Likewise.
1063         * expr.c (type_assertion_hash, note_instructions): Likewise.
1064         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1065         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1066         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1067         Likewise.
1068         * jcf-parse.c (reverse, java_read_sourcefilenames,
1069         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1070         process_zip_dir): Likewise.
1071         * jcf-path.c (add_entry, add_path, jcf_path_init,
1072         jcf_path_extdirs_arg): Likewise.
1073         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1074         * jvgenmain.c (do_mangle_classname): Likewise.
1075         * lang.c (put_decl_string): Likewise.
1076         * verify-impl.c (make_state_copy, make_state, add_new_state):
1077         Likewise.
1078
1079 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1080
1081         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1082
1083 2008-06-14  Tom Tromey  <tromey@redhat.com>
1084
1085         PR java/36247:
1086         * class.c (build_class_ref): Initialize this_classdollar when
1087         needed.
1088
1089 2008-05-23  Andrew Haley  <aph@redhat.com>
1090
1091         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1092         pathname of source file.
1093
1094 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1095
1096         * jcf-dump.c (print_constant): Use
1097         HOST_LONG_LONG_FORMAT.
1098
1099 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1100
1101         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1102         DECL_PURE_P.
1103
1104 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1105
1106         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1107         (build_classdollar_field): Don't set TREE_INVARIANT.
1108         (get_dispatch_table): Don't set TREE_INVARIANT.
1109         (make_class_data): Don't set TREE_INVARIANT.
1110         (build_symbol_entry): Don't set TREE_INVARIANT.
1111         (emit_symbol_table): Don't set TREE_INVARIANT.
1112         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1113         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1114         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1115         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1116
1117 2008-04-03  Tom Tromey  <tromey@redhat.com>
1118
1119         * Make-lang.in (java_OBJS): New variable.
1120
1121 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1122
1123         * java-tree.h (insert_block): Kill.
1124         * decl.c (insert_block): Kill.
1125                 
1126 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1127
1128         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1129         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1130         gpl.texi.
1131
1132 2008-03-27  Tom Tromey  <tromey@redhat.com>
1133
1134         * Make-lang.in: Revert automatic dependency patch.
1135
1136 2008-03-25  Tom Tromey  <tromey@redhat.com>
1137
1138         * Make-lang.in: Removed most explicit .o targets.
1139         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1140         ($(GCJ)$(exeext)): Update.
1141         (JAVA_OBJS): New variable.
1142         (JCFDUMP_OBJS): Reformat.
1143         (java_OBJS): New variable.
1144         (java/jvspec.o-warn): Update.
1145         (java/parse.o-warn): Remove.
1146         (JAVA_TREE_H): Remove.
1147         (java/jcf-io.o): Reduce to variable setting.
1148         (ALL_CPPFLAGS): Likewise.
1149
1150 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1151
1152         * mangle.c (java_mangle_decl): Remove dead check.
1153
1154 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1155
1156         * jcf-parse.c (java_parse_file): Assert binding levels are
1157         left in order.
1158         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1159         Delete.
1160
1161 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1162
1163         * jcf-dump.c (version): Update copyright notice dates.
1164
1165 2008-02-29  Tom Tromey  <tromey@redhat.com>
1166
1167         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1168         method.
1169         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1170
1171 2008-02-26  Tom Tromey  <tromey@redhat.com>
1172
1173         * lang.c (java_post_options): Remove conditional.
1174         * expr.c (expand_byte_code): Remove old location code.
1175         * jcf-parse.c (set_source_filename): Remove old location code.
1176         (give_name_to_class): Likewise.
1177         (jcf_parse): Likewise.
1178         (duplicate_class_warning): Likewise.
1179         (parse_class_file): Likewise.
1180         (java_parse_file): Likewise.
1181         * decl.c (finish_method): Remove old location code.
1182         * class.c (push_class): Remove old location code.
1183
1184 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1185
1186         PR other/35107
1187         * Make-lang.in (jc1): Add $(GMPLIBS).
1188
1189 2008-01-23  David Daney  <ddaney@avtrex.com>
1190
1191         * class.c (hide)  Rename to...
1192         (java_hide_decl) ... this throughout, and make public.
1193         * resource.c (Jr_count): Remove.
1194         (compile_resource_data): Call java_mangle_resource_name to generate
1195         decl name.  Make resource decl public and hidden.
1196         * mangle.c (java_mangle_resource_name): New function.
1197         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1198         functions.
1199
1200 2008-01-04  Andrew Haley  <aph@redhat.com>
1201
1202         PR java/17779
1203         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1204         C90.
1205
1206 2008-01-03  Andrew Haley  <aph@redhat.com>
1207
1208         PR java/17779
1209         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1210         we're about to re-layout the type.
1211
1212 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1213
1214         * lang.c (java_classify_record): Don't return
1215         RECORD_IS_INTERFACE for now.
1216
1217 2007-12-18  Andrew Haley  <aph@redhat.com>
1218
1219         PR java/27643
1220         * jcf-parse.c (java_parse_file): Remove call to
1221         java_mark_class_local.
1222         (parse_class_file): Reinstate call to java_mark_class_local here.
1223         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1224         already set, call java_mangle_decl() and make_decl_rtl() to
1225         rewrite its name as a hidden alias.
1226
1227 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1228
1229         PR debug/7081
1230         * lang.c (java_classify_record): New.
1231         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1232
1233 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1234
1235         PR 34081/C++
1236         * decl.c (finish_method): Pass 'false' for the new
1237         allocate_struct_function parameter.
1238
1239 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1240
1241         * expr.c (build_jni_stub): Use the computed jni func type for
1242         variable meth.
1243
1244 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1245
1246         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1247
1248 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1249
1250         * expr.c (type_assertion_hash): Hash type uids rather than
1251         tree pointers.
1252
1253 2007-11-17  David Daney  <ddaney@avtrex.com>
1254             Andrew Haley  <aph@redhat.com>
1255
1256         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1257         insead of BITS_PER_WORD in big-endian work around.
1258
1259 2007-11-07  Tom Tromey  <tromey@redhat.com>
1260
1261         PR java/34019:
1262         * gcj.texi (Input Options): Add missing noun.
1263
1264 2007-11-02  Tom Tromey  <tromey@redhat.com>
1265
1266         PR java/33765:
1267         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1268         * zipfile.h (ZIPEMPTYMAGIC): New define.
1269
1270 2007-11-01  Tom Tromey  <tromey@redhat.com>
1271
1272         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1273         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1274         (java/jcf-io.o): Depend on zipfile.h.
1275
1276 2007-10-17  Richard Guenther  <rguenther@suse.de>
1277
1278         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1279         dependencies.
1280
1281 2007-10-03  Andrew Haley  <aph@redhat.com>
1282
1283         PR java/33639
1284         * class.c (mangled_classname): Detect and replace illegal
1285         characters in assembly language symbols.
1286         (gen_indirect_dispatch_tables): Call mangled_classname() on
1287         the type.
1288
1289 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1290
1291         * lang.c (java_print_error_function): Add third argument.
1292
1293 2007-09-15  Tom Tromey  <tromey@redhat.com>
1294
1295         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1296         Remove.
1297         <init_final>: Likewise.
1298         * lang.c (java_dump_tree): Update.
1299         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1300
1301 2007-09-11  Jan Hubicka <jh@suse.cz>
1302
1303         * decl.c (java_expand_body): Kill.
1304         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1305
1306 2007-09-06  Tom Tromey  <tromey@redhat.com>
1307
1308         * jcf-parse.c (parse_class_file): Re-enter the current file.
1309
1310 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1311
1312         * boehm.c (mark_reference_fields): Move misaligned pointer check
1313         after JREFERENCE_TYPE_P test
1314
1315 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1316
1317         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1318         if pointer is misaligned.
1319
1320 2007-09-06  Tom Tromey  <tromey@redhat.com>
1321
1322         * lang.c (java_post_options): Update.
1323         * jcf-parse.c (set_source_filename): Update.
1324         (give_name_to_class): Update.
1325         (jcf_parse): Update.
1326         (duplicate_class_warning): Update.
1327         (parse_class_file): Update.
1328         (java_parse_file): Update.
1329         * expr.c (expand_byte_code): Update.
1330
1331 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1332
1333         * decl.c (finish_method): Use set_cfun.
1334
1335 2007-09-04  Andrew Haley  <aph@redhat.com>
1336
1337         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1338         when using the ARM EABI.
1339
1340 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1341
1342         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1343
1344 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1345
1346         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1347         CONST_CAST.
1348         * jcf.h (JCF_FINISH): Likewise.
1349
1350 2007-08-28  Tom Tromey  <tromey@redhat.com>
1351
1352         * Make-lang.in (java.tags): Don't tag '*.y' files.
1353
1354 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1355
1356         * lang.c (java_decl_ok_for_sibcall): Likewise.
1357
1358 2007-08-21  Paul Brook  <paul@codesourcery.com>
1359             Nathan Sidwell  <nathan@codesourcery.com>
1360             Mark Mitchell  <mark@codesourcery.com>
1361             Joseph Myers  <joseph@codesourcery.com>
1362
1363         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1364         date.
1365
1366 2007-08-20  Richard Guenther  <rguenther@suse.de>
1367
1368         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1369         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1370
1371 2007-08-17  Tom Tromey  <tromey@redhat.com>
1372
1373         * typeck.c (find_method_in_interfaces): Update.
1374         * jcf-parse.c (load_class): Update.
1375         * java-gimplify.c (java_gimplify_component_ref): Removed.
1376         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1377         arguments.
1378         (java_gimplify_expr): Update.
1379         * decl.c (java_init_decl_processing): Update.
1380         * class.c (set_constant_value): Update.
1381         (make_class_data): Update.
1382         (finish_class): Update.
1383         (build_static_field_ref): Update.
1384         (is_compiled_class): Update.
1385         (maybe_layout_super_class): Update.
1386         (layout_class): Update.
1387         (layout_class_method): Update.
1388         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1389         (lang_decl_var) <am, final_iud, cif>: Removed fields.
1390         (lang_decl_func) <init_calls_this>: Removed field.
1391         (lang_type) <dot_class, verify_method>: Removed fields.
1392         (FIELD_NESTED_ACCESS): Removed.
1393         (FIELD_NESTED_ACCESS_P): Removed.
1394         (DECL_FIELD_FINAL_IUD): Removed.
1395         (DECL_LOCAL_FINAL_IUD): Removed
1396         (LOCAL_FINAL_P): Removed.
1397         (FINAL_VARIABLE_P): Removed.
1398         (CLASS_FINAL_VARIABLE_P): Removed.
1399         (DECL_BIT_INDEX): Removed.
1400         (DECL_INIT_CALLS_THIS): Removed.
1401         (FIELD_LOCAL_ALIAS): Removed.
1402         (FIELD_LOCAL_ALIAS_USED): Removed.
1403         (FIELD_THISN): Removed.
1404         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1405         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1406         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1407         (TYPE_DOT_CLASS): Removed.
1408         (TYPE_VERIFY_METHOD): Removed.
1409         (ID_CLASSDOLLAR_P): Removed.
1410         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1411         Removed.
1412         (classdollar_identifier_node): Removed.
1413         (TYPE_UNKNOWN): Removed.
1414         (CLASS_FROM_SOURCE_P): Removed.
1415         * expr.c (build_jni_stub): Update.
1416         (force_evaluation_order): Update.
1417         (build_java_empty_stmt): Update.
1418         (build_class_init): Update.
1419         (java_stack_swap): Update.
1420         (build_jni_stub): Update.
1421
1422 2007-08-17  Tom Tromey  <tromey@redhat.com>
1423
1424         * java-tree.h (LABEL_TYPE_STATE): Removed.
1425         (load_type_state): Removed.
1426         (LABEL_PC): Removed.
1427         (LABEL_VERIFIED): Removed.
1428         (type_states): Declare.
1429         * expr.c (type_states): New global.
1430         (load_type_state): Now static.  Use type_states.  Changed
1431         argument.
1432         (lookup_label): Don't set LABEL_PC.
1433         (expand_byte_code): Don't use LABEL_VERIFIED.
1434         (note_instructions): Initialize type_states.
1435         * verify-glue.c (vfy_note_stack_depth): Rewrote.
1436         (vfy_note_stack_type): Use type_states.
1437         (vfy_note_local_type): Likewise.
1438
1439 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1440
1441         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1442         * jcf.h (JCF_FINISH): Likewise.
1443
1444 2007-07-31  Nick Clifton  <nickc@redhat.com>
1445
1446         * java-gimplify.c: Change copyright header to refer to version 3
1447         of the GNU General Public License and to point readers at the
1448         COPYING3 file and the FSF's license web page.
1449         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1450         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1451         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1452         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1453         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1454         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1455         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1456
1457 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1458
1459         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1460
1461 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1462
1463         * lang.c (java_get_callee_fndecl): Constify.
1464
1465 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1466
1467         * mangle.c (set_type_package_list): Constify.
1468         * verify-glue.c (vfy_make_string): Delete.
1469         * verify.h (vfy_make_string): Likewise.
1470
1471 2007-07-26  Tom Tromey  <tromey@redhat.com>
1472
1473         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1474         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1475         EXIT_BLOCK_LABELED_BLOCK): Likewise.
1476         * lang.c (java_tree_inlining_walk_subtrees): Update.
1477         (java_dump_tree): Likewise.
1478         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1479         Remove.
1480         * decl.c (push_labeled_block, pop_labeled_block): Remove.
1481         * java-gimplify.c (java_gimplify_labeled_block_expr,
1482         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1483         (java_gimplify_expr): Update.
1484
1485 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1486
1487         * class.c (java_treetreehash_hash, java_treetreehash_compare):
1488         Constify. 
1489         * expr.c (type_assertion_eq): Likewise.
1490         * jcf-io.c (compare_path): Likewise.
1491         * jcf-parse.c (cmpstringp): Likewise.
1492         * verify-impl.c (get_one_type, compute_argument_types,
1493         compute_return_type): Likewise. 
1494
1495 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1496
1497         PR target/32462
1498         PR libgcj/32465
1499         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1500
1501 2007-07-12  Richard Guenther  <rguenther@suse.de>
1502
1503         * expr.c (expand_java_return): RETURN_EXPR has void type.
1504         (build_jni_stub): Likewise.  Use a comparison against zero
1505         for null-pointer test in COND_EXPR.
1506         (build_field_ref): Build POINTER_PLUS_EXPR with correct
1507         type.  Convert result instead.
1508         (build_invokevirtual): Likewise.
1509
1510 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1511
1512         PR 32617
1513         * lang.c (java_init): Remove setting of force_align_functions_log.
1514         * class.c (add_method_1): Set DECL_ALIGN of non-static method
1515         to cope with ptrmemfunc_vbit_in_pfn.
1516
1517 2007-07-03  David Daney  <ddaney@avtrex.com>
1518
1519         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
1520         include path.
1521         (doc/gcj.dvi): Same.
1522         (doc/gcj.pdf): Same.
1523         (java/index.html): Same.
1524
1525 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
1526
1527         * class.c (make_class_data): Build the index in sizetype.
1528         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1529         adding to a pointer type.
1530         (build_symbol_entry): Likewise.
1531         * expr.c (build_java_arrayaccess): Likewise.
1532         (build_field_ref): Likewise.
1533         (build_known_method_ref): Likewise.
1534         (build_invokevirtual): Likewise.
1535         * except.c (build_exception_object_ref): Do a
1536         NEGATIVE and then a POINTER_PLUS_EXPR instead
1537         of a MINUS_EXPR.
1538
1539 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
1540
1541         * typeck.c (java_signed_type): Remove.
1542         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1543         * java-tree.h (java_signed_type): Remove.
1544
1545 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1546
1547         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1548         (print_constant): Likewise.
1549
1550 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
1551
1552         * expr.c (build_java_binop): Use unsigned_type_for instead of
1553         java_unsigned_type.
1554         * java-tree.h (java_unsigned_type): Remove.
1555         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1556         * typeck.c (java_unsigned_type): Remove.
1557
1558 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1559
1560         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1561         instead of checking GIMPLE_STMT_P in chain_next.
1562
1563 2007-04-06  Colin Walters  <walters@redhat.com>
1564
1565         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1566         * jcf-io.c (open_class): Copy 'filename'.
1567
1568 2007-04-03  Andrew Haley  <aph@redhat.com>
1569
1570         * jvgenmain.c (main): Change main to use class$, not class$$.
1571         (do_mangle_classname): Likewise.
1572         * class.c (hide): New function.
1573         (add_field): Hide everything that shouldn't be visible outside a
1574         DSO.
1575         (build_static_class_ref): Likewise.
1576         (build_classdollar_field): Likewise.
1577         (make_class_data): Likewise.
1578         (layout_class_method): Likewise.
1579         * expr.c (special_method_p): New function.
1580
1581         * class.c (push_class): Don't bogusly guess the source filename.
1582         * jcf-parse.c (give_name_to_class): Don't set input_location from
1583         DECL_ARTIFICIAL decls.
1584
1585 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1586
1587         * typeck.c (java_signed_or_unsigned_type): Removed.
1588         (java_signed_type): use get_signed_or_unsigned_type instead of
1589         java_signed_or_unsigned_type.
1590         (java_unsigned_type): Ditto.
1591         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1592         * java-tree.h (java_signed_or_unsigned_type): Removed.
1593
1594 2007-03-26  Tom Tromey  <tromey@redhat.com>
1595
1596         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1597         (java.maintainer-clean): Likewise.
1598         (java.install-man): Likewise.
1599         (.INTERMEDIATE): Removed grmiregistry.pod.
1600         (grmiregistry.pod): Removed.
1601         * gcj.texi (Invoking gcjh): Removed.
1602         (Invoking gjnih): Likewise.
1603         (Invoking grmiregistry): Likewise.
1604         (direntry): Updated.
1605         (Top): Likewise.
1606         (which-gcj): Removed.
1607
1608 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1609
1610         * Make-lang.in: Add install-pdf target as copied from
1611         automake v1.10 rules.
1612
1613 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1614
1615         * gcj.texi: Standardize title page.
1616
1617 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1618
1619         * class.c: Fix a comment typo.
1620
1621 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1622             Brooks Moses  <brooks.moses@codesourcery.com>
1623             Lee Millward  <lee.millward@codesourcery.com>
1624
1625         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1626         of build3.
1627         (BUILD_MONITOR_EXIT): Likewise.
1628
1629         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1630         (java_gimplify_modify_expr): Likewise.
1631
1632         * class.c (cache_this_class_ref): Use build_call_expr.
1633         (build_static_field_ref): Likewise.
1634         (emit_indirect_register_classes): Likewise.
1635         (emit_register_classes): Likewise.
1636
1637         * resource.c (write_resource_constructor): Use build_call_expr.
1638
1639         * builtins.c (builtin_creator_function): Change interpretation of
1640         the second parameter to be the whole CALL_EXPR instead of the arglist.
1641         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1642         (min_builtin): Likewise.
1643         (abs_builtin): Likewise.
1644         (java_build_function_call_expr): Likewise.
1645         (convert_real): Likewise.
1646         (UNMARSHAL3): Likewise.
1647         (UNMARSHAL4): Likewise.
1648         (UNMARSHAL5): Likewise.
1649         (build_arglist_for_builtin): Delete.  Fix callers to use
1650         build_call_expr instead.
1651         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1652         accessors.
1653         (compareAndSwapInt_builtin): Likewise.
1654         (compareAndSwapLong_builtin): Likewise.
1655         (compareAndSwapObject_builtin): Likewise.
1656         (putVolatile_builtin): Likewise.
1657         (getVolatile_builtin): Likewise.
1658         (VMSupportsCS8_builtin): Likewise.
1659         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1660         instead of arglist.
1661
1662         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1663         (build_java_throw_out_of_bounds_exception): Likewise.
1664         (java_check_reference): Likewise.
1665         (build_java_arraystore_check): Likewise.
1666         (build_newarray): Likewise.
1667         (build_anewarray): Likewise.
1668         (expand_java_multinewarray): Use build_call_list instead of build3.
1669         (build_java_monitor): Use build_call_nary instead of build3.
1670         (java_create_object): Likewise.
1671         (expand_java_NEW): Likewise.
1672         (build_instanceof): Likewise.
1673         (expand_java_CHECKCAST): Likewise.
1674         (build_java_soft_divmod): Likewise.
1675         (build_java_binop): Likewise.
1676         (build_field_ref): Likewise.
1677         (build_class_init): Likewise.
1678         (rewrite_arglist_getcaller): Use build_call_expr.
1679         (build_invokeinterface):  Use build_call_nary instead of build3.
1680         (expand_invoke): Use build_call_list instead of build3.
1681         (build_jni_stub): Use build_call_nary, build_call_list, or
1682         build_call_expr instead of build3.
1683         (expand_java_field_op): Use build_call_expr instead of build3.
1684         (force_evaluation_order): Use new CALL_EXPR accessors.
1685
1686         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1687
1688 2007-02-15  David Daney  <ddaney@avtrex.com>
1689
1690         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1691         (java.maintainer-clean):Add gc-analyze.1.
1692         (.INTERMEDIATE): Add gc-analyze.pod.
1693         (gc-analyze.pod): New rule.
1694         (java.install-man): Install gc-analyze.1
1695         * gcj.texi: Add new section for the gc-analyze program.
1696
1697 2007-02-07  Andrew Haley  <aph@redhat.com>
1698
1699         * class.c (uncache_this_class_ref): New.
1700         * expr.c (build_jni_stub): Initialize the class.
1701         (expand_byte_code): Call uncache_this_class_ref after generating
1702         code.
1703
1704 2007-02-06  Tom Tromey  <tromey@redhat.com>
1705
1706         PR java/30714:
1707         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1708
1709 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1710
1711         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1712
1713 2007-02-02  Andrew Haley  <aph@redhat.com>
1714
1715         * expr.c (expand_byte_code): Call cache_this_class_ref() and
1716         cache_cpool_data_ref().
1717         Set TYPE_CPOOL_DATA_REF.
1718         (cache_cpool_data_ref): New function.
1719         * constants.c (build_ref_from_constant_pool): Remove special-case
1720         code for flag_indirect_classes.
1721         (build_constant_data_ref): Move special-case code for
1722         flag_indirect_classes here from build_ref_from_constant_pool.
1723         * decl.c (finish_method): Move class initialization from here to
1724         cache_this_class_ref.
1725         * class.c (cache_this_class_ref): New function.
1726         (build_class_ref): Use this_classdollar for the ouput class.
1727
1728 2007-02-02  David Daney  <ddaney@avtrex.com>
1729
1730         * class.c (is_compiled_class): Move check to avoid reloading
1731         current class.
1732         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1733         already set.
1734
1735 2007-02-01  Andrew Haley  <aph@redhat.com>
1736
1737         PR java/30641
1738         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1739
1740 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1741
1742         * class.c, jcf-parse.c: Fix comment typos.
1743
1744 2007-01-30  Tom Tromey  <tromey@redhat.com>
1745
1746         * gcj.texi (Strings): Fix documentation for JvNewString.
1747
1748 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1749
1750         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1751         typos.
1752
1753 2007-01-30  Ben Elliston  <bje@au.ibm.com>
1754
1755         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1756
1757 2007-01-29  Tom Tromey  <tromey@redhat.com>
1758
1759         PR java/30607:
1760         * jvspec.c (lang_specific_driver): Handle separate -I argument.
1761         * lang.opt (-I): Add 'Separate'.
1762
1763 2007-01-29  Andrew Haley  <aph@redhat.com>
1764
1765         * class.c (add_method_1): Mark fndecl as external unless we are
1766         compiling it into this object file.
1767
1768 2007-01-24  Andrew Haley  <aph@redhat.com>
1769
1770         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1771         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1772
1773 2007-01-22  Andrew Haley  <aph@redhat.com>
1774
1775         * builtins.c (VMSupportsCS8_builtin): New function.
1776
1777 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1778
1779         PR java/30454
1780         * jcf-io.c (opendir_in_zip): Close the file
1781         and free zipf before returning after an error.
1782
1783 2007-01-16  Tom Tromey  <tromey@redhat.com>
1784
1785         * java-tree.def: Added copyright header.
1786
1787 2007-01-15  Tom Tromey  <tromey@redhat.com>
1788
1789         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1790         case.
1791         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1792         Removed case.
1793         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1794         (EXPR_WFL_NODE): Likewise.
1795         (EXPR_WFL_LINECOL): Likewise.
1796         (EXPR_WFL_FILENAME): Likewise.
1797         (EXPR_WFL_LINENO): Likewise.
1798         (build_expr_wfl, expr_add_location): Don't declare.
1799         (build_unknown_wfl): Removed.
1800         (EXPR_WFL_FILENAME_NODE): Removed.
1801         (EXPR_WFL_COLNO): Removed.
1802         (EXPR_WFL_SET_LINECOL): Removed.
1803         (DECL_FUNCTION_WFL): Removed.
1804         (DECL_FIELD_FINAL_WFL): Removed.
1805         (struct lang_decl_func) <wfl>: Removed field.
1806         <called_constructor>: Likewise.
1807         <inner_access>: Likewise.
1808         (struct lang_decl_var) <wfl>: Removed field.
1809         (DECL_CONSTRUCTOR_CALLS): Removed.
1810         (DECL_FUNCTION_ACCESS_DECL): Likewise.
1811         (DECL_FUNCTION_INNER_ACCESS): Likewise.
1812         (DECL_SPECIFIC_COUNT): Likewise.
1813         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1814         * expr.c (build_expr_wfl): Removed.
1815         (expr_add_location): Likewise.
1816
1817 2007-01-12  Tom Tromey  <tromey@redhat.com>
1818
1819         * jcf-dump.c (main): Updated call to find_class.
1820         * lang.c (java_init): Removed dead code.
1821         * jcf-parse.c (read_class): Don't use java_source field.  Removed
1822         dead code.
1823         (parse_zip_file_entries): Don't use java_source field.
1824         (process_zip_dir): Likewise.
1825         (jcf_parse): Removed dead code.
1826         (java_parse_file): Likewise.
1827         (read_class): Updated call to find_class.
1828         * jcf-io.c (find_class): Don't use java_source field.  Removed
1829         'source_ok' argument, .java logic.
1830         * jcf.h (JCF) <java_source>: Removed field.
1831         (JCF_ZERO): Updated.    (find_class): Updated.
1832         * decl.c: Removed dead code.
1833         * class.c: Removed dead code.
1834
1835 2007-01-11  Tom Tromey  <tromey@redhat.com>
1836
1837         * typeck.c (convert): Don't use flag_emit_class_files.
1838         * lang.c (java_post_options): Don't use flag_emit_class_files.
1839         (java_handle_option): Don't use flag_extraneous_semicolon or
1840         flag_redundant.
1841         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1842         flag_emit_class_files.
1843         (load_class): Likewise.
1844         * java-tree.h (flag_emit_class_files): Don't declare.
1845         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1846         (flag_extraneous_semicolon): Don't declare.
1847         (flag_not_overriding): Likewise.
1848         (flag_static_local_jdk1_1): Likewise.
1849         (flag_redundant): Likewise.
1850         * expr.c (build_newarray): Don't use flag_emit_class_files.
1851         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1852         flag_emit_class_files.
1853         (build_class_ref): Likewise.
1854         * builtins.c (check_for_builtin): Don't use
1855         flag_emit_class_files.
1856
1857 2007-01-10  Tom Tromey  <tromey@redhat.com>
1858
1859         * lang.c (java_can_use_bit_fields_p): Removed.
1860         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1861
1862 2007-01-09  Andrew Haley  <aph@redhat.com>
1863
1864         * expr.c (build_java_arrayaccess): Rewrite to generate array
1865         access in canonical form.
1866         (expand_java_arraystore): Use build_fold_addr_expr() on address of
1867         array access.
1868
1869 2007-01-03  Andrew Haley  <aph@redhat.com>
1870
1871         PR java/28754
1872         * expr.c (expand_java_field_op): If we're initializing a field's
1873         declaring interface we should not also initialize the class
1874         context in which it was referenced.
1875
1876 2007-01-02  Tom Tromey  <tromey@redhat.com>
1877
1878         * java-tree.h (compiling_from_source, current_encoding,
1879         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1880         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1881         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1882         JTI_WFL_OPERATOR): Removed
1883         (finit_identifier_node, instinit_identifier_node,
1884         length_identifier_node, super_identifier_node,
1885         continue_identifier_node, access0_identifier_node, wfl_operator):
1886         Removed.
1887         (cyclic_inheritance_report,
1888         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1889         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1890         DECL_FIXED_CONSTRUCTOR_P): Removed.
1891         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1892         Removed.
1893         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1894         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1895         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1896         import_list, import_demand_list>: Removed.
1897         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1898         cxx_keyword_p): Removed.
1899         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1900         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1901         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1902         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1903         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1904         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1905         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1906         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1907         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1908         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1909         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1910         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1911         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1912         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1913         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1914         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1915         java_parse_abort_on_error, extract_field_decl): Removed.
1916         (finput): Declare.
1917         * lang.c: (compiling_from_source, current_encoding): Removed.
1918         (java_handle_option): Ignore -fencoding.
1919         * parse.h: Don't include lex.h.
1920         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1921         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1922         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1923         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1924         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1925         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1926         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1927         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1928         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1929         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1930         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1931         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1932         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1933         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1934         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1935         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1936         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1937         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1938         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1939         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1940         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1941         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1942         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1943         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1944         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1945         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1946         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1947         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1948         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1949         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1950         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1951         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1952         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1953         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1954         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1955         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1956         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1957         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1958         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1959         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1960         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1961         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1962         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1963         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1964         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1965         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1966         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1967         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1968         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1969         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1970         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1971         SET_CPC_STATIC_INITIALIZER_STMT,
1972         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1973         java_complete_class, java_check_circular_reference,
1974         java_fix_constructors, java_layout_classes, java_reorder_fields,
1975         java_method_add_stmt, java_get_line_col, reset_report,
1976         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1977         java_finish_classes, ctxp, ctxp_for_generation,
1978         ctxp_for_generation_last): Removed.
1979         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1980         * mangle.c (utf8_cmp): New function.
1981         (cxx_keywords): New global.
1982         (cxx_keyword_p): New function.
1983         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1984         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1985         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1986         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1987         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1988         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1989         * Make-lang.in (java.srcextra): Do nothing.
1990         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1991         (JAVA_OBJS): Don't mention deleted files.
1992         (java.mostlyclean): Likewise.
1993         (java.clean): Likewise.
1994         (JAVA_LEX_C): Removed.
1995         (buffer.o, check-init.o, parse.o): Remove unused targets.
1996         (typeck.o): Updated.
1997         * jcf-parse.c (read_class): Comment out unused code.
1998         (java_layout_seen_class_methods): New function.
1999         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2000         Removed.
2001         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
2002         (init_jcf_parse): Removed.
2003         * config-lang.in (gtfiles): Remove deleted files.
2004         * decl.c (java_init_decl_processing): Don't initialize
2005         finit_identifier_node, instinit_identifier_node,
2006         length_identifier_node, super_identifier_node,
2007         continue_identifier_node, access0_identifier_node.  Don't call
2008         init_jcf_parse.
2009         * class.c (cyclic_inheritance_report): New global.
2010         (add_method_1): Don't use
2011         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2012         (maybe_layout_super_class): Comment out code.
2013         (safe_layout_class): New function.
2014         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2015         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2016         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2017         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2018         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2019         (java_gimplify_case_expr): Removed.
2020         (java_gimplify_default_expr): Likewise.
2021         (java_gimplify_new_array_init): Likewise.
2022         * parse.y: Removed.
2023         * keyword.gperf, keyword.h: Removed.
2024         * chartables.h: Removed.
2025         * check-init.c: Removed.
2026         * buffer.c, buffer.h: Removed.
2027         * convert.h: Removed.
2028         * gen-table.pl: Removed.
2029         * lex.c, lex.h: Removed.
2030
2031 2007-01-02  Andrew Haley  <aph@redhat.com>
2032
2033         * expr.c (expand_java_arraystore): Make sure we perform a bounds
2034         check at runtime before we perform a type check.
2035
2036 2006-12-19  Andrew Haley  <aph@redhat.com>
2037
2038         * decl.c: Bump minor BC ABI version.
2039
2040 2006-12-13  Gary Benson  <gbenson@redhat.com>
2041
2042         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2043
2044 2006-12-12  Tom Tromey  <tromey@redhat.com>
2045
2046         * lang-specs.h: Pass -M options to jc1.
2047         * jcf-depend.c (jcf_dependency_add_file): Don't emit
2048         dependencies.
2049
2050 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
2051
2052         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2053
2054 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
2055
2056         * lang-specs.h: Pass '%U'-based options as separate arguments.
2057
2058 2006-12-05  Tom Tromey  <tromey@redhat.com>
2059
2060         PR java/29495:
2061         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2062         classes as well.
2063         * class.c (add_field): Handle ACC_SYNTHETIC.
2064         (add_method_1): Likewise.  Handle bridge and varargs.
2065         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2066         annotation.
2067         (set_class_decl_access_flags): Handle synthetic and annotation.
2068         * java-tree.h (METHOD_BRIDGE): New macro.
2069         (METHOD_VARARGS): Likewise.
2070         (TYPE_SYNTHETIC): Likewise.
2071         (TYPE_ANNOTATION): Likewise.
2072         (lang_type): New fields 'synthetic' and 'annotation'.
2073         (lang_decl_func): New fields 'varargs' and 'bridge'.
2074
2075 2006-12-04  Andrew Haley  <aph@redhat.com>
2076
2077         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2078         there's no map.
2079
2080 2006-11-29  Gary Benson  <gbenson@redhat.com>
2081
2082         * expr.c (rewrite_arglist_getcaller): Reorder.
2083
2084 2006-11-29  Andrew Haley  <aph@redhat.com>
2085
2086         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2087         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2088
2089 2006-11-23  Andrew Haley  <aph@redhat.com>
2090
2091         * expr.c (rewrite_arglist_getcaller): New.
2092         (rewrite_arglist_getclass): Fix indentation.
2093         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
2094         gnu.classpath.VMStackWalker.getCallingClassLoader().
2095         * builtins.c (initialize_builtins): Remove duplicate def'n of
2096         __sync_synchronize.
2097         Add __builtin_return_address.
2098
2099 2006-11-22  Andrew Haley  <aph@redhat.com>
2100
2101         * jcf-reader.c (get_attribute): Mark attr_type unused.
2102
2103         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2104
2105 2007-01-08  Richard Guenther  <rguenther@suse.de>
2106
2107         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2108         * jcf-parse.c (get_constant): Likewise.
2109
2110 2006-11-12  Jan Hubicka  <jh@suse.cz>
2111
2112         * resource.c (compile_resource_data): Update for new varpool names.
2113         * java/class.c (build_utf8_ref): Likewise.
2114
2115 2006-11-12  David Daney  <ddaney@avtrex.com>
2116
2117         PR java/29805
2118         * typeck.c (build_java_array_type): Increase buffer sizes.
2119
2120 2006-11-11  Richard Guenther  <rguenther@suse.de>
2121
2122         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2123         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2124
2125 2006-11-06  Andrew Haley  <aph@redhat.com>
2126
2127         * java-tree.h (CONSTANT_LazyFlag): New.
2128         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2129         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2130         reflection_data.
2131         (handle_constant): Return 0 for dummy cpool entries.
2132         Handle constants of kind Class.
2133         Handle constants of kind NameAndType.
2134         (handle_enclosingmethod_attribute): New.
2135         (handle_signature_attribute): New.
2136         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2137         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2138         (handle_constant): Use unmangle_classname()rather than calling
2139         identifier_subst() directly.
2140
2141 2006-11-02  Andrew Haley  <aph@redhat.com>
2142
2143         * java-tree.h (FIELD_ENUM): New.
2144         (lang_decl_var.field_enum): New.
2145         (lang_type.enum_class): New.
2146         (CLASS_ENUM): New.
2147         * class.c (set_class_decl_access_flags): Handle enum types.
2148         (add_field): Handle enum fields.
2149         (get_access_flags_from_decl): Likewise.
2150
2151         * class.c (make_class_data): Put reflection_data into rodata.
2152
2153 2006-11-01  Andrew Haley  <aph@redhat.com>
2154
2155         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2156         (jcf_parse): Write end marker to annotation_data.
2157         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2158         (annotation_grow, annotation_rewrite_byte) 
2159         (annotation_rewrite_short, annotation_rewrite_int) 
2160         (annotation_read_short, annotation_write_byte) 
2161         (annotation_write_short, annotation_write_int) 
2162         (handle_long_constant, handle_constant, handle_element_value) 
2163         (handle_annotation, handle_annotations) 
2164         (handle_annotation_attribute, rewrite_reflection_indexes) 
2165         (handle_member_annotations, handle_parameter_annotations) 
2166         (handle_default_annotation): New functions.
2167         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
2168         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
2169         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2170         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2171         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2172         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
2173         (TYPE_REFLECTION_DATA): New.
2174         (TYPE_REFLECTION_DATASIZE): New.
2175         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2176         an enum.
2177         * jcf-reader.c (get_attribute): Pass field/method index and
2178         attribute type to get_attribute().
2179         * constants.c (find_class_or_string_constant): Make nonstatic.
2180         (cpool_for_class): Likewise.
2181         (build_constants_constructor): Separate string and scalar types.
2182         * class.c (make_class_data): Generate field_indexes permutation.
2183         Pass it to rewrite_reflection_indexes().
2184         (make_class_data): Generate constructor for reflection_data field.
2185
2186 2006-10-20  Tom Tromey  <tromey@redhat.com>
2187
2188         * gcj.texi (Top): Don't mention jv-scan.
2189         (Invoking gcj): Likewise.
2190         (Invoking gcjh): Likewise.
2191         (Invoking gjnih): Likewise.
2192         (Invoking gij): Likewise.
2193         (Invoking gcj-dbtool): Likewise.
2194         (Invoking jv-scan): Removed.
2195         * parse-scan.y: Removed.
2196         * jv-scan.c: Removed.
2197         * config-lang.in (stagestuff): Don't mention jv-scan.
2198         * Make-lang.in (java): Removed jv-scan.
2199         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2200         (JVSCAN_OBJS): Removed.
2201         (jv-scan$(exeext)): Likewise.
2202         (JAVA_MANFILES): Removed jv-scan.1.
2203         (java.uninstall): Don't mention jv-scan.
2204         (java.mostlyclean): Likewise.
2205         (java.maintainer-clean): Likewise.
2206         (.INTERMEDIATE): Likewise.
2207         (java/jv-scan.o): Removed.
2208         (jv-scan.pod): Likewise.
2209         (java.srcextra): Don't mention parse-scan.c.
2210         (java.mostlyclean): Likewise.
2211         (java/parse-scan.c): Removed.
2212         (java/parse-scan.o-warn): Removed.
2213         (java/parse-scan.o): Removed.
2214
2215 2006-10-20  Tom Tromey  <tromey@redhat.com>
2216
2217         * lang.c (java_handle_option): Don't use
2218         jcf_write_base_directory.
2219         * jcf.h (jcf_write_base_directory): Removed.
2220         * parse.y (java_expand_classes): Don't call write_classfile.
2221         * config-lang.in (gtfiles): Removed jcf-write.c.
2222         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2223         (java/jcf-write.o): Removed.
2224         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2225         * java-tree.h (write_classfile): Removed declaration.
2226         * jcf-write.c: Removed.
2227
2228 2006-10-20  Tom Tromey  <tromey@redhat.com>
2229
2230         * Make-lang.in (java): Removed gjnih, gcjh.
2231         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2232         (GCJH_OBJS): Removed.
2233         (GJNIH_OBJS): Likewise.
2234         (gjnih$(exeext)): Likewise.
2235         (gcjh$(exeext)): Likewise.
2236         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2237         (java.install-common): Don't special case gcjh.
2238         (java.uninstall): Don't mention gcjh, gjnih.
2239         (java.mostlyclean): Likewise.
2240         (java.maintainer-clean): Likewise.
2241         (.INTERMEDIATE): Likewise.
2242         (gcjh.pod): Removed.
2243         (gjnih.pod): Likewise.
2244         (GCJH_TARGET_INSTALL_NAME): Removed.
2245         (java/gjavah-jni.o): Removed.
2246         (java/gjavah.o): Likewise.
2247         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2248         * gjavah.c: Removed.
2249
2250 2006-10-17  Tom Tromey  <tromey@redhat.com>
2251
2252         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2253         "string" case.
2254
2255 2006-10-17  Tom Tromey  <tromey@redhat.com>
2256
2257         * jvgenmain.c (main): Handle -findirect-dispatch.
2258         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2259         jvgenmain.
2260
2261 2006-10-06  Andrew Haley  <aph@redhat.com>
2262
2263         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2264         have a compare_and_swap builtin.
2265         (compareAndSwapLong_builtin): Likewise.
2266         (compareAndSwapObject_builtin): Likewise.
2267
2268 2006-10-04  Andrew Haley  <aph@redhat.com>
2269
2270         * builtins.c (java_builtins): Add compareAndSwapInt,
2271         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2272         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2273         putObjectVolatile, getObjectVolatile, getIntVolatile,
2274         getLongVolatile, getLong.
2275         (UNMARSHAL3): New macro.
2276         (UNMARSHAL4): Likewise.
2277         (UNMARSHAL5): Likewise.
2278         (build_arglist_for_builtin): New function.
2279         (build_addr_sum, build_check_this): New functions.
2280         (putObject_builtin. compareAndSwapInt_builtin,
2281         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2282         putVolatile_builtin, getVolatile_builtin): New builtins.
2283
2284 2006-06-08  Andrew Haley  <aph@redhat.com>
2285  
2286         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2287         get_symbol_table_index().
2288         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2289         private method.
2290         (build_known_method_ref): New arg: special.  Pass it to
2291         get_symbol_table_index.
2292         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2293         the method list.
2294         (build_invokevirtual): New arg: special.  Pass it to
2295         get_symbol_table_index.
2296         (expand_invoke): New variable: special.
2297         Pass it to maybe_rewrite_invocation().
2298         Pass it to build_known_method_ref().
2299         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2300         build the symbol table conbstructor.
2301         (emit_symbol_table): Extract SPECIAL from the method list and pass
2302         it to build_symbol_entry().
2303         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2304         special accordingly.
2305  
2306 2006-09-08  Andrew Haley  <aph@redhat.com>
2307
2308         * class.c (layout_class_method): Use build_java_signature, not
2309         build_java_argument_signature.  Use lookup_java_method, not
2310         lookup_argument_method.
2311
2312 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2313             Bryce McKinlay  <bryce@mckinlay.net.nz>
2314
2315         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2316
2317 2006-07-18  Tom Tromey  <tromey@redhat.com>
2318
2319         * lang.opt: Added missing -W options.
2320
2321 2006-07-12  Tom Tromey  <tromey@redhat.com>
2322
2323         PR java/28329:
2324         * lang-specs.h: Pass '%U'-based options as separate arguments.
2325         Use -faux-classpath.
2326         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2327         * lang.opt (faux-classpath): New option.
2328
2329 2006-07-07  Tom Tromey  <tromey@redhat.com>
2330
2331         * class.c (make_class_data): Set value for reflection_data field.
2332         * decl.c (java_init_decl_processing): Add reflection_data field.
2333
2334 2006-07-07  Tom Tromey  <tromey@redhat.com>
2335
2336         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2337         earlier.
2338         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2339
2340 2006-07-07  Andrew Haley  <aph@redhat.com>
2341
2342         * jcf-parse.c (set_source_filename): Don't check for
2343         CLASS_FROM_CURRENTLY_COMPILED_P.
2344         Remove // comments.
2345
2346 2006-07-07  Andrew Haley  <aph@redhat.com>
2347
2348         * java-tree.h (java_read_sourcefilenames): Declare.
2349         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2350         * lang.opt (fsource-filename): New opt.
2351         * lang-specs.h: Add -fsource-filename.
2352         * jcf-parse.c (num_files, filenames): New variables.
2353         (reverse, cmpstringp, java_read_sourcefilenames,
2354         find_sourcefile): New.
2355         (set_source_filename): Call find_sourcefile to find the real name
2356         of a source file.
2357
2358 2006-06-27  Tom Tromey  <tromey@redhat.com>
2359
2360         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2361         Signature, LocalVariableTypeTable, annotation attributes.
2362         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2363         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2364         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2365         (HANDLE_METHOD): Likewise.
2366         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2367         (print_annotation): New function.
2368         (print_element_value): Likewise.
2369         (indent): Likewise.
2370         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2371         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2372         (print_parameter_annotations): New function.
2373         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2374         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2375         Likewise.
2376         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2377         (print_annotations): New function.
2378
2379 2006-06-23  Tom Tromey  <tromey@redhat.com>
2380
2381         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
2382         emitting class files, always use 1.5.
2383         * gcj.texi (Input Options): Document -fsource.
2384         (Code Generation): Document -ftarget.
2385
2386 2006-06-21  Tom Tromey  <tromey@redhat.com>
2387
2388         PR java/28089:
2389         * expr.c (expand_java_field_op): Initialize field's declaring
2390         class.
2391
2392 2006-06-20  Tom Tromey  <tromey@redhat.com>
2393
2394         * expr.c (push_value): Always flush quick stack.
2395
2396 2006-06-19  Tom Tromey  <tromey@redhat.com>
2397
2398         * expr.c (push_value): Also flush quick stack if value is a
2399         component_ref.
2400
2401 2006-06-19  Tom Tromey  <tromey@redhat.com>
2402
2403         * expr.c (push_value): Flush quick stack if value has side
2404         effects.
2405
2406 2006-06-13  Tom Tromey  <tromey@redhat.com>
2407
2408         * class.c (is_compiled_class): Explicitly check for current
2409         class.
2410
2411 2006-06-09  Tom Tromey  <tromey@redhat.com>
2412
2413         * gjavah.c (decompile_method): Don't decompile a static field
2414         accessor method.
2415
2416 2006-06-06  Tom Tromey  <tromey@redhat.com>
2417
2418         * lang-specs.h <jc1>: Add .jar file to command line if
2419         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
2420
2421 2006-06-05  Tom Tromey  <tromey@redhat.com>
2422
2423         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2424         synthetic, enum, annotation.
2425         * jcf.h (ACC_BRIDGE): New macro.
2426         (ACC_VARARGS): Likewise.
2427         (ACC_SYNTHETIC): Likewise.
2428         (ACC_ENUM): Likewise.
2429         (ACC_ANNOTATION): Likewise.
2430
2431 2006-06-04  Tom Tromey  <tromey@redhat.com>
2432
2433         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2434         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2435         and -ftarget.
2436         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
2437         when needed.  Handle classpath-setting.
2438         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2439         * lang-specs.h: Rewrote.
2440
2441 2006-06-04  Tom Tromey  <tromey@redhat.com>
2442
2443         * jcf-io.c (find_class): Set source_ok to 0.
2444         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2445         (parse_class_file): Don't call java_mark_class_local.
2446         (java_parse_file): Skip .java files.  Call java_mark_class_local
2447         before lowering any code.
2448         (parse_zip_file_entries): Don't call duplicate_class_warning
2449         here.
2450         (process_zip_dir): ... call it here.
2451         * class.c (add_field): Don't mark field external if it is being
2452         compiled into this object.
2453         (make_class_data): Handle situation where class_dtable_decl is
2454         created before Class is compiled.
2455         (is_compiled_class): Don't assume files in zip are compiled into
2456         this object.
2457         (layout_class_method): Don't mark method external if it is being
2458         compiled into this object.
2459
2460 2006-06-04  Tom Tromey  <tromey@redhat.com>
2461
2462         * jcf-path.c (jcf_path_compute): New function.
2463         * jcf.h (jcf_path_compute): Declare.
2464
2465 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2466
2467         * decl.c: Include langhooks.h.
2468         (builtin_function): Remove.
2469         (java_init_decl_processing): Replace calls to builtin_function
2470         with add_builtin_function.
2471         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2472         (java/decl.o): Depend on langhooks.h.
2473         * java-tree.h (builtin_function): Remove.
2474
2475 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2476
2477         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2478
2479 2006-09-12  Tom Tromey  <tromey@redhat.com>
2480
2481         * expr.c (push_value): Always flush quick stack.
2482
2483 2006-09-12  Tom Tromey  <tromey@redhat.com>
2484
2485         PR java/29013:
2486         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2487         the push of the called method's return result.
2488
2489 2006-09-12  Tom Tromey  <tromey@redhat.com>
2490
2491         * jvspec.c (lang_specific_driver): Read spec file even if
2492         -fsyntax-only.
2493
2494 2006-09-12  Tom Tromey  <tromey@redhat.com>
2495
2496         PR java/28754:
2497         * expr.c (expand_java_field_op): Initialize field's declaring
2498         interface if necessary.
2499
2500 2006-09-12  Tom Tromey  <tromey@redhat.com>
2501
2502         PR java/28892:
2503         * expr.c (expand_java_field_op): No error for assignments not in
2504         class initializer or constructor.
2505
2506 2006-08-22  Andrew Haley  <aph@redhat.com>
2507
2508         * decl.c (java_add_stmt): Give the statement list a type.
2509
2510 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2511             Bryce McKinlay  <bryce@mckinlay.net.nz>
2512
2513         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2514
2515 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
2516
2517         PR java/8923
2518         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2519         or '--' is used with a constant operand.
2520         (java_complete_lhs): When processing a '++' or '--' expression,
2521         don't call java_complete_tree but java_complete_lhs, so that a
2522         static final variable operand is never replaced by its value. This
2523         avoids an ICE later on.
2524         (patch_unaryop): Fixed typo in comment.
2525
2526 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2527
2528         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2529
2530 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2531
2532         * builtins.c (check_for_builtin): If a builtin could result in a
2533         direct call being generated, don't use it if flag_indirect_dispatch
2534         is set.
2535
2536 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2537
2538         * gcj.texi (Invocation): Corrections for Invocation API example.
2539
2540 2006-07-04  Andrew Haley  <aph@redhat.com>
2541
2542         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2543         entry.
2544
2545 2006-06-21  Andrew Haley  <aph@redhat.com>
2546
2547         * java-tree.h (update_aliases): Remove
2548         * expr.c (expand_iinc): Remove call to update_aliases().
2549         (STORE_INTERNAL): Likewise.
2550         * decl.c (update_aliases, initialize_local_variable) 
2551         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2552
2553 2006-06-19  Andrew Haley  <aph@redhat.com>
2554
2555         PR java/1305
2556         PR java/27908
2557         * expr.c (java_modify_addr_for_volatile): New function.
2558         (expand_java_field_op): Handle volatile fields.
2559         * java-gimplify.c (java_gimplify_component_ref): Call
2560         java_modify_addr_for_volatile to give the field_ref the correct
2561         volatile type.
2562         (java_gimplify_modify_expr): Likewise.
2563         * java-tree.h (java_modify_addr_for_volatile): New decl.
2564
2565 2006-06-17  Karl Berry  <karl@gnu.org>
2566
2567         * gcj.texi (@dircategory): Use "Software development" instead
2568         of "Programming", following the Free Software Directory.
2569
2570 2006-06-16  Andrew Haley  <aph@redhat.com>
2571
2572         * class.c (make_class_data): When using flag_indirect_classes,
2573         don't initialize the vtable of Class instances.
2574
2575 2006-06-09  Andrew Haley  <aph@redhat.com>
2576
2577         PR java/1305
2578         PR java/27908
2579         * builtins.c (initialize_builtins): Add __sync_synchronize().
2580         * class.c (add_field): Mark volatile fields.
2581         * java-gimplify.c (java_gimplify_expr): Call new functions to
2582         handle self-modifying exprs and COMPONENT_REFs.
2583         (java_gimplify_component_ref): New.
2584         (java_gimplify_modify_expr): Add handling for volatiles.
2585
2586 2006-06-08  Tom Tromey  <tromey@redhat.com>
2587
2588         * gcj.texi (libgcj Runtime Properties): Document
2589         gnu.gcj.user.realname.
2590
2591 2006-06-08  Andrew Haley  <aph@redhat.com>
2592
2593         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2594         get_symbol_table_index().
2595         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2596         private method.
2597         (build_known_method_ref): New arg: special.  Pass it to
2598         get_symbol_table_index.
2599         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2600         the method list.
2601         (build_invokevirtual): New arg: special.  Pass it to
2602         get_symbol_table_index.
2603         (expand_invoke): New variable: special.
2604         Pass it to maybe_rewrite_invocation().
2605         Pass it to build_known_method_ref().
2606         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2607         build the symbol table conbstructor.
2608         (emit_symbol_table): Extract SPECIAL from the method list and pass
2609         it to build_symbol_entry().
2610         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2611         special accordingly.
2612
2613 2006-06-06  David Daney  <ddaney@avtrex.com>
2614
2615         * gcj.texi (libgcj Runtime Properties): Document
2616         gnu.gcj.runtime.NameFinder.show_raw and
2617         gnu.gcj.runtime.NameFinder.remove_unknown.
2618
2619 2006-06-06  Tom Tromey  <tromey@redhat.com>
2620
2621         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2622         synthetic, enum, annotation.
2623         * jcf.h (ACC_BRIDGE): New macro.
2624         (ACC_VARARGS): Likewise.
2625         (ACC_SYNTHETIC): Likewise.
2626         (ACC_ENUM): Likewise.
2627         (ACC_ANNOTATION): Likewise.
2628
2629 2006-06-06  Mike Stump  <mrs@apple.com>
2630
2631         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2632         installing during build.
2633
2634 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2635
2636         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2637         classname-to-library resolution mechanism.
2638         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2639         mechanism deprecated.
2640         (libgcj Runtime Properties): Document
2641         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2642
2643 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2644
2645         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2646         bit wide type.
2647         (jword): Define to uint64 on 64-bit arches.
2648         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2649
2650 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2651
2652         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2653         typos.
2654
2655 2006-05-26  Tom Tromey  <tromey@redhat.com>
2656
2657         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2658         * verify-glue.c (vfy_class_type): New function.
2659         * verify-impl.c (check_constant): Allow 'ldc class'.
2660         * verify.h (vfy_class_type): Declare.
2661
2662 2006-05-25  Andrew Haley  <aph@redhat.com>
2663
2664         PR java/27756
2665         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2666         update all lifetimes, not just the first one.
2667
2668 2006-05-24  Tom Tromey  <tromey@redhat.com>
2669
2670         * java-tree.h: Fixed flag documentation.
2671
2672 2006-05-24  Tom Tromey  <tromey@redhat.com>
2673
2674         PR libgcj/27729:
2675         * jcf.h (ACC_INVISIBLE): Changed value.
2676
2677 2006-05-24  Andrew Haley  <aph@redhat.com>
2678
2679         PR java/27754
2680         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2681         COMPOUND_EXPR.
2682
2683 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2684
2685         * lang.opt (femit-class-file): Remove VarExists.
2686
2687 2006-05-16  Tom Tromey  <tromey@redhat.com>
2688
2689         * verify-impl.c (verify_instructions_0) <op_return>: Special case
2690         for Object.<init>.
2691
2692 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2693
2694         PR driver/26885
2695         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2696         $(GCC_OBJS).
2697
2698 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2699
2700         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2701         (java/expr.o): Replace target.h with $(TARGET_H).
2702         (java/parse.o): Likewise.
2703
2704 2006-05-10  Andrew Haley  <aph@redhat.com>
2705
2706         * class.c (emit_indirect_register_classes): Fix comment.
2707
2708 2006-05-04  Tom Tromey  <tromey@redhat.com>
2709
2710         * java-tree.h (uses_jv_markobj_p): Declare.
2711         * class.c (uses_jv_markobj_p): Removed.
2712         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2713         (get_boehm_type_descriptor): Use it.
2714         (uses_jv_markobj_p): Moved from class.c.  Return bool.
2715
2716 2006-05-04  Tom Tromey  <tromey@redhat.com>
2717
2718         * java-tree.def (THIS_EXPR): Now a tcc_expression.
2719
2720 2006-05-04  Andrew Haley  <aph@redhat.com>
2721
2722         * class.c (make_field_value): Always build_address_of fdecl if
2723         there is an initializer.
2724
2725 2006-05-03  Andrew Haley  <aph@redhat.com>
2726
2727         PR libgcj/27352
2728         * expr.c (maybe_rewrite_invocation): New function.
2729         (rewrite_arglist_getclass): Likewise.
2730         (rules): New.
2731         (expand_invoke): Call maybe_rewrite_invocation.
2732         * parse.y (patch_invoke): Likewise.
2733         * java-tree.h: (maybe_rewrite_invocation): New function.
2734
2735 2006-04-21  Andrew Haley  <aph@redhat.com>
2736
2737         * lang.c (java_init): Handle flag_indirect_classes.
2738         * jvgenmain.c: Use "class$$" instead of "class$".
2739         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2740         DECLs.
2741         (mangle_class_field): Special case "class$$" as well as "class$".
2742         * constants.c (build_ref_from_constant_pool): If
2743         flag_indirect_classes, generate a ref into the heap.
2744         * decl.c (constants_field_decl_node,
2745         constants_data_field_decl_node): New.
2746         * class.c (build_static_class_ref): New.
2747         (build_classdollar_field): Factor out from build_class_ref().
2748         (make_field_value): Handle static fields in heap.
2749         (make_class_data): Make sure we get a static ref to class.
2750         Make class initializer const if flag_indirect_classes.
2751         (register_class): Build a class_ref for initialization if
2752         flag_indirect_classes.
2753         (emit_indirect_register_classes): New.
2754
2755 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2756
2757         * expr.c, gjavah.c: Fix comment typos.
2758
2759 2006-04-03  Andrew Haley  <aph@redhat.com>
2760
2761         PR java/26858
2762         * expr.c (build_field_ref): Don't check the field offset if
2763         flag_syntax_only.
2764
2765 2006-03-30  Andrew Haley  <aph@redhat.com>
2766
2767         PR java/26858
2768         * lang.c (java_attribute_table): New.
2769         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2770         * expr.c (build_field_ref): Add a null pointer check for all
2771         fields of offset > 4k.  Don't do so for accesses via the this
2772         pointer, which we know can never be null.
2773         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2774         methods nonnull.
2775
2776 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
2777
2778         * Make-lang.in: Rename docdir to gcc_docdir.
2779
2780 2006-03-30  Tom Tromey  <tromey@redhat.com>
2781
2782         PR java/26042:
2783         * parse.y (java_reorder_fields): Reset superclass field's size as
2784         well.
2785
2786 2006-03-28  Tom Tromey  <tromey@redhat.com>
2787
2788         PR java/26390:
2789         * parse.y (find_most_specific_methods_list): Added 'class'
2790         argument.
2791         (lookup_method_invoke): Updated.
2792
2793 2006-03-15  Tom Tromey  <tromey@redhat.com>
2794
2795         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2796         non-static method calls.
2797
2798 2006-03-15  David Daney  <ddaney@avtrex.com>
2799
2800         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2801         declaration.
2802
2803 2006-03-15  David Daney  <ddaney@avtrex.com>
2804
2805         * lang.opt (-freduced-reflection): New option.
2806         * lang.c (java_post_options): Generate an error if
2807         -freduced-reflection used with -fjni or -findirect-dispatch.
2808         * java-tree.h (flag_reduced_reflection): Declare new variable.
2809         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2810         if bitmap overflows and flag_reduced_reflection set.
2811         * class.c (uses_jv_markobj_p): New function.
2812         (make_class_data): Moved generation of vtable to before
2813         reflection data, generate less reflection data if
2814         flag_reduced_reflection set.
2815         * gcj.texi: Document -freduced-reflection.
2816
2817 2006-03-15  Tom Tromey  <tromey@redhat.com>
2818
2819         PR java/26638:
2820         * class.c (get_interface_method_index): Don't put <clinit> into
2821         interface table.
2822
2823 2006-03-15  Tom Tromey  <tromey@redhat.com>
2824
2825         * parse.y (analyze_clinit_body): Ignore empty statements.
2826
2827 2006-03-08  David Daney  <ddaney@avtrex.com>
2828
2829         * gcj.texi: Document -static-libgcj option.
2830
2831 2006-02-20  Andrew Haley  <aph@redhat.com>
2832
2833         * jcf-parse.c (parse_class_file): Set input_location from
2834         current_class.
2835
2836 2006-02-15  Andrew Haley  <aph@redhat.com>
2837
2838         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2839         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2840         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2841
2842 2006-02-09  Andrew Haley  <aph@redhat.com>
2843
2844         PR java/26192
2845         * expr.c (expand_invoke): Allow methods in arrays to be resolved
2846         in their superclass.
2847
2848         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2849         array types.
2850         
2851 2006-02-08  Tom Tromey  <tromey@redhat.com>
2852
2853         PR java/22578:
2854         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2855         * builtins.c (convert_real): New function.
2856         (java_builtins): Handle Float.intBitsToFloat,
2857         Float.floatToRawIntBits, Double.longBitsToDouble,
2858         Double.doubleToRawLongBits.
2859
2860 2006-02-07  Andrew Haley  <aph@redhat.com>
2861
2862         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
2863         class other than the one in which we expected to find it, ignore
2864         the result.
2865
2866         PR java/25535
2867         * constants.c (build_constants_constructor): move initializer into
2868         first halfword on a 64-bit big-endian machine.
2869
2870 2006-02-04  Tom Tromey  <tromey@redhat.com>
2871
2872         PR java/25676:
2873         * builtins.c (max_builtin): Skip floating point 'max'.
2874         (min_builtin): Skip floating point 'min'.
2875         (check_for_builtin): Never return NULL_TREE.
2876
2877 2006-02-04  Tom Tromey  <tromey@redhat.com>
2878
2879         PR java/26097:
2880         * expr.c (push_type): Avoid side effect in gcc_assert.
2881
2882 2006-02-04  Roger Sayle  <roger@eyesopen.com>
2883
2884         * decl.c (java_init_decl_processing): Create char_type_node as a
2885         regular INTEGER_TYPE node.
2886         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2887         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2888         test for char_type_node and promoted_char_type_node as special
2889         instances of INTEGER_TYPE tree codes.
2890         (promote_type,build_java_signature): Likewise.
2891         * jcf-write.c (adjust_typed_op): Likewise.
2892         * mangle.c (mangle_type): Likewise.
2893         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2894         * parse.h (JINTEGRAL_TYPE_P): Likewise.
2895
2896 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
2897
2898         * expr.c (java_stack_swap): Revert gcc_assert patch.
2899
2900 2006-02-03  Ben Elliston  <bje@au.ibm.com>
2901
2902         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2903         * typeck.c: Likewise.
2904         * verify-impl.c: Likewise.
2905         * class.c: Likewise.
2906         * decl.c: Likewise.
2907         * jcf-parse.c: Likewise.
2908         * constants.c: Likewise.
2909         * check-init.c: Likewise.
2910         * jcf-write.c: Likewise.
2911         * verify-glue.c: Likewise.
2912         * mangle.c: Likewise.
2913         * expr.c: Likewise.
2914         * lang.c: Likewise.
2915         * boehm.c: Likewise.
2916
2917 2006-02-01  Jan Hubicka  <jh@suse.cz>
2918
2919         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2920         * lang.c (java_init_options): Set no_unit_at_a_time_default.
2921
2922 2006-01-30  Andrew Haley  <aph@redhat.com>
2923
2924         PR java/21428
2925         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2926
2927 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
2928
2929         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2930         Update copyright notice dates.
2931
2932 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2933
2934         * jvspec.c (lang_specific_spec_functions): Remove.
2935
2936 2006-01-06  Tom Tromey  <tromey@redhat.com>
2937
2938         * gcj.texi (Arrays): Added more documentation for
2939         JvNewObjectArray.
2940         (Primitive types): Correct information about primitive classes.
2941         (Reference types): New node.
2942         (Index): New node.
2943
2944 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
2945
2946         * jcf-parse.c (set_source_filename): Set the decl source location
2947         even when returning early.
2948
2949 2005-12-15  Tom Tromey  <tromey@redhat.com>
2950             Andrew Haley  <aph@redhat.com>
2951
2952         PR java/25429
2953         * parse.y (resolve_expression_name): Don't generate accessor
2954         methods for constant fields.
2955
2956 2005-12-13  Andrew Haley  <aph@redhat.com>
2957
2958         PR java/25366
2959         PR java/25368
2960         * class.c (maybe_layout_super_class): Update current_class before
2961         calling do_resolve_class.
2962
2963 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
2964
2965         PR java/25330
2966         * jcf-write.c (write_classfile): Use PID in temporary class
2967         file. Save/restore errno when reporting error.
2968
2969 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2970
2971         PR java/9861
2972         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2973         to bare_function_type and including the return type
2974         * builtins.c (initialize_builtins) : Change builtin mangled name
2975         constants to conform to new mangling scheme
2976
2977 2005-12-08  Andrew Haley  <aph@redhat.com>
2978
2979         PR libgcj/25265
2980         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2981         (soft_abstractmethod_node): New.
2982         * expr.c (build_field_ref): Add in-line check for missing field.
2983         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2984
2985 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2986
2987         * Make-lang.in (java.all.build, java.install-normal): Remove.
2988
2989 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2990
2991         * Make-lang.in: Remove all dependencies on s-gtype, except for
2992         gt-java-parse.h.
2993
2994 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
2995
2996         * class.c (build_utf8_ref, emit_register_classes): Use
2997         switch_to_section and get_section.
2998
2999 2005-12-06  Tom Tromey  <tromey@redhat.com>
3000
3001         PR java/25283:
3002         * parse.y (patch_new_array_init): Revert previous patch.
3003         (lookup_method_invoke): Use size-less array type when creating an
3004         anonymous constructor.
3005
3006 2005-12-05  Tom Tromey  <tromey@redhat.com>
3007
3008         * parse.y (patch_new_array_init): Don't set length on array.
3009
3010 2005-12-02  Richard Guenther  <rguenther@suse.de>
3011
3012         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3013         buildN instead of build.
3014         * class.c (finish_class): Likewise.
3015         * expr.c (java_create_object): Likewise.
3016
3017 2005-11-28  Tom Tromey  <tromey@redhat.com>
3018
3019         PR java/18278:
3020         * expr.c (build_jni_stub): Unwrap the return value.
3021         * java-tree.h (soft_unwrapjni_node): New define.
3022         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3023         * decl.c (java_init_decl_processing): Initialize
3024         soft_unwrapjni_node.
3025
3026 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
3027
3028         * gcj.texi (gij options): Add -Xss documentation.
3029
3030 2005-11-08  Wil Mahan  <wmahan@gmail.com>
3031
3032         PR java/23617
3033         * zextract.c (read_zip_archive): Fix out of memory error when
3034         reading jar files with zip-style comments.
3035
3036 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
3037
3038         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3039         formats.
3040         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3041
3042 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3043             Wil Mahan <wmahan@gmail.com>
3044
3045         PR java/23620
3046         * class.c (make_class): Create empty binfo here.
3047         (set_super_info): Only create binfo if we have superclasses.
3048
3049 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
3050
3051         PR java/24127
3052         * parse.y (method_header): Make the result of the rule a NULL_TREE
3053         when a parsing error occurs.
3054
3055 2005-09-29  Tom Tromey  <tromey@redhat.com>
3056
3057         PR java/24120:
3058         * jcf-io.c (memoized_dirlist_hash): New function.
3059         (caching_stat): Use it.
3060
3061 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3062
3063         PR java/21418
3064         * class.c (inherits_from_p): Try to lay out super class
3065         if it is not already laid out.
3066         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3067         is a NULL_TREE.
3068
3069 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3070
3071         * builtins.c (max_builtin, min_builtin, abs_builtin,
3072         java_build_function_call_expr): Use fold_buildN.
3073         * class.c (layout_class_method): Likewise.
3074         * expr.c (java_truthvalue_conversion, build_java_jsr,
3075         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3076         build_java_binop, build_field_ref, expand_compare,
3077         build_known_method_ref, build_invokevirtual,
3078         process_jvm_instruction): Likewise.
3079         * parse.y (patch_binop, patch_exit_expr): Likewise.
3080         * typeck.c (convert_ieee_real_to_integer): Likewise.
3081         (convert): Don't call fold after convert_ieee_real_to_integer.
3082
3083 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3084
3085         PR java/23891
3086         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3087         the newly created type. Set import lists here, not in create_class.
3088         (jdep_resolve_class): Set current_class.
3089         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
3090         the current package context, not ctxp->package.
3091         (cicp_cache): Removed.
3092         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3093         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3094         * java-tree.h (TYPE_PACKAGE): New macro.
3095         (struct lang_type): New member 'package'.
3096
3097 2005-09-09  Andrew Haley  <aph@redhat.com>
3098
3099         PR libgcj/23182 
3100         * expr.c (pop_type_0): If the expected type is object or ptr
3101         (i.e. void*), return the type of the object we just popped from
3102         the stack.
3103
3104 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3105
3106         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3107         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3108
3109 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3110
3111         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3112         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3113         typos.  Follow spelling conventions.
3114
3115 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3116
3117         PR java/23431
3118         * typeck.c (lookup_do): Look up interfaces for the original class,
3119         not the base class.
3120         * parse.y (java_check_regular_methods): Fix diagnostic message for
3121         more restrictive overriding of a method from an interface.
3122
3123 2005-08-16  Tom Tromey  <tromey@redhat.com>
3124
3125         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3126         class' initial state.
3127
3128 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3129
3130         PR java/22113
3131         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3132         `literal_token' for large numeric input tokens.
3133
3134 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3135
3136         PR java/19870
3137         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3138         and expand to handle method accesses across nested classes.
3139         (build_outer_method_access_method): Rename to
3140         build_nested_method_access_method.  Minor adjustments to comments.
3141         (resolve_expression_name): Use the newly-renamed
3142         nested_member_access_p method.
3143         (resolve_qualified_expression_name): Likewise.
3144         (patch_method_invocation): Also consider static methods for access
3145         method generation.  Minor adjustments to comments.
3146         (maybe_use_access_method): Use the more general
3147         nested_memeber_access_p to determine access across nested class
3148         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3149
3150 2005-08-15  Tom Tromey  <tromey@redhat.com>
3151
3152         PR java/23300.
3153         * expr.c (build_field_ref): Don't generate otable reference when
3154         DECL_FIELD_OFFSET is 0.
3155         * class.c (maybe_layout_super_class): Pass outer class to
3156         do_resolve_class.
3157
3158 2005-08-15  Tom Tromey  <tromey@redhat.com>
3159
3160         * java-tree.h (LABEL_IN_SUBR): Removed.
3161         (LABEL_IN_SUBR): Likewise.
3162         (LABEL_IS_SUBR_START): Likewise.
3163         (LABEL_SUBR_START): Likewise.
3164         (LABEL_SUBR_CONTEXT): Likewise.
3165         (LABEL_CHANGED): Likewise.
3166         (LABEL_RETURN_LABEL): Likewise.
3167         (LABEL_RETURN_TYPE_STATE): Likewise.
3168         (LABEL_RETURN_LABELS): Likewise.
3169         (RETURN_MAP_ADJUSTED): Likewise.
3170         (LABEL_PENDING_CHAIN): Likewise.
3171
3172 2005-08-15  Tom Tromey  <tromey@redhat.com>
3173
3174         * Make-lang.in (JAVA_OBJS): Removed verify.o
3175         (java/verify.o): Removed.
3176         * verify.c: Removed.
3177         * lang.c (flag_new_verifier): Removed.
3178         (java_post_options): Updated.
3179         * java-tree.h (flag_new_verifier): Removed.
3180         (verify_jvm_instructions): Removed.
3181         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3182         (build_java_check_indexed_type): Likewise.
3183         (expand_java_arraystore): Likewise.
3184         (expand_java_arrayload): Likewise.
3185         (pop_arguments): Likewise.
3186         (expand_byte_code): Likewise.
3187         (process_jvm_instruction): Likewise.
3188
3189 2005-08-10  Andrew Haley  <aph@redhat.com>
3190
3191         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3192         type mismatches to make legal GIMPLE.
3193
3194 2005-08-10  Robin Green <greenrd@greenrd.org>
3195
3196         PR java/23230:
3197         * parse.y (maybe_use_access_method): Generalize check from
3198         java.lang.Object to any superclass of current_class
3199
3200 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3201
3202         * class.c (build_class_ref): Wrap the primary class type in a
3203         NOP_EXPR.
3204         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3205         primary class type from the NOP_EXPR in which it was placed.
3206
3207 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3208
3209         * expr.c (expand_load_internal): Fix missing parens in
3210         predicate.
3211
3212 2005-07-28  Andrew Haley  <aph@redhat.com>
3213
3214         * expr.c (expand_load_internal): Convert to destination type.
3215
3216 2005-07-22  Manfred Hollstein  <mh@suse.com>
3217
3218         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3219         (check_constant): Likewise.
3220         (check_wide_constant): Likewise.
3221
3222 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3223
3224         Make CONSTRUCTOR use VEC to store initializers.
3225         * check-init.c (check_init): Update to cope with VEC in
3226         CONSTRUCTOR_ELTS.
3227         * class.c (make_field_value, make_method_value, get_dispatch_table,
3228         make_class_data, emit_symbol_table, emit_catch_table,
3229         emit_assertion_table): Use build_constructor_from_list instead of
3230         build_constructor.
3231         * constants.c (build_constants_constructor): Likewise.
3232         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3233         VEC in CONSTRUCTOR_ELTS.
3234         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3235         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3236         of a TREE_LIST.
3237         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3238         CONSTRUCTOR_ELTS.
3239         * parse.y (build_new_array_init): Use build_constructor_from_list
3240         instead of build_constructor.
3241         (patch_new_array_init): Update to cope with VEC in
3242         CONSTRUCTOR_ELTS.
3243         (array_constructor_check_entry): Likewise.
3244
3245 2005-07-12  Tom Tromey  <tromey@redhat.com>
3246
3247         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3248         command line.
3249
3250 2005-07-12  Tom Tromey  <tromey@redhat.com>
3251
3252         PR java/19674:
3253         * parse-scan.y (interface_member_declaration): Added
3254         empty_statement.
3255
3256 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3257         
3258         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3259         (LABEL_PENDING_CHAIN): Ditto.
3260         (LABEL_PC): Ditto.
3261         (DECL_BIT_INDEX): Ditto.        
3262
3263 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3264
3265         PR java/18119
3266         * parse.y (inner_class_accessible): New function. Logic moved from
3267         check_inner_class_access.
3268         (check_inner_class_access): Use inner_class_accessible.
3269         (resolve_inner_class): Simplify arguments. Create circularity hash
3270         here. Keep looking for classes if we found one that was inaccessible. 
3271         Return the inaccessible class only if there is no other match.
3272         (do_resolve_class): Update for new resolve_inner_class arguments.
3273         Don't create circularity_hash here.
3274
3275 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3276
3277         PR java/21045
3278         * parse.y (add_exception_to_throws): New function.
3279         (purge_unchecked_exceptions): Removed.
3280         (get_constructor_super): Renamed from verify_constructor_super. Now
3281         returns the super constructor after verification.
3282         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3283         or save/restore the exception list.
3284         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3285         class initializers and constructors to the throws clause of the method. 
3286
3287 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3288
3289         PR java/19674
3290         * parse.y (interface_member_declaration): Allow empty statements in
3291         interface declarations.
3292
3293 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3294
3295         * Makefile.in (parse.o): Adjust dependencies.
3296         * parse.y: Include tree-dump.h.
3297
3298 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3299
3300         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3301         flag for quoting.
3302
3303 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3304
3305         * parse.y (issue_warning_error_from_context): Call
3306         pp_output_formatted_text to be able to get the buffer.
3307
3308 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3309
3310         * parse.y (issue_warning_error_from_context): Update for the
3311         renaming of pp_format_text to pp_format.
3312
3313 2005-06-28  Paul Brook  <paul@codesourcery.com>
3314
3315         * decl.c (java_init_decl_processing): Call
3316         default_init_unwind_resume_libfunc.
3317
3318 2005-06-27  Tom Tromey  <tromey@redhat.com>
3319
3320         PR java/21540, PR java/13788:
3321         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3322         fold_constant_for_init.
3323         (patch_binop): Added 'folding' argument.  Updated all callers.
3324         (patch_unaryop) <NOP_EXPR>: New case.
3325         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3326         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3327
3328 2005-06-25  Jan Hubicka  <jh@suse.cz>
3329
3330         * builtins.c (define_builtin): Accept new flags parameter.
3331         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3332
3333 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3334
3335         * all files: Update FSF address in copyright headers.
3336
3337 2005-06-24  Tom Tromey  <tromey@redhat.com>
3338
3339         * verify-impl.c (verify_instructions_0): Correctly handle
3340         situation where PC falls off end.
3341
3342 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3343
3344         PR java/20697
3345         * parse.y (find_most_specific_methods_list): Remove special case for
3346         inner classes.
3347
3348 2005-06-15  Tom Tromey  <tromey@redhat.com>
3349
3350         PR libgcj/21906:
3351         * class.c (make_method_value): Use soft_abstractmethod_node for
3352         abstract method.
3353         * java-tree.h (soft_abstractmethod_node): New define.
3354         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3355         * decl.c (java_init_decl_processing): Initialize
3356         soft_abstractmethod_node.
3357
3358 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3359
3360         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3361
3362 2005-06-13  Per Bothner  <per@bothner.com>
3363
3364         * expr.c (int highest_label_pc_this_method,
3365         start_label_pc_this_method): New globals.
3366         (lookup_label): Add start_label_pc_this_method to pc for label, and
3367         update highest_label_pc_this_method.  This prevents conflicts between
3368         labels from different methods.
3369         * java-tree.h: Declare new globals.
3370         * jcf-parse.c (parse_class_file): If needed bump
3371         start_label_pc_this_method and reset highest_label_pc_this_method.
3372
3373 2005-06-13  Tom Tromey  <tromey@redhat.com>
3374
3375         PR java/21844:
3376         * parse.y (nested_field_access_p): Handle case where outer field
3377         is inherited by enclosing class.
3378
3379 2005-06-12  Per Bothner  <per@bothner.com>
3380
3381         * class.c (inherits_from_p): Do load_class if needed.
3382
3383 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3384
3385         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3386         * java-tree.h (parse_error_context): Move...
3387         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3388         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3389         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3390
3391 2005-06-08  Roger Sayle  <roger@eyesopen.com>
3392
3393         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3394
3395 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3396
3397         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3398         msgid for argument name.
3399         * gjavah.c (error): Likewise.
3400         * java-tree.h (parse_error_context): Likewise.
3401         * parse.y (parse_error_context, parse_warning_context,
3402         issue_warning_error_from_context): Likewise.
3403
3404 2005-06-01  Tom Tromey  <tromey@redhat.com>
3405
3406         PR java/21722:
3407         * class.c (build_static_field_ref): Don't fold constant fields if
3408         current class is from a .class file and we're using indirect
3409         dispatch.
3410
3411 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3412
3413         * java/verify-glue.c: Don't include errors.h and include toplev.h.
3414         * java/Make-lang.in: Updates dependencies.
3415
3416 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
3417
3418         PR java/19870.
3419         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3420         NESTED_FIELD_ACCESS_IDENTIFIER_P.
3421         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3422         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3423         * jcf-write.c (generate_classfile): Use
3424         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3425         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3426         * parse.y (build_outer_field_access): Rename to
3427         build_nested_field_access. Support static fields and outer-to-inner
3428         class accesses.
3429         (outer_field_access_p): Rename to nested_field_access_p. Support
3430         static fields and generalise to outer-to-inner class and sibling
3431         inner class accesses.
3432         (outer_field_expanded_access_p): Rename to
3433         nested_field_expanded_access_p and support static fields.
3434         (outer_field_access_fix): Rename to nested_field_access_fix and
3435         support static fields.
3436         (build_outer_field_access_expr): Rename to
3437         build_nested_field_access_expr and support static fields.
3438         (build_outer_field_access_methods): Rename to
3439         build_nested_field_access_methods and support static fields. For
3440         static fields, generate accessors without class instance parameters.
3441         (build_outer_field_access_method): Rename to
3442         build_nested_field_access_method and support static fields.
3443         (build_outer_method_access_method): Use
3444         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3445         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3446         (resolve_expression_name): Consider static field accesses across
3447         nested classes.
3448         (resolve_qualified_expression_name): Likewise.
3449         (java_complete_lhs): Use nested_field_access_fix instead of
3450         outer_field_access_fix.
3451         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3452         Use nested_field_expanded_access_p instead of
3453         outer_field_expanded_access_p. Use nested_field_access_fix instead
3454         of outer_field_access_fix.
3455         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3456         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3457
3458 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3459
3460         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
3461         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3462         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3463         MINOR_BINARYCOMPAT_ABI_VERSION): New.
3464         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3465         (parse_version): Calculate version ID using new method. Use bit-flags
3466         for flag_indirect_dispatch and flag_bootstrap_classes.
3467
3468 2005-05-25  Richard Henderson  <rth@redhat.com>
3469
3470         PR libgcj/21692
3471         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3472         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3473         DECL_CONTEXT; avoid pushdecl_top_level.
3474         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3475         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3476         (layout_class_method): Likewise.
3477         * decl.c (java_mark_cni_decl_local): New.
3478         (java_mark_class_local): Use it.
3479         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3480         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3481         (struct lang_decl_func): Add local_cni;
3482         (struct lang_decl_var): Add class_field, vtable.
3483         (java_mangle_decl): Declare.
3484         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3485         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3486         (mangle_obstack_1): New.
3487         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
3488         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
3489         lhd_set_decl_assembler_name for things that don't need mangling.
3490         (mangle_class_field): Rename from java_mangle_class_field, make
3491         static, don't call init_mangling or finish_mangling.
3492         (mangle_vtable): Similarly.
3493         (mangle_local_cni_method_decl): New.
3494         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
3495         gcc_assert, and MANGLE_RAW_STRING.
3496         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3497
3498 2005-05-25  DJ Delorie  <dj@redhat.com>
3499
3500         * class.c (set_constant_value): Move warning control from if() to
3501         warning(OPT_*).
3502
3503 2005-05-24  Richard Henderson  <rth@redhat.com>
3504
3505         * builtins.c (define_builtin): Don't call make_decl_rtl.
3506         * constants.c (build_constant_data_ref): Likewise.
3507         * class.c (build_utf8_ref): Likewise.
3508         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3509         (get_dispatch_table, layout_class_method): Likewise.
3510         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3511         by hand.
3512         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3513         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3514         to determine if we need a non-zero address.
3515         * decl.c (builtin_function): Don't call make_decl_rtl.
3516         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3517         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3518         * resource.c (compile_resource_data): Likewise.
3519         * parse.y (resolve_field_access): Re-word comment to avoid
3520         building DECL_RTL.
3521
3522 2005-05-24  Richard Henderson  <rth@redhat.com>
3523
3524         * class.c (registered_class): Take it out of class_roots; turn into
3525         a vec of trees.
3526         (register_class): Make static.  Don't duplicate decl node.  Use
3527         VEC_safe_push.
3528         (emit_register_classes): Use VEC_iterate.  Use output_constant
3529         instead of assemble_integer.  Don't call mark_decl_referenced
3530         directly.
3531         * java-tree.h (register_class): Remove decl.
3532
3533 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
3534
3535         PR java/17845
3536
3537         * parse.y (register_package, package_list): Remove.
3538         (package_declaration): Do not call register_package.
3539         (do_resolve_class): Do not use package_list.
3540
3541 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
3542
3543         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3544         unused variable.
3545
3546 2005-05-15  Tom Tromey  <tromey@redhat.com>
3547
3548         PR java/21519:
3549         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3550         NOTE_PUSH.
3551
3552 2005-05-12  Aaron Luchko <aluchko@redhat.com>
3553
3554         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3555
3556 2005-05-11  Tom Tromey  <tromey@redhat.com>
3557
3558         * gcj.texi (Code Generation): Document -fbootstrap-classes.
3559         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3560         (parse_version): Use it.
3561         * lang.opt (-fbootstrap-classes): New option.
3562
3563 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
3564
3565         PR java/21436
3566         * class.c (maybe_layout_super_class): Look for imports in this_class.
3567         * parse.h (ctxp_for_generation_last): New.
3568         (do_resolve_class): Add a parameter.
3569         * parse.y (ctxp_for_generation_last): New.
3570         (java_pop_parser_context): Add at end of list.
3571         (find_in_imports, find_in_imports_on_demand): Look in ctxp
3572         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3573         the given type are NULL.
3574         (do_resolve_class): Look into the imports of the new second parameter.
3575         Adjust recursive calls.
3576         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3577         calls to do_resolve_class.
3578         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3579         (java_complete_class): Do not do that here.
3580
3581 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3582
3583         PR java/20309
3584         * Make-lang.in (java): Add gjnih.
3585         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3586         (GJNIH_OBJS): New variable.
3587         (gjnih$(exeext)): New target.
3588         (JAVA_MANFILES): Add gjnih.1.
3589         (java.uninstall): Add gjnih.1.
3590         (java.mostlyclean): Add gjnih.
3591         (java.maintainer-clean): Add gjnih.1.
3592         (java/gjavah-jni.o): New target.
3593         (.INTERMEDIATE): Add gjnih.pod.
3594         (gjnih.pod): New target.
3595         * config-lang.in (stagestuff): Add gjnih.
3596         * gcj.texi (Top): Add gjnih node.
3597         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3598         -bootclasspath options.
3599         (Invoking gjnih): New node.
3600         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3601         (TOOLNAME): New macro.
3602         (error): Replace hard-coded gcjh with TOOLNAME.
3603         (process_file): Likewise.
3604         (usage): Likewise.
3605         (version): Likewise.
3606         (help): Likewise.  Add help output for -force, -old, -trace and -J
3607         options.
3608         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3609         (options): Add force, old, trace and J fields.
3610         (main): Handle -force, -old, -trace and -J options.
3611
3612 2005-05-03  Tom Tromey  <tromey@redhat.com>
3613
3614         PR java/21245:
3615         * gjavah.c (main): Unlink output file on error.
3616
3617 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3618
3619         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3620         copyright.
3621
3622 2005-04-29  Tom Tromey  <tromey@redhat.com>
3623
3624         * expr.c (build_jni_stub): Updated for change to build_block.
3625
3626 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3627
3628         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3629
3630 2005-04-28  Andrew Haley  <aph@redhat.com>
3631
3632         PR java/19285
3633         * java-tree.h (soft_resolvepoolentry_node): New.
3634         (alloc_constant_fieldref): Declare.
3635         * expr.c (expand_java_field_op): Don't call class_init for
3636         accesses to static fields with indirect dispatch.
3637         * builtins.c (initialize_builtins): Add "__builtin_expect".
3638         * decl.c (soft_resolvepoolentry_node): New variable.
3639         (java_init_decl_processing): Create a decl for
3640         "_Jv_ResolvePoolEntry".
3641         * class.c (build_fieldref_cache_entry): New function.
3642         (build_static_field_ref): Rewrite for indirect dispatch.
3643         * constants.c (find_name_and_type_constant_tree): New function.
3644         (alloc_constant_fieldref): Likewise.
3645         (build_constants_constructor): Handle CONSTANT_Fieldref and
3646         CONSTANT_NameAndType.
3647
3648         PR java/21115
3649         * expr.c (force_evaluation_order): Convert outgoing args smaller
3650         than integer.
3651
3652 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3653
3654         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3655         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
3656         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3657
3658 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3659
3660         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3661         to `unlock_stream' with `unlock_std_streams'.
3662
3663 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3664
3665         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3666         instead of just expr.h.
3667
3668 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3669
3670         * gjavah.c (main): Unlock the stdio streams.
3671         * jcf-dump.c (main): Likewise.
3672         * jv-scan.c (main): Likewise.
3673         * jvgenmain.c (main): Likewise.
3674
3675 2005-04-23  DJ Delorie  <dj@redhat.com>
3676
3677         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3678         parse.y: Adjust warning() callers.
3679
3680 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
3681
3682         * gcj.texi (Object fields): Change "Integer" to "Int" in example
3683         contructor.
3684
3685 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3686
3687         * gcj.texi: Fix typos and bogus example.
3688
3689 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
3690
3691         * except.c: Fix a comment typo.
3692
3693 2005-04-19  Julian Brown  <julian@codesourcery.com>
3694
3695         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3696         indirect dispatch with PIC.
3697
3698 2005-04-18  Andrew Haley  <aph@redhat.com>
3699
3700         * java-except.h (struct eh_range.handler): Remove unused field.
3701         (handle_nested_ranges): Remove function declaration.
3702         (sanity_check_exception_range): Add function declaration.       
3703         * verify.c (verify_jvm_instructions): Remove call to
3704         handle_nested_ranges.
3705         * verify-glue.c (verify_jvm_instructions_new): Call
3706         sanity_check_exception_range.
3707         * except.c (link_handler, eh_range_freelist, link_handler,
3708         handle_nested_ranges): Remove.
3709         (add_handler): Rewrite.
3710         (sanity_check_exception_range): New function.
3711         (print_ranges): New function.
3712
3713 2005-04-13  Julian Brown  <julian@codesourcery.com>
3714
3715         * decl.c (finish_method): Give methods once-only linkage.
3716
3717 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
3718
3719         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3720
3721 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3722
3723         * java-tree.h: Don't use PARAMS().
3724
3725 2005-04-07  Per Bothner  <per@bothner.com>
3726
3727         * class.c (push_class): By default, suppress debug output.
3728         (finish_class): Enable debug output for classes we're emitting.
3729
3730 2005-04-07  Andrew Haley  <aph@redhat.com>
3731
3732         * gcj.texi: Correct gcj-dbtool instructions.
3733
3734 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
3735
3736         * gcj.texi: Fix a typo.
3737         * lang.c: Fix a comment typo.
3738
3739 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
3740
3741         * gcj.texi (Invoking gij): Add descriptions of new -X options.
3742         Mention recognized-and-ignored compatibility options.
3743         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3744         JvFree.
3745         (About CNI): Add Memory allocation section.
3746
3747 2005-04-01  Tom Tromey  <tromey@redhat.com>
3748
3749         * decl.c (java_init_decl_processing): Fix types of
3750         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3751         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3752         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3753
3754 2005-03-31  Jan Hubicka  <jh@suse.cz>
3755
3756         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3757         * class.c: Include cgraph.h
3758         (make_local_functoin_alias): Mark aslias as needed.
3759         * resource.c: Include cgraph.h
3760         (compile_resource_data): Go via cgraph interface.
3761
3762 2005-03-30  Ian Lance Taylor  <ian@airs.com>
3763
3764         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3765
3766 2005-03-30  Tom Tromey  <tromey@redhat.com>
3767
3768         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3769         inner_class_info_index==0 or outer_class_info_index==0.
3770
3771 2005-03-29  Tom Tromey  <tromey@redhat.com>
3772
3773         * gcj.texi (libgcj Runtime Properties): Document
3774         gnu.gcj.runtime.endorsed.dirs.
3775
3776 2005-03-24  Anthony Green  <green@redhat.com>
3777
3778         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3779         'gcj-dbtool -p'.
3780
3781 2005-03-23  Tom Tromey  <tromey@redhat.com>
3782
3783         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3784         (parse_version): Use it.
3785
3786 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3787
3788         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3789
3790 2005-03-18  Andrew Haley  <aph@redhat.com>
3791
3792         PR java/20522
3793         * decl.c (update_aliases): Don't update variables that are about
3794         to die.
3795         (maybe_poplevels): Add comment.
3796
3797 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
3798
3799         PR java/20502
3800         * jcf-parse.c (duplicate_class_warning): New function.
3801         (java_parse_file): Call duplicate_class_warning if 
3802         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3803         (parse_zip_file_entries): Likewise. Also set
3804         CLASS_FROM_CURRENTLY_COMPILED_P.
3805
3806 2005-03-16  Andrew Haley  <aph@redhat.com>
3807
3808         * expr.c (expand_java_arrayload): Don't generate a
3809         NullPointerException based on the type of the node.
3810         (build_java_array_length_access): Likewise.
3811
3812 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
3813
3814         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3815
3816 2005-03-11  Tom Tromey  <tromey@redhat.com>
3817
3818         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3819         (libgcj Runtime Properties): Document the default .db.
3820
3821 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3822
3823         PR java/20312
3824         * parse.y (checks_throws_clauses): Check exceptions list even when
3825         the base class does not come from a source file being compiled.
3826         (java_complete_lhs): Remove unused variable 'wfl'.
3827
3828 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
3829
3830         PR java/20338
3831         * decl.c (finish_method): Emit _Jv_InitClass for private static
3832         methods inside inner classes as well.
3833
3834 2005-03-08  Julian Brown  <julian@codesourcery.com>
3835         * Revert patch from 2005-03-08 for causing bootstrap failure on
3836         ppc-darwin.
3837
3838 2005-03-08  Julian Brown  <julian@codesourcery.com>
3839
3840         * decl.c (finish_method): Give methods once-only linkage.
3841
3842 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3843
3844         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3845
3846 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
3847
3848         * verify-glue.c (vfy_is_assignable_from): Perform static check using
3849         can_widen_reference_to if the C++ ABI is in use.
3850         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3851         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3852         type_isresolved, init_state, set_pc, state_get_pc,
3853         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3854         (verify_fail): Report the current PC from the verifier context.
3855         (free_state): Remove #if 0 block to enable this function.
3856         (free_verifier_context): Call free_state on state_list iterator
3857         values before freeing them.
3858         * expr.c (pop_type_0): Pop correct type for error message when stack
3859         contains a multi-word type.
3860
3861 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3862
3863         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3864         for known NULL array length access.
3865
3866 2005-03-07  Tom Tromey  <tromey@redhat.com>
3867
3868         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3869
3870 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
3871
3872         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3873         typeck.c: Update copyright.
3874
3875 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
3876
3877         Remove xref code.
3878         * xref.c, xref.h: Remove file.
3879         * Make-lang.in (java/xref.o): Remove.
3880         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3881         * lang.c (flag_emit_xref): Remove definition.
3882         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3883         * typeck.c (convert): Remove use of do_not_fold.
3884         * parse.y (do_not_fold): Remove definition.
3885         (parser grammar): Remove xref code.
3886         (maybe_create_class_interface_decl, create_class): Likewise.
3887         (register_fields, method_header, finish_method_declaration): Likewise.
3888         (declare_local_variables, source_end_java_method): Likewise.
3889         (java_complete_expand_classes): Do not set do_not_fold.
3890         (java_complete_expand_method): Remove xref code.
3891         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3892         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3893         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3894         (patch_synchronized_statement, patch_throw_statement): Likewise.
3895         (maybe_build_class_init_for_field): Likewise.
3896
3897 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
3898
3899         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3900         instead of IS_NON_TYPE_CODE_CLASS.
3901
3902 2005-03-04  Andrew Haley  <aph@redhat.com>
3903
3904         PR java/18362
3905         * class.c (set_method_index): Don't set method_index if it is
3906         NULL_TREE.
3907         (layout_class_method): Don't complain about "non-static method foo
3908         overrides static method" in the case of indirect dispatch.
3909
3910 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3911
3912         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3913         warning.
3914         * Make-lang.in: Don't elide warnings in jcf-io.c.
3915
3916 2005-03-01  Per Bothner  <per@bothner.com>
3917
3918         PR java/8608
3919         * check-init.c (wfl): Remove static.
3920         (final_assign_error, check_init): Replace calls to parse_error_context
3921         by plain error.
3922         (check_init): Save, set, and restore input_location for each exp.
3923
3924 2005-03-01  Per Bothner  <per@bothner.com>
3925
3926         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3927         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3928         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3929
3930 2005-03-01  Per Bothner  <per@bothner.com>
3931
3932         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3933
3934 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3935
3936         PR libgcj/16923
3937         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3938         JvVMOption.
3939
3940 2005-02-22  Tom Tromey  <tromey@redhat.com>
3941
3942         PR java/20056:
3943         * verify-impl.c (EITHER): New define.
3944         (types_compatible): Handle it.
3945         (check_field_constant): Use it.
3946
3947 2005-02-18  Tom Tromey  <tromey@redhat.com>
3948
3949         PR java/20056:
3950         * verify-impl.c (types_equal): Fixed test.
3951
3952         PR java/20056:
3953         * verify-glue.c (vfy_class_has_field): New function.
3954         * verify.h (vfy_class_has_field): Declare.
3955         * verify-impl.c (check_field_constant): Added 'putfield'
3956         argument.
3957         (verify_instructions_0): Updated.
3958         (types_equal): New function.
3959
3960 2005-02-14  Tom Tromey  <tromey@redhat.com>
3961
3962         PR java/19921:
3963         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3964         stack effect of multianewarray.
3965
3966 2005-02-14  Andrew Haley  <aph@redhat.com>
3967
3968         PR java/19907
3969         * expr.c (expand_byte_code): Call promote_arguments().
3970         (promote_arguments): New function.
3971         * decl.c (check_local_unnamed_variable): Remove special case for
3972         new verifier.
3973         (find_local_variable): Promote all boolean types to int
3974         when searching for local variable decls.
3975
3976 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
3977
3978         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3979         parse-scan.y: Update copyright.
3980
3981 2005-02-11  Per Bothner  <per@bothner.com>
3982
3983         PR java/15543
3984         * parse-scan.y (input_location): Remove variable.
3985         (main_input_filename): New - replaces input_filename, which isn't
3986         settable if USE_MAPPED_LOCATION.
3987         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3988         so we don't reference input_location or wfl_operator in that case.
3989         * jv-scan.c (expand_location): Remove - no longer used.
3990         (main): Set main_input_filename rather than input_filename.
3991
3992 2005-02-09  Richard Henderson  <rth@redhat.com>
3993
3994         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
3995         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
3996
3997 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
3998
3999         * expr.c (add_type_assertion): Use the proper enumeration type,
4000         since this is what htab_find_slot() is expecting.
4001
4002 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
4003
4004         * gcj.texi: Update copyright dates.
4005
4006 2005-02-02  Tom Tromey  <tromey@redhat.com>
4007
4008         * gcj.texi (libgcj Runtime Properties): Default library_control
4009         to 'cache'.
4010
4011 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
4012
4013         PR java/15543
4014         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4015         (modifiers) when square brackets are present in a declaration for
4016         a final paramter.
4017         * jv-scan.c (main): Set input_filename and input_line.
4018
4019 2005-02-01  Tom Tromey  <tromey@redhat.com>
4020
4021         PR java/19742:
4022         * gjavah.c (get_field_name): Don't override name for JNI header.
4023
4024 2005-02-01  Roger Sayle  <roger@eyesopen.com>
4025
4026         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4027         of unsigned types using iushr and lushr JVM bytecodes.
4028
4029 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4030
4031         PR java/19738
4032         * gjavah.c (jni_print_float): Do not emit floating-point
4033         initialiser for a static final field.
4034         (jni_print_double): Likewise.
4035
4036 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
4037
4038         Revert:
4039         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4040         * gjavah.c (print_field_info): Mark static data members of
4041         floating-point type with "__extension__".
4042
4043 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4044
4045         * gjavah.c (print_field_info): Mark static data members of
4046         floating-point type with "__extension__".
4047
4048 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4049
4050         PR java/9157
4051         * parse.y (build_string_concatenation): Remove redundant if.
4052         (patch_conditional_expr): Attempt to patch_string() the condition
4053         of a ?: as well, in addition to its other operands.
4054
4055 2005-01-25  Tom Tromey  <tromey@redhat.com>
4056
4057         * Make-lang.in (java/java-tree-inline.o): Removed.
4058
4059 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4060
4061         PR java/19070
4062         * parse.y (patch_binop): Allow comparisons against NULL only
4063         if the other operand is of a reference type.
4064
4065 2005-01-24  Tom Tromey  <tromey@redhat.com>
4066
4067         * java-tree.h (gcj_abi_version): Declare.
4068         * class.c (make_class_data): Push gcj_abi_version into "next"
4069         field.  Renamed field.
4070         * decl.c (gcj_abi_version): New global.
4071         (parse_version): New function.
4072         (java_init_decl_processing): Call it.  Renamed 'next' field.
4073         Include version.h.
4074         (GCJ_BINARYCOMPAT_ADDITION): New define.
4075
4076 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4077
4078         PR java/19295
4079         * jcf-write.c (generate_bytecode_insns): Conversions between
4080         integer types of the same precision shouldn't generate widening
4081         or narrowing conversion bytecodes.
4082
4083 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4084
4085         * java-except.h, java-tree.h: Remove unused prototypes.
4086
4087 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4088
4089         PR java/18091:
4090         * jcf-write.c (perform_relocations): Don't call memcpy if source
4091         and destination are the same.
4092
4093 2005-01-17  Tom Tromey  <tromey@redhat.com>
4094
4095         * verify-impl.c (get_short): Sign extend.
4096         (get_int): Likewise.
4097
4098 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4099
4100         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4101         with TYPE_SIZE.
4102
4103 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4104
4105         * verify.c: Revert to the version before the BC-ABI merge.
4106
4107 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4108
4109         PR java/19277
4110         * check-init.c (check_init): Take care of references that do not
4111         have an explicit final variable declaration (e.g. array length
4112         access) for pre/post in/de-crement operators.
4113
4114 2005-01-08  Mark Wielaard  <mark@klomp.org>
4115
4116         * parse.y (process_imports): Allocate (and free) original_name only
4117         when not already defined.
4118         * jcf-parse.c (read_class): Free results of find_class() and
4119         lrealpath().
4120         (java_parse_file): Keep pointer to head of file_list and free when
4121         done. Free result of lrealpath().
4122
4123 2005-01-05  Tom Tromey  <tromey@redhat.com>
4124
4125         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4126
4127 2004-12-20  Andrew Haley  <aph@redhat.com>
4128
4129         * typeck.c: Use fold_convert for ints and booleans.
4130
4131 2004-12-17  Andrew Haley  <aph@redhat.com>
4132
4133         PR java/18931
4134         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4135         BOOLEAN_TYPE or CHAR_TYPE.
4136         (convert_to_boolean, convert_to_char) : Remove.
4137         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4138         * expr.c (expand_load_internal): Do type conversion if type is not
4139         as required.
4140
4141 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4142
4143         PR target/18459
4144         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4145         Update comment.
4146
4147 2004-12-07  Andrew Haley  <aph@redhat.com>
4148
4149         PR java/18811:
4150         * jcf-parse.c (load_class): Remove sanity test for missing inner
4151         class file.
4152
4153 2004-12-06  Tom Tromey  <tromey@redhat.com>
4154
4155         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4156         (java.uninstall): Likewise.
4157         (java.maintainer-clean): Likewise.
4158         (.INTERMEDIATE): Likewise.
4159         (java.install-man): Likewise.
4160         (gcj-dbtool.pod): New target.
4161         * gcj.texi (Code Generation): Document -findirect-dispatch.
4162         (libgcj Runtime Properties): Document
4163         gnu.gcj.precompiled.db.path.
4164         (Top): Link to "Invoking gcj-dbtool".
4165
4166 2004-12-06  Tom Tromey  <tromey@redhat.com>
4167
4168         PR java/14853:
4169         * java-tree.h (extract_field_decl): Declare.
4170         * parse.y (extract_field_decl): Renamed from
4171         strip_out_static_field_access_decl.  No longer static.
4172         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4173
4174 2004-12-03  Tom Tromey  <tromey@redhat.com>
4175
4176         * lang.c (flag_new_verifier): Define.
4177         (java_post_options): Set flag_new_verifier if indirect dispatch
4178         is being used.
4179         * lang.opt (fnew-verifier): Removed.
4180
4181 2004-12-03  Tom Tromey  <tromey@redhat.com>
4182
4183         PR bootstrap/14614:
4184         * Make-lang.in (java.install-common): Only install transformed
4185         gcjh if gcj-cross exists.
4186
4187 2004-12-03  Andrew Haley  <aph@redhat.com>
4188
4189         PR java/18812
4190         * except.c (link_handler): Patch 'outer' field of siblings of the
4191         range we're demoting.
4192
4193 2004-12-03  Andrew Haley  <aph@redhat.com>
4194
4195         PR java/18697
4196         * class.c (layout_class_method): Don't fail to override a method
4197         simply because it has DECL_ARTIFICIAL set.
4198
4199 2004-12-02  Tom Tromey  <tromey@redhat.com>
4200
4201         PR java/16675:
4202         * parse.y (craft_constructor): Special case null_pointer_node.
4203
4204 2004-12-02  Tom Tromey  <tromey@redhat.com>
4205
4206         PR java/18741:
4207         * java-gimplify.c (java_gimplify_expr): Don't call
4208         SET_EXPR_LOCATION unless wrapped tree is an expression.
4209
4210 2004-11-27  Per Bothner  <per@bothner.com>
4211
4212         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4213         Fix fencepost error in 'i', which got executed one too many times.
4214         Also, fold memcpy into explicit loop, as originally intended.
4215         Also, free temporary 'buf' which otherwise leaks.
4216
4217 2004-11-27  Per Bothner  <per@bothner.com>
4218
4219         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4220         local static variables if not USE_MAPPED_LOCATION.
4221
4222 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4223
4224         * class.c, decl.c, expr.c: Fix comment typos.
4225
4226 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4227
4228         PR java/18305
4229         * decl.c (end_java_method): Call
4230         attach_init_test_initialization_flags on all the init_decls.
4231         * parse.y (attach_init_test_initialization_flags): Move to ...
4232         * expr.c (attach_init_test_initialization_flags): here and
4233         support BIND_EXPR also.
4234         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4235         * jcf-parse.c (parse_class_file): Don't disable class init
4236         optimization.
4237
4238 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4239
4240         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4241         in diagnostics.
4242
4243 2004-11-24  Richard Henderson  <rth@redhat.com>
4244
4245         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4246         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4247
4248 2004-11-24  Tom Tromey  <tromey@redhat.com>
4249
4250         * verify.c (defer_merging): Don't use C++-style comment.
4251         * verify.h (java_opcode): Added java_opcode_end.
4252         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4253
4254         * verify-impl.c (vfy_push_type): Removed bogus "return".
4255         (initialize_stack): Use vfy_alloc and vfy_free.
4256         (verify_instructions_0): Likewise.
4257
4258         * Merged gcj-abi-2-dev-branch to trunk.
4259
4260 2004-11-24  Andrew Haley  <aph@redhat.com>
4261
4262         * jcf-parse.c (parse_class_file): Set file_start_location.
4263
4264 2004-11-10  Tom Tromey  <tromey@redhat.com>
4265
4266         * class.c (make_field_value): Don't call build_static_field_ref.
4267         (build_static_field_ref): Don't emit direct references when using
4268         indirect dispatch.
4269
4270         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4271         -verbose:class into man page synopsis.
4272
4273 2004-11-09  Tom Tromey  <tromey@redhat.com>
4274
4275         * expr.c (build_java_arraystore_check): Still generate check if
4276         element type is itself an array.
4277
4278 2004-11-08  Tom Tromey  <tromey@redhat.com>
4279
4280         * java-tree.h (soft_check_assignment_node): Removed.
4281         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4282         * decl.c (java_init_decl_processing): Don't initialize
4283         soft_check_assignment_node.
4284
4285 2004-11-05  Tom Tromey  <tromey@redhat.com>
4286
4287         * class.c (layout_class_methods): Don't add Miranda methods when
4288         using indirect dispatch.
4289
4290 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4291
4292         * class.c (make_class_data): Call emit_assertion_table to set the
4293         'assertion_table' field.
4294         (build_signature_for_libgcj): Move here from expr.c.
4295         (add_assertion_table_entry): New function. Callback for assertion
4296         hashtable traversal.
4297         (emit_assertion_table): New. Take class argument, and generate
4298         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4299         * decl.c (init_decl_processing): Define assertion_entry_type record.
4300         Push 'assertion_table' class field instead of 'verify'.
4301         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4302         (type_assertion_hash): Include 'assertion_code' in hash.
4303         (add_type_assertion): Rewritten. Take class and assertion_code
4304         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4305         (can_widen_reference_to): Use new add_type_assertion() arguments.
4306         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4307         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4308         (verify_identifier_node): Removed.
4309         (assertion_entry_type, assertion_table_type): New.
4310         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4311         assertion code definitions.
4312         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4313         'target_type' to 'op1' and 'op2'.
4314         (add_type_assertion): Declare.
4315         (lang_printable_name_wls): Remove unused definition.
4316         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4317         to emit runtime assertion.
4318         (vfy_note_stack_type): Clean up non-C90 declarations.
4319         (vfy_note_local_type): Likewise.
4320         * verify.h (vfy_is_assignable_from): Declare.
4321         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4322         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4323         instead of is_assignable_from_slow().
4324         (types_compatible): Reinstate ref_compatible() call.
4325
4326 2004-11-04  Tom Tromey  <tromey@redhat.com>
4327
4328         * class.c (build_static_field_ref): Reverted previous patch.
4329
4330         * class.c (build_static_field_ref): Don't emit direct references
4331         when using indirect dispatch.
4332
4333 2004-11-03  Tom Tromey  <tromey@redhat.com>
4334
4335         * expr.c (expand_java_arrayload): Set lhs_type_node.
4336         (expand_java_arraystore): Set rhs_type_node.
4337
4338 2004-11-02  Tom Tromey  <tromey@redhat.com>
4339
4340         * jcf-parse.c (compute_class_name): Use filename length from zip
4341         directory, not strlen.
4342
4343         * expr.c (expand_invoke): Mark new interface methods as abstract.
4344
4345 2004-11-01  Tom Tromey  <tromey@redhat.com>
4346
4347         * verify-impl.c (push_jump): Removed check for uninitialized
4348         objects.
4349         (push_exception_jump): Likewise.
4350         (handle_ret_insn): Likewise.
4351         (handle_jsr_insn): Likewise.
4352         (state_check_no_uninitialized_objects): Removed.
4353
4354         * decl.c (check_local_unnamed_variable): Recognize
4355         promoted-to-int parameters when using the new verifier.
4356         * expr.c (expand_java_arraystore): Explicitly request array type
4357         when using new verifier.
4358         (expand_java_arrayload): Likewise.
4359         (invoke_build_dtable): Don't pass object_type_node as
4360         expression argument to build_java_indirect_ref.
4361         (build_java_check_indexed_type): Do nothing.
4362         (build_java_arraystore_check): Handle case where array doesn't
4363         have array type.
4364         (build_java_array_length_access): Likewise.
4365         (expand_invoke): Handle case where interface overrides a method
4366         from Object.
4367         (pop_type_0): Always succeed for reference types.
4368         (process_jvm_instruction): Don't pop a value in a dead
4369         exception handler.
4370         (pop_arguments): Convert arguments to correct types.
4371
4372 2004-10-29  Andrew Haley  <aph@redhat.com>
4373
4374         * jcf-parse.c (give_name_to_class): Remove line that was
4375         incorrectly merged.
4376
4377 2004-10-29  Andrew Haley  <aph@redhat.com>
4378
4379         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4380
4381 2004-10-20  Andrew Haley  <aph@redhat.com>
4382
4383         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4384
4385 2004-10-26  Tom Tromey  <tromey@redhat.com>
4386
4387         * verify.h (vfy_notify_verified): Removed.
4388         * verify-glue.c (vfy_notify_verified): Removed.
4389
4390 2004-10-26  Tom Tromey  <tromey@redhat.com>
4391
4392         * verify-impl.c (debug_print_state): Declare `i' before code.
4393         (merge_types): Modify `t' when it is null_type.
4394
4395 2004-10-26  Tom Tromey  <tromey@redhat.com>
4396
4397         * verify-impl.c (type_print): Renamed from print.  Now static and
4398         takes an argument.
4399         (debug_print_state): Use type_print.
4400
4401 2004-10-25  Tom Tromey  <tromey@redhat.com>
4402
4403         * expr.c (build_invokeinterface): Compute correct offset for
4404         index into interface methods.
4405
4406 2004-10-20  Tom Tromey  <tromey@redhat.com>
4407
4408         * java-tree.h (verify_jvm_instructions_new): Declare.
4409
4410         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4411         command line.
4412
4413         * verify-impl.c (verify_instructions): Correctly handle wide
4414         types on the stack.
4415         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4416         (vfy_get_component_type): Strip pointer types.
4417         (vfy_find_class): Use get_type_from_signature.  Strip pointer
4418         types.
4419         Include java-except.h.
4420
4421 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
4422
4423         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4424         vfy_push_type_t, set_variable, add_new_state, merge_into,
4425         handle_jsr_insn, branch_prepass, check_class_constant,
4426         check_wide_constant, get_one_type, compute_static_types,
4427         verify_instructions_0): Clean up C99 declarations after statements.
4428
4429 2004-10-20  Tom Tromey  <tromey@redhat.com>
4430
4431         * verify-impl.c (merge_refs): Compare reference against iterator,
4432         not ref2.
4433
4434         * verify-glue.c (vfy_tag): Mask off resolved flag.
4435
4436 2004-10-19  Tom Tromey  <tromey@redhat.com>
4437
4438         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4439         (init_state_with_stack): Initialize `this_type' in state.
4440         (verify_method): Use debug_print.
4441         * verify-glue.c (vfy_is_primitive): Removed debugging print.
4442         (vfy_note_stack_depth): Reverted last patch.
4443         (vfy_note_stack_type): Note pointer to Object, not Object.
4444         (vfy_note_local_type): Likewise.
4445
4446         * verify.h (vfy_note_instruction_seen): Declare.
4447         * verify-glue.c (verify_jvm_instructions_new): Set
4448         BCODE_EXCEPTION_TARGET on target instruction.
4449         (vfy_note_instruction_seen): New function.
4450         * verify-impl.c (FLAG_INSN_SEEN): New define.
4451         (verify_instructions_0): Set flag on instruction.  Save state for
4452         PC=0 later.
4453         (verify_instructions): Call vfy_note_instruction_seen.
4454
4455         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4456         (verify_jvm_instructions_new): Call method_init_exceptions,
4457         add_handler, and handle_nested_ranges.
4458         * verify-impl.c (verify_method): Return 1 on success.
4459         (verify_instructions_0): Save the state at PC=0.
4460
4461         * verify-impl.c (init_type_from_class): Set is_resolved and
4462         ref_next on new ref_intersection.
4463         (init_type_from_string): Likewise.
4464
4465 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
4466
4467         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4468         if flag_new_verifier is set.
4469         * java-tree.h (flag_new_verifier): Declare.
4470         * lang.opt (fnew-verifier): New option.
4471         * verify-impl.c: Work around namespace pollution by undef'ing
4472         'current_class'.
4473         (struct verifier_context): Make 'bytecode' const.
4474         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4475         (types_compatible): For the BC-ABI, always consider reference types
4476         compatible.
4477         (check_class_constant): Use vfr->current_class.
4478         (check_constant): Likewise.
4479         (check_wide_constant): Likewise.
4480         (check_field_constant): Check for 'L' at start of type name.
4481         (get_one_type): Return pointer instead of type. Set type result in
4482         caller via passed type pointer.
4483         (compute_argument_types): Update to use new get_one_type arguments.
4484         (compute_return_type): Likewise.
4485         (make_verifier_context): New. Allocate and initialize 'vfr'.
4486         (free_verifier_context): New. Free 'vfr' and its contents.
4487         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4488         and free_verifier_context.
4489
4490 2004-10-15  Tom Tromey  <tromey@redhat.com>
4491
4492         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4493         * verify.h (vfy_fail): Fixed formatting.
4494
4495         * verify-impl.c (vfr): Fixed comment formatting.
4496         (collapse_type): New function.
4497         (verify_instructions): Notify compiler about type map.
4498         * verify.h (vfy_note_stack_depth): Updated.
4499         (vfy_note_stack_type): Likewise.
4500         (vfy_note_local_type): Likewise.
4501         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4502         Declare.
4503         * verify-glue.c (vfy_note_stack_depth): Correctly size type
4504         state.  Added `method' argument.
4505         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
4506         argument.
4507         (vfy_note_local_type): New function.
4508         (vfy_unsuitable_type): Likewise.
4509         (vfy_return_address_type): Likewise.
4510         (vfy_null_type): Likewise.
4511
4512         * verify.h (VFY_IN_GCC): Removed.
4513         (VFY_WANT_TYPEMAP): Removed.
4514         * verify-impl.c (verify_instructions_0): Removed useless "\".
4515         (struct state) <next>: Uncomment.
4516
4517 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
4518
4519         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4520         C-style.
4521
4522 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4523
4524         * Make-lang.in (verify.o): Re-enabled this target.
4525         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4526         (vfy_get_interface): Likewise.
4527         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4528         * verify.h (verify_jvm_instructions_new): Declare.
4529         * verify-impl.c (free_state): Temporarily comment out unused
4530         function.
4531
4532 2004-10-06  Tom Tromey  <tromey@redhat.com>
4533
4534         * java-tree.h (JV_STATE_READ): New enum value.
4535
4536 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4537
4538         * verify.h: New file.
4539
4540 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
4541
4542         * verify-impl.c, verify-glue.c, verify.h: New files.
4543         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4544
4545 2004-09-24  Andrew Haley  <aph@redhat.com>
4546
4547         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4548         for a slot if it's of pointer type.
4549
4550 2004-09-14  Tom Tromey  <tromey@redhat.com>
4551
4552         * class.c (make_class_data): Correctly initialize "state" field.
4553         Initialize "engine" field.
4554         * decl.c (java_init_decl_processing): Add "engine" field.
4555
4556 2004-09-10  Andrew Haley  <aph@redhat.com>
4557
4558         PR java/12760
4559         * expr.c (build_invokeinterface): Use fast method for interface
4560         dispatch.
4561         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4562         JTI_ITABLE_PTR_TYPE.
4563         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
4564         (emit_symbol_table): Add new arg, element_size.
4565         * decl.c (java_init_decl_processing): Initialize Class.itable.
4566         * class.c (GEN_TABLE): New macro.
4567         (gen_indirect_dispatch_tables): Use it.  Add itable.
4568         (make_class_data): Add new arg for emit_symbol_table().
4569         Emit itable.
4570         (add_miranda_methods): Make sure search_class has been parsed.
4571         (emit_symbol_table): Add new arg, element_size.
4572
4573 2004-09-06  Andrew Haley  <aph@redhat.com>
4574
4575         * verify.c (merge_types): Return Object for all merges of
4576         interfaces.
4577         * expr.c (add_type_assertion): Don't generate assertions when
4578         source type is array of Object.
4579
4580 2004-09-03  Andrew Haley  <aph@redhat.com>
4581
4582         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4583
4584         * lang.c (java_post_options): Force flag_verify_invocations if
4585         we're not using indirect dispatch.
4586
4587         * expr.c (pop_type_0): Move test for interfaces before call to
4588         can_widen_reference_to().
4589         (build_signature_for_libgcj): Remove generation of canonical array
4590         type.
4591         (add_type_assertion): Canonicalize both arrays.
4592         Don't assert that type X can be assigned to Object.
4593         Don't assert that type X an be assigned to type X.
4594         Don't assert that Object can be assigned to type X.
4595         (can_widen_reference_to): Warn whenever we generate an assertion.
4596         (process_jvm_instruction): Use throwable_type_node for the type of
4597         an exception class.
4598
4599 2004-09-01  Andrew Haley  <aph@redhat.com>
4600
4601         * decl.c (java_init_decl_processing): Change
4602         verify_identifier_node to "__verify".
4603         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4604         * java-tree.h (verify_identifier_node): Change to "__verify".
4605
4606         * expr.c (build_signature_for_libgcj): New function.
4607         (add_type_assertion): Use it to construct signatures for
4608         source_type and target_type.
4609
4610 2004-08-27  Andrew Haley  <aph@redhat.com>
4611
4612         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4613         (verify_identifier_node): New.
4614         (TYPE_VERIFY_METHOD): New.
4615         (struct type_assertion): New type.
4616         * expr.c (type_assertion_eq): New function.
4617         (type_assertion_hash): New function.
4618         (add_type_assertion): New function.
4619         (can_widen_reference_to): Call add_type_assertion().
4620         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4621         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4622         (finish_class): Output TYPE_VERIFY_METHOD (type).
4623
4624         * decl.c (end_java_method): Nullify unused fields.
4625
4626 2004-08-17  Andrew Haley  <aph@redhat.com>
4627
4628         * verify.c (defer_merging): Quieten.
4629         * jcf-parse.c (load_class): Only try to open a class file if it's
4630         java.lang.Object or if it's part of the current compilation.
4631         Check that the class we just tried to load is the class we just
4632         loaded.  Quieten.
4633         (java_parse_file): Set flag_verify_invocations off if we're
4634         compiling from .class.
4635         (parse_zip_file_entries): Abort if we try to read a dummy class.
4636         * expr.c (can_widen_reference_to): Quieten.
4637         (build_invokevirtual): Abort if we try to invokevirtual an
4638         interface.
4639         (expand_invoke): Don't build a non-interface call to an interface.
4640         (build_instanceof): Don't do premature optimization if
4641         flag_verify_invocations is not set.
4642         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4643         from superclass.
4644         (build_static_field_ref): Add correct type conversion for
4645         field_address.
4646         (add_miranda_methods): Disable generation of Miranda methods for
4647         dummy classes.
4648         (layout_class_method): Don't complain about non-static method
4649         overrides static method with dummy classes.
4650
4651 2004-08-13  Tom Tromey  <tromey@redhat.com>
4652
4653         * class.c (build_static_field_ref): Re-enable atable lookups for
4654         static fields.
4655
4656         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4657
4658 2004-08-11  Tom Tromey  <tromey@redhat.com>
4659
4660         * gcj.texi (libgcj Runtime Properties): Document new properties.
4661
4662 2004-08-06  Andrew Haley  <aph@redhat.com>
4663
4664         * jcf-parse.c (load_class): Check that we really have loaded the
4665         class we're looking for.
4666
4667 2004-07-19  Andrew Haley  <aph@redhat.com>
4668
4669         * verify.c (verify_jvm_instructions): Comment change only.
4670
4671         * typeck.c (build_java_array_type): Add size field to array name.
4672
4673         * java-tree.h (LOCAL_SLOT_P): New.
4674         (update_aliases): Add PC argument.
4675         (pushdecl_function_level): New function.
4676
4677         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4678         MODIFY_EXPR, and SAVE_EXPR.
4679         (java_gimplify_modify_expr): New function.
4680
4681         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4682         (expand_iinc): Pass PC to update_aliases().
4683         (STORE_INTERNAL): Likewise.
4684         (process_jvm_instruction): Likewise.
4685
4686         * decl.c (base_decl_map): New variable.
4687         (uniq): New variable.
4688         (update_aliases): Rewrite with more thorough checking.
4689         (debug_variable_p): New function.
4690         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4691         (check_local_named_variable): Delete whole function.
4692         (initialize_local_variable): New function.
4693         (check_local_unnamed_variable): Add checks and comments.
4694         (find_local_variable): Rewrite.
4695         (java_replace_reference): New function.
4696         (function_binding_level): New variable.
4697         (pushdecl_function_level): New function.
4698         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4699         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4700         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4701         function_binding_level.
4702         (end_java_method): Null unused fields to save memory.
4703
4704 2004-06-29  Andrew Haley  <aph@redhat.com>
4705
4706         * except.c (expand_start_java_handler): Push a new binding level.
4707         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4708         register_exception_range() to register where we'll do it.
4709         (expand_end_java_handler): Remove old bogus code.  Replace with
4710         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4711         the top of the expression we're curently building.
4712         (maybe_end_try): Delete.
4713         * decl.c (binding_level.exception_range): New field.
4714         (clear_binding_level): Add field exception_range.  Reformat.
4715         (poplevel): Call expand_end_java_handler().
4716         (poplevel): Call java_add_stmt only if functionbody is false.
4717         (maybe_poplevels): Don't call maybe_end_try() from here.
4718         (end_java_method): Clear no longer used trees in function decl.
4719         (register_exception_range): New function.
4720         * java-tree.h (register_exception_range, struct eh_range): Declare.
4721
4722 2004-06-22  Andrew Haley  <aph@redhat.com>
4723
4724         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4725         the otable.
4726         * check-init.c (get_variable_decl): Teach check-init about
4727         FIELD_DECLs addressed via the otable.
4728         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4729         CLASS_PARSED_P.
4730
4731 2004-05-28  Andrew Haley  <aph@redhat.com>
4732
4733         * jcf-parse.c (load_class): Don't try to read a class that we've
4734         already read.
4735
4736         * expr.c (build_invokeinterface): Use the old-fashioned way of
4737         doing indirect dispatch: look up interfaces by name.
4738         * java-tree.h (enum java_tree_index): Add
4739         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4740         * decl.c (java_init_decl_processing): Add
4741         soft_lookupinterfacemethodbyname_node.
4742
4743         * gjavah.c (print_method_info): Final methods have vtable entries,
4744         so gjavah needs to output them.
4745         * class.c (layout_class_method): Generate vtable entries for final
4746         methods.
4747         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4748         dispatch, even if a method is final.
4749
4750 2004-05-25  Andrew Haley  <aph@redhat.com>
4751
4752         * class.c (build_symbol_entry): Convert the names of constructors
4753         to init_identifier_node when generating an entry for the indirect
4754         dispatch table.
4755
4756         * expr.c (build_known_method_ref): Generate indirect calls for
4757         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4758
4759 2004-05-24  Andrew Haley  <aph@redhat.com>
4760
4761         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4762         atable element is of the right type.
4763
4764         * class.c (build_static_field_ref): Cast pointer to correct type
4765         for field.
4766
4767 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4768
4769         * Merged with HEAD as of 20040514. Diff against
4770         gcj-abi-2-merge-20040514.
4771
4772 2004-04-16  Andrew Haley  <aph@redhat.com>
4773
4774         * verify.c (check_pending_block): Disable subroutine checks.
4775         (defer_merging): New function.
4776         (merge_types): If types are dummy, use defer_merging to combine them.
4777         (verify_jvm_instructions): If invocation is invokeinterface and
4778         target is dummy, assume target really is an interface.
4779
4780         * parse.y (patch_invoke): Break out call to java_create_object.
4781
4782         * lang.c (flag_verify_invocations): New.
4783
4784         * jcf-parse.c (load_class): If we've already failed to load a
4785         class, don't try again.
4786         (load_class): If we can't find a .class file, don't fail, but emit
4787         a warning.
4788         (parse_class_file): Don't act on dummy methods.
4789
4790         * java-tree.h (flag_verify_invocations): New.
4791         (TYPE_DUMMY): New.
4792         (lang_type.dummy_class): New field.
4793         (java_create_object): New function.
4794         (METHOD_DUMMY): New.
4795
4796         * expr.c (build_field_ref): Widen field offset.
4797         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4798         that each of its elements is compatible with the one we're
4799         popping.
4800         (pop_type_0): Issue a warning to say that we need to generate a
4801         runtime check.
4802         (java_create_object): New function.
4803         (build_field_ref): Only generate hard refs if we're not using
4804         indirect dispatch.
4805         (expand_java_field_op): If we're using !verify_invocations and we
4806         see a missing field, generate a decl for it.
4807
4808         (expand_invoke): If a class doesn't have the method we seek and
4809         we're using !flag_verify_invocations, generate a decl for the
4810         method now.
4811
4812         (build_known_method_ref): Always use indirect dispatch via the
4813         atable for static methods.
4814
4815         (expand_java_NEW): Break out object creation into new function,
4816         java_create_object.
4817
4818         (can_widen_reference_to): Issue a warning to say that we need to
4819         generate a runtime check.
4820
4821         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4822         (make_method_value): Also use index for interfaces.
4823         (make_class_data): Skip dummy field for inherited data.
4824         Don't build method array for dummy methods.
4825         Set size_in_byte to -1 when using inirect dispatch
4826         Don't build a hard class ref if we don't have a hard ref to our
4827         superclass, or if we're using inirect dispatch.
4828         Null out dispatch tables.
4829
4830         (layout_class_method): Don't complain about non-static method
4831         overrides static method is method is artificial.
4832
4833         (build_static_field_ref): Disable atable references to static
4834         fields for the time being.
4835
4836         (layout_class_methods): Check for CLASS_INTERFACE as
4837         well as CLASS_ABSTRACT.
4838
4839 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4840
4841         * class.c (make_class_data): Don't check flag_inline_functions.
4842         * lang.c (flag_really_inline): Remove unused flag.
4843         (java_handle_option): Don't set it here.  Remove special handling
4844         of flag_inline_functions for Java.
4845         (java_init): Don't set flag_inline_trees here.  Already done...
4846         (java_post_options): ...here.  Don't clear flag_inline_functions.
4847
4848 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4849
4850         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4851         (java_gimplify_exit_block_expr): New function.
4852         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4853         LABELED_BLOCK_EXPR.
4854         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4855         (EXIT_BLOCK_EXPR): Likewise.
4856         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4857         (LABELED_BLOCK_BODY): Likewise.
4858         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4859         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4860         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
4861         TREE_OPERAND.
4862         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4863         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4864         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
4865         second operand of EXIT_BLOCK_EXPR.
4866         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4867         TREE_OPERAND.
4868         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4869
4870 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4871
4872         * xref.h (xref_flag_value): Remove.
4873         (xref_set_data, xref_get_data): Likewise.
4874         (xref_set_current_fp): Likewise.
4875         (XREF_NONE): Likewise.
4876         (XREF_GET_DATA): Likewise.
4877         * xref.c (xref_flag_value): Remove.
4878         (xref_set_data, xref_get_data): Likewise.
4879         (xref_set_current_fp): Likewise.
4880
4881 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4882
4883         * gjavah.c (output_directory): Make static.
4884         (temp_directory): Likewise.
4885
4886 2004-11-15  Tom Tromey  <tromey@redhat.com>
4887
4888         * decl.c (instn_ptr_type_node): Removed.
4889         (lineNumbers_ptr_type_node): Removed.
4890         (jint_type): Removed.
4891         (jint_ptr_type): Removed.
4892
4893 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
4894
4895         PR java/15576
4896         * check-init.c (check_init): Ignore DECL_EXPR.
4897         * expr.c (always_initialize_class_p): Reenable.
4898         (build_class_init): Use a variable to store the decl.  Also use
4899         boolean_false_node instead of integer_zero_node.
4900         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4901         to the block.
4902
4903 2004-11-08  Tom Tromey  <tromey@redhat.com>
4904
4905         PR java/16843:
4906         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4907         generating a JNI header.
4908         (print_field_info): Handle JNI headers.
4909         (jni_print_float): Likewise.
4910         (jni_print_double): Likewise.
4911
4912 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
4913
4914         * decl.c (end_java_method): Remove duplicated code.
4915
4916 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
4917             Gerald Pfeifer  <gerald@pfeifer.com>
4918
4919         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4920         as well.
4921
4922 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
4923
4924         PR java/17265
4925         * class.c: Reinstate 2004-08-18 patch.
4926         (make_local_function_alias): Don't create an alias for extern (native)
4927         functions.
4928
4929 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4930
4931         PR java/17265
4932         * class.c (make_local_function_alias): Revert 2004-08-18 change.
4933         (make_method_value): Likewise.
4934
4935 2004-10-21  Andrew Haley  <aph@redhat.com>
4936
4937         PR java/18091:
4938         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4939
4940 2004-10-20  Andrew Haley  <aph@redhat.com>
4941
4942         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4943         Remove duplicated code block.
4944
4945 2004-10-18  Steven Bosscher  <stevenb@suse.de>
4946
4947         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4948         New rules to work around old Bison warnings.
4949
4950 2004-10-17  Steven Bosscher  <stevenb@suse.de>
4951
4952         * class.c (ident_subst): Always alloca buffer.
4953         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4954         opcode after including javaop.def.
4955         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4956         conditional expression that exits, to avoid warnings.
4957         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4958         a user of an extension.
4959         * win32-host.c: Move check down to have non-empty file when
4960         WIN32 is not defined.
4961
4962         * Make-lang.in (java-warn): Add STRICT_WARN.
4963         (java/jcf-io.o-warn): Don't have Werror for this file.
4964         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4965
4966 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
4967
4968         * expr.c (expr_add_location): Move declaration to before all
4969         statements.
4970         * parse.y (java_expand_classes): Ditto.
4971         * lex.c (java_peek_unicode): Ditto.
4972
4973 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4974
4975         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4976         if possible, else convert `foo' to 'foo'.
4977         * class.c: Likewise.
4978         * decl.c: Likewise.
4979         * expr.c: Likewise.
4980         * jcf-io.c: Likewise.
4981         * jcf-parse.c: Likewise.
4982         * lang.c: Likewise.
4983         * lex.c: Likewise.
4984         * parse.h: Likewise.
4985
4986 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4987
4988         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4989         rename parameter 'msg' to 'msgid' in function declaration.
4990         (issue_warning_error_from_context): Likewise.
4991         (yyerror): Rename parameter 'msg' to 'msgid'.
4992         (all over): Use new quoting style for diagnostics.
4993
4994 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
4995
4996         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
4997         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
4998         Update copyright.
4999
5000 2004-10-14  Matt Austern  <austern@apple.com>
5001
5002         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5003         pointer_set_t* now.
5004
5005 2004-10-13  Tom Tromey  <tromey@redhat.com>
5006
5007         PR java/15578:
5008         * lang.opt (--extdirs): Document.
5009         * jvspec.c (lang_specific_driver): Recognize -encoding and
5010         -extdirs.
5011
5012 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
5013
5014         * parse.y (issue_warning_error_from_context): Use va_list *
5015         instead of va_list parameter.
5016         (parse_error_context): Update call.
5017         (parse_warning_context): Likewise.
5018
5019 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
5020
5021         * parse.y, parse-scan.y: Add list of diagnostic messages to
5022         insulate translation template from version of yacc/bison used
5023         to compile the grammar.
5024
5025 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
5026
5027         Prepare for %q, %< and %> in diagnostic message strings.
5028         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5029         Name second parameter 'msgid'.
5030         * parse.y: Additionally include pretty-print.h and diagnostic.h.
5031         (issue_warning_error_from_context): Use pretty-printer functions
5032         instead of vsprintf for constructing formatted messages. Rename
5033         parameter 'msg' to 'msgid'.
5034         (parse_error_context): Rename parameter 'msg' to 'msgid'.
5035         (parse_warning_context): Likewise.
5036
5037 2004-10-05  Andrew Haley  <aph@redhat.com>
5038
5039         PR java/17779
5040         * jcf-parse.c (parse_zip_file_entries): If a class has a
5041         superclass and a TYPE_SIZE of zero, lay it out.
5042
5043 2004-09-30  Andrew Haley  <aph@redhat.com>
5044
5045         PR java/17733
5046         * jcf-parse.c (compute_class_name): Rewrite.
5047
5048 2004-10-01  Jan Hubicka  <jh@suse.cz>
5049
5050         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5051
5052 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5053
5054         * lex.c: Fix a comment typo.
5055
5056 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5057
5058         * java-tree.h: Fix a comment typo.
5059
5060 2004-09-30  Per Bothner  <per@bothner.com>
5061
5062         Simplify lexer.  Implement --enable-mapped-location support.
5063         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5064         (parse_source_file_1): Pass filename as extra parameter, so we can call
5065         linemap_add and set input_location here, rather than in both callers.
5066         (read_class): Pass copied filename to parse_source_file_1.
5067         Don't initialize wfl_operator - only needed for source compilation.
5068         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5069         * lex.h:  Remove a bunch of debugging macros.
5070         * lex.h (struct_java_line, struct java_error):  Remove types.
5071         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5072         (struct java_lc_s):  Remove prev_col field.
5073         (struct java_lexer):  New fields next_unicode, next_columns, and
5074         avail_unicode.  New position field, and maybe token_start field.
5075         Don't need hit_eof field - use next_unicode == -1 instead.
5076         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5077         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5078         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5079         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5080         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5081         (struct parser_ctxt):  New file_start_location field.
5082         Remove p_line, c_line fields since we no longer save lines.
5083         Remove elc, lineno, and current_jcf fields - no longer used.
5084         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5085         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5086         source_location and is probably not needed anymore anyway.
5087         Use new expr_add_Location function.
5088         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5089         (java_pop_parser_context):  Minor cleanup.
5090         (java_parser_context_save_global, java_parser_context_restore_global,
5091         java_pop_parser_context):  Save/restore input_location as a unit.
5092         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5093         a source_location instead of a wfl context node.
5094         (check_class_interface_creation):  input_filename is not addressable.
5095         (create_artificial_method):  Calling java_parser_context_save_global
5096         and java_parser_context_restore_global is overkill.  Instead,
5097         temporarily set input_location from class decl.
5098         (java_layout_seen_class_methods): Set input_location from method decl.
5099         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5100         (finish_loop_body):  Likewise.
5101         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5102         (java_sprint_unicode):  Take a character, not index in line.
5103         (java_sneak_uncode):  Replaced by java_peek_unicode.
5104         (java_unget_unicode):  No longer used.
5105         (java_allocate_new_line. java_store_unicode):  Removed, since we
5106         no longer remember "lines".
5107         (java_new_lexer):  Update for new data structures.
5108         (java_read_char):  Move unget_value checking to java_read_unicode.
5109         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5110         efficient functions that are used directly when lexing.
5111         (java_read_unicode_collapsing_terminators):  No longer needed.
5112         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5113         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5114         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5115         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5116         combine switch branches, and test for common token kinds earlier.
5117         (java_lex_error):  Rewrite.
5118         * jv-scan.c (expand_location): New function, copied from tree.c.
5119         (main): Set ctxp->filename instead of setting input_filename directly.
5120
5121 2004-09-30  Per Bothner  <per@bothner.com>
5122
5123         More cleanup for --enable-mapped-location.
5124         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5125         input_location here.  Instead do it in give_name_to_class.
5126         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5127         * expr.c (expand_byte_code): Call linemap_line_start.
5128         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5129         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5130         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5131         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5132         to USE_MAPPED_LOCATION case.
5133
5134         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5135         * jcf-parse.c (java_parse_file): Don't set input_filename.
5136         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5137         Create a list of TRANSLATION_UNIT_DECL.
5138         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5139         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5140         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5141         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5142         (file_start_location):  New static.
5143         (set_source_filename):  Avoid extra access to input_filename macro.
5144         Concatenate new name with class's package prefix.
5145         (set_source_filename, give_name_to_class): Update.
5146         (give_name_to_class):  Set class's "line 0" input_location here.
5147         (parse_class_file):  Set input_location as a unit.
5148
5149         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5150
5151 2004-09-29  Per Bothner  <per@bothner.com>
5152
5153         * java-tree.h:  Redefine some macros and add some declaration
5154         to handle the USE_MAPPED_LOCATION case.
5155         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5156         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5157         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5158         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5159
5160         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5161         * decl.c (finish_method, java_add_stmt): Likewise.
5162         * java-gimplify.c (java-gimplify.c):  Likewise.
5163         * jcf-write.c (generate_bytecode_insns):  Likewise.
5164         * lang.c (java_post_options): Likewise - call linemap_add.
5165
5166 2004-09-29  Andrew Haley  <aph@redhat.com>
5167
5168         PR java/17007
5169         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5170         result of TRUNC_MOD_EXPR.
5171         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5172         * decl.c (java_init_decl_processing): Mark
5173         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5174
5175 2004-09-28  Tom Tromey  <tromey@redhat.com>
5176
5177         PR java/15710:
5178         * class.c (add_miranda_methods): Load superinterface if not
5179         already loaded.
5180
5181 2004-09-28  Andrew Haley  <aph@redhat.com>
5182
5183         PR java/17586
5184         * jcf-parse.c (load_class): Don't try to read a class that we've
5185         already read.
5186
5187 2004-09-28  Andrew Haley  <aph@redhat.com>
5188
5189         * jcf-parse.c (load_class): Back out previous broken patch.
5190
5191 2004-09-28  Andrew Haley  <aph@redhat.com>
5192
5193         PR java/17586
5194         * jcf-parse.c (load_class): Don't try to read a class that we've
5195         already read.
5196         Check that we really did read the right class.
5197
5198 2004-09-25  Tom Tromey  <tromey@redhat.com>
5199
5200         PR java/17500:
5201         * parse.y (create_artificial_method): Use add_method_1.
5202
5203 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5204
5205         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5206         comment typos.
5207         * gcj.texi: Fix typos.
5208
5209 2004-09-24  Tom Tromey  <tromey@redhat.com>
5210
5211         PR java/15656:
5212         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5213         in error parts of rule.
5214         (unary_expression): Don't call error_if_numeric_overflow when $1
5215         is NULL.
5216
5217 2004-09-24  Tom Tromey  <tromey@redhat.com>
5218
5219         PR java/16789:
5220         * parse.y (resolve_qualified_expression_name): Set
5221         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5222         * expr.c (force_evaluation_order): Check for empty argument list
5223         after stripping COMPOUND_EXPR.
5224
5225 2004-09-23  Andrew Haley  <aph@redhat.com>
5226
5227         PR java/16927:
5228         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5229         COND_EXPRs.
5230
5231 2004-09-23  Tom Tromey  <tromey@redhat.com>
5232
5233         PR java/17329:
5234         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5235         where operand is null.
5236
5237 2004-09-23  Tom Tromey  <tromey@redhat.com>
5238
5239         PR java/17380:
5240         * parse.y (not_accessible_p): Allow access to protected members
5241         even when class is not static.
5242
5243 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5244
5245         * Make-lang.in: Revert the gcc-none.o change.
5246
5247 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5248
5249         * parse.y (patch_anonymous_class): VEC_space returns true if there
5250         is space.
5251
5252 2004-09-21  Matt Austern  <austern@apple.com>
5253
5254         Fix bootstrap.
5255         * gjavah.c (free_method_name_list): Fix function definition so
5256         it's a proper C prototype.
5257
5258 2004-09-21  Tom Tromey  <tromey@redhat.com>
5259
5260         PR java/17575:
5261         * gjavah.c (free_method_name_list): New method.
5262         (main): Call it.
5263
5264 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5265             Zack Weinberg  <zack@codesourcery.com>
5266
5267         * java-tree.def: Use tree_code_class enumeration constants
5268         instead of code letters.
5269         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5270         new tree-class enumeration constants.
5271
5272 2004-09-13  Tom Tromey  <tromey@redhat.com>
5273
5274         PR java/17216:
5275         * class.c (layout_class_method): Put synthetic methods into the
5276         vtable.
5277
5278 2004-09-11  Andrew Pinski  <apinski@apple.com>
5279
5280         * Make-lang.in (java/ggc-none.c): Change dependency
5281         for ggc.h into $(GGC_H).
5282
5283 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5284
5285         * Make-lang.in (java/win32-host.o): Add dependency on
5286         coretypes.h.
5287         * win32-host.c: Add includes for coretypes.h, jcf.h
5288
5289 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5290
5291         * Make-lang.in (GCJH_OBJS): Change dependency from
5292         ggc-none.o to java/ggc-none.o
5293         (JCFDUMP_OBJS): Likewise.
5294         (java/ggc-none.o): New target.
5295
5296 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5297
5298         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5299         * class.c (build_utf8_ref, build_static_field_ref,
5300         make_field_value, make_method_value, get_dispatch_table,
5301         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5302         * constants.c (get_tag_node, build_ref_from_constant_pool,
5303         build_constants_constructor): Likewise.
5304         * decl.c (java_init_decl_processing): Likewise.
5305         * expr.c (build_java_array_length_access, build_newarray,
5306         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5307         build_java_binop, build_field_ref, expand_java_add_case,
5308         expand_java_call, build_known_method_ref, build_invokevirtual,
5309         build_invokeinterface, build_jni_stub): Likewise.
5310         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5311         * jcf-parse.c (get_constant): Likewise.
5312         * lex.c (do_java_lex): Likewise.
5313         * parse.y (patch_binop, patch_unaryop, patch_cast,
5314         build_newarray_node, patch_newarray): Likewise.
5315         * resource.c (compile_resource_data): Likewise.
5316         * typeck.c (build_prim_array_type): Likewise.
5317
5318 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5319
5320         * decl.c (java_init_decl_processing): Adjust
5321         initialize_sizetypes call.
5322
5323 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5324
5325         * jv-scan.c (fancy_abort): Add.
5326
5327 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5328
5329         * expr.c (build_java_arrayaccess): Use convert to change
5330         len's type.
5331
5332 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5333
5334         * class.c (make_local_function_alias): Allocate extra space for 'L'
5335         in name buffer. Reported by Thomas Neumann.
5336
5337 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5338
5339         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5340         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5341         * lex.c (do_java_lex): Adjust.
5342         (error_if_numeric_overflow): Likewise.
5343
5344 2004-08-18  Andrew Pinski  <apinski@apple.com>
5345
5346         * class.c (make_local_function_alias): Only make a new decl if we
5347         support alias attribute on all decls.
5348
5349 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5350
5351         * class.c (make_local_function_alias): New function. Create local
5352         alias for public method DECL.
5353         (make_method_value): Use make_local_function_alias.
5354         * parse.y (craft_constructor): Don't special-case anonymous classes.
5355         Always set ctor_name to init_identifier_node.
5356         (lookup_method_invoke): Call layout_class_method when creating
5357         anonymous class constructor.
5358
5359 2004-08-18  Richard Henderson  <rth@redhat.com>
5360
5361         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5362         default case.  Treat '<' similarly.  Update for
5363         is_gimple_formal_tmp_var name change.
5364
5365 2004-08-17  Andrew Haley  <aph@redhat.com>
5366
5367         * lang.c (lang_printable_name): Obey verbose flag.
5368         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5369         lang_printable_name().
5370         (verify_constructor_circularity, get_printable_method_name,
5371         check_abstract_method_definitions, java_check_regular_methods,
5372         java_check_abstract_methods, check_inner_class_access,
5373         fix_constructors, patch_method_invocation, patch_return):
5374         Likewise.
5375         * expr.c (pop_type_0): Likewise.
5376
5377         * java-tree.h (lang_printable_name_wls): Delete.
5378
5379 2004-08-16  Tom Tromey  <tromey@redhat.com>
5380
5381         PR java/8473:
5382         * parse.y (primary): Changed for initialized and uninitialized
5383         array creations.
5384         (array_access): Handle array_creation_initialized.
5385         (array_creation_expression): Split into
5386         array_creation_initialized and array_creation_uninitialized.
5387
5388 2004-08-16  Andrew Haley  <aph@redhat.com>
5389
5390         * jcf-write.c (find_constant_index): Canonicalize NaNs when
5391         generating bytecode.
5392
5393 2004-08-16  Elliot Lee <sopwith@redhat.com>
5394
5395         PR java/9677
5396         * jcf-parse.c (java_parse_file): Handle filenames with embedded
5397         spaces, and quoted filelists.
5398
5399 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5400
5401         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5402         * class.c (build_utf8_ref, build_static_field_ref,
5403         make_field_value, make_method_value, get_dispatch_table,
5404         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5405         * constants.c (get_tag_node,  build_ref_from_constant_pool,
5406         build_constants_constructor): Likewise.
5407         * decl.c (java_init_decl_processing): Likewise.
5408         * expr.c (build_java_array_length_access, build_newarray,
5409         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5410         build_java_binop, build_field_ref, expand_java_add_case,
5411         expand_java_call, build_known_method_ref, build_invokevirtual,
5412         build_invokeinterface, build_jni_stub): Likewise.
5413         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5414         * jcf-parse.c (get_constant): Likewise.
5415         * lex.c (do_java_lex): Likewise.
5416         * parse.y (patch_binop, patch_unaryop, patch_cast,
5417         build_null_of_type, patch_newarray): Likewise.
5418         * resource.c (compile_resource_data): Likewise.
5419         * typeck.c (build_prim_array_type): Likewise.
5420
5421 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
5422
5423         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5424         Don't create BLOCK here or call java_gimplify_block.
5425
5426 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5427
5428         * java-tree.h (flag_deprecated): Removed.
5429         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5430         * parse.y (check_deprecation): Check warn_deprecated instead of
5431         flag_deprecated.
5432
5433 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
5434
5435         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5436         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5437         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5438         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5439         flag_force_classes_archive_check, flag_optimize_sci,
5440         flag_indirect_dispatch): Remove explicit declarations.
5441         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
5442         final comment.
5443
5444 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
5445
5446         PR bootstrap/14893
5447         * Make-lang.in (java.install-man): Install from either build
5448         tree or source tree, whichever has the file first.
5449
5450 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
5451
5452         * jcf-parse.c (get_constant): Adjust force_fit_type call.
5453         * lex.h (SET_LVAL_NODE_TYPE): Remove.
5454         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5455         (do_java_lex): Likewise. Adjust force_fit_type call.
5456
5457 2004-08-04  Roger Sayle  <roger@eyesopen.com>
5458             Andrew Haley  <aph@redhat.com>
5459
5460         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5461         checking trees as they're being built.
5462         (convert): Call convert_ieee_real_to_integer if we're
5463         converting a constant, even if we're writing a class file.
5464
5465 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
5466
5467         PR java/16701
5468         * parse.y (fold_constant_for_init): Call resolve_field_access with
5469         correct current_class context.
5470
5471 2004-08-01  Roger Sayle  <roger@eyesopen.com>
5472
5473         * decl.c (update_aliases, initialize_local_variable): Replace calls
5474         to build with calls to buildN.
5475         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5476         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5477         * parse.h (BUILD_THROW): Likewise.
5478         * parse.y (switch_expression, synchronized_statement,
5479         catch_clause_parameter, array_creation_expression,
5480         conditional_expression, make_qualified_name,
5481         resolve_qualified_expression_name, patch_method_invocation,
5482         patch_invoke, build_method_invocation, build_new_invocation,
5483         build_assignment, patch_assignment, build_binop, patch_binop,
5484         build_string_concatenation, build_incdec, patch_unaryop,
5485         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5486         patch_return, build_if_else_statement, build_labeled_block,
5487         build_new_loop, build_loop_body, build_bc_statement,
5488         build_assertion, encapsulate_with_try_catch, build_try_statement,
5489         build_try_finally_statement, patch_synchronized_statement,
5490         emit_test_initialization): Likewise, replace build with buildN.
5491
5492 2004-07-28  Eric Christopher  <echristo@redhat.com>
5493
5494         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5495         (java_unsafe_for_reeval): Ditto.
5496
5497 2004-07-26    <hp@bitrange.com>
5498
5499         * parse.y (build_super_invocation): Adjust declaration order to
5500         avoid declaration after statement.
5501
5502 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
5503
5504         * decl.c: Rename all identifiers named `class' to `cl'.
5505
5506 2004-07-25  Richard Henderson  <rth@redhat.com>
5507
5508         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5509
5510 2004-07-23  Mike Stump  <mrs@apple.com>
5511
5512         * boehm.c (set_bit): Improve type safety wrt unsignedness.
5513         * gjavah.c (throwable_p, decode_signature_piece,
5514         print_full_cxx_name, print_include, add_namelet, add_class_decl,
5515         process_file): Likewise.
5516         * jcf-dump.c (main): Likewise.
5517         * jcf-io.c (read_zip_member): Likewise.
5518         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5519         give_name_to_class, get_class_constant): Likewise.
5520         * jcf-write.c (find_constant_wide, push_long_const,
5521         generate_classfile): Likewise.
5522         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5523         * parse.y (read_import_dir): Likewise.
5524         * typeck.c (parse_signature_type): Likewise.
5525         * verify.c (verify_jvm_instructions): Likewise.
5526         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5527
5528 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
5529
5530         * Make-lang.in: Replace rmic and rmiregistry references with
5531         grmic and grmiregistry.
5532         * gcj.texi: Likewise.
5533
5534 2004-07-20  Andrew Haley  <aph@redhat.com>
5535
5536         PR java/16431.
5537         * verify.c (verify_jvm_instructions): Comment change only.
5538
5539         * typeck.c (build_java_array_type): Add size field to array name.
5540
5541         * java-tree.h (LOCAL_SLOT_P): New.
5542         (update_aliases): Add PC argument.
5543         (pushdecl_function_level): New function.
5544
5545         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5546         MODIFY_EXPR, and SAVE_EXPR.
5547         (java_gimplify_modify_expr): New function.
5548
5549         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5550         (expand_iinc): Pass PC to update_aliases().
5551         (STORE_INTERNAL): Likewise.
5552         (process_jvm_instruction): Likewise.
5553
5554         * decl.c (base_decl_map): New variable.
5555         (uniq): New variable.
5556         (update_aliases): Rewrite with more thorough checking.
5557         (debug_variable_p): New function.
5558         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5559         (check_local_named_variable): Delete whole function.
5560         (initialize_local_variable): New function.
5561         (check_local_unnamed_variable): Add checks and comments.
5562         (find_local_variable): Rewrite.
5563         (java_replace_reference): New function.
5564         (function_binding_level): New variable.
5565         (pushdecl_function_level): New function.
5566         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5567         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5568         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5569         function_binding_level.
5570         (end_java_method): Null unused fields to save memory.
5571
5572 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5573
5574         * class.c (add_interface_do): Remove.
5575         (set_super_info, interface_of_p, maybe_add_interface,
5576         add_interface, make_class_data, layout_class,
5577         add_miranda_methods): Adjust BINFO accessors and addition.
5578         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5579         accessors.
5580         * jcf-write.c (generate_classfile): Likewise.
5581         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5582         check_circular_reference, java_complete_class,
5583         check_abstract_method_definitions,
5584         java_check_abstract_method_definitions,
5585         check_interface_throws_clauses, java_check_abstract_methods,
5586         lookup_java_interface_method2,
5587         find_applicable_accessible_methods_list): Adjust BINFO accessors
5588         and addition.
5589         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5590
5591 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5592
5593         * builtins.c (max_builtin, min_builtin,
5594         java_build_function_call_expr): Replace calls to build with buildN.
5595         * class.c (build_class_ref, build_static_field_ref,
5596         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5597         * constants.c (build_ref_from_constant_pool): Likewise.
5598         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5599         add_stmt_to_compound): Likewise.
5600         * except.c (build_exception_object_ref, expand_end_java_handler):
5601         Likewise.
5602         * java-gimplify.c (java_gimplify_case_expr,
5603         java_gimplify_default_expr, java_gimplify_block,
5604         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5605         * jcf-write.c (generate_bytecode_insns): Likewise.
5606         * typeck.c (convert_ieee_real_to_integer): Likewise.
5607
5608 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5609
5610         * java-tree.h (builtin_function): Declare.
5611
5612 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5613
5614         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5615         abuse restore_line_number_status.
5616
5617 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5618
5619         g++/15861
5620         * jcf-parse.c (java_emit_static_constructor): Specify default
5621         priority.
5622
5623 2004-07-13  Per Bothner  <per@bothner.com>
5624
5625         * java-tree.h (all_class_filename):  Remove useless macro.
5626         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5627         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5628         * parse.y (java_parser_context_restore_global):  Replace
5629         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5630         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5631
5632 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5633
5634         PR java/16474
5635         gjavah.c (print_field_info): Emit constant only if field is static.
5636
5637 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5638
5639         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5640         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5641         build_java_ret, build_java_throw_out_of_bounds_exception,
5642         build_java_array_length_access, java_check_reference,
5643         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5644         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5645         expand_java_arrayload, build_java_monitor, expand_java_return,
5646         expand_load_internal, expand_java_NEW, build_get_class,
5647         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5648         build_java_soft_divmod, build_java_binop, build_field_ref,
5649         expand_compare, expand_java_goto, expand_java_switch,
5650         expand_java_add_case, build_class_init, build_known_method_ref,
5651         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5652         expand_invoke, build_jni_stub, expand_java_field_op,
5653         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5654         force_evaluation_order, emit_init_test_initialization): Convert
5655         calls to "build" into calls to the prefered "buildN" functions.
5656
5657 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5658
5659         * java-tree.h (set_block): Remove.
5660         * lang.c (java_clear_binding_stack): New.
5661         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5662         * decl.c (struct binding_level): Remove this_block.
5663         (clear_binding_level): Likewise.
5664         (poplevel): Don't handle this_block.
5665         (set_block): Remove.
5666
5667 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5668
5669         * class.c (common_enclosing_context_p): Remove statement with no
5670         side-effects.
5671
5672 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5673
5674         PR java/8618
5675         * parse.y (create_anonymous_class): Remove 'location' argument. Use
5676         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5677         (craft_constructor): Inherit access flags for implicit constructor
5678         from the enclosing class.
5679         (create_class): Fix comment typo.
5680         (resolve_qualified_expression_name): Pass type of qualifier to
5681         not_accessible_p, not the type in which target field was found.
5682         (not_accessible_p): Handle inner classes. Expand protected
5683         qualifier-subtype check to enclosing instances, but don't apply this
5684         check to static members. Allow protected access to inner classes
5685         of a subtype. Allow private access within common enclosing context.
5686         (build_super_invocation): Get WFL line number info from current
5687         class decl.
5688         (build_incomplete_class_ref): Update for new create_anonymous_class
5689         signature.
5690         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5691         common_enclosing_instance_p.
5692         * class.c (common_enclosing_context_p): New. Determine if types
5693         share a common enclosing context, even across static contexts.
5694         (common_enclosing_instance_p): Renamed from
5695         common_enclosing_context_p. Determines if types share a common
5696         non-static enclosing instance.
5697         * java-tree.h (common_enclosing_instance_p): Declare.
5698         * jcf-write.c (get_method_access_flags): New. Surpress private flag
5699         for inner class constructors.
5700         (generate_classfile): Use get_method_access_flags.
5701
5702 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5703
5704         * class.c (interface_of_p): Check for null TYPE_BINFO.
5705
5706 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
5707
5708         * class.c (make_class): Do not create binfo here.
5709         (set_super_info): Create it here.
5710         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5711
5712 2004-07-08  Richard Henderson  <rth@redhat.com>
5713
5714         * expr.c (case_identity, get_primitive_array_vtable,
5715         java_expand_expr, emit_init_test_initialization): Remove.
5716         * java-tree.h (java_expand_expr): Remove.
5717         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5718
5719 2004-07-07  Per Bothner  <per@bothner.com>
5720
5721         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
5722         get internal error due to mismatched types.
5723
5724         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
5725
5726         * gcj.texi (Linking):   New node.  Document -lgij usage.
5727
5728 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5729
5730         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5731         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5732         * java/class.c (set_super_info, class_depth, interface_of_p,
5733         maybe_add_interface, add_interface, make_class_data,
5734         layout_class, add_miranda_methods): Adjust BINFO macros.
5735         * expr.c (can_widen_reference_to, lookup_field): Likewise.
5736         * jcf-write.c (generate_classfile): Likewise.
5737         * parse.y (patch_anonymous_class,
5738         check_inner_circular_reference, check_circular_reference,
5739         java_complete_class, check_abstract_method_definitions,
5740         java_check_abstract_method_definitions,
5741         check_interface_throws_clauses, java_check_abstract_methods,
5742         lookup_java_interface_method2,
5743         find_applicable_accessible_methods_list): Likewise.
5744         * typeck.c (find_method_in_interface): Likewise.
5745         * verify.c (merge_types): Likewise.
5746
5747 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5748
5749         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5750         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5751
5752 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5753
5754         * class.c (make_class): Use make_tree_binfo.
5755         (set_super_info, add_interface_do): Likewise.
5756         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5757
5758 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5759
5760         * verify.c: Correct array element access formatting thinko.
5761
5762 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5763
5764         * verify.c: Insert a short blurb at the start referring to the JVMS.
5765         (merge_type_state): Remove redundant nested if statement.
5766         (verify_jvm_instructions): Ensure current_subr is initialised to
5767         NULL_TREE.
5768         Minor formatting fixes all over the place.
5769
5770 2004-07-02  Richard Henderson  <rth@redhat.com>
5771
5772         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5773
5774 2004-07-01  Richard Henderson  <rth@redhat.com>
5775
5776         * class.c (registerClass_libfunc): Remove.
5777         (init_class_processing): Don't set it.
5778         (emit_register_classes): Take list_p parameter.  Fill it in
5779         with _Jv_RegisterClass calls.
5780         * decl.c (java_init_decl_processing): Don't call
5781         init_resource_processing.
5782         * jcf-parse.c (java_emit_static_constructor): New.
5783         (java_parse_file): Call it.
5784         * resource.c (registerResource_libfunc): Remove.
5785         (init_resource_processing): Remove.
5786         (write_resource_constructor): Take list_p parameter.  Fill it in
5787         with _Jv_RegisterResource calls.
5788         * java-tree.h: Update prototypes.
5789
5790 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
5791
5792         PR java/1262
5793         * class.c (layout_class_method): Do not override package-private
5794         method if its in a different package.
5795         (split_qualified_name): Move here from parse.y. Rename from
5796         breakdown_qualified. Add comment.
5797         (in_same_package): Move here from parse.y. Add comment.
5798         * java-tree.h (break_down_qualified, in_same_package): Declare.
5799         (in_same_package): Likewise.
5800         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5801         Callers updated.
5802
5803 2004-06-29  Andrew Haley  <aph@redhat.com>
5804
5805         * except.c (expand_start_java_handler): Push a new binding level.
5806         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5807         register_exception_range() to register where we'll do it.
5808         (expand_end_java_handler): Remove old bogus code.  Replace with
5809         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5810         the top of the expression we're curently building.
5811         (maybe_end_try): Delete.
5812         * decl.c (binding_level.exception_range): New field.
5813         (clear_binding_level): Add field exception_range.  Reformat.
5814         (poplevel): Call expand_end_java_handler().
5815         (poplevel): Call java_add_stmt only if functionbody is false.
5816         (maybe_poplevels): Don't call maybe_end_try() from here.
5817         (end_java_method): Clear no longer used trees in function decl.
5818         (register_exception_range): New function.
5819         * java-tree.h (register_exception_range, struct eh_range): Declare.
5820
5821 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
5822
5823         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5824
5825 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
5826
5827         Formatting fixes.
5828         * expr.c (class_has_finalize_method): Fix method name indentation.
5829         (expand_java_call): Remove K&R style parameter declaration.
5830         (expand_invoke): Fix statement indentation.
5831         (expand_java_field_op): Likewise.
5832         * parse-scan.y: Fix typo.
5833         (reset_report): Fix method name indentation.
5834         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5835         line. Fix typos.
5836         * verify.c (verify_jvm_instructions): Document parameters, insert
5837         page break.
5838         * lang.c (lang_init_source): Fix method name indentation.
5839         * class.c (common_enclosing_context_p): Likewise.
5840         (emit_symbol_table): Fix parameter list indentation.
5841         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5842         parameter declaration.
5843         * constants.c: Fix copyright notice indentation.
5844         * typeck.c (find_method_in_superclasses): Fix parameter list
5845         indentation.
5846         (find_method_in_interfaces): Likewise.
5847         * zextract.c (makelong): Fix method name indentation.
5848
5849 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5850
5851         PR java/15715.
5852         * parse.y (create_interface): Set correct access modifiers for
5853         interfaces.
5854         * jcf-write.c (get_classfile_modifiers): New function.
5855         (generate_classfile): Use get_classfile_modifiers, not
5856         get_access_flags.
5857
5858 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5859
5860         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5861         dependency to current parser context, not NULL_TREE, for top-level
5862         classes.
5863         (jdep_resolve_class): Enable member access check for all inner
5864         class dependencies.
5865
5866 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5867
5868         * parse.y (qualify_and_find): Pass type decl, not identifier, to
5869         load_class.
5870
5871 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5872
5873         PR java/15734
5874         * expr.c (expand_java_field_op): Ensure that target class for static
5875         field access has been loaded.
5876
5877 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5878             Ranjit Mathew  <rmathew@hotmail.com>
5879
5880         PR java/1207, java/16178
5881         * jcf-parse.c (load_class): Return immediately if passed a type decl
5882         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5883         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5884         before calling load_class.
5885         (qualify_and_find): Likewise.
5886         (find_in_imports_on_demand): Likewise.
5887         (find_applicable_accessible_methods_list): Likewise.
5888
5889 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
5890
5891         * parse.y (java_layout_seen_class_methods): Don't call load_class
5892         on class defined by source parser.
5893
5894 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
5895
5896         * parse.y (set_nested_class_simple_name_value): Removed.
5897         (java_complete_expand_class): Remove calls to
5898         set_nested_class_simple_name_value.
5899
5900 2004-06-22  Andrew Haley  <aph@redhat.com>
5901             Ranjit Mathew  <rmathew@hotmail.com>
5902
5903         Fixes PR java/16113.
5904         * decl.c (force_poplevels): Remove call to expand_end_bindings.
5905
5906 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
5907
5908         * parse.y (create_class): Correct diagnostic message about
5909         java.lang.Object extending anything else.
5910
5911 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5912
5913         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5914         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5915         * constants.c (build_ref_from_constant_pool): Likewise.
5916         * expr.c (build_java_array_length_access): Likewise.
5917         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5918         (invoke_build_dtable, build_invokevirtual): Likewise.
5919         (build_invokeinterface, java_expand_expr): Likewise.
5920         (emit_init_test_initialization): Likewise.
5921         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5922         * parse.y (make_qualifed_name, build_array_ref): Likewise.
5923
5924 2004-06-21  Andrew Haley  <aph@redhat.com>
5925
5926         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5927         block.
5928
5929 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
5930
5931         * jcf.h (struct JCF): Change java_source, right_zip and finished
5932         to unsigned int.
5933         * lex.h (struct java_lexer): Change hit_eof, read_anything,
5934         byte_swap and use_fallback to unsigned int.
5935         * parse.h (struct _jdep): Change flag0 to unsigned int.
5936
5937 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
5938
5939         Fixes PR java/13948
5940         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5941         before trying to lay out its methods.
5942         * jcf-parse.c (read_class): Track parsed files using canonical paths
5943         obtained via lrealpath from libiberty.
5944         (java_parse_file): Likewise.
5945         (parse_source_file_1): Rename formal parameter to reflect its
5946         modified purpose. Minor formatting fix.
5947
5948 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5949
5950         * class.c (emit_register_classes): Make the function uninlinable,
5951         do not set current_function_cannot_inline.
5952         * resource.c (write_resource_constructor): Do not reset
5953         flag_inline_functions around rest_of_compilation.
5954
5955 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
5956
5957         PR java/15769
5958         * expr.c (java_truthvalue_conversion): Handle
5959         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5960         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5961         i.e. return the expression.
5962
5963 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
5964
5965         * gjavah.c: Include version.h
5966
5967 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
5968
5969         * jcf-write.c (generate_bytecode_conditional): Correct handling
5970         of unordered conditionals. Add comment.
5971
5972 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
5973             Per Bothner  <per@bothner.com>
5974
5975         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5976         local variable was initialised upon declaration.
5977         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5978         variable was final and initialised upon declaration.
5979         * check-init.c (check_final_reassigned): Give error only if a blank
5980         final is not definitely unassigned or if an initialised final is
5981         reassigned.
5982         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5983         assignment expressions. Remove case MODIFY_EXPR, label do_default.
5984         (check_init): Perform initialised-variable-removing-optimisation
5985         only on non-final local variables.
5986
5987 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5988
5989         * jcf-write.c (generate_bytecode_conditional): Handle binops
5990         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5991         and LTGT_EXPR.
5992         (generate_bytecode_insns): Likewise.
5993
5994 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5995
5996         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
5997         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
5998
5999 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6000
6001         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6002         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6003
6004 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6005
6006         * decl.c (struct binding_level): Add GTY marker. Compile
6007         binding_depth unconditionally.
6008         (current_binding_level, free_binding_level, global_binding_level):
6009         Likewise.
6010         (clear_binding_level): Unconditionally set binding_depth.
6011         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6012
6013 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6014
6015         * lex.c (java_new_lexer): Set 'encoding'.
6016         (java_read_char): Improve error message for unrecognized characters.
6017         * lex.h (struct java_lexer): New field 'encoding'.
6018
6019 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6020
6021         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6022
6023 2004-05-21  Mark Wielaard  <mark@klomp.org>
6024
6025         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6026         extern.
6027
6028 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
6029
6030         * typeck.c: Remove non-printable character 160.
6031
6032 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
6033
6034         * check-init.c: Correct minor typos.
6035
6036 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6037
6038         * Make-lang.in, expr.c, java-gimplify.c: Rename
6039         tree-simple.[ch] to tree-gimple.[ch].
6040
6041 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
6042
6043         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6044
6045 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6046
6047         Merge from tree-ssa-20020619-branch.  See
6048         ChangeLog.tree-ssa for details.
6049
6050         * Make-lang.in, builtins.c, check-init.c, class.c,
6051         constants.c, decl.c, except.c, expr.c, java-except.h,
6052         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6053         lang.c, lang.opt, parse.y, resource.c: Merged.
6054         * java-gimplify.c: New file.
6055
6056 2004-05-10  Andrew Haley  <aph@redhat.com>
6057
6058         * parse.y (create_class): Set TYPE_VFIELD.
6059         * decl.c (java_init_decl_processing): Likewise.
6060
6061         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6062         * class.c (make_method_value): Replace DECL_VINDEX with call to
6063         get_method_index().
6064         (get_dispatch_vector): Likewise.
6065         (layout_class_method): Likewise.
6066         Replace set of DECL_VINDEX with call to set_method_index().
6067         (set_method_index): New function.
6068         (get_method_index): New function.
6069         * java-tree.h (set_method_index): New function decl.
6070         (get_method_index): New function decl.
6071
6072 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6073
6074         * parse.y (check_pkg_class_access): Add new argument
6075         and use it when cl is NULL to call lookup_cl on it.
6076         (parser_check_super_interface): Do not call lookup_cl.
6077         Pass this_decl to check_pkg_class_access and NULL
6078         instead of lookup_cl.
6079         (parser_check_super): Update for change in
6080         check_pkg_class_access.
6081         (do_resolve_class): Likewise.
6082         (process_imports): Likewise.
6083         (find_in_imports_on_demand): Likewise.
6084         (resolve_qualified_expression_name): Likewise.
6085
6086 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6087
6088         Fixes PR java/9685, PR java/15073
6089         * parse.y (accessibility_string): New method.
6090         (not_accessible_field_error): Use accessibility_string()
6091         instead of java_accstring_lookup().
6092         (resolve_qualified_expression_name): Check with
6093         check_pkg_class_access() before allowing access using
6094         qualified names.
6095         Fix comment typo.
6096         Use check_pkg_class_access() instead of not_accessible_p()
6097         for unqualified types.
6098         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6099         REFERENCE for package-private access checking.
6100         (patch_method_invocation): Use accessibility_string() instead
6101         of java_accstring_lookup().
6102
6103 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6104
6105         Fixes PR java/15133
6106         * gjavah.c (struct method_name): Add member is_native.
6107         (overloaded_jni_method_exists_p): Match candidate method only if
6108         it is native.
6109         (print_method_info): Initialise is_native flag from the method's
6110         access flags.
6111
6112 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6113
6114         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6115         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6116
6117 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6118
6119         * resource.c (write_resource_constructor): Guard call to possibly
6120         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6121
6122 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6123
6124         * class.c (make_class_data): Add new field aux_info.
6125         * decl.c (java_init_decl_processing): Push type and decl for
6126         `aux_info'.
6127
6128 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6129
6130         * expr.c (expand_java_NEW): Don't use size argument for
6131         _Jv_AllocObject calls.
6132         * parse.y (patch_invoke): Likewise.
6133
6134 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6135
6136         * expr.c (build_invokeinterface): Remove unused variables to
6137         fix warnings.
6138
6139 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6140
6141         * class.c (get_interface_method_index): New function. Return dispatch
6142         index for interface method.
6143         (make_method_value): For interface methods, set index field to
6144         iface dispatch index, not DECL_VINDEX.
6145         * expr.c (build_invokeinterface): Use get_interface_method_index.
6146
6147 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6148
6149         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6150
6151 2004-03-31  Andrew Haley  <aph@redhat.com>
6152
6153         PR java/14104
6154         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6155
6156 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6157
6158         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6159         form of GTY markers.
6160
6161 2004-03-25  Marcus Meissner  <meissner@suse.de>
6162
6163         PR java/14689:
6164         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6165
6166 2004-03-23  Tom Tromey  <tromey@redhat.com>
6167
6168         PR java/14315:
6169         * jcf-write.c (make_class_file_name): Don't report if mkdir
6170         failed with EEXIST.
6171
6172 2004-03-23  Tom Tromey  <tromey@redhat.com>
6173
6174         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6175
6176 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6177
6178         * class.c, gjavah.c, lang.c: Fix comment typos.
6179         * gcj.texi: Fix typos.
6180
6181 2004-03-19  Per Bothner  <per@bothner.com>
6182
6183         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6184
6185         * class.c (assume_compiled_node_struct):  Rename type to
6186         class_flag_node_struct, as it is now also used for enable_assertions.
6187         Rename assume_compiled_node typedef.  Rename excludep field to value.
6188         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6189         Minor optimization - avoid needless strlen.
6190         (add_assume_compiled):  Some tweaking and optimization.
6191         Rename and generalize to add_class_flag takem an extra parameter.
6192         (add_assume_compled):  New just calls add_class_flag.
6193         (add_enable_assert, enable_assertions):  New functions.
6194         (enable_assert_tree):  New static.
6195         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6196         * lang.opt (fenable-assertions, fenable-assertions=,
6197         fdisable-assertions, fdisable-assertions=):  New options.
6198         * lang.c (java_handle_option):  Handle new options.
6199         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6200         class in an interface - create helper class nested in outer interface.
6201         (build_assertion):  Short-circuit if enable_assertions is false.
6202
6203 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6204
6205         * java-tree.h: Changes throughout to add checking to macros
6206         and numerous whitespace changes.
6207         (VAR_OR_FIELD_CHECK): New macro.
6208         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6209         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6210
6211 2004-03-16  Per Bothner  <per@bothner.com>
6212
6213         * jcf-jump.c (options):  New --print-constants option.
6214         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6215
6216         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6217         (print_constant_terse_with_index):  New helper function.
6218         (various places):  Check flag_print_constant_pool where missing.
6219         (main):  If verbose set flag_print_constant_pool.
6220         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6221
6222 2004-03-15  Andrew Haley  <aph@redhat.com>
6223
6224         PR java/14581
6225         * parse.y (java_complete_lhs): Check that final variable has an
6226         initializer.
6227
6228 2004-03-12  Andrew Haley  <aph@redhat.com>
6229
6230         PR java/14551
6231         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6232         conversion.
6233
6234 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6235
6236         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6237         is NULL.
6238
6239 2004-02-27  Per Bothner  <per@bothner.com>
6240
6241         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6242         suggestion:  Use build_incomplete_class_ref.
6243         This fixes PR java/13508, java/11714.
6244
6245 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6246
6247         * java/parse.h: Update copyright.
6248
6249 2004-02-26  Andrew Haley  <aph@redhat.com>
6250
6251         PR java/14231:
6252         * parse.y (check_interface_throws_clauses): Check for
6253         !METHOD_INVISIBLE (iface_method).
6254         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6255         well as CLASS_ABSTRACT.
6256
6257 2004-02-25  Per Bothner  <per@bothner.com>
6258
6259         * parse.y (build_assertion):  If we're in an inner class, create the
6260         class$ helper routine in the outer class.
6261
6262 2004-02-19  Richard Henderson  <rth@redhat.com>
6263
6264         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6265
6266 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6267
6268         * Make-lang.in (java.install-man): Add extra dependencies.
6269
6270 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6271
6272         * Make-lang.in: Install man pages under the same names
6273         (possibly transformed) as the program they document.
6274
6275 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6276
6277         * gjavah.c: Include "intl.h".
6278         (error): New function.
6279         (main): Call gcc_init_libintl.
6280         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6281         print_stub_or_jni, process_file, main): Use error rather than
6282         fprintf.
6283         (print_method_info, usage, help, version, main): Mark strings for
6284         translation with _.  Avoid splitting up sentences.  Send
6285         information messages to stdout.
6286         * jcf-dump.c: Include "intl.h".
6287         (main): Call gcc_init_libintl.
6288         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6289         Mark error, usage and version messages for translation with _.
6290         Avoid splitting up sentences.
6291         * jv-scan.c: Include "intl.h".
6292         (fatal_error, warning): Change parameter s to msgid.  Translate
6293         messages.
6294         (main): Call gcc_init_libintl.
6295         (usage, help, version): Mark error, usage and version messages for
6296         translation with _.  Avoid splitting up sentences.
6297         * jvgenmain.c: Include "intl.h".
6298         (main): Call gcc_init_libintl.
6299         (usage, main): Mark error messages for translation with _.
6300         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6301         JVGENMAIN_OBJS): Add intl.o.
6302         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6303         java/jvgenmain.o): Update dependencies.
6304
6305 2004-02-08  Per Bothner  <per@bothner.com>
6306
6307         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6308         class don't use not_accessible_field_error, which can get confused.
6309
6310 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6311
6312         Make-lang.in (po-generated):  Delete.
6313
6314 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6315
6316         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6317         Depend on target.h.
6318         * decl.c: Include target.h.
6319         (start_java_method): Replace PROMOTE_PROTOTYPES with
6320         targetm.calls.promote_prototypes.
6321         * expr.c: Include target.h.
6322         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6323         targetm.calls.promote_prototypes.
6324         * parse.y: Include target.h.
6325         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6326         with targetm.calls.promote_prototypes.
6327
6328 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6329
6330         * typeck.c: Update copyright.
6331
6332 2004-02-02  Tom Tromey  <tromey@redhat.com>
6333
6334         * decl.c (java_init_decl_processing): Remove duplicate
6335         gnu/gcj/RawData.
6336
6337 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6338
6339         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6340
6341 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6342
6343         * expr.c (build_field_ref): Move variable
6344         definition up.
6345
6346 2004-01-28  Andrew Haley  <aph@redhat.com>
6347
6348         * expr.c (build_field_ref): Widen field offset.
6349
6350 2004-01-27  Andrew Haley  <aph@redhat.com>
6351
6352         java/13273
6353         * parse.y (check_interface_throws_clauses): Make sure class_decl
6354         has been loaded.
6355
6356 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6357
6358         PR java/13733
6359         * parse.y (patch_assignment): Don't modify lhs_type for
6360         reference assignments.
6361
6362 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6363
6364         * Make-lang.in: Replace $(docdir) with doc.
6365         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6366         (java.install-man): Revamp rule.
6367
6368 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6369
6370         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6371         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6372         instead of deferred backquote.
6373
6374 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6375
6376         * typeck.c (find_method_in_interfaces): Move variable
6377         definition up.
6378
6379 2004-01-16  Andrew Haley  <aph@redhat.com>
6380
6381         PR java/13273:
6382         * typeck.c (shallow_find_method): New.
6383         (find_method_in_superclasses): New.
6384         (find_method_in_interfaces): New.
6385         (lookup_do): Rewrite.
6386         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6387
6388         * jcf-parse.c (read_class): Save and restore output_class.
6389         * decl.c (java_expand_body): Set output_class from fndecl.
6390
6391 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
6392
6393         * class.c (gen_indirect_dispatch_tables): Fix string length
6394         calculations.
6395
6396 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6397
6398         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6399         (java.srcextra): Copy above back to source directory if requested.
6400         (po-generated): Delete reference to $(parsedir).
6401         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6402         Use implicit rule.
6403
6404 2004-01-14  Jan Hubicka  <jh@suse.cz>
6405
6406         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6407         estimation.
6408
6409 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6410
6411         * java-tree.h (java_expand_expr): Change prototype.
6412         * expr.c (java_expand_expr): Add alt_rtl parameter.
6413
6414 2004-01-09  Andrew Haley  <aph@redhat.com>
6415
6416         PR java/12755:
6417         * parse.y (java_fix_constructors):  Set output_class.
6418         (java_reorder_fields): Likewise.
6419         (java_layout_classes): Likewise.
6420         (java_expand_classes): Generate indirect dispatch tables.
6421         (java_expand_classes): Set output_class.
6422         (java_finish_classes): Likewise.
6423         * lang.c (java_init): Turn on always_initialize_class_p if we're
6424         using indirect dis[atch.
6425         (java_decl_ok_for_sibcall): Use output_class, not current_class.
6426         (java_get_callee_fndecl): Use class local atable.
6427         * jcf-parse.c
6428         (always_initialize_class_p): Decl moved to java-tree.h.
6429         (HANDLE_CLASS_INFO): Set output_class.
6430         (read_class): Likewise.
6431         (parse_class_file): Call gen_indirect_dispatch_tables.
6432         (parse_zip_file_entries): Set output_class.
6433         (java_parse_file): Set output_class.  Don't emit symbol tables.
6434         * java-tree.h (output_class): New.
6435         Remove global declarations for otable, atable, and ctable.
6436         (always_initialize_class_p): moved here from decl.c.
6437         (DECL_OWNER): New.
6438         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6439         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6440         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6441         (struct lang_type): Add otable_methods, otable_decl,
6442         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6443         ctable_decl, catch_classes, type_to_runtime_map.
6444         * expr.c (build_field_ref): Make otable, atable, and ctable class
6445         local rather than global.
6446         (build_known_method_ref): Likewise.
6447         (build_invokeinterface): Likewise.
6448         (java_expand_expr): Pass runtime type (rather than actual type) to
6449         expand_start_catch.
6450         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6451         this class.  Look up each class in that map to delete duplicates.
6452         (expand_end_java_handler): Pass runtime type (rather than actual
6453         type) to expand_start_catch.
6454         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6455         (do_nothing): New.
6456         (java_init_decl_processing): Rearrange things.  Remove global
6457         declarations of otable, atable, and ctable.
6458         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6459         (java_expand_body): Set output_class.
6460         * constants.c (build_constant_data_ref): Use output_class, not
6461         current_class.
6462         (alloc_name_constant): Likewise.
6463         * class.c (gen_indirect_dispatch_tables): New.
6464         (build_class_ref): Generate hard reference to superclass, even if
6465         using indirect dispatch.
6466         (build_static_field_ref): Use class local atable.
6467         (make_class_data): Generate hard reference to superclass, even if
6468         using indirect dispatch.
6469         Generate symbolic references to interfaces when using indirect
6470         dispatch.
6471         (make_class_data): Emit otable, atable, and ctable.
6472         Make otable, atable, and ctable class local rather than global.
6473         (emit_catch_table): Make otable, atable, and ctable class local
6474         rather than global.
6475
6476 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
6477
6478         * parse.y (catch_clause_parameter): Fix typo.
6479
6480         PR java/13404
6481         * parse.y: (catch_clause_parameter): Return early if $3, aka
6482         formal_parameter, is null.
6483
6484 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6485
6486         * class.c: Remove uses of "register" specifier in
6487         declarations of arguments and local variables.
6488         * decl.c: Likewise.
6489         * expr.c: Likewise.
6490         * gjavah.c: Likewise.
6491         * jcf-dump.c: Likewise.
6492         * jcf-io.c: Likewise.
6493         * jcf-parse.c: Likewise.
6494         * jcf-write.c: Likewise.
6495         * keyword.h: Likewise.
6496         * parse.y: Likewise.
6497         * typeck.c: Likewise.
6498         * verify.c: Likewise.
6499
6500 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
6501
6502         * Make-lang.in (GCJ_CROSS_NAME): Delete.
6503         (java.install_common, java.install-man): Adjust for above.
6504         (java.uninstall): Likewise.
6505
6506 2003-12-03  Michael Koch  <konqueror@gmx.de>
6507
6508         * class.c (make_class_data):
6509         Push field value to 'hack_signers' instead of 'signers'.
6510         * decl.c (java_init_decl_processing):
6511         Push field 'hack_signers' instead of 'signers'.
6512
6513 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
6514
6515         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6516         including iconv.h.
6517
6518 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
6519
6520         PR java/12374:
6521         * parse.y (qualify_ambiguous_name): Remove lots of broken
6522         field access processing - there's no need to do that here,
6523         because we have resolve_field_access.  Remove
6524         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6525         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6526         used.
6527
6528 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
6529
6530         Fix PR java/13237
6531         * parse.y (java_complete_lhs): Save location prior to patching
6532         CALL_EXPR.
6533
6534 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
6535
6536         PR java/12548
6537         * resource.c (write_resource_constructor): Append
6538         "_resource" to constructor identifier name.
6539
6540 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
6541
6542         Fix PR java/13183.
6543         * constants.c (cpool_for_class): New function.
6544         (outgoing_cpool): Remove global variable.
6545         (alloc_name_constant): Use cpool_for_class.
6546         (build_constants_constructor): Likewise.
6547         * decl.c (java_expand_body): Set current_class.
6548         * java-tree.h (outgoing_cpool) Remove declaration.
6549         (init_outgoing_cpool): Likewise.
6550         * jcf-parse.c (init_outgoing_cpool): Remove function.
6551         (parse_class_file): Don't call init_outgoing_cpool.
6552         * parse.y (java_complete_expand_methods): Don't call
6553         init_outgoing_cpool.  Don't save outgoing_cpool.
6554         (java_expand_classes): Don't restore outgoing_cpool.
6555         (java_finish_classes): Likewise.
6556
6557 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
6558
6559         * Make-lang.in: (java.install-common) Add
6560         symlink for $(target_noncanonical)-gcjh for
6561         native builds.
6562
6563 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6564
6565         * Make-lang.in (java.extraclean): Delete.
6566
6567 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6568
6569         * Make-lang.in (check-java): Add.
6570
6571 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
6572
6573         Fix PR java/13024.
6574         * except.c (prepare_eh_table_type): Allocate variable-sized
6575         buffer `buf' with alloca.
6576
6577 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6578
6579         Fix PR java/12857.
6580
6581         decl.c (java_init_decl_processing): Don't initialize
6582         class_not_found_type_node, no_class_def_found_type_node.
6583
6584         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6585         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6586         (class_not_found_type_node, no_class_def_found_type_node):
6587         Don't define.
6588
6589         parse.y (build_dot_class_method_invocation): Add this_class
6590         argument.  Qualify method invocations to a different class.
6591         (create_new_parser_context): Initialize saved_data_ctx to 0.
6592         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6593         (build_dot_class_method): Don't load classes.  Register
6594         incomplete types.
6595         (build_incomplete_class_ref): Special cases for interfaces
6596         and inner classes.  Move build_dot_class_method call to here...
6597         (patch_incomplete_class_ref): ...from here.  Pass current_class
6598         to build_dot_class_method_invocation.
6599         (build_assertion): Pass class_type to
6600         build_dot_class_method_invocation.
6601         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6602
6603 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6604
6605         Fix PR java/12739.
6606         * java-tree.h (BLOCK_EMPTY_P): Define.
6607         * parse.y (java_complete_lhs): Check for empty blocks
6608         in TRY_FINALLY_EXPR case.
6609
6610 2003-11-17  Andrew Haley  <aph@redhat.com>
6611
6612         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6613         (struct lang_decl_var:freed): New variable.
6614         * decl.c (poplevel): Mark local vars that have gone out of scope.
6615         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6616         scope.
6617
6618 2003-11-16  Jason Merrill  <jason@redhat.com>
6619
6620         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6621         and TAGS files that include them for each front end.
6622
6623 2003-11-15  Tom Tromey  <tromey@redhat.com>
6624
6625         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6626
6627 2003-11-12  Jason Merrill  <jason@redhat.com>
6628
6629         PR optimization/12547
6630         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6631         BLOCK_EXPR_BODY directly.
6632
6633 2003-11-12  Andrew Haley  <aph@redhat.com>
6634
6635         PR java/11045
6636         * parse.y (fold_constant_for_init): Check that we really do have a
6637         constant.
6638
6639         PR java/11533
6640         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6641         init_test_decls being inlined.
6642
6643         PR java/12890:
6644         * parse.y (do_resolve_class): Check return value from
6645         breakdown_qualified().
6646
6647 2003-11-11  Tom Tromey  <tromey@redhat.com>
6648
6649         PR java/12915:
6650         * parse.y (merge_string_cste): Handle case where we have a
6651         pointer that happens to be zero, not null_pointer_node.
6652
6653 2003-11-10  Tom Tromey  <tromey@redhat.com>
6654
6655         * jcf-parse.c (classify_zip_file): Correctly compare
6656         filename_length against length of manifest file's name.
6657
6658 2003-11-08  Tom Tromey  <tromey@redhat.com>
6659
6660         PR java/12894:
6661         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6662
6663 2003-11-06  Andrew Haley  <aph@redhat.com>
6664
6665         * expr.c (java_stack_swap): Make sure destination stack slots are
6666         of the correct type.
6667
6668 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6669
6670         * Make-lang.in (dvi): Move targets to $(docobjdir).
6671         (gcj.dvi): Simplify rule and adjust target.
6672         (gcj.info): Simplify rule.
6673         (gcj.pod): New intermediate rule.
6674         (gcjh.pod): Likewise.
6675         (jv-scan.pod): Likewise.
6676         (jcf-dump.pod): Likewise.
6677         (gij.pod): Likewise.
6678         (jv-convert.pod): Likewise.
6679         (rmic.pod): Likewise.
6680         (rmiregistry.pod): Likewise.
6681         (gcj.1): Delete.
6682         (gcjh.1): Delete.
6683         (jv-scan.1): Delete.
6684         (jcf-dump.1): Delete.
6685         (gij.1): Delete.
6686         (jv-convert.1): Delete.
6687         (rmic.1): Delete.
6688         (rmiregistry.1): Delete.
6689
6690 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
6691
6692         Fixes PR java/12866.
6693         * parse.y (resolve_qualified_expression_name): Move test
6694         for outer field access methods from here...
6695         (check_thrown_exceptions) ...to here.
6696
6697 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
6698
6699         * .cvsignore: Delete.
6700
6701 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
6702
6703         * verify.c (verify_jvm_instructions): Don't warn about legal
6704         eh binding regions generated for example by jdk 1.4.1.
6705
6706 2003-10-24  David S. Miller  <davem@redhat.com>
6707
6708         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6709
6710 2003-10-22  Andrew Haley  <aph@redhat.com>
6711
6712         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6713         (java_get_callee_fndecl): New.
6714
6715         * jcf-parse.c (java_parse_file): Call emit_catch_table().
6716
6717         * java-tree.h (ctable_decl): New.
6718         (catch_classes):  New.
6719         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6720
6721         * decl.c (java_init_decl_processing): Add catch_class_type.
6722         Add ctable_decl.
6723         Add catch_classes field.
6724
6725         * class.c (build_indirect_class_ref): Break out from
6726         build_class_ref.
6727         (make_field_value): Check flag_indirect_dispatch.
6728         (make_class_data): Ditto.
6729         Tidy uses of PUSH_FIELD_VALUE.
6730         Add field catch_classes.
6731         (make_catch_class_record): New.
6732
6733         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6734
6735 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6736
6737         * jcf-write.c: Follow spelling conventions.
6738         * parse.y: Likewise.
6739
6740 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6741
6742         * ChangeLog: Fix typos.
6743         * expr.c: Fix comment typos.
6744         * jcf-write.c: Likewise.
6745         * lang.c: Likewise.
6746         * lex.c: Likewise.
6747         * mangle.c: Likewise.
6748         * parse-scan.y: Likewise.
6749         * parse.y: Likewise.
6750
6751 2003-10-22  Tom Tromey  <tromey@redhat.com>
6752
6753         * expr.c (expand_byte_code): Only warn about dead bytecode when
6754         extra_warnings is set.
6755
6756 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
6757
6758         Fix for PR java/12586.
6759         * mangle.c (find_compression_record_match): Don't iterate through
6760         package namespace elements unless they all match compression_table
6761         entries.
6762
6763 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
6764
6765         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6766         (generate-manpages): Likewise.
6767         (java.maintainer-clean): Likewise.
6768         (gcj.info): Likewise.
6769         (gcj.1): Likewise.
6770         (gcjh.1): Likewise.
6771         (jv-scan.1): Likewise.
6772         (jcf-dump.1): Likewise.
6773         (gij.1): Likewise.
6774         (jv-convert.1): Likewise.
6775         (rmic.1): Likewise.
6776         (rmiregistry.1): Likewise.
6777         (java.install-man): Likewise.
6778         (parse-scan.o): Move and define complete compile line.
6779         (parse.o): Likewise.
6780         (jcf-tree-inline.o): Move.
6781
6782 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
6783
6784         * Make-lang.in (info): Update dependencies.
6785         (java.install-info): Remove.
6786         ($(srcdir)/java/gcj.info): Replace with ...
6787         ($(docobjdir)/gcj.info): ... this.
6788
6789 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
6790
6791         * Make-lang.in: Replace uses of $(target_alias) with
6792         $(target_noncanonical).
6793
6794 2003-10-09  Tom Tromey  <tromey@redhat.com>
6795
6796         * decl.c (java_init_decl_processing): Declare signers field.
6797         * class.c (make_class_data): Set signers field.
6798
6799 2003-10-09  Jason Merrill  <jason@redhat.com>
6800
6801         * parse.y (patch_assignment): Use make_node to create a BLOCK.
6802         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6803         POINTER_TYPE.
6804
6805 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
6806
6807         * Make-lang.in (java.info): Replace with ...
6808         (info): ... this.
6809         (java.dvi): Replace with ...
6810         (dvi): ... this.
6811         (java.generated-manpages): Replace with ...
6812
6813 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
6814
6815         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6816
6817 2003-10-01  Andrew Haley  <aph@redhat.com>
6818
6819         * jcf-parse.c (java_parse_file): Write otable and atable.
6820         * java-tree.h (atable_methods): New.
6821         (atable_decl): New.
6822         (atable_syms_decl): New.
6823         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6824         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6825         (symbol_*type): Rename method_symbol* to symbol*type.
6826         (emit_offset_symbol_table): Delete.
6827         (emit_symbol_table): New.
6828         (get_symbol_table_index): New.
6829         (atable_type): New.
6830         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6831         (build_known_method_ref): Likewise.
6832         (get_symbol_table_index): Rename from get_offset_table_index.
6833         Parameterize to allow re-use by differing types of symbol table.
6834         (build_invokevirtual): Pass table to get_offset_table_index.
6835         * decl.c (java_init_decl_processing): Push types and decls for
6836         atable and atable_syyms.
6837         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6838         (make_class_data): Add new fields atable and atable_syms.
6839         (emit_symbol_table): Rename from emit_offset_symbol_table.
6840         Parameterize to allow re-use by different types of symbol table.
6841         (build_symbol_entry): Renamed from build_method_symbols_entry.
6842
6843 2003-09-30  Roger Sayle  <roger@eyesopen.com>
6844
6845         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6846         semantics for SAVE_EXPR, by caching the result in a temporary.
6847
6848 2003-09-28  Richard Henderson  <rth@redhat.com>
6849
6850         * check-init.c (check_init): Save and restore input_location
6851         instead of file and line separately.
6852         * decl.c (java_expand_body): Likewise.
6853         * jcf-write.c (generate_bytecode_insns): Likewise.
6854         * parse.y (safe_layout_class): Likewise.
6855         * jcf-parse.c (read_class, parse_class_file): Likewise.
6856         (java_parse_file): Use %H for warning locator.
6857
6858 2003-09-28  Roger Sayle  <roger@eyesopen.com>
6859
6860         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6861         with void-type branches instead of using a COMPOUND_EXPR.
6862
6863 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
6864
6865         * decl.c (java_optimize_inline, dump_function): Remove.
6866         * java-tree.h (java_optimize_inline): Remove declaration.
6867         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6868         * parse.y (source_end_java_method, java_expand_classes):
6869         Likewise.  Remove dead code.
6870
6871 2003-09-27  Roger Sayle  <roger@eyesopen.com>
6872
6873         * lang.c (java_init_options): Set flag_evaluation_order.
6874         * expr.c (force_evaluation_order): Don't attempt to force
6875         evaluation order of binary operations using save_expr.
6876         * parse.y (java_complete_lhs): No longer need to call
6877         force_evaluation_order when constructing binary operators.
6878
6879 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6880             Bryce McKinlay  <bryce@mckinlay.net.nz>
6881
6882         PR java/1333:
6883         * parse.y (not_accessible_field_error): New function.
6884         (resolve_expression_name): Check field access permissions.
6885         (resolve_qualified_expression_name): Use
6886         not_accessible_field_error.
6887         (resolve_qualified_expression_name): Likewise.
6888
6889 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6890
6891         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6892
6893 2003-09-23  Roger Sayle  <roger@eyesopen.com>
6894
6895         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6896         with equal operands without side-effects.
6897
6898 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
6899
6900         * decl.c (java_init_decl_processing): Don't emit otable decls
6901         if flag_indirect_dispatch is not set.
6902
6903 2003-09-21  Richard Henderson  <rth@redhat.com>
6904
6905         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6906         resource.c: Revert.
6907
6908 2003-09-21  Richard Henderson  <rth@redhat.com>
6909
6910         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6911         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6912
6913 2003-09-20  Richard Henderson  <rth@redhat.com>
6914
6915         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6916
6917 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6918
6919         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6920         * check-init.c (check_init): Likewise.
6921
6922 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6923
6924         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6925
6926 2003-09-16  Andrew Haley  <aph@redhat.com>
6927
6928         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6929
6930 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
6931
6932         Fixes PR java/9577
6933         * mangle.c (find_compression_record_match): Skip
6934         over a "6JArray" (the array template mangled string)
6935         IDENTIFIER_NODE.
6936         (mangle_array_type): Correct minor typo.
6937         (atms): Move definition to the beginning.
6938
6939 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
6940
6941         * class.c (add_miranda_methods): Ensure super-interfaces are laid
6942         out. Fix for PR java/12254.
6943
6944 2003-09-11  Richard Henderson  <rth@redhat.com>
6945
6946         * parse.y (source_end_java_method): Update for new
6947         cgraph_finalize_function argument.
6948
6949 2003-09-09  Richard Henderson  <rth@redhat.com>
6950
6951         * parse.y (source_end_java_method): Update call to
6952         cgraph_finalize_function.
6953
6954 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
6955
6956         * decl.c (java_expand_body): New function.
6957         * expr.c (build_class_init): Set DECL_IGNORED_P.
6958         * java-tree.h (start_complete_expand_method,
6959         java_expand_body): Declare.
6960         * jcf-parse.c (cgraph.h): Include.
6961         (java_parse_file): Handle flag_unit_at_a_time.
6962         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6963         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6964         (java_estimate_num_insns): Use walk_tree_without_duplicates.
6965         (java_start_inlining): New function.
6966         * parse.h (java_finish_classes): Declare.
6967         * parse.y: Include cgraph.h.
6968         (block): Don't special-case empty block production.
6969         (craft_constructor): Set DECL_INLINE.
6970         (source_end_java_method): Handle flag_unit_at_a_time.
6971         Replace inline code with call to java_expand_body.
6972         (start_complete_expand_method): Remove static modifier.
6973         (java_expand_method_bodies): Patch function tree for
6974         class initialization and/or synchronization as needed.
6975         Don't begin RTL expansion yet.
6976         (java_expand_classes): Check flag_unit_at_a_time before
6977         calling finish_class.
6978         (java_finish_classes): New function.
6979         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6980         (patch_assignment): Set DECL_CONTEXT on temporary variable.
6981         (emit_test_initialization): Set DECL_IGNORED_P.
6982
6983 2003-09-03  Roger Sayle  <roger@eyesopen.com>
6984
6985         * builtins.c (enum builtin_type): Delete unused enumeration.
6986         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6987
6988 2003-08-28  Tom Tromey  <tromey@redhat.com>
6989
6990         * gcj.texi (Extensions): Document gcjlib URLs.
6991
6992 2003-08-20  Tom Tromey  <tromey@redhat.com>
6993
6994         * gcj.texi (Extensions): Added xref.
6995         (libgcj Runtime Properties): Document
6996         gnu.gcj.runtime.VMClassLoader.library_control.
6997
6998 2003-08-20  Andrew Haley  <aph@redhat.com>
6999
7000         * except.c (prepare_eh_table_type): Use new encoding for exception
7001         handlers when using -fno-assume-compiled.
7002
7003 2003-08-13  Tom Tromey  <tromey@redhat.com>
7004
7005         * gcj.texi (Invoking gij): Document -X and -?.
7006
7007 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
7008
7009         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7010         GCJH_OBJS, JCFDUMP_OBJS
7011         * win32-host.c: Removed the unnecessary and broken dependency
7012         on jcf.h
7013
7014 2003-08-11  Tom Tromey  <tromey@redhat.com>
7015
7016         * parse.y (java_check_regular_methods): Typo fixes.  Call
7017         check_interface_throws_clauses.  Use
7018         check_concrete_throws_clauses.
7019         (check_interface_throws_clauses): New function.
7020         (check_concrete_throws_clauses): New function.
7021         (hack_is_accessible_p): New function.
7022         (find_most_specific_methods_list): Added FIXME.
7023         * typeck.c (lookup_do): Use `flags' argument to decide what to
7024         do.  Reimplemented.
7025         (lookup_argument_method_generic): New function.
7026         (lookup_argument_method2): Removed.
7027         * jcf.h (ACC_INVISIBLE): New define.
7028         * jcf-write.c (generate_classfile): Skip invisible methods.
7029         * class.c (add_miranda_methods): New function.
7030         (layout_class_methods): Use it.
7031         (get_access_flags_from_decl): Use ACC_INVISIBLE.
7032         * java-tree.h (METHOD_INVISIBLE): New define.
7033         (lang_decl_func) [invisible]: New field.
7034         (lookup_argument_method_generic): Declare.
7035         (SEARCH_INTERFACE): New define.
7036         (SEARCH_SUPER): Likewise.
7037         (SEARCH_ONLY_INTERFACE): Likewise.
7038         (SEARCH_VISIBLE): Likewise.
7039         (lookup_argument_method2): Removed declaration.
7040
7041 2003-08-05  Tom Tromey  <tromey@redhat.com>
7042
7043         Fix for PR java/11600:
7044         * parse.y (java_complete_lhs): See whether we're calling a method
7045         on an array.
7046         (check_thrown_exceptions): Added `is_array_call' argument;
7047         fixed `clone' checking; updated all callers.
7048
7049 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
7050
7051         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7052
7053 2003-08-03  Tom Tromey  <tromey@redhat.com>
7054
7055         * java-tree.h (METHOD_TRANSIENT): Removed.
7056         * decl.c (pushdecl): Removed some dead code.
7057         * class.c (get_access_flags_from_decl): Can't have transient
7058         method.
7059         (add_method_1): Can't have a transient method.
7060
7061 2003-07-28  Andreas Jaeger  <aj@suse.de>
7062
7063         * jvspec.c: Convert to ISO C90 prototypes.
7064
7065 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7066
7067         * decl.c (force_poplevels): Fix warning call.
7068
7069 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7070
7071         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7072         (expand_java_field_op): Likewise.
7073         * class.c (layout_class_method): Likewise
7074         (emit_register_classes): Likewise.
7075         * decl.c (pushdecl): Likewise.
7076         (poplevel): Likewise.
7077         (force_poplevels): Likewise.
7078         (give_name_to_locals): Likewise.
7079         * check-init.c (check_for_initialization): Likewise.
7080
7081 2003-07-24  Jason Merrill  <jason@redhat.com>
7082
7083         * java-tree.h: Move boolean_type_node et al to the back end.
7084
7085 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7086
7087         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7088         casts.
7089
7090 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7091
7092         * lang.opt: Don't show -MD_ and -MDD_.
7093
7094 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7095
7096         * lang-options.h: Remove.
7097         * lang.opt: Add help text.
7098
7099 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7100
7101         * expr.c: Remove the last argument to expand_assignment().
7102
7103 2003-07-09  Jan Hubicka  <jh@suse.cz>
7104
7105         * java-tree.h (DECL_NUM_STMTS): Rename to...
7106         (DECL_ESTIMATED_INSNS): ... this.
7107         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7108         New static functions.
7109         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7110         * parser.y (add_stmt_to_compound): Do not account statements.
7111
7112 2003-07-08  Mark Wielaard  <mark@klomp.org>
7113
7114         * gcj.texi: CNI now expands to Compiled Native Interface.
7115
7116 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7117
7118         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7119
7120 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7121
7122         * expr.c (expand_byte_code): Adjist emit_line_note call.
7123
7124 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7125
7126         * lang.c (java_handle_option): Don't handle filenames.
7127
7128 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7129
7130         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7131         DIR_SEPARATOR.
7132         Use FILENAME_CMP.
7133         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7134         * jcf.h: Delete COMPARE_FILENAMES definition.
7135
7136 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7137
7138         * lang.c (java_init_options): Update prototype.
7139
7140 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7141
7142         * decl.c (poplevel): Adjust define_label call.
7143
7144 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7145
7146         * gjavah.c (flag_jni): Make non-static.
7147         * parse-scan.y (ctxp): Make non-static.
7148
7149         * class.c (build_method_symbols_entry)
7150         * expr.c (get_offset_table_index)
7151         * jcf-parse.c (jcf_parse):
7152         Mark the definition static, matching the forward declaration.
7153
7154 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7155
7156         * lang.c (java_handle_option): Don't check for missing arguments.
7157
7158 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7159
7160         * class.c (push_class): Use a location_t to save place.
7161         (emit_register_classes): Set input_location. Adjust
7162         expand_function_end call.
7163         * resource.c (write_resource_constructor): Likewise.
7164         * decl.c (end_java_method): Adjust expand_function_end call.
7165         * parse.y (source_end_java_method): Likewise.
7166
7167 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7168
7169         * lang.c (java_handle_option): Likewise.
7170
7171 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7172
7173         * lang.c (java_handle_option): Special-casing of optional
7174         joined arguments no longer needed.
7175         * lang.opt: Update switches that take optional argument.
7176
7177 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7178
7179         * lang.opt: Declare Java.
7180         * lang.c (java_init_options): Update.
7181
7182 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7183
7184         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7185
7186 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7187
7188         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7189         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7190         * lang.opt: -MD and -MMD have an underscore.
7191
7192 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7193
7194         * class.c (emit_register_classes): Adjust init_function_start
7195         call.
7196         * decl.c (complete_start_java_method): Likewise.
7197         * resource.c (write_resource_constructor): Likewise.
7198
7199 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7200
7201         * Make-lang.in: Update to use options.c and options.h.
7202         * lang.c: Include options.h not j-options.h.
7203         (java_handle_option): Abort on unrecognized option.
7204         (java_init_options): Request Java switches.
7205
7206 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7207
7208         * Make-lang.in: Handle mostlyclean.
7209
7210 2003-06-11  Tom Tromey  <tromey@redhat.com>
7211
7212         * lang.c (java_handle_option): Update dependency_tracking for
7213         OPT_MF case.
7214
7215         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7216         empty argument.
7217
7218 2003-06-10  Andrew Haley  <aph@redhat.com>
7219
7220         * resource.c (write_resource_constructor): Use expand_expr to
7221         generate the address of the label attached to a resource.
7222         * Make-lang.in (java/resource.o): Add expr.h
7223
7224 2003-06-10  Andrew Haley  <aph@redhat.com>
7225
7226         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7227         (java_decl_ok_for_sibcall): New.
7228
7229 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7230
7231         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7232         (java/j-options.c, java/j-options.h): New.
7233         * java-tree.h (resource_name, compile_resource_file,
7234         compile_resource_data): Constify.
7235         * jcf-write.c (jcf_write_base_directory): Similarly.
7236         * jcf.h (jcf_write_base_directory): Similarly.
7237         * lang.c: Include j-options.h.
7238         (cl_options_count, cl_options, string_option, java_decode_option,
7239         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7240         process_option_with_no): Remove.
7241         (resource_name): Constify.
7242         (LANG_HOOKS_HANDLE_OPTION): Override.
7243         (java_handle_option): New.
7244         (java_init): Don't call jcf_path_init.
7245         (java_init_options): Call jcf_path_init.
7246         * lang.opt: New.
7247         * resource.c (compile_resource_data, compile_resource_file): Constify.
7248
7249 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7250
7251         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7252         (struct lang_decl_func): Add last_line field.
7253         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7254         DECL_SOURCE_LINE_LAST): Remove.
7255         * parse.y (missing_return_error, finish_method_declaration,
7256         lookup_cl, start_artificial_method_body, source_end_java_method,
7257         start_complete_expand_method): Adjust.
7258
7259 2003-06-08  Tom Tromey  <tromey@redhat.com>
7260
7261         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7262         fno-assume-compiled.
7263
7264 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7265
7266         * builtins.c (define_builtin_type, builtin_types): Delete.
7267         (define_builtin): Rewritten to take just the built-in code,
7268         the function's name, type and fallback library function name.
7269         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7270         (initialize_builtins): Overhaul to define the GCC builtins
7271         used by gcj manually, providing the Java run-time's
7272         implementations as the fallback library function.
7273
7274 2003-06-08  Anthony Green  <green@redhat.com>
7275
7276         * parse.y (patch_cast): Fix conversions from floating-point to
7277         integral types.
7278
7279 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7280
7281         * Make-lang.in: Update.
7282         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7283
7284 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7285
7286         * lang.c (java_init_options): Update.
7287
7288 2003-06-05  Jan Hubicka  <jh@suse.cz>
7289
7290         * Make-lang.in:  Add support for stageprofile and stagefeedback
7291
7292 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7293
7294         * lang.c (java_init_options): Prescribe wrap-around two's
7295         complement arithmetic overflow by setting flag_wrapv.
7296
7297 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7298
7299         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7300         (builtin_record): Add an additional builtin_code field to
7301         record which GCC built-in corresponds to the Java function.
7302         (java_builtins):  Add new entries for atan, atan2, exp, log,
7303         pow and tan.
7304         (max_builtin, min_builtin, abs_builtin): Perform constant
7305         folding on the resulting tree.
7306         (java_build_function_call_expr): Likewise, perform constant
7307         folding on the resulting tree.
7308         (initialize_builtins): The NULL creators are now allowed in
7309         the java_builtins table, which is now terminated by an entry
7310         with builtin_code == END_BUILTINS.
7311         (check_for_builtin): Likewise.  If the matching creator is
7312         NULL, construct the call using java_build_function_call_expr
7313         directly with the decl for the corresponding builtin_code.
7314
7315 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7316
7317         * win32-host.c: Normalize copyright boilerplate.
7318
7319 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7320
7321         * parse.y (print_int_node): Use string concatentation on
7322         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7323         function calls into one.
7324
7325 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7326
7327         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7328         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7329         all the affected error messages.
7330
7331 2003-05-13  Richard Henderson  <rth@redhat.com>
7332
7333         * class.c (layout_class_method): Set DECL_EXTERNAL.
7334         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7335         * java-tree.h (java_mark_class_local): Declare.
7336         * jcf-parse.c (parse_class_file): Use it.
7337         * parse.y (java_expand_classes): Likewise.
7338
7339 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7340
7341         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7342         * lex.h: #include input.h.
7343         * jv-scan.c (input_filename): Remove.
7344
7345 2003-05-02  Tom Tromey  <tromey@redhat.com>
7346
7347         PR java/10491:
7348         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7349         (handle_inner_classes): New function.
7350
7351 2003-05-01  Tom Tromey  <tromey@redhat.com>
7352
7353         PR java/10459:
7354         * parse.y (finish_for_loop): Do nothing if update expression is a
7355         EXPR_WFL_NODE wrapping nothing.
7356         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7357
7358 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7359
7360         * lex.h (input_lineno): Remove declaration.
7361         * parse-scan.y: #include input.h.
7362         (input_filename): Remove declaration.
7363         (input_location): Add definition.
7364         (input_line): Remove definition.
7365
7366 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7367
7368         * lex.h (lineno): Rename to ...
7369         (input_line): ... here
7370         * parse-scan.y (lineno): Rename to ...
7371         (input_line): ... here.
7372         (reset_report): Rename lineno to input_line.
7373         * check-init.c (check_init): Likewise.
7374         * class.c (push_class): Likewise.
7375         * decl.c (complete_start_java_method, end_java_method): Likewise.
7376         * expr.c (expand_byte_code): Likewise.
7377         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7378         * jcf-write.c (generate_bytecode_insns): Likewise.
7379         * lex.c (java_init_lex, java_allocate_new_line,
7380         do_java_lex): Likewise.
7381         * parse.h (YYNOT_TWICE): Likewise.
7382         * parse.y (empty_statement, expression_statement,
7383         java_pop_parser_context, java_parser_context_save_global,
7384         yyerror, register_fields, method_header, safe_layout_class,
7385         find_in_imports_on_demand, create_artificial_method,
7386         source_end_java_method, start_complete_expand_method,
7387         build_thisn_assign, java_complete_lhs,
7388         maybe_absorb_scoping_block): Likewise.
7389
7390 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
7391
7392         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7393         '/' when computing java source filename
7394
7395 2003-04-13  Tom Tromey  <tromey@redhat.com>
7396
7397         * gjavah.c (print_c_decl): Indentation fix.
7398
7399 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
7400
7401         * class.c (make_field_value, make_method_value, get_dispatch_table)
7402         (make_class_data, emit_offset_symbol_table)
7403         * constants.c (build_constants_constructor)
7404         * java-tree.h (START_RECORD_CONSTRUCTOR)
7405         * parse.y (maybe_build_array_element_wfl):
7406         Use build_constructor.
7407
7408 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
7409
7410         PR java/10253:
7411         * parse.y (string_convert_int_cst): Always use at least one digit
7412         in string conversion. Remove ASCII dependence.
7413         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7414
7415 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
7416
7417         * Make-lang.in: added win32-host.c
7418         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7419         resolves to open() on non-Win32 platforms and
7420         Win32-specific jcf_open_exact_case() on Win32
7421         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7422         when trying .java and .class files
7423         * win32-host.c: added to repository. Defines
7424         Win32-specific jcf_open_exact_case()
7425
7426 2003-04-10  Andrew Haley  <aph@redhat.com>
7427
7428         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7429         (maybe_free_localvar): Renamed from localvar_free.
7430         Add new arg, really.
7431         (generate_bytecode_insns): Set new variable, jsrs.
7432         Only free local vars if no jsr insns have been emittted.
7433         Call maybe_free_localvar, not localvar_free.
7434
7435 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
7436
7437         * gcj.texi: Remove @ at start of file.
7438
7439 2003-03-25  Tom Tromey  <tromey@redhat.com>
7440
7441         * parse.y (create_interface): Call CHECK_DEPRECATED.
7442
7443 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
7444
7445         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7446
7447 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
7448
7449         * javaop.h (jfloat, jdouble): Make them structures mirroring
7450         the bit fields of IEEE float and double respectively.
7451         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7452         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7453         (union Word, union DWord): Delete.
7454         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7455
7456         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7457         D_NAN_MASK): Delete.
7458         (jni_print_float, jni_print_double): New.  Generate
7459         hexadecimal floating constants.
7460         (print_field_info): Use jni_print_float/double.
7461
7462         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
7463         finite floating point numbers for output; special case
7464         non-finite floats.
7465
7466 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
7467
7468         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7469         Replace 0 and 1 with true and false in return statements.
7470
7471 2003-03-19  Tom Tromey  <tromey@redhat.com>
7472
7473         * lex.c (do_java_lex): Renamed from java_lex.
7474         (java_lex): New function.
7475         Include timevar.h.
7476
7477 2003-03-13  Tom Tromey  <tromey@redhat.com>
7478
7479         * parse.y (resolve_inner_class): Error if qualifier is a primitive
7480         type.
7481
7482 2003-03-04  Andrew Haley  <aph@redhat.com>
7483
7484         * gjavah.c (is_first_data_member): New global variable.
7485         (print_c_decl): If it's the first data member, align it as the
7486         superclass.
7487         (process_file): Set is_first_data_member.
7488
7489 2003-03-11  Tom Tromey  <tromey@redhat.com>
7490
7491         * parse.y (resolve_field_access): Initialize class if field is
7492         found in another static field.
7493         * expr.c (build_class_init): Don't optimize out initialization of
7494         implemented interface.
7495
7496 2003-03-11  Andrew Haley  <aph@redhat.com>
7497
7498         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7499         warning.
7500
7501 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
7502
7503         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7504         and DIR_SEPARATOR_2 for a target.
7505         Correct minor typos.
7506
7507         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7508         and DIR_SEPARATOR_2 for a target into account.
7509
7510 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
7511
7512         * lang.c (java_init): Update prototype, move code to java_post_options.
7513         (java_post_options): Similarly.
7514
7515 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
7516
7517         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7518         compare file name components depending on the case-sensitivity
7519         or otherwise of the host file system.
7520
7521         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7522         "strcmp" to compare file name components.
7523         Use IS_DIR_SEPARATOR instead of comparing directly against
7524         DIR_SEPARATOR.
7525         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7526         comparing directly against DIR_SEPARATOR.
7527
7528 2003-03-04  Tom Tromey  <tromey@redhat.com>
7529
7530         * Make-lang.in (java.tags): New target.
7531
7532 2003-03-01  Roger Sayle  <roger@eyesopen.com>
7533
7534         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7535         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7536
7537 2003-03-01  Tom Tromey  <tromey@redhat.com>
7538
7539         * parse.y (jdep_resolve_class): Only check deprecation if we found
7540         a decl.
7541
7542 2003-02-28  Tom Tromey  <tromey@redhat.com>
7543
7544         PR java/9695:
7545         * class.c (maybe_layout_super_class): Always pass a WFL to
7546         do_resolve_class.
7547         * parse.y (do_resolve_class): Updated comment to explain
7548         parameters.
7549
7550 2003-02-26  Tom Tromey  <tromey@redhat.com>
7551
7552         * jcf-write.c (generate_classfile): Check whether class is
7553         deprecated before writing attribute count.
7554
7555 2003-02-25  Roger Sayle  <roger@eyesopen.com>
7556
7557         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7558         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7559
7560 2003-02-23  Tom Tromey  <tromey@redhat.com>
7561
7562         * lang-options.h: Added -Wdeprecated.
7563         * gcj.texi (Warnings): Document -Wdeprecated.
7564         * java-tree.h (flag_deprecated): Declare.
7565         * lang.c (lang_W_options): Added deprecated.
7566         (flag_deprecated): New global.
7567         * chartables.h: Rebuilt.
7568         * gen-table.pl (process_one): Look at whitespace.
7569         (print_tables): Define LETTER_SPACE, LETTER_MASK.
7570         * parse.h (CLEAR_DEPRECATED): New macro.
7571         (CHECK_DEPRECATED_NO_RESET): New macro.
7572         * jcf-parse.c (handle_deprecated): New function.
7573         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7574         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7575         * parse.y (resolve_type_during_patch): Check deprecation.
7576         (jdep_resolve_class): Likewise.
7577         (process_imports): Likewise.
7578         (resolve_expression_name): Likewise.
7579         (check_deprecation): Strip arrays from decl.  Check
7580         flag_deprecated.
7581         (patch_method_invocation): Also check the particular constructor
7582         for deprecation.
7583         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7584         * jcf-write.c (append_deprecated_attribute): New function.
7585         (generate_classfile): Generate deprecated attribute when
7586         appropriate.
7587         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7588         (java_lex) [case '*']: Simplify logic.
7589         (java_start_char_p): Use LETTER_MASK.
7590         (java_part_char_p): Likewise.
7591         (java_space_char_p): New function.
7592
7593 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7594
7595         Change base class access representation.
7596         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7597         (add_interface_do): Likewise.
7598
7599 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7600
7601         * decl.c (java_init_decl_processing): Change
7602         soft_lookupjnimethod_node to reflect the change in
7603         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7604         * expr.c (build_jni_stub): Calculate and pass the size
7605         on the stack of the arguments to a JNI function. Use
7606         new target macro MODIFY_JNI_METHOD_CALL to allow a
7607         target to modify the call to a JNI method.
7608
7609 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7610
7611         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7612         instead of basename to avoid compiler warnings on Tru64.
7613
7614 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7615
7616         * gcj.texi: Update to GFDL 1.2.
7617
7618 2003-01-31  Andrew Haley  <aph@redhat.com>
7619
7620         * parse.y (java_expand_classes): Scan the whole class list looking
7621         for access methods that haven't yet been expanded.
7622
7623 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7624
7625         Fix for java/4269:
7626
7627         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7628         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7629         * jcf-parse.c: Likewise.
7630
7631 2003-01-31  Mark Wielaard  <mark@klomp.org>
7632
7633         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7634
7635 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7636
7637         * class.c (make_class): Use BINFO_ELTS.
7638         (set_super_info): Likewse.
7639         (add_interface_do): Likewise.
7640
7641 2003-01-30  Tom Tromey  <tromey@redhat.com>
7642
7643         * jcf-parse.c (read_class): Update identifier's class value if it
7644         changed during parsing.
7645
7646 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7647
7648         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7649         Propagate change to all other rules as required.
7650         (java/parse-scan.o): Add explicit dependency on
7651         $(parsedir)/java/parse-scan.c .
7652
7653 2003-01-29  Tom Tromey  <tromey@redhat.com>
7654
7655         * parse.y (patch_assignment): Only transform the rhs of an
7656         assignment when compiling to native.
7657
7658 2003-01-28  Tom Tromey  <tromey@redhat.com>
7659
7660         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7661
7662 2003-01-28  Tom Tromey  <tromey@redhat.com>
7663
7664         * lex.c (java_lex): Don't include UEOF as part of token.
7665         (java_read_unicode): Error if \u sequence prematurely terminated.
7666
7667 2003-01-27  Tom Tromey  <tromey@redhat.com>
7668
7669         * parse.y (java_check_regular_methods): Check for construct after
7670         checking types in throws clause.
7671
7672 2003-01-24  Tom Tromey  <tromey@redhat.com>
7673
7674         * class.c (build_static_field_ref): Only a String or numeric field
7675         can fold to a constant.
7676
7677 2003-01-23  Tom Tromey  <tromey@redhat.com>
7678
7679         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7680         file name in resource buffer.
7681
7682 2003-01-23  Tom Tromey  <tromey@redhat.com>
7683
7684         * expr.c (build_known_method_ref): Use method's context to find
7685         method table index.
7686
7687 2003-01-23  Tom Tromey  <tromey@redhat.com>
7688
7689         * constants.c (set_constant_entry): Allocated cleared memory.
7690
7691 2003-01-22  Tom Tromey  <tromey@redhat.com>
7692
7693         * java-tree.h: Don't use PARAMS.
7694         * resource.c: Add prototypes for all functions.
7695         (write_resource_constructor): Use `const char *' to avoid
7696         warning.
7697
7698 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
7699
7700         * jcf-parse.c (process_zip_dir): Remove unused variable.
7701
7702 2003-01-22  Tom Tromey  <tromey@redhat.com>
7703
7704         * expr.c (build_invokeinterface): Abort if method's context is not
7705         an interface.
7706
7707 2003-01-22  Tom Tromey  <tromey@redhat.com>
7708
7709         * gcj.texi (Input and output files): Mention non-class entries.
7710         * decl.c (java_init_decl_processing): Call
7711         init_resource_processing.
7712         * java-tree.h (compile_resource_data, write_resource_constructor,
7713         compile_resource_file, init_resource_processing): Declare.
7714         * config-lang.in (gtfiles): Added resource.c.
7715         * Make-lang.in (gt-java-resource.h): New target.
7716         (JAVA_OBJS): Added resource.o.
7717         (java/resource.o): New target.
7718         * resource.c: New file.
7719         * class.c (compile_resource_file): Moved to resource.c.
7720         (registerResource_libfunc): Likewise.
7721         (utf8_decl_list): Mark with GTY; now static.
7722         * jcf-parse.c (classify_zip_file): New function.
7723         (parse_zip_file_entries): Use it; compile .properties files.
7724         (process_zip_dir): Use classify_zip_file and compute_class_name.
7725         Don't write class name into zip directory.
7726         (java_parse_file): Call write_resource_constructor.
7727         (compute_class_name): New function.
7728         * jcf-io.c (read_zip_member): Reindented.
7729
7730 2003-01-21  Tom Tromey  <tromey@redhat.com>
7731
7732         * class.c (supers_all_compiled): New function.
7733         (make_class_data): Use it.
7734
7735 2003-01-21  Tom Tromey  <tromey@redhat.com>
7736
7737         * parse.y (method_header): Native method can't be strictfp.
7738         No method can be transient or volatile.
7739
7740 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7741
7742         Make-lang.in (jvspec.o-warn): Add -Wno-error.
7743
7744 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
7745
7746         * check-init.c: Fix comment typos.
7747         * class.c: Likewise.
7748         * constants.c: Likewise.
7749         * decl.c: Likewise.
7750         * except.c: Likewise.
7751         * expr.c: Likewise.
7752         * java-except.h: Likewise.
7753         * java-tree.h: Likewise.
7754         * javaop.h: Likewise.
7755         * jcf-dump.c: Likewise.
7756         * jcf-io.c: Likewise.
7757         * jcf-parse.c: Likewise.
7758         * jcf-write.c: Likewise.
7759         * lang.c: Likewise.
7760         * mangle.c: Likewise.
7761         * typeck.c: Likewise.
7762         * verify.c: Likewise.
7763
7764 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7765
7766         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7767         * jcf-write.c: Include "tm_p.h".
7768
7769 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7770
7771         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7772
7773 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7774
7775         * builtins.c (java_build_function_call_expr): Renamed from
7776         build_function_call_expr.  All callers changed.
7777
7778         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7779         * jcf-parse.c: Include tm_p.h.
7780
7781         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7782         warning.
7783
7784 2003-01-14  Tom Tromey  <tromey@redhat.com>
7785
7786         * class.c (make_class_data): Check that super is compiled before
7787         building class reference to it.
7788
7789 2003-01-14  Andrew Haley  <aph@redhat.com>
7790
7791         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7792         varargs function -- correct.
7793
7794 2003-01-14  Andrew Haley  <aph@redhat.com>
7795
7796         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7797
7798 2003-01-14  Andrew Haley  <aph@redhat.com>
7799
7800         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7801         varargs function -- correct.
7802
7803         * parse.y (patch_assignment): Copy the rhs of an assignment into a
7804         temporary if the RHS is a reference.
7805
7806 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7807
7808         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7809         * keyword.h: Regenerated.
7810
7811         * All Files: Convert to ISO C style function definitions.
7812
7813 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7814
7815         * parse.y (check_pkg_class_access): ANSIfy definition.
7816
7817 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7818
7819         * decl.c, parse-scan.y, parse.y: Don't cast return value of
7820         xmalloc et al.
7821
7822         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7823
7824 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
7825
7826         Merge from pch-branch:
7827
7828         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
7829
7830         * Make-lang.in (java/gjavah.o): Update dependencies.
7831         * gjavah.c: Include ggc.h.
7832
7833         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
7834
7835         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7836         (JCFDUMP_OBJS): Add ggc-none.o.
7837         (java/jcf-dump.o): Depend on GGC_H.
7838         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7839         CPool substructures.
7840         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7841         * jcf-dump.c: Include ggc.h.
7842
7843         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7844
7845         * jcf.h (union cpool_entry): New.
7846         (struct CPool): Use gengtype to mark.  Change field 'data' to be
7847         an array of unions.
7848         (struct JCF): Use gengtype to mark.
7849         (CPOOL_UINT): Update for new cpool_entry type.
7850         (CPOOL_USHORT1): Likewise.
7851         (CPOOL_USHORT2): Likewise.
7852         (CPOOL_FINISH): Use GC to free cpool subfields.
7853         * parse.h (struct parser_ctxt): Mark field current_jcf.
7854         * lex.c (java_init_lex): Use GC to allocate struct JCF.
7855         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7856         (main_jcf): Use gengtype to mark.
7857         (ggc_mark_jcf): Delete.
7858         (get_constant): Update for new cpool_entry type.
7859         (give_name_to_class): Likewise.
7860         (get_class_constant): Likewise.
7861         (init_outgoing_cpool): Use GGC to allocate struct CPool.
7862         (java_parse_file): Use GGC to allocate struct JCF.
7863         (init_jcf_parse): Don't call ggc_add_root.
7864         * jcf-reader.c (jcf_parse_constant_pool): Update for new
7865         cpool_entry type.
7866         * java-tree.h (current_jcf): Use gengtype to mark.
7867         (CPOOL_UTF): Update for new cpool_entry type.
7868         (outgoing_cpool): Use gengtype to mark.
7869         (struct lang_type): GC struct JCF and struct CPool.
7870         * config-lang.in (gtfiles): Add jcf.h.
7871         * constants.c (find_tree_constant): New.
7872         (set_constant_entry): Allocate cpool subfields using GGC.  Update
7873         for new cpool_entry type.
7874         (find_constant1): Update for new cpool_entry type.
7875         (find_constant2): Likewise.
7876         (find_utf8_constant): Use find_tree_constant.
7877         (find_class_or_string_constant): Remove unnecessary cast to jword.
7878         Update for new cpool_entry type.
7879         (count_constant_pool_bytes): Update for new cpool_entry type.
7880         (write_constant_pool): Likewise.
7881         (alloc_name_constant): Use find_tree_constant.
7882         (build_constants_constructor): Update for new cpool_entry type.
7883
7884         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7885
7886         * parse.y (mark_parser_ctxt): Delete.
7887         (goal): Don't use ggc_add_root.
7888         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7889         (java_pop_parser_context): Let GC free parser_ctxt.
7890         (java_parser_context_resume): Likewise.
7891         * parse.h (struct parser_ctxt): Use gengtype to mark.
7892         (ctxp): Likewise.
7893         (ctxp_for_generation): Likewise.
7894         * lex.h (struct java_lc_s): Mark for gengtype.
7895         (java_lexer): Rearrange for gengtype.
7896         * config-lang.in (gtfiles): Add lex.h, parse.h.
7897
7898 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7899
7900         * All Files: Remove PARAMS macro.
7901
7902         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7903         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7904         `__STDC__' macros.
7905
7906         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7907         VA_CLOSE.
7908
7909 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
7910
7911         * Make-lang.in (java.install-common, java.uninstall,
7912         java.install-info, java.install-man): Prepend $(DESTDIR)
7913         to destination paths in all (un)installation commands.
7914         (java.install-common): Rewrite $(LN) command to support
7915         DESTDIR with "ln" as well as with "ln -s".
7916
7917 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
7918
7919         * java-tree.h: Protect against multiple inclusion.
7920
7921 2003-01-07  Tom Tromey  <tromey@redhat.com>
7922
7923         * class.c (add_assume_compiled): Don't adjust parent if we're
7924         already at the root of tree.
7925
7926 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7927
7928         * lang.c (dump_compound_expr): Prototype.
7929
7930 2003-01-03  Tom Tromey  <tromey@redhat.com>
7931
7932         Fix for PR java/8712:
7933         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7934         when simply checking against `null'.
7935
7936 2003-01-03  Tom Tromey  <tromey@redhat.com>
7937
7938         * gcj.texi (Standard Properties): Document http.proxyHost and
7939         http.proxyPort.
7940
7941         * gcj.texi (GNU Classpath Properties): Document new properties.
7942
7943 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7944
7945         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7946         java/lang-options.h, java/mangle.c, java/mangle_name.c,
7947         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7948
7949 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7950
7951         * Make-lang.in, boehm.c, buffer.c,
7952           buffer.h, builtins.c, class.c,
7953           config-lang.in, constants.c,
7954           convert.h, decl.c, except.c,
7955           expr.c, java-except.h,
7956           java-tree.h, javaop.def,
7957           jcf-parse.c, jcf-write.c,
7958           jv-scan.c, jvgenmain.c,
7959           jvspec.c, keyword.gperf,
7960           keyword.h, lang-options.h,
7961           lang-specs.h, lang.c, lex.c,
7962           lex.h, mangle.c, mangle_name.c,
7963           parse-scan.y, parse.h, parse.y,
7964           typeck.c, verify.c, xref.c,
7965           xref.h: Replace "GNU CC" with
7966           "GCC" in the copyright header.
7967
7968         * check-init.c, gjavah.c, javaop.h,
7969           jcf-depend.c, jcf-dump.c, jcf-io.c,
7970           jcf-path.c, jcf-reader.c, jcf.h,
7971           zextract.c, zipfile.h: These files are
7972           "part of GCC". Also say "GCC" not "GNU CC".
7973
7974 2002-12-30  DJ Delorie  <dj@redhat.com>
7975
7976         * Make-lang.in: Protect against texi2pod/pod2man failing.
7977
7978 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
7979
7980         * gcj.texi: Use @copying.
7981
7982 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7983
7984         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7985         print_cxx_classname.
7986         (print_cxx_classname): Add add_scope parameter.
7987         (print_class_decls): Do not emit a semicolon after the extern
7988         "Java" block.
7989         (process_file): Adjust calls to print_cxx_classname.
7990
7991 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
7992
7993         * gcj.texi: Include Cover Texts in man page.
7994
7995 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
7996
7997         * class.c (build_static_field_ref): Check FIELD_FINAL.
7998
7999         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8000         instead of current_constant_pool_data_ref.
8001         * java-tree.h (current_constant_pool_data_ref): Undefine.
8002         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8003         * jcf-parse.c (init_outgoing_cpool): Don't initialize
8004         current_constant_pool_data_ref.
8005
8006         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8007         not build_internal_class_name.
8008
8009         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8010         Use it when class ref isn't certain to be compiled.
8011
8012 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8013
8014         * gcj.texi: Include gcc-common.texi.
8015         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8016         $(srcdir)/doc/include/gcc-common.texi.
8017
8018 2002-12-22  Anthony Green  <green@redhat.com>
8019
8020         * gcj.texi (Limitations): Add note about org.xml.sax and
8021         org.w3c.dom.
8022
8023 2002-12-20  Tom Tromey  <tromey@redhat.com>
8024
8025         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8026         where minimum case value is Integer.MIN_VALUE.
8027         Fixes PR java/8955.
8028
8029 2002-12-18  Andrew Haley  <aph@redhat.com>
8030
8031         * parse.y (patch_invoke): Force evaluation order when `check' is
8032         set.  For PR libgcj/8945.
8033
8034 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
8035
8036         * gcj.texi: Change version number to 3.4.
8037
8038 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
8039         Andrew Haley <aph@redhat.com>
8040
8041         * parse.y (source_end_java_method): Remove custom encoding of line
8042         numbers for a function decl before passing it to the back end.
8043
8044 2002-12-03  Andrew Haley  <aph@redhat.com>
8045
8046         * class.c (make_class_data): New field, "chain".
8047         * decl.c (java_init_decl_processing): Likewise.
8048
8049 2002-12-02  Tom Tromey  <tromey@redhat.com>
8050
8051         For PR java/8740:
8052         * parse.y (do_resolve_class): Handle qualified name via
8053         recursion.
8054
8055 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
8056
8057         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8058         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8059         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8060         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8061         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8062         Include coretypes.h and tm.h.
8063         * Make-lang.in: Update dependencies.
8064
8065 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8066
8067         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8068
8069 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8070
8071         * jcf-reader.c: Don't expand JCF_readu4 inside the
8072         expansion of JCF_SKIP.
8073
8074 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8075
8076         * jcf-reader.c: Don't expand JCF_readu4 inside the
8077         expansion of JCF_SKIP.
8078
8079 2002-11-22  Tom Tromey  <tromey@redhat.com>
8080
8081         * parse.y (patch_binop): Cast right hand side of shift expression
8082         to `int'.  Fixes PR java/8676.
8083
8084 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8085             Andrew Haley <aph@redhat.com>
8086
8087         * gcc/java/jcf-write.c (write_classfile): Remove target
8088         class file, if it exists, before renaming the temporary
8089         class file to it.
8090
8091 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8092
8093         * jvspec.c (lang_specific_spec_functions): New.
8094
8095 2002-11-18  Tom Tromey  <tromey@redhat.com>
8096
8097         Fix for PR java/7912:
8098         * expr.c (can_widen_reference_to): Allow cast of array to
8099         Cloneable or Serializable.
8100         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8101         (java_io_serializable_identifier_node): Likewise.
8102         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8103         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8104         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8105         java_io_serializable.
8106         * decl.c (java_init_decl_processing): Initialize
8107         java_lang_cloneable_identifier_node and
8108         java_io_serializable_identifier_node.
8109         (java_lang_cloneable_identifier_node): New global.
8110         (java_io_serializable_identifier_node): Likewise.
8111
8112 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8113
8114         * buffer.c: Remove unnecessary casts.
8115         * check-init.c: Likewise.
8116         * class.c: Likewise.
8117         * constants.c: Likewise.
8118         * decl.c: Likewise.
8119         * except.c: Likewise.
8120         * gjavah.c: Likewise.
8121         * jcf-io.c: Likewise.
8122         * jcf-parse.c: Likewise.
8123         * jcf-path.c: Likewise.
8124         * jvspec.c: Likewise.
8125         * lang.c: Likewise.
8126         * lex.c: Likewise.
8127         * verify.c: Likewise.
8128
8129 2002-11-06  Tom Tromey  <tromey@redhat.com>
8130
8131         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8132         a JNI header.
8133
8134 2002-11-05  Tom Tromey  <tromey@redhat.com>
8135
8136         Fix for PR java/6388.
8137         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8138         * java-tree.h (enum java_tree_index): New values
8139         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8140         (decimal_int_max, decimal_long_max): New defines.
8141         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8142         (error_if_numeric_overflow): Rewrote range checking.
8143         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8144         decimal_long_max.
8145
8146 2002-11-02  Tom Tromey  <tromey@redhat.com>
8147
8148         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8149
8150         * class.c (make_method_value): Put class name, not signature, into
8151         `throws' field.  For PR java/8415.
8152
8153 2002-10-24  Tom Tromey  <tromey@redhat.com>
8154
8155         * gcj.texi (Invoking gij): Document --showversion.
8156         (Standard Properties): java.library.path now set.
8157
8158 2002-10-23  Tom Tromey  <tromey@redhat.com>
8159
8160         * gjavah.c (decode_signature_piece): In JNI mode, print
8161         `jobjectArray' when array depth is nonzero.
8162         Fixes PR java/8296.
8163
8164 2002-10-15  Andrew Haley  <aph@redhat.com>
8165
8166         * parse.y (patch_invoke): Call force_evaluation_order on a static
8167         arg list.
8168         (resolve_qualified_expression_name): Call force_evaluation_order
8169         on a arg list that is part of a Qualified Expression Name.
8170
8171         * lang.c (dump_compound_expr): New.
8172         (java_dump_tree): New.
8173
8174 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8175
8176         * gcj.texi: Added item describing the GCJ runtime property
8177         "gnu.gcj.progname".
8178
8179 2002-10-15  Richard Henderson  <rth@redhat.com>
8180
8181         * jcf-parse.c (get_constant): Fix type warning.
8182
8183 2002-10-15  Andrew Haley  <aph@redhat.com>
8184
8185         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8186         (java_inlining_map_static_initializers): Declare.
8187
8188 2002-10-14  Andrew Haley  <aph@redhat.com>
8189
8190         * tree-inline.c (remap_block): All local class initialization
8191         flags go in the outermost scope.
8192         (expand_call_inline): Call java_inlining_map_static_initializers.
8193         (expand_call_inline): Call java_inlining_merge_static_initializers.
8194         * java/lang.c (merge_init_test_initialization): New.
8195         (java_inlining_merge_static_initializers): New.
8196         (inline_init_test_initialization): New.
8197         (java_inlining_map_static_initializers): New.
8198
8199 2002-10-11  Mark Wielaard  <mark@klomp.org>
8200
8201         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8202
8203 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8204
8205         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8206
8207 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8208
8209         * parse.y (merge_string_cste): Add parentheses around & within |.
8210
8211 2002-10-08  Tom Tromey  <tromey@redhat.com>
8212
8213         * parse.y (variable_declarator_id): Simplify error path for
8214         array declarator error.  For PR java/8003.
8215
8216 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8217
8218         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8219         bug_report_url.
8220
8221 2002-10-08  Andrew Haley  <aph@redhat.com>
8222
8223         * parse.y (attach_init_test_initialization_flags): Check for
8224         error_mark_node.
8225
8226 2002-10-07  Anthony Green  <green@redhat.com>
8227
8228         * parse.y (merge_string_cste): Fix bug in string concatenation.
8229
8230 2002-10-03  Michael Koch  <konqueror@gmx.de>
8231
8232         * gcj.texi (Standard properties):
8233         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8234
8235 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8236
8237         PR optimization/6627
8238         * lang.c (java_init): If storing the vbit in function
8239         pointers, ensure that force_align_functions_log is atleast
8240         one to aid compatability with g++ vtables.
8241
8242 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8243
8244         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8245         foul of type-based aliasing.
8246
8247 2002-09-30  Anthony Green  <green@redhat.com>
8248
8249         * gcj.texi (Invoking jv-scan): Fix texinfo.
8250
8251 2002-09-28  Anthony Green  <green@redhat.com>
8252
8253         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8254         (Code Generation): Add -fno-assert documentation.
8255         * jv-scan.c (flag_assert): New global.
8256         (options): Add assert option.
8257         (help): Add --no-assert documentation.
8258         * parse-scan.y (flag_assert): New global.
8259         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8260         (flag_assert): New global.
8261         * java-tree.h (flag_assert): New global.
8262         * lex.c (java_lex): Obey flag_assert.
8263         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8264         calling cc1.
8265
8266 2002-09-26  Andrew Haley  <aph@redhat.com>
8267
8268         * expr.c (build_java_array_length_access): Check for null pointer.
8269         * expr.c (expand_java_arrayload): Likewise.
8270
8271 2002-09-21  Richard Henderson  <rth@redhat.com>
8272
8273         * jcf-parse.c (get_constant): Decode from IEEE no matter
8274         what the target format.
8275
8276 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8277
8278         * ChangeLog: Follow spelling conventions.
8279         * class.c: Likewise.
8280         * decl.c: Likewise.
8281         * expr.c: Likewise.
8282         * gjavah.c: Likewise.
8283         * java-tree.h: Likewise.
8284         * jcf-dump.c: Likewise.
8285         * jcf-parse.c: Likewise.
8286         * jvspec.c: Likewise.
8287         * lang.c: Likewise.
8288         * mangle.c: Likewise.
8289         * parse.y: Likewise.
8290
8291 2002-09-17  Tom Tromey  <tromey@redhat.com>
8292
8293         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8294         where \r appears at EOF.  Fixes PR java/7950.
8295
8296 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8297
8298         * jvspec.c (lang_specific_driver): Remove unused variable.
8299
8300 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8301
8302         * java-tree.h (union lang_tree_node): Add chain_next option.
8303
8304 2002-09-16  Richard Henderson  <rth@redhat.com>
8305
8306         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8307         use new real.h interface.
8308         * jcf-write.c (find_constant_index): Use new real.h interface.
8309         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8310
8311 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8312
8313         * lang.c: Follow spelling conventions.
8314
8315 2002-09-11  Per Bothner  <per@bothner.com>
8316
8317         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8318         constant to the type of the field.
8319         (java_complete_tree):  Remove now-redundant code.
8320
8321         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8322
8323 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8324
8325         For PR java/5794:
8326         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8327         return label if a ret instruction for the jsr has been reached.
8328
8329 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8330
8331         * parse.y (DIR_SEPARATOR): Don't define.
8332         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8333
8334 2002-08-28  Andrew Haley  <aph@redhat.com>
8335
8336         * verify.c (verify_jvm_instructions): Allow exception handler
8337         inside code that is being protected, but generate a warning.
8338         * except.c (link_handler): Initialize `expanded' in new eh_range.
8339         (binding_depth, is_class_level, current_pc): Declare extern.
8340
8341 2002-09-01  Mark Wielaard <mark@klomp.org>
8342
8343         * gcj.texi: Add chapter about system properties.
8344         Fixed some typos.
8345
8346 2002-08-26  Tom Tromey  <tromey@redhat.com>
8347
8348         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8349         conversion if RHS_TYPE is byte, short, or char.
8350
8351 2002-08-22  Tom Tromey  <tromey@redhat.com>
8352
8353         * gcj.texi (Invoking gij): Document -cp and -classpath.
8354
8355 2002-08-21  Tom Tromey  <tromey@redhat.com>
8356
8357         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8358         $(prefix)/share.  For PR libgcj/7633.
8359
8360         For PR java/6005 and PR java/7611:
8361         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8362         (java_can_use_bit_fields_p): New function.
8363
8364 2002-08-16  Tom Tromey  <tromey@redhat.com>
8365
8366         * gcj.texi (Class Initialization): Mention class initialization of
8367         arrays.
8368
8369 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8370
8371         * Make-lang.in (java-tree-inline.o): New.
8372         (JAVA_OBJS): Add java-tree-inline.o.
8373         * parse.y (source_end_java_method): Call java_optimize_inline.
8374         (java_expand_method_bodies): Save method's tree in
8375         DECL_SAVED_TREE.
8376         (add_stmt_to_compound): Keep track of the number of statments.
8377         * lang.c (java_init): Enable flag_inline_trees.
8378         (java_post_options): If flag_inline_functions is on, enable
8379         flag_inline_trees instread.
8380         (decl_constant_value): New.
8381         (java_tree_inlining_walk_subtrees): New.
8382         * java-tree.h (DECL_NUM_STMTS): New macro.
8383         (java_optimize_inline): Declare.
8384         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8385         Handle a LABEL_EXPR.
8386         * decl.c (build_result_decl): If we already have a DECL_RESULT
8387         don't make another.
8388         (dump_function): New.
8389         (java_optimize_inline): New.
8390         (dump_function): New.
8391
8392 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
8393
8394         For PR java/7483:
8395         * parse.y (build_assertion): Invert return from
8396         desiredAssertionStatus.
8397
8398 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8399
8400         * jcf-write.c (get_access_flags): Return correct access flags for
8401         private and protected inner classes.
8402
8403 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8404
8405         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8406
8407 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8408
8409         * mangle_name.c: Don't include obstack.h twice.
8410         * xref.c: Don't include obstack.h.
8411
8412 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8413
8414         * class.c: (permanent_obstack): Delete declaration.
8415         * constants.c: (permanent_obstack): Delete declaration.
8416         * except.c: (permanent_obstack): Delete declaration.
8417         * expr.c: (permanent_obstack): Delete declaration.
8418         * jcf-parse.c: (permanent_obstack): Delete declaration.
8419         (saveable_obstack): Delete declaration.
8420         * parse.h: (permanent_obstack): Delete declaration.
8421         * typeck.c: (permanent_obstack): Delete declaration.
8422
8423 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8424
8425         * gcj.texi (version-gcc): Increase to 3.3.
8426
8427 2002-07-22  Tom Tromey  <tromey@redhat.com>
8428
8429         * lex.c (java_lex): Check for `e' or `E' after 0.
8430
8431 2002-07-21  Richard Henderson  <rth@redhat.com>
8432
8433         * lang.c (java_unsafe_for_reeval): New.
8434         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8435
8436 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
8437
8438         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8439         (jcf_path_init): Use GET_ENVIRONMENT.
8440
8441 2002-07-10  Roger Sayle  <roger@eyesopen.com>
8442             Zack Weinberg <zack@codesourcery.com>
8443
8444         * builtins.c (initialize_builtins): Remove defines that
8445         handled C/C++ specific junk hereby removed from builtins.def.
8446
8447 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
8448
8449         * lang.c (java_post_options): Update prototype.
8450
8451 2002-07-05  Roger Sayle  <roger@eyesopen.com>
8452
8453         * builtins.c (initialize_builtins): Ignore the additional
8454         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
8455         the builtins.def file.
8456
8457 2002-07-01  Tom Tromey  <tromey@redhat.com>
8458
8459         For PR libgcj/7073:
8460         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8461         specially.
8462
8463 2002-07-01  Roger Sayle  <roger@eyesopen.com>
8464
8465         * java/decl.c (builtin_function): Accept additional parameter.
8466         (java_init_decl_processing): Pass an additional NULL_TREE
8467         argument to builtin_function.
8468
8469 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
8470
8471         * gcj.texi: Fixed gcj invocation example so that it compiles.
8472
8473 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8474
8475         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8476         * parse.y (mark_parser_ctxt): Likewise.
8477         (check_modifiers, declare_local_variables): Avoid incorrect
8478         hardcoded constant 10.
8479
8480         * lex.c (java_read_char): Avoid "comparison is always true"
8481         warning.
8482
8483 2002-06-25  Andreas Schwab  <schwab@suse.de>
8484
8485         * expr.c (JSR): Avoid undefined operation on PC.
8486
8487 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8488
8489         * decl.c (clear_binding_level): Const-ify.
8490
8491 2002-06-13  Akim Demaille  <akim@epita.fr>
8492
8493         * parse.y (class_declaration, interface_declaration): Make sure
8494         all their rules have an action, in order to avoid meaningless `$$
8495         = $1' and their type clashes.
8496
8497 2002-06-11  Tom Tromey  <tromey@redhat.com>
8498
8499         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8500         * parse-scan.y (statement_without_trailing_substatement): Added
8501         assert_statement.
8502         (assert_statement): New rule.
8503         * java-tree.h (struct lang_type) [assertions]: New field.
8504         (TYPE_USES_ASSERTIONS): New macro.
8505         (CLASS_USES_ASSERTIONS): Likewise.
8506         (FIELD_SYNTHETIC): New define.
8507         * lex.c (java_lval;): Added ASSERT_TK.
8508         * parse.y (ASSERT_TK): Added.
8509         (statement_without_trailing_substatement): Added assert_statement.
8510         (assert_statement): New rule.
8511         (build_assertion): New function.
8512         (maybe_generate_pre_expand_clinit): Create and initialize
8513         $assertionsDisabled.
8514         (lookup_package_type): Removed decl.
8515         * keyword.h: Rebuilt.
8516         * keyword.gperf (assert): New token.
8517
8518 2002-06-10  Akim Demaille  <akim@epita.fr>
8519
8520         * parse.y (interface_type_list, class_member_declaration)
8521         (unary_expression_not_plus_minus): Remove duplicate %type.
8522         Whitespace changes.
8523
8524 2002-06-09  Tom Tromey  <tromey@redhat.com>
8525
8526         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8527
8528         * parse.y (method_header): Give error message in all cases.
8529         Fixes PR java/6865.
8530
8531 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8532
8533         Don't use RTL inlining. Fix for PR java/6820.
8534         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8535         (flag_really_inline): New.
8536         (java_decode_option): Set flag_really_inline if -finline-functions
8537         is seen.
8538         (java_post_options): New function. Turn off inlining unless
8539         flag_really_inline is set.
8540
8541 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8542
8543         * gjavah.c (throwable_p): Accept argument as either a classname or
8544         signature fragment. Create null-terminated classname string for super
8545         when calling itself recursively.
8546         (decode_signature_piece): Skip first character from class name
8547         signature when calling throwable_p.
8548
8549 2002-06-08  H.J. Lu  (hjl@gnu.org)
8550
8551         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8552
8553 2002-06-04  Tom Tromey  <tromey@redhat.com>
8554
8555         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8556
8557 2002-06-04  Michael Koch  <konqueror@gmx.de>
8558
8559         * gcj.texi (Input Options): Fixed typo.
8560
8561 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
8562
8563         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8564         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8565         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8566         and all now-pointless local variables.  Rename other local
8567         variables to reflect their not being handles.
8568
8569         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8570         #if JCF_USE_STDIO blocks.
8571
8572         * parse.y: Add missing semicolon at end of rule.
8573
8574 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8575
8576         * check-init.c (attach_initialized_static_class): Delete, unused.
8577         * parse.y: Use htab_t instead of struct hashtable, update
8578         all uses.
8579         * java-tree.h: Include hashtab.h instead of hash.h.
8580         (struct lang_decl_func): Use htab_t, set up for gengtype.
8581         (struct init_test_hash_entry): Delete.
8582         (struct treetreehash_entry): New.
8583         (java_treetreehash_find): New
8584         (java_treetreehash_new): New prototype.
8585         (java_treetreehash_create): New prototype.
8586         (java_mark_tree): Delete prototype.
8587         (java_hash_hash_tree_node): Delete prototype.
8588         (java_hash_compare_tree_node): Delete prototype.
8589         (attach_initialized_static_class): Delete prototype.
8590         * expr.c (build_class_init): Update to use java_treetreehash
8591         functions.
8592         (java_expand_expr): Update to use htab_t.
8593         (emit_init_test_initialization): Likewise.
8594         * decl.c (java_mark_tree): Delete.
8595         * class.c (init_test_hash_newfunc): Delete.
8596         (java_hash_hash_tree_node): Delete.
8597         (java_hash_compare_tree_node): Delete.
8598         (add_method_1): Update to use java_treetreehash functions.
8599         (JAVA_TREEHASHHASH_H): New macro.
8600         (java_treetreehash_hash): New function.
8601         (java_treetreehash_compare): New function.
8602         (java_treetreehash_find): New function.
8603         (java_treetreehash_new): New function.
8604         (java_treetreehash_create): New function.
8605         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8606
8607         * Make-lang.in (java/parse.o): Depend on debug.h.
8608         * java-tree.h (struct lang_identifier): Use gengtype.
8609         (union lang_tree_node): New.
8610         (struct lang_decl_func): Use gengtype.
8611         (struct lang_decl_var): Likewise.
8612         (struct lang_decl): Likewise.
8613         * parse.y: Include debug.h.
8614         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8615
8616         * lang.c (struct language_function): New dummy structure.
8617
8618         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8619         descriminator for DECL_LANG_SPECIFIC.
8620         (struct lang_decl_func): Rename from struct lang_decl.
8621         (enum lang_decl_desc): New.
8622         (struct lang_decl): Make it a union.  Update all the accessor macros.
8623         (struct lang_type): Use gengtype.
8624         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8625         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8626         are now the same size.
8627         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8628         use discriminator to mark DECL_LANG_SPECIFIC.
8629
8630         * Make-lang.in (gt-java-builtins.h): New rule.
8631         (java/builtins.o): Add dependency on gt-<filename>.h.
8632         * builtins.c: Use gengtype for roots.
8633         (union string_or_tree): Use gengtype.
8634         (struct builtin_record): Use gengtype.
8635         * config-lang.in (gtfiles): Add builtins.c.
8636
8637         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8638         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8639         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8640         gt-java-parse.h, gtype-java.h): Add rules to generate.
8641         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8642         (class.o): Add dependency on gt-*.h.
8643         (constants.o): Likewise.
8644         (decl.o): Likewise.
8645         (expr.o): Likewise.
8646         (jcf-parse.o): Likewise.
8647         (jcf-write.o): Likewise.
8648         (lang.o): Likewise.
8649         * config-lang.in (gtfiles): New.
8650         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8651         * constants.c: Replace uses of ggc_add_* with GTY markers.
8652         Include gt-*.h.
8653         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8654         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8655         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8656         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8657         Include gt-*.h.
8658         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8659         Include gt-*.h.
8660         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8661         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8662         gt-*.h.
8663         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8664         Include gtype-java.h.
8665
8666 2002-06-02  Tom Tromey  <tromey@redhat.com>
8667
8668         Fix for PR java/5913:
8669         * parse.y (patch_binop): Call patch_string on op1.
8670
8671 2002-06-02  Tom Tromey  <tromey@redhat.com>
8672
8673         Fix for PR java/1343, PR java/6336:
8674         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8675         formatting.  Changed return type.
8676         (anonymous_class_counter): Moved to top of file.
8677         (maybe_make_nested_class_name): Append number to class name for
8678         function-local classes.
8679
8680 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8681
8682         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8683         * Make-lang.in: Update dependency lists.
8684
8685 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
8686
8687         * gjavah.c (throwable_p): Do not free the name of the class after
8688         passing it to find_class.
8689         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8690         * jcf-io.c (dirent.h): Include it.
8691         (fnmatch.h): Likewise.
8692         (compare_path): New function.
8693         (java_or_class_file): Likewise.
8694         (memoized_dirlist_entry): New type.
8695         (memoized_dirlist_lookup_eq): New function.
8696         (memoized_dirlists): New variable.
8697         (caching_stat): New function.
8698         (memoized_class_lookup_eq): New function.
8699         (memoized_class_lookups): Likewise.
8700         (find_class): Use memoized_class_lookups and caching_stat.
8701         * jcf.h (JCF_USE_SCANDIR): Define.
8702         * parse.y (java_expand_classes): Write the class files in reverse
8703         order.
8704
8705 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8706
8707         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8708
8709 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
8710
8711         * jcf-write.c (write_classfile): Unlink the temporary file if it
8712         cannot be renamed.  Use concat to build up the name of the
8713         temporary file.
8714
8715 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
8716
8717         * jcf-write.c (write_classfile): Write the file to a
8718         temporary file and then rename it.
8719
8720 2002-05-07  Tom Tromey  <tromey@redhat.com>
8721
8722         * gjavah.c (throwable_p): Use xstrdup, not strdup.
8723
8724         Fix for PR java/1200:
8725         * gjavah.c (throwable_p): New function.
8726         (decode_signature_piece): Use it.  A `WeakReference' isn't the
8727         same as a `jweak'.
8728         Include hashtab.h.
8729         (gcjh_streq): New function.
8730
8731 2002-05-07  Andreas Jaeger  <aj@suse.de>
8732
8733         * parse.y (finish_for_loop): Fix if statement.
8734
8735 2002-05-06  Tom Tromey  <tromey@redhat.com>
8736
8737         Fix for PR java/5941:
8738         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8739         loop update expression.
8740         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8741         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8742
8743 2002-05-04  Mark Wielaard  <mark@klomp.org>
8744
8745         For PR java/6519:
8746         * parse.y (build_string_concatenation): Return just op1 only when op2
8747         is null and op1 is a STRING_CST, otherwise always construct a
8748         StringBuffer.
8749
8750 2002-04-27  Tom Tromey  <tromey@redhat.com>
8751
8752         For PR java/6382:
8753         * parse.y (string_convert_int_cst): New function.
8754         (merge_string_cste): Use it.
8755
8756 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8757
8758         * java-tree.h (java_parse_file): Update.
8759         (java_set_yydebug): Remove.
8760         * jcf-parse.c (yydebug): Remove.
8761         (java_set_yydebug): Die.
8762         (java_parse_file): Update.
8763         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8764
8765 2002-04-24  Tom Tromey  <tromey@redhat.com>
8766
8767         For PR java/6425:
8768         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8769         EXPR_WFL_QUALIFICATION of qual_wfl.
8770
8771 2002-04-23  Per Bothner  <per@bothner.com>
8772
8773         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
8774         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
8775         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
8776
8777 2002-04-23  Tom Tromey  <tromey@redhat.com>
8778
8779         For PR java/6314:
8780         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
8781         recognize `-fcompile-resource='.
8782         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
8783         a bit.
8784
8785 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8786
8787         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8788         paths. Fixes PR java/2791.
8789
8790 2002-04-19  Andrew Haley  <aph@redhat.com>
8791
8792         * jcf-write.c (push_long_const): lo, hi: New variables.
8793         Use rshift_double to extract the high part of a 64-bit long.
8794         Use WORD_TO_INT to extract the low part.
8795
8796         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8797         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
8798         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8799
8800 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8801
8802         * typeck.c (incomplete_type_error): Remove.
8803
8804 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8805
8806         * class.c (make_class_data): Set DECL_ALIGN on static class data,
8807         for hash synchronization.
8808         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8809         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8810         class_type_node.
8811
8812 2002-04-16  Mark Wielaard  <mark@klomp.org>
8813
8814         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8815         negative zero.
8816
8817 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8818
8819         Fix for PR java/6294:
8820         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8821         interfaces.
8822
8823 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8824
8825         Fix for PR java/6085:
8826         * parse.y (patch_method_invocation): Always use build_access_to_thisn
8827         to get enclosing "this" argument for inner-class constructor
8828         invocation. Pass correct arguments to build_access_to_thisn.
8829
8830 2002-04-10  Andreas Jaeger  <aj@suse.de>
8831
8832         * gcj.texi (Input Options): Fix extdirs patch.
8833
8834 2002-04-10  Anthony Green  <green@redhat.com>
8835
8836         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8837
8838 2002-04-09  Anthony Green  <green@redhat.com>
8839
8840         * gcj.texi (Input Options): Add --extdirs documentation.
8841         * jcf-dump.c (OPT_extdirs): New macro.
8842         (options): Add extdirs option.
8843         (help): Describe --extdirs.
8844         (main): Handle OPT_extdirs.
8845         * gjavah.c (OPT_extdirs): New macro.
8846         (options): Add extdirs option.
8847         (help): Describe --extdirs.
8848         (main): Handle OPT_extdirs.
8849         * jcf-path.c (jcf_path_init): Add extdirs support.
8850         (jcf_path_extdirs_arg): New function.
8851         (extensions): New variable to hold extensions path entries.
8852         * jvspec.c: Remove -fextdirs= when compiling main().
8853         * lang.c (java_decode_option): Handle -fextdirs=.
8854         * jcf.h (jcf_path_extdirs_arg): Declare new function.
8855         * Make-lang.in: Compile jcf-path with version info for use in
8856         identifying the appropriate libgcj.jar.
8857
8858 2002-04-08  Tom Tromey  <tromey@redhat.com>
8859
8860         For PR libgcj/5303:
8861         * .cvsignore: Added rmic.1 and rmiregistry.1.
8862         * gcj.texi (Top): Link to new nodes.
8863         (Invoking rmic): New node.
8864         (Invoking rmiregistry): Likewise.
8865         * Make-lang.in (java.generated-manpages): Added rmic.1 and
8866         rmiregistry.1.
8867         (java.maintainer-clean): Likewise.
8868         ($(srcdir)/java/rmic.1): New target.
8869         ($(srcdir)/java/rmiregistry.1): Likewise.
8870         (java.install-man): Handle rmic.1 and rmiregistry.1.
8871
8872 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8873
8874         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8875         Add note about handling uncaught exceptions. Add an exception handler
8876         to example.
8877
8878 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8879
8880         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8881         after using it to patch CALL_EXPR.
8882
8883 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8884
8885         * gcj.texi (Invocation): Document CNI invocation API.
8886
8887 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8888
8889         * expr.c (truthvalue_conversion): Rename.  Update.
8890         (expand_compare): Update.
8891         * java-tree.h (java_truthvalue_conversion): New.
8892         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8893
8894 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8895
8896         * java-tree.h (java_mark_addressable): New.
8897         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8898         * typeck.c (mark_addressable): Rename, update.
8899
8900 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8901
8902         * expr.c (build_java_binop): Update.
8903         * java-tree.h (java_signed_type, java_unsigned_type,
8904         java_signed_or_unsigned_type): Update.
8905         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8906         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8907         * parse.y (patch_binop): Update.
8908         * typeck.c (signed_or_unsigned_type, unsigned_type,
8909         signed_type): Update.
8910
8911 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8912
8913         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8914         (java_dummy_print): Remove.
8915         (lang_print_error): Rename.  Exit early if inhibiting output.
8916         (inhibit_error_printing_function): New.
8917         (java_init): Don't set hook.
8918         (lang_init_source): Use new boolean.
8919
8920 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8921
8922         * parse.y (do_resolve_class): Fix infinite recursion.
8923
8924 2002-03-29  Tom Tromey  <tromey@redhat.com>
8925
8926         * parse.y (check_inner_circular_reference): Ignore incomplete
8927         types.
8928
8929 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8930
8931         * Make-lang.in (builtins.o): Update.
8932         * boehm.c (get_boehm_type_descriptor): Update.
8933         * builtins.c: Include langhooks.h.
8934         * decl.c (java_init_decl_processing): Update.
8935         * java-tree.h (java_type_for_mode, java_type_for_size): New.
8936         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8937         Redefine.
8938         * typeck.c (type_for_mode, type_for_size): Update.
8939
8940 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8941
8942         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8943
8944 2002-03-28  Tom Tromey  <tromey@redhat.com>
8945
8946         * except.c (expand_end_java_handler): If the handler type is NULL,
8947         use java.lang.Throwable.  Fixes PR java/5986.
8948
8949 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8950
8951         Fix for PR java/4715:
8952         * jcf-parse.c (parse_source_file_3): New function.
8953         (read_class): Call it.
8954         (java_parse_file): Likewise.
8955
8956 2002-03-28  Jan Hubicka  <jh@suse.cz>
8957
8958         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8959
8960 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8961
8962         * parse.y (resolve_package): Initialize "decl".
8963         (lookup_package_type): Remove unused function.
8964
8965 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8966
8967         Fix for PR java/5993:
8968         * parse.y (resolve_package): Return the decl if resolution was
8969         successful. Don't special case "java.lang" and "java.lang.reflect"
8970         packages. Set type_name to the merged identifier.
8971         (resolved_qualified_expression_name): Print error using "name" if
8972         resolve_package returns NULL_TREE.
8973
8974 2002-03-27  Tom Tromey  <tromey@redhat.com>
8975
8976         * expr.c (expand_invoke): Don't generate null pointer check if
8977         we're calling <init>.
8978
8979 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8980
8981         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8982         fix prototype.
8983         * java-tree.h (java_lang_expand_expr): Similarly.
8984         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8985         (java_init): Don't set hook.
8986
8987 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8988
8989         Fix for PR java/5850:
8990         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8991         context if field was not found in the current scope.
8992         * expr.c (lookup_field): Don't look in enclosing contexts.
8993
8994 2002-03-26  Tom Tromey  <tromey@redhat.com>
8995
8996         Fix for PR java/5942:
8997         * parse.y (init_src_parse): Added sanity check.
8998         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
8999         elements, not 11.
9000
9001 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9002
9003         * decl.c (lang_mark_tree): Rename java_mark_tree.
9004         * java-tree.h (java_mark_tree): New.
9005         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9006
9007 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
9008
9009         * lex.c: Change java_perform_atof to take normal parameters
9010         instead of a pointer to a parameter block.  Call it directly
9011         from java_lex.
9012
9013 2002-03-22  Mark Wielaard  <mark@klomp.org>
9014
9015         Fix for PR java/5368:
9016         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9017         when printing error message.
9018
9019 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9020
9021         * decl.c (maybe_build_cleanup): Remove.
9022
9023 2002-03-22  Tom Tromey  <tromey@redhat.com>
9024
9025         Andrew Haley  <aph@cambridge.redhat.com>
9026
9027         * expr.c (build_field_ref): Don't build a check if the field is a
9028         member of `this'.
9029
9030 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
9031
9032         Fix for PR java/6026:
9033         * lex.c (java_lex): Fix parsing of consecutive floats.
9034
9035 2002-03-21  Tom Tromey  <tromey@redhat.com>
9036
9037         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9038         class.
9039
9040 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9041
9042         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9043         insert_block, getdecls, kept_level_p, global_bindings_p): New.
9044
9045 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9046
9047         * gcj.texi: @code{gcj} becomes @command{gcj}.
9048         @code{gcc} becomes @command{gcc}.
9049         GcjRaw changed to gnu.gcc.RawData.
9050
9051 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9052
9053         * decl.c (start_java_method): Use new hook.
9054         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9055         (java_init): Remove old hook.
9056
9057 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9058
9059         * builtins.c (define_builtin): Do nothing if `type' is null.
9060         Fixes PR java/5876.
9061
9062 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9063
9064         * parse.y (parser_check_super_interface): Fix error message
9065         grammar/order.
9066
9067 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9068
9069         * jcf-parse.c (get_constant): Delete unused variables.
9070
9071 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9072
9073         * java-tree.h (java_parse_file): New.
9074         * jcf-parse.c (yyparse): Rename java_parse_file.
9075         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9076
9077 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9078
9079         * parse.y (craft_constructor): Return the constructor decl.
9080         (java_expand_classes): Update comments.
9081         (lookup_method_invoke): Call fix_constructors immediately for
9082         anonymous class. Fixes PR java/5935.
9083
9084 2002-03-15  Anthony Green  <green@redhat.com>
9085
9086         * jcf-parse.c (yyparse): Don't emit class registration
9087         constructor when compiling resource files.
9088
9089 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9090
9091         * lang.c (java_tree_code_type, java_tree_code_length,
9092         tree_code_name): Delete.
9093         (tree_code_type, tree_code_length, tree_code_name): Define.
9094         (java_init): Don't try to copy into the various tree_code
9095         arrays.
9096
9097 2002-03-12  Tom Tromey  <tromey@redhat.com>
9098
9099         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9100         UTF-8, not UCS-2.  Fixes PR java/5923.
9101
9102         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9103         a call_expr wrapped in a convert.  Fixes PR java/5848.
9104
9105 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9106
9107         * jcf-write.c (write_classfile): Improve error strings.
9108
9109 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9110
9111         * lex.c: Adjust comments to GNU standards.
9112
9113 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9114
9115         Fix for PR java/5902:
9116         * lex.c (java_lex): Fix parsing of literals.
9117
9118 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9119
9120         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9121         to prevent it getting evaluated twice in the store checking case.
9122         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9123         examining OBJECT.
9124
9125 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9126
9127         * decl.c (java_init_decl_processing): Make sure class_type_node
9128         alignment is not less than 64 bits if hash synchronization is enabled.
9129
9130 2002-03-08  Per Bothner  <per@bothner.com>
9131
9132         * parse.y (java_complete_lhs):  Check if patch_assignment
9133         returned an error-mark.
9134
9135         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9136
9137 2002-03-08  Per Bothner  <per@bothner.com>
9138
9139         Fix for PR java/5812.
9140         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9141         here instead of in JSR macro.  Likewise with load_type_state call.
9142         Do the latter on if the return_pc has been verified (the jsr returns).
9143         (JSR):  Now just call build_java_jsr.
9144
9145 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9146
9147         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9148         (java.install-common): Link native driver to
9149         JAVA_TARGET_INSTALL_NAME.
9150
9151 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9152
9153         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9154         * builtins.c(sin_builtin): Likewise
9155         * builtins.c(sqrt_builtin): Likewise
9156
9157 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9158
9159         * java/expr.c, java/jcf-parse.c, java/lex.c:
9160         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9161         REAL_ARITHMETIC blocks unconditional.  Delete some further
9162         #ifdef blocks predicated on REAL_ARITHMETIC.
9163
9164 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9165
9166         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9167         explicit sizeof/sizeof.
9168         * decl.c (java_init_decl_processing): Likewise.
9169         * jcf-parse.c (init_jcf_parse): Likewise.
9170         * parse.y (init_src_parse): Likewise.
9171
9172 2002-03-02  Per Bothner  <per@bothner.com>
9173
9174         Make --CLASSPATH by a synonym for --classpath and -classpath.
9175         Implement --bootclasspath.
9176         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9177         (classpath_l):  Remove.
9178         (jcf_path_CLASSPATH_arg):  Remove.
9179         (jcf_path_bootclasspath_arg):  New function.
9180         (jcf_path_seal):  Simplify accordingly.
9181
9182         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9183         (jcf_path_CLASSPATH):  Remove declaration.
9184         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9185         (lang_specific_driver):  Translate -bootclasspath.
9186         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9187         * lang.c (decode_lang_options):  Do jcf_path_init first.
9188         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9189         * gjavah.c:  Also handle --bootclasspath.
9190         Handle --CLASSPATH as a synonum for --classpath.
9191         * jcf-dump.c: Likewise.
9192
9193         "." is not part of system path, but is the default for --classpath.
9194         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9195         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9196
9197         * gcj.texi:  Document changes.
9198
9199 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9200
9201         * expr.c (build_java_arraystore_check): Fix formatting.
9202
9203 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9204
9205         Fix for PR java/5758, java/5632:
9206         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9207         inner-class separator too.
9208         * parse.y (do_resolve_class): New local `decl_result.'
9209         Progressively build a name for what can have been loaded.
9210
9211 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9212
9213         * expr.c (java_array_data_offset): Removed function.
9214         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9215         (build_java_array_length_access): Obtain "length" value using a
9216         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9217         (build_java_arrayaccess): Correct comment. Access "data" using a
9218         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9219         (build_java_arraystore_check): New function.
9220         (expand_java_arraystore): Use build_java_arraystore_check.
9221         * parse.y (patch_assignment): Simplify code to insert a store check
9222         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9223         * check-init.c (check_init): Update to reflect that an array length
9224         access is now a COMPONENT_REF.
9225         * gcj.texi (Code Generation): Improve documentation of
9226         -fno-bounds-check. Add documentation for -fno-store-check.
9227         * java-tree.h (flag_store_check): Declare.
9228         (build_java_arraystore_check): Declare.
9229         * lang.c (flag_store_check): Initialize to 1.
9230         (lang_f_options): Add store-check option.
9231         * jvspec.c: Don't pass store-check option to jvgenmain.
9232         * lang-options.h: Add help string for -fno-store-check.
9233
9234 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9235
9236         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9237         * java-tree.h (java_dup_lang_specific_decl): New.
9238         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9239
9240 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9241
9242         * builtins.c, decl.c: Delete traditional-mode-related code
9243         copied from the C front end but not used, or used only to
9244         permit the compiler to link.
9245
9246 2002-02-22  Tom Tromey  <tromey@redhat.com>
9247
9248         Fix for PR java/2369:
9249         * jvspec.c (verify_class_name): New function.
9250         (lang_specific_driver): Call it.
9251         (JAVA_START_CHAR_P): New macro.
9252         (JAVA_PART_CHAR_P): Likewise.
9253
9254 2002-02-22  Per Bothner  <per@bothner.com>
9255
9256         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9257         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9258         type_info pointer (currently unimplemented hence NULL) to vtable.
9259         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9260         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9261         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9262         (build_dtable_decl):  Add declarations for new fields.
9263
9264 2002-02-20  Per Bothner  <per@bothner.com>
9265
9266         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9267         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9268         don't need to set it on the COMPOUND_EXPR - the caller does that.
9269
9270 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9271
9272         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9273         `--CLASSPATH' becomes `--classpath.'
9274         * gjavah.c: Likewise.
9275         * jcf-dump.c: Likewise.
9276         * lang-options.h: Likewise.
9277         * lang.c: Likewise.
9278         * jcf-path.c: Updated comment.
9279         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9280         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9281         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9282         (jcf_path_CLASSPATH_arg): Ditto.
9283         (classpath_u): Updated leading comment.
9284
9285 2002-02-20  Per Bothner  <per@bothner.com>
9286
9287         * builtins.c (check_for_builtin):  New function.
9288         (build_call_or_builtin):  Remove.
9289         * java-tree.h:  Update accordingly.
9290         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9291         of build_call_or_builtin.
9292         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9293         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9294         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9295
9296 2002-02-17  Tom Tromey  <tromey@redhat.com>
9297
9298         * java-tree.h (TYPE_STRICTFP): New macro.
9299         (struct lang_type) [strictfp]: New field.
9300         (CLASS_STRICTFP): New macro.
9301         (METHOD_STRICTFP): New macro.
9302         (struct lang_decl) [strictfp]: New field.
9303         * parse.y (method_header): Disallow strictfp constructor or
9304         abstract method.
9305         (STRICT_TK): Move before MODIFIER_TK.
9306         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9307         (METHOD_MODIFIERS): Likewise.
9308         (INTERFACE_MODIFIERS): Likewise.
9309         * jcf-write.c (get_access_flags): Likewise.
9310         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9311         (add_method_1): Likewise.
9312         (get_access_flags_from_decl): Likewise.
9313         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9314         recognize strictfp flag.
9315         * jcf.h (ACC_STRICT): New define.
9316
9317 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9318
9319         * class.c(build_utf8_ref): Move declaration of decl_size
9320
9321 2002-02-07  Tom Tromey  <tromey@redhat.com>
9322
9323         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9324         path.
9325
9326 2002-02-04  Anthony Green  <green@redhat.com>
9327
9328         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9329         sections if available.
9330
9331 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9332
9333         * parse.y (java_expand_classes): Fix typo in static field loop.
9334
9335 2002-02-02  Richard Henderson  <rth@redhat.com>
9336
9337         * class.c (add_field): Mark static fields external.
9338         (build_class_ref): Remove redundant set.
9339         * parse.y (java_expand_classes): Mark static fields of classes
9340         to be compiled as local.
9341         * jcf-parse.c (parse_class_file): Likewise.
9342
9343 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9344
9345         * gcj.texi (About CNI): New node.
9346
9347 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9348
9349         PR java/5080
9350         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9351         setlocale() with LC_CTYPE as a parameter.
9352         * jv-scan.c: Same.
9353
9354 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9355
9356         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9357         Follow GNU Coding Standards for --version.
9358
9359 2002-01-28  Tom Tromey  <tromey@redhat.com>
9360
9361         * expr.c (build_jni_stub): Ensure storage for `meth' is
9362         generated.
9363         * parse.y (java_complete_expand_methods): Set
9364         current_function_decl before building JNI stub.
9365
9366 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9367
9368         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9369         BUILT_IN_SQRTF.
9370
9371 2002-01-22  Tom Tromey  <tromey@redhat.com>
9372
9373         * decl.c (java_init_decl_processing): Use add_predefined_file.
9374         Predefine RawData.java.
9375         (predef_filenames): Removed.
9376         (java_init_decl_processing): Don't register predef_filenames.
9377         * jcf-parse.c (add_predefined_file): New function.
9378         (predefined_filename_p): Rewrote.
9379         (predefined_filename_p): No longer static.
9380         * decl.c (java_init_decl_processing): Call initialize_builtins.
9381         * Make-lang.in (JAVA_OBJS): Added builtins.o.
9382         (java/builtins.o): New target.
9383         * builtins.c: New file.
9384         * parse.y (patch_invoke): Use build_call_or_builtin.
9385         * java-tree.h (build_call_or_builtin): Declare.
9386         (initialize_builtins): Declare.
9387         (java_set_exception_lang_code): Removed unused declaration.
9388         (PREDEF_FILENAMES_SIZE): Removed.
9389         (java_tree_index): Added JTI_PREDEF_FILENAMES.
9390         (predef_filenames): New define.
9391         (add_predefined_file): Declare.
9392         (predefined_filename_p): Declare.
9393         * expr.c (expand_invoke): Use build_call_or_builtin.
9394
9395 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9396
9397         * parse.y (patch_switch_statement): Fix format specifier.
9398
9399 2002-01-16  Tom Tromey  <tromey@redhat.com>
9400
9401         More for PR java/5365:
9402         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9403         default.
9404         (process_file): Generate include for
9405         java.lang.UnsupportedOperationExceptions.
9406
9407 2002-01-15  Andreas Jaeger  <aj@suse.de>
9408
9409         * .cvsignore: Add man pages.
9410
9411 2002-01-15  Tom Tromey  <tromey@redhat.com>
9412
9413         Fix for PR java/5365:
9414         * gjavah.c (process_file): Turn class name into a file name.
9415
9416 2002-01-14  Matthias Klose  <doko@debian.org>
9417
9418         * gcj.texi: Fix whitespace and formatting errors in the
9419         synopsis of the man pages. Update copyright.
9420
9421 2002-01-14  Tom Tromey  <tromey@redhat.com>
9422
9423         For PR libgcj/5303:
9424         * Make-lang.in (java.install-man): Handle jv-convert man page.
9425         (java.generated-manpages): Added jv-convert.1.
9426         (java.uninstall): Remove jv-convert.1.
9427         (java.maintainer-clean): Likewise.
9428         ($(srcdir)/java/jv-convert.1): New target.
9429         * gcj.texi (Top): Link to jv-convert node.
9430         (Individual utilities): Likewise.
9431         (Invoking jv-convert): New node.
9432
9433 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
9434             Martin Kahlert  <martin.kahlert@infineon.com>
9435
9436         * jcf-parse.c (get_constant): Don't swap lo/hi for big
9437         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9438
9439 2002-01-03  Graham Stott  <grahams@redhat.com>
9440
9441         * class.c (compile_resource_file): Update copyright date.
9442         Constify filename parameter.
9443         (java-tree.h): Update copyright date.
9444         (compile_resource_file): Constify filename parameter.
9445
9446 2002-01-03  Graham Stott  <grahams@redhat.com>
9447
9448         * gcc/jcf-parse.c: Update copyright date.
9449         (yyparse): Constify resource_filename.
9450
9451 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9452
9453         * parse.y (src_parse_roots): Don't needlessly zero init.
9454
9455 2001-12-31  Tom Tromey  <tromey@redhat.com>
9456
9457         * parse.y (dump_java_tree): New function.
9458         (source_end_java_method): Call it.
9459         (end_class_declaration): Likewise.
9460         * lang.c (java_decode_option): Call dump_switch_p.
9461
9462 2001-12-28  Tom Tromey  <tromey@redhat.com>
9463
9464         * gen-table.pl: Don't process characters after \uffff.  Added
9465         comment pointing to input file.
9466
9467 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9468
9469         * gen-table.pl: Const-ify output.  Document the location of a
9470         suitable unicode input file.
9471
9472         * chartables.h: Regenerate.
9473
9474 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9475
9476         * chartables.h: Const-ify.
9477         * gjavah.c (options): Likewise.
9478         * jcf-dump.c (options): Likewise.
9479         * jv-scan.c (options): Likewise.
9480         * lex.c (java_start_char_p, java_part_char_p): Likewise.
9481         * parse.y (binop_lookup): Likewise.
9482
9483 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9484
9485         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9486         the static arrays that are output.
9487         * jvspec.c (jvgenmain_spec): Make static.
9488         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9489         * keyword.h: Regenerate.
9490         * lang.c (string_option, process_option_with_no, lang_f_options,
9491         lang_W_options): Const-ify.
9492         * lex.c (java_lex): Likewise.
9493
9494 2001-12-21  Richard Henderson  <rth@redhat.com>
9495
9496         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9497         (get_boehm_type_descriptor): ... here.  Arrange for the
9498         TREE_TYPE to get set properly.
9499
9500 2001-12-21  Richard Henderson  <rth@redhat.com>
9501
9502         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9503         only if the target requires collect2.
9504
9505         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9506
9507 2001-12-20  Tom Tromey  <tromey@redhat.com>
9508
9509         For PR java/4509:
9510         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9511         CAN_COMPLETE_NORMALLY for the node.
9512         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9513         generate code for second branch if first branch can't complete
9514         normally.
9515         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9516         the loop head if the loop body can't complete normally.
9517
9518 2001-12-20  Tom Tromey  <tromey@redhat.com>
9519
9520         For PR java/4766:
9521         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9522         case where `finally' clause can't complete normally.
9523
9524 2001-12-20  Tom Tromey  <tromey@redhat.com>
9525
9526         Fixes PR java/5057:
9527         * parse.y (analyze_clinit_body): Added this_class parameter.
9528         Check for more cases where we must keep <clinit>.
9529         (maybe_yank_clinit): Cleaned up flow control.
9530
9531 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9532
9533         * decl.c (java_init_decl_processing): Don't initialize
9534         finit_leg_identifier_node.
9535         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9536         (finit_leg_identifier_node): Remove.
9537         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9538
9539 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9540
9541         * mangle.c (mangle_member_name): Don't special-case for
9542         NO_DOLLAR_IN_LABEL.
9543         * mangle_name.c (unicode_mangling_length): Likewise.
9544         (append_unicode_mangled_name): Likewise.
9545         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9546         code.
9547
9548 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9549
9550         * expr.c (build_java_array_length_access): Don't force null pointer
9551         check unless flag_check_references is set.
9552
9553 2001-12-20  Tom Tromey  <tromey@redhat.com>
9554
9555         Fix for PR java/3417:
9556         * parse.y (patch_assignment): Added special processing for
9557         `return'.
9558         (patch_return): Don't convert booleans to integers, and don't
9559         special-case `null'.
9560
9561 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9562
9563         * config-lang.in (diff_excludes): Remove.
9564
9565 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9566
9567         * gcj.texi: Update link to GCC manual.
9568
9569 2001-12-17  Tom Tromey  <tromey@redhat.com>
9570
9571         * parse.y (link_nested_class_to_enclosing): Removed useless
9572         statement.
9573
9574 2001-12-16  Tom Tromey  <tromey@redhat.com>
9575
9576         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9577         Fixes PR java/5088.
9578
9579 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9580
9581         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9582         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9583         spelling errors.
9584
9585 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9586
9587         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9588
9589 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9590
9591         * decl.c (java_init_decl_processing): Build otable_type correctly.
9592         otable_decl is an otable_type.
9593
9594 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9595
9596         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9597         otable_type, otable_ptr_type, method_symbol_type,
9598         method_symbols_array_type, method_symbols_array_ptr_type): New
9599         field/global tree definitions.
9600         (flag_indirect_dispatch): New flag.
9601         * decl.c (java_init_decl_processing): Initialize new otable and
9602         otable_syms type nodes and decls. Add new field "index" to
9603         method_type_node.
9604         * class.c (build_method_symbols_entry): New function.
9605         (make_method_value): Set "index" to to method's vtable index for
9606         virtual methods when indirect-dispatch is not used.
9607         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9608         and set vtable_method_count to -1. Set otable and otable_syms field
9609         if indirect-dispatch is used and there was something to put in them.
9610         (build_method_symbols_entry): New function.
9611         (emit_offset_symbol_table): New function.
9612         * expr.c (get_offset_table_index): New function.
9613         (build_invokevirtual): Build array reference to otable at the index
9614         returned by get_offset_table_index, and use the result as the vtable
9615         offset.
9616         (build_invokeinterface): Similar.
9617         * jcf-parse.c (yyparse): If indirect-dispatch, call
9618         emit_offset_symbol_table at the end of compilation, after all classes
9619         have been generated.
9620         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9621         * lang.c (flag_indirect_dispatch): Define.
9622         (lang_f_options): Add indirect-dispatch flag.
9623
9624 2001-12-14  Matthias Klose  <doko@debian.org>
9625
9626         * gcj.texi: Markup for man page generation. Document missing
9627         options printed by <tool> --help.
9628         Terminate description of gij's -ms option with a dot.
9629         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9630         (java.generated-manpages java.install-man, java.uninstall,
9631         java-maintainer-clean) Updated.
9632
9633 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9634
9635         * class.c (get_dispatch_table): Fix java vtable layout
9636         for TARGET_VTABLE_USES_DESCRIPTORS.
9637         * decl.c (java_init_decl_processing): Initialize
9638         alloc_no_finalizer_node, finalize_identifier_node.
9639         * expr.c (class_has_finalize_method): New function.
9640         (expand_java_NEW): Generate calls for finalizer-free allocation.
9641         (build_invokevirtual): Fix java vtable layout for
9642         TARGET_VTABLE_USES_DESCRIPTORS.
9643         * java-tree.h (enum java_tree_index): New entries:
9644         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9645         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9646         (class_has_finalize_method): declare.
9647         (HAS_FINALIZER_P): New macro.
9648         * parse.y (patch_invoke): Generate calls for finalizer-free
9649         allocation.
9650
9651 2001-12-12  Matthias Klose  <doko@debian.org>
9652
9653         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9654         whitespace at end of line.
9655
9656 2001-12-11  Tom Tromey  <tromey@redhat.com>
9657
9658         * lex.c (java_init_lex): Define wfl_to_string as
9659         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9660
9661 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9662
9663         * class.c (make_method_value): Use null_pointer_node to
9664         represent empty exception table.
9665
9666 2001-12-10  Tom Tromey  <tromey@redhat.com>
9667
9668         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9669
9670 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9671
9672         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9673
9674 2001-12-09  Per Bothner  <per@bothner.com>
9675
9676         * check-init.c (current_switch_has_default):  New static field.
9677         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
9678         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
9679         DEFAULT_EXPR seen, simulate a default alternative that copies state.
9680
9681 2001-12-09  Tom Tromey  <tromey@redhat.com>
9682
9683         * check-init.c (check_init): Don't allow pre- or post- increment
9684         or decrement of final variable.
9685         (final_assign_error): Minor error message rewording.
9686
9687 2001-12-08  Tom Tromey  <tromey@redhat.com>
9688
9689         * java-tree.h: Fixed typo.
9690
9691         * gjavah.c (decompile_method): Don't decompile to `return this'
9692         for static methods.
9693
9694         * gjavah.c (cxx_keywords): Re-sorted.
9695         * lex.c (cxx_keywords): Re-sorted.
9696
9697         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9698         else.
9699
9700         * gjavah.c (print_namelet): Clear subnamelets.
9701         (HANDLE_METHOD): Set `method_printed' earlier.
9702
9703 2001-12-07  Tom Tromey  <tromey@redhat.com>
9704
9705         * lang.c (lang_f_options): Added
9706         optimize-static-class-initialization.
9707         (java_decode_option): Removed special case.
9708
9709 2001-12-07  Per Bothner  <per@bothner.com>
9710
9711         * check-init.c (check_init):  Fix typo freeing memory twice.
9712
9713 2001-12-05  Per Bothner  <per@bothner.com>
9714
9715         Restore support for static class initialization optimization.
9716         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9717         * check-init.c (check_int):  At end of BLOCK handle initialization
9718         blocks, which used to be done in java_complete_expand_method but did
9719         not handle the case where check_for_initialization might allocate
9720         more than a word of bits.
9721         * decl.c (lang_make_tree):  The smic field is now a tree.
9722         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
9723         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
9724
9725         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
9726
9727         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9728         Change from a hash table to a list.
9729         (struct_lang_decl):  Change field 'smic' to match.
9730         * class.c (add_method_1):  Initialize
9731         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9732         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
9733         (java_expand_method_bodies): -here, since 'smic' is now a list.
9734         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
9735
9736         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
9737
9738         * class.c (java_hash_compare_tree_node):  Fix casts.
9739
9740 2001-12-04  Per Bothner  <per@bothner.com>
9741
9742         * check-init.c:   Handle definite unassignment to finals in addition
9743         to definite assignment.
9744         (loop_current_locals):  New field.
9745         (num_current_locals, int start_current_locals, num_current_words):
9746         Make static.
9747         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
9748         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9749         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
9750         (get_variable_decl, check_final_reassigned):  New functions.
9751         (check_init, check_bool_init):  Modify as needed for checking finals.
9752         (check_for_initialization):  Take extra parameter and return void.
9753         Do extra start-up logic to check final fields for assignment.
9754         * parse.y (check_static_final_variable_assignment_flag,
9755         reset_static_final_variable_assignment_flag, check_final_assignment,
9756         check_final_variable_local_assignment_flag,
9757         reset_final_variable_indirect_assignment_flag,
9758         reset_final_variable_global_assignment_flag):  Remove functions.
9759         (java_complete_expand_methods, outer_field_access_fix,
9760         patch_assignment): Remove no-longer used logic.
9761         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
9762         * parse.y (register_fields, java_complete_tree):  Update accordingly.
9763
9764         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
9765         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
9766         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
9767
9768         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
9769
9770         * java-tree.h (DECL FINAL):  New bit-field.
9771         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
9772         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
9773         (DECL_INIT_CALLS_THIS):  New macro.
9774         (struct lang_decl):  New bit-field init_calls_this.
9775         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9776         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9777         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
9778         use it for both local variables and final fields.
9779         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
9780         and local_final.
9781         (struct lang_type):  Remove hfv bit-field.
9782         (check_for_initialization):  Change to return void.
9783
9784         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
9785         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
9786         * check-init.c (final_assign_error):  New helper function.
9787         (check_final_reassigned, check_init):  Use it.
9788         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9789
9790         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
9791         bit-fields to unsigned.
9792
9793 2001-12-03  Per Bothner  <per@bothner.com>
9794
9795         * parse.y (patch_binop):  Minor constant folding.
9796
9797         * parse.y (build_current_thisn):  Shorter 'buffer'.
9798
9799 2001-12-03  Per Bothner  <per@bothner.com>
9800
9801         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
9802         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9803         * jcf-write.c (generate_bytecode_insns):  Remove support for
9804         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9805         * check-init.c (check_init):  Likewise.
9806
9807 2001-12-03  Per Bothner  <per@bothner.com>
9808
9809         * verify.c (subroutine_nesting):  New function.
9810         (verify_jvm_instructions):  Use it to fix logic for checking that
9811         we're done with the current subroutine.
9812
9813         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9814         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9815
9816 2001-12-03  Per Bothner  <per@bothner.com>
9817
9818         * jcf.h:  Fix obvious typo in comment.
9819         * typeck.c (build_null_signature):  Add comment.
9820
9821 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9822
9823         * expr.c: Remove leading capital from diagnostic messages, as
9824         per GNU coding standards.
9825         * jcf-io.c: Similarly.
9826         * jcf-parse.c: Similarly.
9827         * jv-scan.c: Similarly.
9828         * jvspec.c: Similarly.
9829         * mangle.c: Similarly.
9830
9831 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
9832             Alexandre Petit-Bianco  <apbianco@redhat.com>
9833
9834         * expr.c (build_java_arrayaccess): Call save_expr on array for
9835         correct evaluation order, modified comment, fixed indentation.
9836         * parse.y: (patch_assignment): Correctly extract the array base
9837         from the tree generate by build_java_arrayaccess, added comments.
9838         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9839         Fixes PR java/3096, PR java/3803, PR java/3965.
9840
9841 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9842
9843         * expr.c (expand_byte_code): Remove trailing periods from messages.
9844         * jcf-parse.c (load_class, jcf_parse): Similarly.
9845         * jcf-write.c (generate_classfile): Similarly.
9846         * lex.c (java_lex): Similarly.
9847
9848 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9849
9850         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9851
9852 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9853
9854         * Make-lang.in (java.generated-manpages): New dummy target.
9855
9856 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9857
9858         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9859         ASM_FINAL_SPEC.
9860         (lang_specific_pre_link): Use set_input to set input_filename.
9861         Append `main' here.
9862         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9863         (main): Fix definition.
9864         Strip `main' from classname.
9865         Fixes PR java/227.
9866
9867 2001-11-18  Roger Sayle <roger@eyesopen.com>
9868
9869         * parse.h (java_expand_switch): Remove old prototype.
9870
9871 2001-11-18  Tom Tromey  <tromey@redhat.com>
9872
9873         Fix for PR java/1401:
9874         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9875         arg0 is null.
9876         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9877         correctly.
9878
9879 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9880
9881         * lang.c (finish_parse): Rename to java_finish.
9882         (LANG_HOOKS_FINISH, java_finish): New.
9883
9884 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9885
9886         * decl.c (init_decl_processing): Rename java_init_decl_processing.
9887         * java-tree.h: New prototype.
9888         * lang.c (java_init): Update prototype.  Combine with old init_parse.
9889
9890 2001-11-13  Tom Tromey  <tromey@redhat.com>
9891
9892         * gjavah.c (method_signature): New global.
9893         (HANDLE_METHOD): Set it.
9894         (decompile_return_statement): New function.
9895         (decompile_method): Use it.
9896         (print_method_info): Removed `synth' argument.
9897
9898 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9899
9900         * java-tree.h (java_set_yydebug): New.
9901         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9902         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9903         (print_lang_decl, print_lang_type, print_lang_identifier,
9904         print_lang_statistics, lang_print_xnode): Remove.
9905
9906 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9907
9908         * jcf-parse.c (init_lex): Remove.
9909         * lang.c (language_string, lang_identify): Remove.
9910         (struct lang_hooks): Constify.
9911         (LANG_HOOKS_NAME): Override.
9912         (init_parse): Update.
9913
9914 2001-11-08  Andreas Franck  <afranck@gmx.de>
9915
9916         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9917         program_transform_name the way suggested by autoconf.
9918         (java.install-common): Also transform auxiliary program names with
9919         program_transform_name.
9920
9921 2001-11-08  Tom Tromey  <tromey@cygnus.com>
9922
9923         * parse.y (trap_overflow_corner_case): New rule.
9924         (unary_expression): Use it.
9925         * lex.c (java_init_lex): Don't set minus_seen.
9926         (yylex): Don't use minus_seen.  Communicate overflow to parser for
9927         it to handle.
9928         (error_if_numeric_overflow): New function.
9929         * parse.h (minus_seen): Removed field.
9930         (JAVA_RADIX10_FLAG): New define.
9931
9932 2001-11-07  Tom Tromey  <tromey@redhat.com>
9933
9934         Patch for PR java/1414:
9935         * parse.y (case_label_list): New global.
9936         (goal): Register case_label_list with GC.
9937         (java_complete_lhs): Save new case on case_label_list.
9938         (patch_switch_statement): Check for duplicate case labels.
9939
9940 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9941
9942         * parse.y (patch_assignment): Removed unused third argument.
9943         (java_complete_lhs): Removed unused third argument to patch_assignment.
9944
9945 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9946
9947         * lang.c: Include langhooks-def.h.
9948         * Make-lang.in: Update.
9949
9950 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9951
9952         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9953
9954 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9955
9956         * mangle.c (find_compression_record_match): Don't match compression
9957         records for package name elements unless they occur at the start of
9958         the name. Fix for PR java/4717.
9959
9960 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9961
9962         * expr.c (expand_java_field_op): Don't special-case references to
9963         java.lang.PRIMTYPE.TYPE.
9964         (build_primtype_type_ref): Removed.
9965         * java-tree.h (build_primtype_type_ref): Remove prototype.
9966         * parse.y (maybe_build_primttype_type_ref): Removed.
9967         (complete_function_arguments): Don't special-case references to
9968         java.lang.PRIMTYPE.TYPE.
9969         (patch_assignment): Likewise.
9970         (array_constructor_check_entry): Likewise.
9971
9972 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9973
9974         * mangle.c (static tree compression_table): Fixed leading comment.
9975         * parse.h (struct parser_ctxt): Fixed field comment.
9976         * parse.y (check_pkg_class_access): New prototype, fixed leading
9977         comment, new parameter used to emit error only if passed as true.
9978         (parse_check_super): Pass extra argument to check_pkg_class_access.
9979         (do_resolve_class): Likewise.
9980         (process_imports): Likewise.
9981         (read_import_dir): Fixed indentation.
9982         (find_in_imports_on_demand): New local class_type_name. Local
9983         node_to_use deleted. while loop changed into for loop. Report
9984         multiple definition only for accessible classes. Improved error
9985         message.
9986         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9987         assigned to parameter list, fixed indentation. while loop changed
9988         into for loop, restore TREE_CHAIN on local `tem' before the next
9989         iteration.
9990
9991 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9992
9993         * lang.c (lang_get_alias_set): Deleted.
9994
9995 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9996
9997         * gjavah.c (jni_print_char): Fix thinko in last change.
9998
9999         * gjavah.c (jni_print_char, decode_signature_piece): Use
10000         safe-ctype macros and/or fold extra calls into fewer ones.
10001         * lex.c (java_read_unicode, java_lex): Likewise.
10002         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10003         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10004         * mangle_name.c (append_unicode_mangled_name,
10005         unicode_mangling_length): Likewise.
10006
10007 2001-10-17  Richard Henderson  <rth@redhat.com>
10008
10009         * Make-lang.in (java/lang.o): Depend on langhooks.h.
10010
10011 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10012
10013         * lang.c (langhooks.h): Included.
10014         (LANG_HOOKS_INIT): Redefined.
10015         (LANG_HOOKS_INIT_OPTIONS): Likewise.
10016         (LANG_HOOKS_DECODE_OPTION): Likewise.
10017         (struct lang_hooks lang_hooks): New initialization.
10018
10019 2001-10-11  Per Bothner  <per@bothner.com>
10020
10021         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
10022         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10023         The former is simpler, and jcf-write.c handles it better.
10024         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
10025         or WITH_CLEANUP_EXPR.
10026         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
10027         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10028
10029         * parse.y (patch_if_else_statement):  If the condition is constant,
10030         optimize away the test.
10031
10032 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10033
10034         * parse.y (patch_cast): Call patch_string on the first operand of
10035         the incoming node, update it if necessary. Fixes PR java/4510.
10036
10037 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10038
10039         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10040         when name qualifier matches a package name.
10041
10042 2001-10-08  Tom Tromey  <tromey@redhat.com>
10043
10044         Fix for PR java/4489:
10045         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10046         force a new label when computing `body_block'.
10047
10048 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10049
10050         * jcf-io.c (format_uint): Const-ify.
10051         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10052         * lex.c (java_get_line_col): Likewise.
10053         * parse.y (build_incdec): Likewise.
10054
10055 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10056
10057         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10058         a NULL enclosing context if appropriate. Fixes PR java/4466.
10059
10060 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10061
10062         * parse.y (patch_assignment): Use lvalue's original TYPE when
10063         building the final COMPOUND_EXPR.
10064         (try_reference_assignconv): Fixed leading comment.
10065
10066 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10067
10068         * parse.y (check_final_variable_indirect_assignment): For
10069         COMPOUND_EXPR, return only if finals were found initialized
10070         properly, if not, keep on checking.
10071         (check_final_variable_global_assignment_flag): New local
10072         error_found, set when appropriate and used to decide whether to
10073         report uninitialized finals. Fixed typo in comment.
10074
10075 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10076
10077         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10078         last three initializations. Fixes PR java/4360.
10079
10080 2001-09-21  Richard Henderson  <rth@redhat.com>
10081
10082         * class.c (get_dispatch_table): Handle function descriptors.
10083         (build_dtable_decl): Likewise.
10084         * expr.c (build_invokevirtual): Likewise.
10085
10086 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10087
10088         * parse.y (patch_method_invocation): Build class initialization
10089         when static finals are used to qualify method invocation.
10090         Fixes PR java/4366.
10091
10092 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10093
10094         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10095         build_type_name_from_array_name.
10096         (STRING_STRIP_BRACKETS): New macro.
10097         * parse.y (build_type_name_from_array_name): New function.
10098         (array_creation_expression:): Accumulate []s instead of [s.
10099         (cast_expression:): Accumulate []s instead of [s after cast type
10100         name.
10101         (build_array_from_name): Local string deleted, use
10102         build_type_name_from_array_name.
10103         (build_unresolved_array_type): Accumulate []s instead of [s after
10104         type name.
10105         (register_fields): Fixed comment.
10106         (resolve_class): Local name, base deleted, new locals tname and
10107         array_dims. Use build_type_name_from_array_name. Use array_dims to
10108         build array type.
10109         (purify_type_name): Use STRING_STRIP_BRACKETS.
10110
10111 2001-09-18  Andreas Jaeger  <aj@suse.de>
10112
10113         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10114         * jv-scan.c: Likewise.
10115
10116 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10117
10118         * parse.y (patch_method_invocation): Inner class creation context
10119         check not enforced within constructors. Fixes PR java/1873.
10120
10121 2001-09-16  Tom Tromey  <tromey@redhat.com>
10122
10123         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10124         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10125
10126 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10127
10128         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10129         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10130         (struct lang_type): New fields import_list and import_demand_list.
10131         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10132         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10133         (do_resolve_class): New local saved_enclosing_type, initialized,
10134         passed as parameter to find_in_imports and find_in_imports_on_demand.
10135         (find_in_imports): Added paramater enclosing_type, use its
10136         TYPE_IMPORT_LIST when applicable.
10137         (find_in_imports_on_demand): Added parameter enclosing_type, use
10138         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10139         declaration and initialization.
10140         (fold_constant_for_init): Switch/restore current_class to the
10141         appropriate context.
10142
10143 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10144
10145         * verify.c (verify_jvm_instructions): Fix typo.
10146
10147 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10148
10149         * expr.c (expand_invoke): Const-ification.
10150         * parse.y (patch_method_invocation): Likewise.
10151
10152 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10153
10154         * gjavah.c (cxx_keywords): Const-ification.
10155         * keyword.gperf (java_keyword): Likewise.
10156         * lang.c (java_tree_code_name): Likewise.
10157         * lex.c (cxx_keywords): Likewise.
10158         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10159
10160 2001-09-11  Richard Henderson  <rth@redhat.com>
10161
10162         * parse.h (ctxp_for_generation): Mark extern.
10163
10164 2001-09-10  Richard Henderson  <rth@redhat.com>
10165
10166         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10167
10168 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10169
10170         * typeck.c (java_array_type_length, build_prim_array_type):
10171         Represent empty arrays by NULL index.
10172
10173 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10174
10175         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10176         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10177
10178 2001-09-06  Anthony Green  <green@redhat.com>
10179
10180         * class.c (O_BINARY): Define if necessary.
10181         (registerResource_libfunc): Declare.
10182         (init_class_processing): Initilize registerResource_libfunc.
10183         (compile_resource_file): New function.
10184         * java-tree.h (resource_name): Declare.
10185         (compile_resource_file): Declare.
10186         * jcf-parse.c (yyparse): Handle compiling java resource files.
10187         * lang.c (java_decode_option): Handle -fcompile-resource option.
10188         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10189         resource files.
10190         * gcj.texi (Code Generation): Add documentation for -R flag.
10191
10192 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10193
10194         * jcf-write.c (generate_classfile): Issue an error in case of
10195         field/initial value mismatch.
10196         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10197         being initialized and we're generating bytecode.
10198         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10199         set DECL_INITIAL properly when appropriate.
10200         Fixes PR java/4230
10201         Fixes PR java/4204
10202
10203 2001-09-01  Per Bothner  <per@bothner.com>
10204
10205         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10206         relevant.  All initializers except static final and constant require
10207         <clinit>, regardless of flag_emit_class_files.
10208
10209 2001-08-31  Per Bothner  <per@bothner.com>
10210
10211         * class.c (set_constant_value):  When not emitting class files, then a
10212         String ConstantValue is a utf8const_ptr_type.
10213
10214 2001-08-30  Per Bothner  <per@bothner.com>
10215
10216         * jcf-write.c (generate_classfile):  Check that field is primitive
10217         or string before emitting ConstantValue attribute.
10218
10219 2001-08-30  Per Bothner  <per@bothner.com>
10220
10221         * parse.y (resolve_qualified_expression_name):  If creating a
10222         COMPOUND_EXPR, set it's type correctly.
10223
10224 2001-08-30  Per Bothner  <per@bothner.com>
10225
10226         * jcf-io.c (open_class):  Set filename field.
10227
10228         * jcf-parse,c (parse_class_file):  Set current_function_decl
10229         for better error message when Code attribute is missing.
10230
10231         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10232         better diagnostics, especially for constructors.
10233
10234 2001-08-30  Per Bothner  <per@bothner.com>
10235
10236         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10237         attribute if field is not final, for compatibility with jdk.
10238
10239         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10240         to correct type.  Work-around for front-end bug.
10241         * class.c (set_constant_value):  Error if constant has wrong type.
10242
10243 2001-08-30  Per Bothner  <per@bothner.com>
10244
10245         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10246         "Double" are printed at verbosity 1.
10247
10248         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10249
10250         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10251
10252 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10253
10254         * parse.y (patch_assignment): Don't verify final re-assignment here.
10255         (java_complete_lhs): Verify assignments to finals calling
10256         patch_assignment. Verify re-assignments to finals before calling
10257         patch_assignment.
10258
10259 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10260
10261         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10262         Fixes PR java/1413
10263
10264 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10265
10266         * lex.c (java_lex): new local found_hex_digits. Set and then used
10267         in test to reject invalid hexadecimal numbers.
10268         * parse.y (java_complete_tree): Prevent unwanted cast with
10269         initialized floating point finals.
10270         (patch_binop): Emit a warning when detecting a division by zero,
10271         mark result not constant, don't simplify non integer division.
10272
10273 2001-08-28  Per Bothner  <per@bothner.com>
10274
10275         * jcf-write.c  (generate_bytecode_insns):  For increments and
10276         decrements just recurse to push constant.  Improvement on Mark's patch.
10277
10278 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10279
10280         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10281         real conversion for increments and decrements of reals.
10282
10283 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10284
10285         * parse.y (resolve_qualified_expression_name): Handle unresolved
10286         qualified expressions, prevent numerical qualifiers, fixed typo.
10287         Fixes PR java/4141
10288
10289 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10290
10291         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10292         don't report anything but deprecated class when marked so. Handle
10293         VAR_DECL.
10294         (patch_method_invocation): Check deprecation on methods and types.
10295         (patch_binop): code becomes an enum tree_code, added default: to
10296         switch to handle that. Detect division by zero, try to fold and
10297         return before using a subroutine.
10298
10299 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10300
10301         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10302         file smaller than 4 bytes.
10303         * parse.y (check_inner_circular_reference): New function.
10304         (check_circular_reference): Likewise.
10305         (array_initializer:): Accept {,}.
10306         (java_check_circular_reference): Rewritten using
10307         check_circular_reference and check_inner_circular_reference.
10308         (java_complete_expand_method): Unconditionally save and restore
10309         the unpurged exception list.
10310         (build_dot_class_method_invocation): Unmangle signature parameter.
10311
10312 2001-08-21  Tom Tromey  <tromey@redhat.com>
10313
10314         * decl.c (init_decl_processing): Add `throws' field to method
10315         descriptor.
10316         * class.c (make_method_value): Compute `throws' field for method.
10317
10318 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10319
10320         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10321         circularity is detected.
10322         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10323
10324 2001-08-17  Richard Henderson  <rth@redhat.com>
10325
10326         * class.c (emit_register_classes): Add align parameter to
10327         call to assemble_integer.
10328
10329 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10330
10331         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10332         loading a class_or_name fails, try considering an innerclass name
10333         and load the enclosing context.
10334         * parse.y (resolve_inner_class): New function.
10335         (find_as_inner_class): Added leading comment.
10336         (register_incomplete_type): Keep the current context as enclosing
10337         context for JDEP_FIELD dependencies.
10338         (do_resolve_class): Locals new_class_decl and super initialized to
10339         NULL. Call resolve_inner_class, explore the enclosing context
10340         superclass if necessary.
10341         Fixes PR java/4007
10342
10343 2001-08-16  Tom Tromey  <tromey@redhat.com>
10344
10345         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10346         * gjavah.c (main): Updated for change to jcf_path_seal.
10347         * lang.c (version_flag): New global.
10348         (java_decode_option): Recognize `-version'.
10349         (java_init): Update for change to jcf_path_seal.
10350         * jcf.h (jcf_path_seal): Added `print' argument.
10351         * jcf-path.c (jcf_path_seal): Added `print' argument.
10352
10353 2001-08-13  Zack Weinberg  <zackw@panix.com>
10354
10355         * Make-lang.in (java/decl.o): Update dependencies.
10356         * decl.c: Include libfuncs.h, don't include toplev.h.
10357
10358 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10359
10360         * decl.c (init_decl_processing): exception_type_node,
10361         class_not_found_type_node, and no_class_def_found_type_node
10362         initialized. predef_filenames augmented accordingly.
10363         instinit_identifier_node initialized.
10364         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10365         * java-tree.h (enum java_tree_index): New entries
10366         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10367         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10368         (exception_type_node): New macro.
10369         (class_not_found_type_node): Likewise.
10370         (no_class_def_found_type_node): Likewise.
10371         (instinit_identifier_node): Likewise.
10372         (PREDEF_FILENAMES_SIZE): Adjusted.
10373         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10374         (struct lang_type): Fixed typo in bitfield name.
10375         (DECL_INSTINIT_P): New macro.
10376         (ID_INSTINIT_P): Likewise.
10377         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10378         attribute.
10379         * parse.y (encapsulate_with_try_catch): New function.
10380         (generate_instinit): Likewise.
10381         (build_instinit_invocation): Likewise.
10382         (ctors_unchecked_throws_clause_p): Likewise.
10383         (add_instance_initializer): Deleted.
10384         (build_instance_initializer): Likewise.
10385         (in_instance_initializer): Likewise.
10386         (check_method_redefinition): instinit$ not to be verified.
10387         (java_complete_expand_methods): Generate instinit$, simplified code.
10388         (build_dot_class_method): Eliminated unnecessary locals. Use
10389         encapsulate_with_try_catch, removed unnecessary code.
10390         (fix_constructors): New local iii. Use build_instinit_invocation.
10391         (patch_method_invocation): Added comment.
10392         (maybe_use_access_method): Don't consider instinit$.
10393         (find_applicable_accessible_methods_list): Shorten the search for
10394         instinit$ too.
10395         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10396         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10397         (patch_throw_statement): Likewise. Fixed typo.
10398
10399 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
10400
10401         Revert:
10402         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10403         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10404         ASM_FINAL_SPEC.
10405         (lang_specific_pre_link): Use set_input to set input_filename.
10406         Append `main' here.
10407         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10408         (main): Fix definition.
10409         Strip `main' from classname.
10410         Fixes PR java/227.
10411
10412 2001-08-11  Zack Weinberg  <zackw@panix.com>
10413
10414         * lex.h: Don't include setjmp.h.  Don't define
10415         SET_FLOAT_HANDLER or prototype set_float_handler.
10416
10417 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10418
10419         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10420         `poplevel' in the right order.
10421
10422 2001-08-09  Richard Henderson  <rth@redhat.com>
10423
10424         * Make-lang.in (class.o): Depend on TARGET_H.
10425         * class.c (emit_register_classes): Use target hooks instead of
10426         assemble_constructor and assemble_destructor.
10427
10428 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
10429
10430         * check-init.c (flags.h): Include
10431         (check_init): Don't report uninitialized static class
10432         initialization flags, don't free bit index when doing static class
10433         initialization optimization.
10434         (check_for_initialization): Return type changed to `unsigned int.'
10435         (attach_initialized_static_class): New function.
10436         * class.c (add_method_1): Create the initialized static class
10437         table if necessary.
10438         (finish_class): Always emit deferred inline methods.
10439         * decl.c (emit_init_test_initialization): Moved to expr.c
10440         (complete_start_java_method): Don't traverse
10441         DECL_FUNCTION_INIT_TEST_TABLE.
10442         (lang_mark_tree): Mark hash tables in function decls.
10443         * expr.c (emit_init_test_initialization): Moved from decl.c.
10444         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10445         initialization flag, set DECL_CONTEXT and
10446         LOCAL_CLASS_INITIALIZATION_FLAG.
10447         (java_lang_expand_expr): Emit initialization code for static class
10448         initialized flags when entering block, if necessary.
10449         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10450         * java-tree.h (flag_optimize_sci): New global variable declaration.
10451         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10452         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10453         (LOCAL_FINAL_P): Fixed typo in comment.
10454         (FINAL_VARIABLE_P): Likewise.
10455         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10456         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10457         (struct lang_decl): New fields `ict', `smic' and `cif.'
10458         (check_for_initialization): New returned value for global.
10459         (attach_initialized_static_class): New global function.
10460         (STATIC_CLASS_INIT_OPT_P): New macro.
10461         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10462         * lang.c (java_decode_option): Handle
10463         `-fno-optimize-static-class-initialization'
10464         * parse.y (start_complete_expand_method): New function.
10465         (java_expand_method_bodies): Likewise.
10466         (attach_init_test_initialization_flags): Likewise.
10467         (adjust_init_test_initialization): Likewise.
10468         (emit_test_initialization): Likewise.
10469         (java_complete_expand_methods): Nullify abstract and native method
10470         bodies.
10471         (java_complete_expand_method): New locals `fbody', `block_body'
10472         and `exception_copy.' Reorganized: directly return on empty method
10473         bodies, call `start_complete_expand_method', remember definitely
10474         initialized static class in function, don't expand method bodies.
10475         (java_expand_classes): Call `java_expand_method_bodies' before
10476         `finish_class' when compiling to native.
10477         (resolve_expression_name): Use `orig' after building outer class
10478         field access.
10479         (patch_invoke): Remember static method invocations.
10480
10481 2001-08-06  Richard Henderson  <rth@redhat.com>
10482
10483         * class.c (emit_register_classes): Pass a symbol_ref and priority
10484         to assemble_constructor.
10485
10486 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
10487
10488         * java-tree.h (all_class_filename): New macro.
10489         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10490         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10491         newly created IDENTIFIER_NODE to `all_class_filename.'
10492
10493 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
10494
10495         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10496         Use ggc_add_tree_root to register roots.
10497
10498 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10499
10500         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10501         second operand calling check_init.
10502         * decl.c (complete_start_java_method): Swaped second and third
10503         arguments while creating WITH_CLEANUP_EXPR node.
10504         * jcf-write.c (generate_bytecode_insns): Use second operand
10505         instead of third when handling WITH_CLEANUP_EXPR.
10506         * parse.y (java_complete_lhs): Expand second operand of
10507         WITH_CLEANUP_EXPR nodes.
10508         (patch_synchronized_statement): Swaped second and third arguments
10509         while creating WITH_CLEANUP_EXPR node.
10510
10511 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
10512
10513         * parse.y (create_interface): Avoid cyclic inheritance report when
10514         syntax error encountered during class definition.
10515         Fixes PR java/2956
10516
10517 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10518
10519         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10520         ASM_FINAL_SPEC.
10521         (lang_specific_pre_link): Use set_input to set input_filename.
10522         Append `main' here.
10523         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10524         (main): Fix definition.
10525         Strip `main' from classname.
10526         Fixes PR java/227.
10527
10528 2001-07-18  Tom Tromey  <tromey@redhat.com>
10529
10530         For PR java/2812:
10531         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10532         * lex.c (java_new_lexer): Use ICONV_CONST.
10533         (java_read_char): Likewise.
10534         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10535         (jv-scan$(exeext)): Likewise.
10536
10537 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10538
10539         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10540         * parse.y (check_class_interface_creation): Allow `private' if the
10541         enclosing is not an interface.
10542         (create_interface): Interface tagged public if the enclosing
10543         context is an interface.
10544         (create_class): Class tagged public if the enclosing context
10545         is an interface.
10546         Fixes PR java/2959
10547
10548 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10549
10550         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10551         Fixes PR java/2665
10552
10553 2001-07-14  Tim Josling  <tej@melbpc.org.au>
10554
10555         * check-init.c (check_init): Remove references to EXPON_EXPR.
10556
10557 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10558
10559         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10560         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10561         Fixes PR java/3602
10562
10563 2001-07-13  Tom Tromey  <tromey@redhat.com>
10564
10565         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10566         invocation.
10567
10568 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10569
10570         * parse.y (patch_method_invocation): Don't override primary if one
10571         is already provided, but let this$<n> be built. Fixed comment.
10572
10573 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10574
10575         * parse.y (empty_statement:): Report empty statement error only
10576         when found at class declaration level.
10577         Fixes PR java/3635
10578
10579 2001-07-12  Tom Tromey  <tromey@redhat.com>
10580
10581         * expr.c (expand_load_internal): New function.
10582         (LOAD_INTERNAL): Use it.
10583
10584 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10585
10586         * parse.y (verify_constructor_super): Compare anonymous class ctor
10587         args with `valid_method_invocation_conversion_p.'
10588         Fixes PR java/3285
10589
10590 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10591
10592         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10593         `-fsyntax-only.' Fixes PR java/3248
10594
10595 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10596
10597         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10598
10599 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10600
10601         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10602         current function is static. Fixes PR java/1970
10603
10604 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10605
10606         * parse.y (patch_method_invocation): Add enclosing context to ctor
10607         calls if necessary. Fixes PR java/2953
10608
10609 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10610
10611         * parse.y (resolve_package): Abort if qualified expression member
10612         isn't right.
10613         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10614         Fixes PR java/1391
10615
10616 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10617
10618         * verify.c: Don't use // comments.
10619
10620 2001-07-05  Tom Tromey  <tromey@redhat.com>
10621
10622         * lang.c (flag_assume_compiled): Removed.
10623         * java-tree.h (flag_assume_compiled): Removed.
10624         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10625         -fhash-synchronization, -fuse-divide-subroutine,
10626         -fcheck-references, -femit-class-file, -femit-class-files,
10627         -fassume-compiled.  Updated --encoding information.  Changed
10628         -foutput-class-dir to `-d'.
10629
10630 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10631
10632         * jcf-parse.c (parse_class_file): Add lineno parameter to
10633         debug_start_source_file call.
10634
10635 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10636
10637         * gcj.texi: Use gpl.texi.
10638         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10639         dependencies and use doc/include in search path.
10640
10641 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10642
10643         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10644         `this'.  If so, don't build instance initializers.
10645
10646 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10647
10648         * parse.y (resolve_expression_name): Improved error message for
10649         inner class cases. Fixes PR java/1958
10650
10651 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10652
10653         * lang.c: #include diagnostic.h
10654         (lang_print_error): Add a `diagnostic_context *' parameter.
10655         (java_dummy_print): Likewise.
10656         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10657
10658 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10659
10660         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10661         * jcf.h (typedef struct JCF): New bitfield `finished.'
10662         (JCF_FINISH): Set `finished.'
10663         (JCF_ZERO): Reset `finished.'
10664         Fixes PR java/2633
10665
10666 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10667
10668         * parse.y (class_body_declaration:): Don't install empty instance
10669         initializers.
10670         Fixes PR java/1314
10671
10672 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10673
10674         * class.c (set_super_info): Call `set_class_decl_access_flags.'
10675         (set_class_decl_access_flags): New function.
10676         * java-tree.h (set_class_decl_access_flags): New prototype.
10677         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10678         (parse_class_file): New local `decl_max_locals.' Take wide types
10679         into account to compute DECL_MAX_LOCALS.
10680         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10681         imports on demand.
10682
10683 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
10684
10685         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10686
10687 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10688
10689         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10690         * parse.y (do_resolve_class): Moved comments out to leading comment
10691         section. Removed local `start', New local `_ht' and
10692         `circularity_hash.'  Record `enclosing' in hash table and search
10693         it to detect circularity.  Use `enclosing' as an argument to
10694         `lookup_cl.' Free the hash table when done.
10695
10696 2001-06-19  Tom Tromey  <tromey@redhat.com>
10697
10698         * lex.c (java_read_char): Disallow invalid and overlong
10699         sequences.  Fixes PR java/2319.
10700
10701 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
10702
10703         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10704
10705 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10706
10707         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10708         arguments accordingly.
10709
10710 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10711
10712         * gcj.texi: Move contents to just after title page.
10713
10714 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
10715
10716         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10717         builtin type.
10718         (patch_incomplete_class_ref): Build the class ref, build the class
10719         init if necessary, complete the tree.
10720         Fixes PR java/2605
10721
10722 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10723
10724         * parse.y (lookup_field_wrapper): Test `name' code.
10725         (resolve_qualified_expression_name): Test `qual_wfl' code.
10726         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10727         handle `qual_wfl' by code.
10728         (maybe_build_primttype_type_ref): Test `wfl' code.
10729
10730 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10731
10732         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10733         fdl.texi.
10734         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
10735         the dvi file in the java directory.
10736
10737 2001-05-25  Sam TH  <sam@uchicago.edu>
10738
10739         * gen-table.pl javaop.h jcf.h lex.h,
10740         parse.h: Fix header include guards.
10741
10742 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
10743
10744         * jv-scan.c (version): Update copyright year.
10745
10746 2001-05-21  Per Bothner  <per@bothner.com>
10747
10748         * jcf-parse.c (read_class):  If class is from .class or .zip file
10749         and it's already been read, don't push/pop parser context.
10750
10751 2001-05-18  Per Bothner  <per@bothner.com>
10752
10753         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
10754         command line so the jvgenmain-generated main program comes first.
10755
10756 2001-05-15  Tom Tromey  <tromey@redhat.com>
10757
10758         * class.c (build_utf8_ref): Don't generate identifier based on
10759         utf8const contents.
10760
10761 2001-05-12  Richard Henderson  <rth@redhat.com>
10762
10763         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10764         * expr.c (java_lang_expand_expr): Expand it.
10765         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10766         calling build_exception_object_ref.
10767         * parse.y (catch_clause_parameter): Likewise.
10768         (build_dot_class_method): Likewise.
10769         (try_reference_assignconv): Likewise.
10770         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10771         * jcf-write.c (generate_bytecode_insns): Likewise.
10772
10773 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10774
10775         * parse.y (build_unresolved_array_type): Set
10776         EXPR_WFL_QUALIFICATION on the newly created wfl.
10777         Fixes PR java/2538. Fixes PR java/2535.
10778
10779 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10780
10781         * parse.y (fix_constructors): Removed unnecessary assignment to
10782         local. Moved assignment to `this$<n>', fixed comments and
10783         indentation.
10784         (build_wfl_wrap): Fixed indentation.
10785         Fixes PR java/2598, java/2579 and java/2658.
10786
10787 2001-05-03  Mo DeJong  <mdejong@redhat.com>
10788
10789         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10790         check for byte swap.
10791
10792 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
10793
10794         * expr.c (build_class_init): Move MODIFY_EXPR
10795         outside of COND_EXPR.  Remove variable `call'.
10796
10797 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10798
10799         * decl.c: NULL_PTR -> NULL.
10800         * jcf-write.c: Likewise.
10801
10802 2001-05-01  Tom Tromey  <tromey@redhat.com>
10803
10804         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10805         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10806         * gcj.texi: Updated copyright text.  Include fdl.texi.
10807         (Top): Link to new node.
10808
10809 2001-05-01  Per Bothner  <per@bothner.com>
10810
10811         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
10812
10813 2001-05-01  Per Bothner  <per@bothner.com>
10814
10815         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
10816         import_list contains the name, not the TREE_PURPOSE.
10817
10818 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10819
10820         * jcf-io.c (read_zip_member): Cast to long in comparison with
10821         signed value.
10822
10823         * jvspec.c (lang_specific_driver): Initialize variables.
10824
10825         * mangle.c (find_compression_record_match): Likewise.
10826
10827         * typeck.c (build_null_signature): Provide static prototype.  Mark
10828         parameter with ATTRIBUTE_UNUSED.
10829
10830         * verify.c (verify_jvm_instructions): Initialize variable.
10831
10832 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10833
10834         * parse.y (do_resolve_class): Check for cyclic inheritance during
10835         inner class resolution.
10836
10837 2001-04-27  Per Bothner  <per@bothner.com>
10838
10839         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
10840         while iterating, since that could cause gc to lose stuff.
10841
10842 2001-04-26  Per Bothner  <per@bothner.com>
10843
10844         Fix method search wrt scope of inner classes to match JLS2.
10845         * typeck.c (build_null_signature):  New static function.
10846         (has_method):  New function.  Uses build_null_signature and lookup_do.
10847         * java-tree.h (has_method):  New declaration.
10848         * parse.y (find_applicable_accessible_methods_list):  Do not search
10849         context of inner classes here.
10850         (patch_method_invocation):  Search scope, ie. current and outer clases,
10851         for method matching simple name, to find class.
10852
10853 2001-04-26  Per Bothner  <per@bothner.com>
10854
10855         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10856         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
10857
10858         * constants.c (find_methodref_with_class_index):  New function.
10859         (find_methodref_index):  Use find_methodref_with_class_index.
10860         * java-tree.h (find_methodref_with_class_index):  New declaration.
10861         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
10862         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10863         If context changed from interface to class, don't use invokeinterface.
10864
10865 2001-04-25  Per Bothner  <per@bothner.com>
10866
10867         * verify.c (verify_jvm_instructions):  For field instructions,
10868         check that field index is valid.  For invoke instructions, check that
10869         method index is valid.
10870
10871 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
10872
10873         * config-lang.in (target_libs): Copy from $libgcj_saved.
10874
10875 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10876
10877         * decl.c (init_decl_processing): Add new class "protectionDomain"
10878         field.
10879         * class.c (make_class_data): Set initial value for "protectionDomain".
10880
10881 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10882
10883         * jvspec.c (lang_specific_driver): Fix memory allocation
10884         deficit, by using concat in lieu of xmalloc/sprintf.
10885
10886 2001-04-20  Per Bothner  <per@bothner.com>
10887
10888         Fixes to compile multiple .class files at once.
10889         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
10890         * java-tree.h (CLASS_PARSED_P):  New macro.
10891         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10892         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
10893         (read_class):  Avoid some code duplication.
10894         Don't call JCF_FINISH for a .class file - might be needed later.
10895         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
10896         rather than CLASS_LOADED_P, since latter implies class laid out.
10897         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
10898         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
10899
10900 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10901
10902         * Make-lang.in (java/boehm.o): Depend on toplev.h.
10903
10904         * boehm.c: Include toplev.h.
10905
10906 2001-04-06  Tom Tromey  <tromey@redhat.com>
10907             Alexandre Petit-Bianco  <apbianco@redhat.com>
10908
10909         Fix for PR gcj/1404 and PR gcj/2332:
10910         * parse.y (build_array_from_name): If we use the type_wfl then
10911         accumulate dimensions from the original type as well.
10912         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10913
10914 2001-04-06  Tom Tromey  <tromey@redhat.com>
10915
10916         * parse.y (analyze_clinit_body): Return true if the second operand
10917         of a METHOD_EXPR is nonzero.
10918
10919 2001-04-06  Tom Tromey  <tromey@redhat.com>
10920
10921         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10922         directory.
10923         ($(srcdir)/java/parse.c): Likewise.
10924
10925 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10926
10927         * gcj.texi: Use `which-gcj' instead of `which-g77.'
10928         (version-gcc): Initialized.
10929         (which-gcj): Likewise.
10930
10931 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10932
10933         * java-tree.h (struct lang_decl): New macro
10934         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10935         * parse.y (build_instance_initializer): New function.
10936         (add_instance_initializer): Use it.
10937         (java_fix_constructors): Set `current_class' before fix pass.
10938         (fix_constructors): Just return if already fixed. Move `super()'
10939         invocation ahead. Use `build_instance_initializer.'
10940         Fixes PR java/1315.
10941
10942 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10943
10944         * parse.y (resolve_qualified_expression_name): Pass field's
10945         DECL_CONTEXT to `not_accessible_p.'
10946         (not_accessible_p): Changed parameters order in `inherits_from_p'
10947         invocation.
10948
10949 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
10950
10951         * lang-options.h: Add flag_check_references.
10952
10953 2001-04-04  Per Bothner  <per@bothner.com>
10954
10955         * java-tree.h (CONSTANT_VALUE_P):  New macro.
10956         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
10957         * parse.y (maybe_build_class_init_for_field):  New static function.
10958         (resolve_expression_name, resolve_field_access):  Use
10959         maybe_build_class_init_for_field instead of build_class_init
10960         This does not do the init if the field is compile-time-constant.
10961         (resolve_field_access):  Simplify.
10962
10963         * parse.y (fold_constant_for_init):  Merge test into switch.
10964
10965 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
10966
10967         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10968         on gansidecl.h.
10969         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10970
10971 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
10972
10973         * expr.c (pop_type_0): Save the result of the first
10974         lang_printable_name call in a scratch buffer, so it
10975         won't be clobbered by the second call.
10976
10977 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10978
10979         * parse-scan.y (array_type:): Rewritten.
10980         (type_declaration:): `empty_statement' replaces `SC_TK.'
10981         (class_member_declaration:): `empty statement' added.
10982         (method_body:): Simplified.
10983         (static_initializer:): Likewise.
10984         (primary_no_new_array:): Use `type_literals.'
10985         (type_literals:): New rule.
10986         (dims:): Set and update `bracket_count.'
10987         Fixes PR java/1074. Fixes PR java/2412.
10988
10989 2001-03-28  Hans Boehm  <boehm@acm.org>
10990
10991         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
10992         (get_boehm_type_descriptor): Set type on returned value to be a
10993         pointer length integer.
10994
10995 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10996
10997         * expr.c (pop_type_0): Call `concat' rather than building the
10998         string manually.
10999         (pop_type): Add format specifier in call to `error'.
11000
11001         * parse.y (patch_method_invocation): Avoid casting away
11002         const-ness.
11003
11004 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
11005
11006         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11007
11008 2001-03-28  Richard Henderson  <rth@redhat.com>
11009
11010         IA-64 ABI Exception Handling:
11011         * Make-lang.in (except.o): Don't depend on eh-common.h.
11012         * check-init.c (check_init): Handle EXC_PTR_EXPR.
11013         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11014         [soft_exceptioninfo_call_node]: Remove.
11015         [eh_personality_libfunc, lang_eh_runtime_type]: New.
11016         (end_java_method): No emit_handlers.
11017         * except.c (java_set_exception_lang_code): Remove.
11018         (method_init_exceptions): Don't call it.
11019         (prepare_eh_table_type): No CATCH_ALL_TYPE.
11020         (build_exception_object_ref): New.
11021         (expand_end_java_handler): Update for except.h name changes.
11022         (emit_handlers, expand_resume_after_catch): Remove.
11023         * expr.c (java_lang_expand_expr): Update for except.h name changes.
11024         (process_jvm_instruction): Use build_exception_object_ref.
11025         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11026         (soft_exceptioninfo_call_node): Remove.
11027         (build_exception_object_ref): Declare.
11028         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11029         soft_exceptioninfo_call_node.  Move processing ...
11030         [EXC_PTR_EXPR]: ... here.
11031         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11032         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11033         (source_end_java_method): No java_set_exception_lang_code or
11034         emit_handlers.
11035         (build_dot_class_method): Use build_exception_object_ref.
11036         (try_reference_assignconv): Check EXC_PTR_EXPR not
11037         soft_exceptioninfo_call_node.
11038
11039 2001-03-28  Richard Henderson  <rth@redhat.com>
11040
11041         * java-tree.h (throw_node): Define as a single member of
11042         java_global_trees instead of a separate array.
11043         (JTI_THROW_NODE): New.
11044         * decl.c (throw_node): Don't declare.
11045         (init_decl_processing): Init a scalar throw_node.
11046         Don't register it for gc.
11047         * check-init.c (check_init): Reference scalar throw_node.
11048         * expr.c (build_java_athrow): Likewise.
11049         * jcf-write.c (generate_bytecode_insns): Likewise.
11050         * parse.h (BUILD_THROW): Likewise.
11051
11052 2001-03-28  Richard Henderson  <rth@redhat.com>
11053
11054         * decl.c (end_java_method): Do not save and restore
11055         flag_non_call_exceptions.
11056         * parse.y (source_end_java_method): Likewise.
11057         * lang.c (flag_exceptions): Don't declare.
11058         (java_init_options): Set flag_non_call_exceptions.  Set
11059         flag_exceptions here ...
11060         (java_init): ... not here.
11061
11062 2001-03-27  Richard Henderson  <rth@redhat.com>
11063
11064         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11065         exceptions_via_longjmp.
11066
11067         * lang.c (flag_new_exceptions): Don't declare it.
11068         (java_init_options): Or set it.
11069
11070 2001-03-27  Richard Henderson  <rth@redhat.com>
11071
11072         * decl.c (end_java_method): Rename asynchronous_exceptions to
11073         flag_non_call_exceptions.
11074         * parse.y (source_end_java_method): Likewise.
11075
11076 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11077
11078         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11079
11080 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11081
11082         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11083
11084 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11085
11086         * parse.y (find_as_inner_class): Follow current package
11087         indications not to mistakingly load an unrelated class.
11088
11089 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11090
11091         * constants.c (PUTN): Use memcpy, not bcopy.
11092
11093         * lex.c (java_read_char): Use memmove, not bcopy.
11094
11095         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11096
11097 2001-03-23  Per Bothner  <per@bothner.com>
11098
11099         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11100         macro for better error pin-pointing.
11101         * java-tree.h:  Fix typo in comment.
11102
11103         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11104         Don't include jsr/goto in exception range.
11105         Check if start and end of exception range are the same (also TRY_EXPR).
11106         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11107         However, do emit the following goto even if try_block is empty.
11108         Defer freeing exception_decl until after the finalizer, to make
11109         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11110
11111         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11112         return the finally-clause and vice versa.
11113
11114 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11115
11116         * gcj.texi (Input Options): documented the check for attribute
11117         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11118         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11119         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11120         (jcf_parse): Check for the right classes archive if necessary.
11121         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11122         (jcf_parse_fields): Fixed indentation.
11123         * jcf-write.c (append_gcj_attribute): New function.
11124         (generate_classfile): Compute the attribute count, invoke
11125         `append_gcj_attribute'.
11126         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11127         turned into bit-fields. New bit-field `right_zip.'
11128         (JCF_ZERO): Set `right_zip' to zero.
11129         * lang-options.h (-fforce-classes-archive-check): Added flag.
11130         * lang.c (flag_force_classes_archive_check): New flag.
11131         (lang_f_options): New entry `force-classes-archive-check.'
11132         Fixes PR java/1213.
11133
11134 2001-02-07  Andrew Haley  <aph@redhat.com>
11135
11136         * gcj.texi (Configure-time Options): Add -fcheck-references.
11137         * expr.c (build_java_indirect_ref): New function.
11138         (java_check_reference): New function.
11139         (build_java_array_length_access): Use build_java_indirect_ref to
11140         check for null references.
11141         (build_java_arrayaccess): Likewise.
11142         (build_get_class): Likewise.
11143         (build_field_ref): Likewise.
11144         (invoke_build_dtable): Likewise.
11145         (build_invokeinterface): Likewise.
11146         * lang.c (lang_f_options): Add flag_check_references.
11147         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11148         * java-tree.h (flag_check_references): New variable.
11149         * lang.c (flag_check_references): Likewise.
11150         * parse.y (patch_invoke): Use java_check_reference.
11151         (patch_assignment): Allow for extra nesting in
11152         _Jv_CheckArrayStore.
11153
11154 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11155
11156         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11157         * lex.c (cxx_keywords): Likewise.
11158
11159 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11160
11161         * parse.y (qualify_ambiguous_name): Broaden `length'
11162         recognition. Help MODIFY_EXPR be resolved as expression names.
11163         Fixes PR java/2066. Fixes PR java/2400.
11164
11165 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11166
11167         * gjavah.c (process_file): Mark interface definitions with
11168         "__attribute__ ((java_interface))".
11169
11170 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11171
11172         * class.c (layout_class): Fixed push_super_field's second
11173         argument. Fixes PR java/2333.
11174         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11175         too early to lay innerclasses out.
11176
11177 2001-03-20  Tom Tromey  <tromey@redhat.com>
11178             Alexandre Petit-Bianco <apbianco@redhat.com>
11179
11180         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11181         inside an array reference. Insertion of the array store check
11182         rewritten. Fixes PR java/2299.
11183
11184 2001-03-20  Tom Tromey  <tromey@redhat.com>
11185
11186         * lex.c (java_read_unicode): Only accept leading `u's.
11187
11188 2001-03-20  Tom Tromey  <tromey@redhat.com>
11189
11190         * jcf-parse.c (read_class): Initialize `class'.
11191
11192 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11193
11194         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11195
11196 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11197
11198         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11199         (layout_class): Likewise.
11200         (layout_class_method): Likewise.
11201         (emit_register_classes): Likewise.
11202         * decl.c (builtin_function): Likewise.
11203         (give_name_to_locals): Likewise.
11204
11205 2001-03-19  Per Bothner  <per@bothner.com>
11206
11207         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11208         before trying to load an inner class.
11209
11210         Fixes to process to command-line .class files in two passes.
11211         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11212         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11213         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11214         * class.c (is_compiled_class):  Fix for renamed flag.
11215         * parse.y (maybe_create_class_interface_decl):  Likewise.
11216         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11217         * jcf-parse.c (read_class);  Read current_class.
11218         (jcf_parse):  Make static.
11219         (load_inner_classes):  New function, with code moved from jcf_parse,
11220         because we need to inner classes after the command-line files are read.
11221         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11222         Reduce use of main_jcf (basically only for archive) and
11223         use finput instead of main_jcf->read_state.
11224         Inline jcf_figure_file_type into yyparse.
11225         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11226         Defer load_inner_classes and parse_class_file to a second pass,
11227         after we've correctly mapped command-line .clas fiels to classes.
11228         (jcf_figure_file_type):  Removed.
11229         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11230         (JCF_ZERO):  Also clear zipd field.
11231         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11232
11233 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11234
11235         * jcf-parse.c (yyparse): Change ch from char * to char.
11236
11237 2001-03-19  Per Bothner  <per@bothner.com>
11238
11239         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11240         Add constructed filelist-file at end, following -xjava.  Thus any .o
11241         and library files are not affected by the -xjava.  Also wrap
11242         explicit @FILE with -xjava and -xnone.
11243
11244 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11245
11246         * class.c (build_static_field_ref): Call make_decl_rtl() after
11247         setting the DECL_EXTERNAL flag.
11248
11249 2001-03-17  Per Bothner  <per@bothner.com>
11250
11251         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11252
11253         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11254         when result is is needed (target is STACK_TARGET).
11255
11256         * parse.h (JDEP_SOLV):  Removed.
11257         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11258
11259         * parse.y (incomplete_class_list): Removed.
11260         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11261         It doesn't work if resolve_class changes the name of an array type
11262         that is on the list and then someone else looks for the modified name.
11263         Also, seems liable to break when compiling multiple source files at
11264         once.  So the simplest is to just remove incomplete_class_list -
11265         it is only a minor space win and it is not even clear it saves time.
11266
11267         * parse.y (resolve_class):  Remove unneeded promote_type.
11268
11269 2001-03-15  Per Bothner  <per@bothner.com>
11270
11271         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11272         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11273         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11274         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11275
11276         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11277         * parse.y (java_expand_classes):  Likewise.
11278
11279         * parse.y (expand_start_java_method):  Was only called once and had a
11280         misleading name, so inline in caller java_complete_expand_method.
11281         (enter_a_block):  Likewise inline in enter_block and remove.
11282
11283         Remove junk from when gcc/java was created (by copying from C/C++).
11284         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11285         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11286         more_cleanups_ok, have_cleanups (which have never been used).
11287         (pushlevel, poplevel):  Remove related useless code.
11288
11289         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11290         vtable for Class) should be external, except when compiling Class.
11291
11292         * jvspec.c (lang_specific_driver):  Fix -C handling.
11293         Check -save-temps to see if temp @FILE should be deleted.
11294         Follow-up to/fix for February 16 patch.
11295
11296         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11297         (type_stack_dup):  Remove no-longer neded error check.
11298
11299 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11300
11301         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11302         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11303         don't surround the element with 'N..E' if the type name is
11304         unqualified.
11305
11306 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11307
11308         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11309         DECL_RTL_SET_P, etc.
11310         (make_method_value): Likewise.
11311         (get_dispatch_table): Likewise.
11312
11313         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11314
11315 2001-03-07  Tom Tromey  <tromey@redhat.com>
11316
11317         * config-lang.in (lang_requires): Define.
11318
11319 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11320
11321         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11322         not flag_fast_math.
11323
11324 2001-03-05  Per Bothner  <per@bothner.com>
11325
11326         Fix a problem where rest_of_decl_compilation applied to
11327         class_dtable_decl causes problems because it was done too early,
11328         before output file was opened.
11329         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11330         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11331         (make_class_data):  Define class_dtable_decl.
11332         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11333
11334 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11335
11336         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11337         uses of 'boolean' with 'bool'.
11338
11339 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11340
11341         * lang-specs.h: Add zero initializer for cpp_spec field to all
11342         array elements.
11343
11344 2001-02-16  Per Bothner  <per@bothner.com>
11345
11346         Handle compiling multiple input files at once, and @FILE syntax.
11347         * gcj.texi:  Updated documentation to match.
11348         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11349         * jcf-parse.c (parse_source_file):  Split into ...
11350         (parse_source_file_1):  New function - and:
11351         (parse_source_file_2):  New function.
11352         (yyparse):  On -ffilelist-file, open and scan named file.
11353         On first pass over files, only do parse_source_file_1.
11354         A new second pass calls parse_source_file_2 for each file to compile.
11355         (init_jcf_parse):  Call init_src_parse.
11356         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11357         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11358         as multiple input file combined in one compilation.
11359         * lang-options.h:  Add -ffilelist-file
11360         * lang.c (flag_filelist_file):  New flag variable.
11361         (lang_f_options):  Handle -ffilelist-file.
11362         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11363         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11364         gclass_list - use global fields of src_parse_roots instead.
11365         * parse.y (src_parse_roots):  New array.
11366         (incomplete_class_list, gclass_list):  New macros.
11367         (push_parser_context, java_pop_parser_context,
11368         java_parser_context_resume):  Don't fiddle with deleted fields.
11369         (various):  Use incomplete_class gclass_list and global macros
11370         instead of parse_ctxt fields - the lists are global.
11371         (init_src_parse):  New function.
11372
11373 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11374
11375         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11376
11377 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11378
11379         * parse.y (check_inner_class_access): Moved declaration of local
11380         `enclosing_decl_type' to the right location.
11381
11382 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
11383
11384         * parse.y (parser_check_super_interface): Don't call
11385         check_pkg_class_access for an inner interface.
11386         (parser_check_super): Don't call check_pkg_class_access for inner
11387         class.
11388         (do_resolve_class): Simplify enclosing type loop. Don't call
11389         check_pkg_class_access if CL and DECL are not set.
11390         (find_in_imports_on_demand): Set DECL if class_type needed to be
11391         loaded. Don't call check_pkg_class_access for an inner class.
11392         (check_inner_class_access): Rewritten to implement member access
11393         rules as per spec 6.6.1.
11394         (check_pkg_class_access): Handle the empty package correctly.
11395         (in_same_package): New function. Determine if two classes are in the
11396         same package.
11397
11398 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
11399
11400         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11401         method into array types.
11402         * parse.y (patch_method_invocation): Bypass access check on clone call
11403         to array instance.
11404
11405 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
11406
11407         * expr.c (build_instanceof): Check for arrays when trying fold to
11408         false.
11409
11410 2001-02-15  Jim Meyering  <meyering@lucent.com>
11411
11412         * Make-lang.in (java.install-common): Depend on `installdirs'.
11413         (java.install-info): Likewise.
11414
11415 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
11416
11417         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11418
11419 2001-02-14  Tom Tromey  <tromey@redhat.com>
11420             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11421
11422         Fix for PR java/1261.
11423         * typeck.c (build_java_array_type): Add public `clone' method to
11424         arrays.
11425         * parse.y (resolve_qualified_expression_name): Use current_class
11426         when checking for inaccessibility.
11427         (patch_method_invocation): Fixed error message when accessibility
11428         denied.  Added `from_super' argument.
11429
11430 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11431
11432         * parse.y (resolve_class): Don't build a fake decl. Use the one
11433         already built.
11434         * typeck.c (build_java_array_type): Build and assign decl to array
11435         type.
11436
11437 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11438
11439         * parse.y (not_accessible_p): Changed leading comment. Added extra
11440         `where' argument. Use it to enforce protected access rules.
11441         (resolve_qualified_expression_name): Added extra argument to
11442         not_accessible_p.
11443         (patch_method_invocation): Use argument `primary' to provide
11444         not_accessible_p with an extra argument.
11445         (lookup_method_invoke): Added extra argument to not_accessible_p.
11446         (search_applicable_method_list): Likewise.
11447
11448 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11449
11450         * parse.y (resolve_qualified_expression_name): Try to resolve as
11451         an inner class access only if `decl' is a TYPE_DECL.
11452
11453 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11454
11455         * decl.c (classdollar_identifier_node): Initialize.
11456         * java-tree.h (enum java_tree_index): New entry
11457         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11458         (classdollar_identifier_node): New macro.
11459         (ID_CLASSDOLLAR_P): Likewise.
11460         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11461         (build_dot_class_method_invocation): Likewise.
11462         (find_applicable_accessible_methods_list): `class$' can't be
11463         inherited.
11464
11465 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
11466
11467         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11468
11469 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11470
11471         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11472         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11473         gone.
11474
11475 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11476
11477         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11478         outside of the `__U' sequence too.
11479         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11480         sequence too.
11481
11482 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11483
11484         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11485
11486 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11487
11488         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11489         (JVGENMAIN_OBJS): Likewise.
11490         * java-tree.h (append_gpp_mangled_name): New prototype.
11491         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11492         Removed cast calling `gcc_add_root.'
11493         * jvgenmain.c (mangle_obstack): New global, initialized.
11494         (main): Use it.
11495         (do_mangle_class): Constify local `ptr.'
11496         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11497         append_gpp_mangle_name and update `count' if necessary.
11498         Use `mangle_obstack.'
11499         * mangle.c (append_unicode_mangled_name): Removed.
11500         (append_gpp_mangled_name): Likewise.
11501         (unicode_mangling_length): Likewise.
11502         (mangle_member_name): Return type set to `void.'
11503         (mangle_field_decl): Don't append `U' in escaped names.
11504         (mangle_method_decl): Likewise.
11505         (mangle_member_name): Just use `append_gpp_mangled_name.'
11506         * mangle_name.c: New file.
11507
11508 2001-02-07  Per Bothner  <per@bothner.com>
11509
11510         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
11511
11512         * check-init.c (check_init):  Don't call done_alternative after
11513         processing loop code, as a LOOP_EXPR never terminates normally.
11514
11515 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11516
11517         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11518
11519 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11520
11521         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11522         DECLs.
11523
11524 2001-02-06  Tom Tromey  <tromey@redhat.com>
11525
11526         * lex.c (java_new_lexer): Longer error message.
11527
11528 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
11529             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11530
11531         * typeck.c (build_prim_array_type): Added leading comment.
11532         (build_java_array_type): Moved locals out of
11533         block. Always create the `data' field, fixed alignment to match
11534         C++.
11535
11536 2001-02-04  Tom Tromey  <tromey@redhat.com>
11537
11538         * expr.c (java_lang_expand_expr): Don't bother recomputing
11539         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
11540         Fixes PR java/1866.
11541
11542 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11543
11544         * parse.y (process_imports): Save the original name of the import
11545         for better error report.
11546
11547 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
11548
11549         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11550         of macros used when compiling jvspec.c.
11551         * jvspec.c (lang_specific_driver): Link with the shared
11552         libgcc by default.
11553
11554 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11555
11556         * check-init.c (check_init): Call internal_error instead of fatal.
11557         * expr.c (java_lang_expand_expr): Likewise.
11558         * jcf-parse.c (get_constant): Likewise.
11559         * mangle.c (java_mangle_decl): Likewise.
11560         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11561         (operator_string): Likewise.
11562         * check-init.c (check_init): Call abort instead of fatal.
11563         * class.c (build_class_ref): Likewise.
11564         * constants.c (write_constant_pool): Likewise.
11565         * decl.c (start_java_method): Likewise.
11566         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11567         (java_stack_dup, encode_newarray_type): Likewise.
11568         (build_java_array_length_access): Likewise.
11569         (build_java_check_indexed_type, expand_java_pushc): Likewise.
11570         (build_java_soft_divmod, build_invokeinterface): Likewise.
11571         * java-tree.h (INNER_CLASS_P): Likewise.
11572         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11573         (give_name_to_class, get_class_constant): Likewise.
11574         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11575         (find_constant_index, generate_bytecode_conditional): Likewise.
11576         (generate_bytecode_insns, perform_relocations): Likewise.
11577         * lex.c (java_unget_unicode, java_lex): Likewise.
11578         * mangle.c (mangle_type, mangle_record_type): Likewise.
11579         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11580         (finish_mangling): Likewise.
11581         * parse.h (MARK_FINAL_PARMS): Likewise.
11582         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11583         (obtain_incomplete_type, java_complete_class): Likewise.
11584         (java_check_regular_methods, java_complete_expand_method): Likewise.
11585         (cut_identifier_in_qualified, check_deprecation): Likewise.
11586         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11587         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11588         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11589         * typeck.c (set_local_type, parse_signature_type): Likewise.
11590         (parse_signature_string, build_java_signature): Likewise;
11591         (set_java_signature): Likewise.
11592         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11593         * class.c (add_method): Call fatal_error instead of fatal.
11594         (build_static_field_ref): Likewise.
11595         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11596         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11597         * lex.c (java_new_new_lexer): Likewise.
11598         * jv-scan.c (main): Likewise.
11599         (fatal_error): Renamed from fatal.
11600         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11601         pfatal_with_name.
11602         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11603         (yyparse): Likewise.
11604         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11605         * lex.c (java_get_line_col): Likewise.
11606         * jcf-parse.c (load_class): Make errors non-fatal.
11607         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11608
11609 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11610
11611         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11612         (error): Remove unused function.
11613         (main): Don't use "__attribute__ alias" on generated class symbol.
11614
11615 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11616
11617         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11618         argument.
11619         * parse.y (finish_method_declaration): Code accounting for WFLed
11620         method DECL_NAMEs deleted.
11621         (check_abstract_method_definitions): Likewise.
11622         (resolve_type_during_patch): Layout resolved type.
11623         * typeck.c (lookup_do): Removed unused local.
11624
11625 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11626
11627         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11628         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11629         integer_negative_one_node.
11630         * expr.c (build_java_binop): Likewise.
11631
11632 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11633
11634         * zextract.c (read_zip_archive): Read file_offset before writing
11635         zipd and consequently clobbering the header contents.
11636
11637 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11638
11639         * Make-lang.in: Remove all dependencies on defaults.h.
11640         * decl.c: Don't include defaults.h.
11641         * expr.c: Likewise.
11642         * parse.y: Likewise.
11643
11644 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11645
11646         * ChangeLog (2001-01-21): Fixed typo.
11647         * class.c (layout_class_method): Code accounting for WFLed
11648         method DECL_NAMEs deleted.
11649         * constant.c (find_methodref_index): Likewise.
11650         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11651         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11652         (struct lang_decl): New field `wfl'.
11653         (java_get_real_method_name): Prototype deleted.
11654         * mangle.c (mangle_method_decl): Code accounting for WFLed
11655         method DECL_NAMEs deleted.
11656         * parse.h (GET_METHOD_NAME): Macro deleted.
11657         * parse.y (reset_method_name): Deleted.
11658         (method_header): Set DECL_FUNCTION_WFL.
11659         (check_abstract_method_header): Code accounting for WFLed method
11660         DECL_NAMEs deleted.
11661         (java_get_real_method_name): Deleted.
11662         (check_method_redefinition): Code accounting for WFLed method
11663         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11664         (java_check_regular_methods): Likewise.
11665         (java_check_abstract_methods): Likewise.
11666         (java_expand_classes): Don't call `reset_method_name.'
11667         (search_applicable_method_list): Use DECL_NAMEs instead of
11668         GET_METHOD_NAME.
11669         * typeck.c (lookup_do): Code accounting for WFLed method
11670         DECL_NAMEs deleted.
11671
11672 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
11673
11674         * lex.c (java_read_char): Check for EOF from getc first.
11675
11676 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11677
11678         * class.c (layout_class): Don't lay the superclass out if it's
11679         already being laid out.
11680         * jcf-parse.c (handle_innerclass_attribute): New function.
11681         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11682         handle_innerclasses_attribute.
11683         (jcf_parse): Don't load an innerclasses if it's already being
11684         laid out.
11685         * jcf-write.c (append_innerclass_attribute_entry): Static
11686         `anonymous_name' and its initialization deleted. `ocii' and `ini'
11687         to be zero for anonymous classes.
11688
11689 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11690
11691         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11692         necessary.
11693         * jcf-parse.c (set_source_filename): Use
11694         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11695
11696 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11697
11698         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11699         gets a unique asm name.
11700
11701 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11702
11703         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11704         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11705         if necessary.
11706         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11707         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11708         * parse.y (lookup_package_type_and_set_next): Deleted.
11709         (resolve_package): Removed unnecessary code.
11710         (find_applicable_accessible_methods_list): `finit$' can't be
11711         inherited.
11712         * verify.c (pop_argument_types): Added missing prototype.
11713
11714 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
11715
11716         * config-lang.in: Disable java by default.
11717
11718 2001-01-23  Tom Tromey  <tromey@redhat.com>
11719
11720         * gcj.texi (Copying): New node.
11721         Added copyright information.
11722
11723 2001-01-21  Per Bothner  <per@bothner.com>
11724
11725         Various fixes to allow compiling a compressed .jar/.zip archive.
11726         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
11727         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
11728         (struct ZipDirectory):  New field zipf points to owning ZipFile.
11729         * jcf.h (struct ZipDirectory):  Add forward declaration.
11730         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
11731         Remove seen_in_zip and zip_offset fields.
11732         (JCF_SEEN_IN_ZIP):  New macro.
11733         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
11734         * jcf-io.c:  Change all ZipFileCache to ZipFile.
11735         (read_zip_member):  New function.
11736         (open_in_zip):  Call read_zip_member.
11737         * jcf-parse.c (find_in_current_zip):  Remove function.
11738         (read_class):  Merge in find_in_current_zip functionality.
11739         Call read_zip_member if needed.
11740         (parse_zip_file_entries):  Use read_zip_member.
11741         (process_zip_dir):  Update for removed and added JCF fields.
11742         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
11743
11744 2001-01-21  Per Bothner  <per@bothner.com>
11745
11746         Minor optimization of static ggc roots.
11747         * jcf-parse.c (parse_roots):  New static field.
11748         (current_field, current_method, current_file_list):  Replace by macros
11749         naming fields of parse_roots.
11750         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
11751         * class.c (class_roots):  New static field.
11752         (registered_class, fields_ident, info_ident, class_list):
11753         New macros naming fields of parse_roots.
11754         (build_static_field_ref):  Don't register roots here.
11755         (layout_class):  Static field list replaced by macro class_list.
11756         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
11757         Initialize fields_ident and info_ident here.
11758
11759 2001-01-21  Per Bothner  <per@bothner.com>
11760
11761         * jcf-parse.c (ggc_mark_jcf):  New function.
11762         (init_jcf_parse):  Register current_jcf as ggc root.
11763
11764 2001-01-21  Per Bothner  <per@bothner.com>
11765
11766         * lang.c (put_decl_node):  Print method's name.
11767
11768 2001-01-21  Per Bothner  <per@bothner.com>
11769
11770         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
11771         (verify_jvm_instructions):  Use it, for better error messages on loads.
11772
11773 2001-01-21  Per Bothner  <per@bothner.com>
11774
11775         * verify.c (merge_type_state):  Still may have to merge even if
11776         LABEL_VERIFIED (label).
11777
11778 2001-01-21  Per Bothner  <per@bothner.com>
11779
11780         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
11781         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11782
11783 2001-01-19  Per Bothner  <per@bothner.com>
11784
11785         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
11786         if expeting an interface type.  Refines Tom's change of 2000-09-12.
11787
11788 2001-01-18  Per Bothner  <per@bothner.com>
11789
11790         * gcj.texi (Input Options): Mention .java files.
11791
11792 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11793
11794         * lang-options.h (-Wunsupported-jdk11): Removed.
11795         * lang.c (flag_not_overriding): Deleted.
11796         (flag_static_local_jdk1_1): Likewise.
11797         (lang_W_options): Removed "unsupported-jdk11" entry.
11798         * parse.y (java_check_methods): Removed dead code.
11799
11800 2001-01-17  Tom Tromey  <tromey@redhat.com>
11801
11802         Changes suggested by Per Bothner:
11803         * gcj.texi (Input Options): Don't mention input files.
11804         (Code Generation): Updated --main information.
11805         (Invoking jcf-dump): Mention that --javap is incomplete.
11806         From Alexandre Petit-Bianco:
11807         (Warnings): Don't mention -Wunsupported-jdk11.
11808         My stuff:
11809         (Compatibility): Mention JDK 1.2-ness of libraries.
11810         (Resources): Mention resources used when writing gcj.
11811
11812 2001-01-17  Tom Tromey  <tromey@redhat.com>
11813
11814         * gcj.texi: New file.
11815         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11816         (java.info): Depend on gcj.info.
11817         (java/gcj.dvi): New target.
11818         (java.dvi): Depend on gcj.dvi.
11819         (java.install-info): Wrote.
11820
11821 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
11822
11823         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11824         having called make_decl_rtl.
11825
11826 2001-01-14  Per Bothner  <per@bothner.com>
11827
11828         Various patches to emit better messages on verification errors.
11829         * expr.c (push_type_0):  Return error indication on stack overflow,
11830         instead of callinfg fatal.
11831         (push_type):  Now just call push_type_0 (nd fatal on overflow).
11832         (pop_type_0):  Return detailed error message (in a char** argument).
11833         (pop_type):  If pop_type_0 fails, print error message.
11834         (pop_argument_types):  Moved to verify.c.
11835         * verify.c (pop_argument_types):  Moved from expr.c.
11836         Return a (possible) error message, rather than void.
11837         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
11838         (verify_jvm_instruction):  Use new macros, improving error messages.
11839         For case OPCODE_astore use object_ptr_type_node.
11840         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
11841         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
11842
11843         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11844         constant, return body without wrapper.  (Improves constant folding.)
11845         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
11846
11847 2001-01-13  Per Bothner  <per@bothner.com>
11848
11849         * expr.c (expand_java_field_op):  Assigning to a final field outside
11850         an initializer does not violate JVM spec, so should be warning, not
11851         error.  (Sun's verifier does not complain - though MicroSoft's does.)
11852
11853 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
11854
11855         * gjavah.c (version), jcf-dump.c (version): Update copyright year
11856         to 2001.
11857
11858 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
11859
11860         * parse.y (resolve_expression_name): Permit instance variables from
11861         enclosing context in super constructor call.
11862         (resolve_qualified_expression_name): Permit enclosing class's qualified
11863         "this" in super constructor call.
11864
11865 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11866
11867         * class.c (build_utf8_ref): Remove last argument in call to
11868         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11869         (build_class_ref): Likewise.
11870         (build_static_field_ref): Likewise.
11871         (get_dispatch_table): Likewise.
11872         (layout_class_method): Likewise.
11873         (emit_register_classes): Likewise.
11874         * constants.c (build_constant_data_ref): Likewise.
11875         * decl.c (builtin_function): Likewise.
11876         (create_primitive_vtable): Likewise.
11877         * expr.c (build_known_method_def): Likewise.
11878         (build_jni_stub): Likewise.
11879         (java_lang_expand_expr): Likewise.
11880
11881 2001-01-10  Tom Tromey  <tromey@redhat.com>
11882
11883         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11884
11885 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11886
11887         * java-tree.h (lang_printable_name_wls): New prototype.
11888         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11889         rather than `current_class' to print type name. Don't prepend type
11890         names when printing constructor names.
11891         (lang_printable_name_wls): New function.
11892         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11893         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11894         * parse.y (patch_method_invocation): Message tuned for constructors.
11895         (not_accessible_p): Grant `private' access from within
11896         enclosing contexts.
11897
11898 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11899
11900         All files with updated copyright when applicable.
11901         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11902         * class.c (mangle_class_field): Function removed.
11903         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11904         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11905         (build_class_ref): Call `java_mangle_class_field' instead of
11906         `mangle_class_field.'
11907         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11908         (layout_class): Call `java_mangle_decl' instead of
11909         `mangle_static_field.'
11910         (cxx_keywords): Initialized static array moved to `lex.c.'
11911         (layout_class_method): Changed leading comment. Simplified to
11912         call `java_mangle_decl.' Local `ptr' moved in for loop body.
11913         * decl.c (lang_mark_tree): Mark field `package_list.'
11914         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11915         (struct lang_type): New field `package_list.'
11916         (unicode_mangling_length): Prototype removed.
11917         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11918         emit_unicode_mangled_name): Likewise.
11919         (cxx_keyword_p): New prototype.
11920         (java_mangle_decl, java_mangle_class_field,
11921         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11922         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11923         `build_expr_wfl.'
11924         * jvgenmain.c (main_method_prefix): Global variable removed.
11925         (main_method_suffix): Likewise.
11926         (do_mangle_classname): New function.
11927         (main): Call it. Format changed to accommodate new mangling scheme.
11928         * lex.c: (utf8_cmp): Conditionally prototyped.
11929         (cxx_keywords): Moved from class.c, conditionally defined.
11930         (utf8_cmp, cxx_keyword_p): Likewise.
11931         * mangle.c (obstack.h, ggc.h): Included.
11932         (mangle_field_decl): New function.
11933         (mangle_method_decl, mangle_type, mangle_pointer_type,
11934         mangle_array_type, mangle_record_type,
11935         find_compression_pointer_match, find_compression_array_match,
11936         find_compression_record_match,
11937         find_compression_array_template_match, set_type_package_list,
11938         entry_match_pointer_p, emit_compression_string, init_mangling,
11939         finish_mangling, compression_table_add, mangle_member_name): Likewise.
11940         (mangle_obstack): New global.
11941         (MANGLE_RAW_STRING): New macro.
11942         (unicode_mangling_length): Turned static.
11943         (append_unicode_mangled_name): Renamed from
11944         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
11945         replaces `obstack', removed from the parameter list.
11946         (append_gpp_mangled_name): Turned static. `mangle_obstack'
11947         replaces parameter `obstack', removed from the parameter list. Call
11948         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11949         (append_gpp_mangled_classtype): Removed.
11950         (compression_table, compression_next): New static variables.
11951         * parse.y (temporary_obstack): Extern declaration removed.
11952
11953 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11954
11955         * parse.y (patch_binop): Compute missing type in error situations.
11956
11957 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11958
11959         * class.c (make_class_data): Push initial value for "arrayclass".
11960         * decl.c (init_decl_processing): Add new class field "arrayclass".
11961
11962 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11963
11964         From patha@softlab.ericsson.se:
11965         * parse.y (switch_label): Use build, not build1, to construct
11966         DEFAULT_EXPR.
11967
11968 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
11969
11970         * lang.c (lang_decode_option): Change -MA to -MP.
11971         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11972         Update to new prototype; do quote targets.
11973         (jcf_dependency_write): Update.
11974
11975 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
11976
11977         Shorten primitive array allocation path:
11978         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11979         to create new primitive arrays.
11980         * expr.c (build_newarray): If generating native code, call
11981         soft_newarray_node with a reference to the primitive TYPE identifier
11982         instead of type_value.
11983
11984 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
11985
11986         Fix for PRs gcj/312 and gcj/253:
11987         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11988         dest if they arn't already.
11989         * class.c (layout_class): Call maybe_layout_super_class on
11990         superinterfaces also, but only if compiling from bytecode.
11991
11992         Fix for PR gcj/373:
11993         * parse.y (create_class): Set ACC_STATIC if class is declared in an
11994         interface.
11995
11996 2000-12-15  Tom Tromey  <tromey@redhat.com>
11997
11998         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
11999         set.
12000
12001 2000-12-14  Andrew Haley  <aph@redhat.com>
12002
12003         * boehm.c (mark_reference_fields): Change test to correctly detect
12004         bitmap overflow.
12005
12006 2000-12-15  Andreas Jaeger  <aj@suse.de>
12007
12008         * config-lang.in (lang_dirs): Added.
12009
12010 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12011
12012         * parse.y (end_artificial_method_body): Fixed undefined behavior.
12013         Credits go to rth for finding it.
12014
12015 2000-12-13  Mike Stump  <mrs@wrs.com>
12016
12017         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12018
12019 2000-11-07  Tom Tromey  <tromey@cygnus.com>
12020
12021         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12022         * lex.c (java_ignorable_control_p): Removed.
12023         (java_letter_or_digit_p): Removed.
12024         (java_start_char_p): New function.
12025         (java_read_char): Return `int', not `unicode_t'.  Changed
12026         callers.
12027         (java_read_unicode): Likewise.
12028         (java_read_unicode_collapsing_terminators): Likewise.
12029         (java_get_unicode): Likewise.
12030         (java_new_lexer): Initialize hit_eof.
12031         (java_parse_end_comment): Take `int' argument.
12032         (java_parse_doc_section): Likewise.
12033         (java_parse_escape_sequence): Don't allow backlash-newline.
12034         Return `int'.
12035         * lex.h (JAVA_DIGIT_P): Removed.
12036         (_JAVA_LETTER_OR_DIGIT_P): Removed.
12037         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12038         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12039         (JAVA_PART_CHAR_P): New macro.
12040         (UEOF): Now -1.
12041         (JAVA_CHAR_ERROR): Now -2.
12042         (java_lexer): New field `hit_eof'.
12043         * chartables.h: New file.
12044         * gen-table.pl: new file.
12045
12046 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12047             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12048
12049         * parse.y (java_complete_lhs): Only allow compound assignment of
12050         reference type if type is String.
12051
12052 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12053
12054         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12055         jcf-path.c: Likewise.
12056
12057 2000-12-09  Anthony Green  <green@redhat.com>
12058
12059         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12060         filestart and filename_length as int values.
12061
12062 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12063
12064         * jcf-io.c (find_class): Correct the logic that tests to see if a
12065         .java file is newer than its .class file. The compiler was
12066         incorrectly printing a warning when file mod times were equal.
12067
12068 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12069
12070         * jvgenmain.c: Use ISPRINT not isascii.
12071
12072 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12073
12074         * parse.y (end_artificial_method_body): Fixed typo.
12075
12076 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12077
12078         * parse.y (patch_method_invocation): Pick the correct enclosing
12079         context when creating inner class instances.
12080         Fixes gcj/332.
12081
12082 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12083
12084         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12085         Update copyright year to 2000.
12086
12087 2000-11-23  Anthony Green  <green@redhat.com>
12088
12089         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12090         Move current_file_list out of yyparse and make it static.
12091
12092         * expr.c: Declare quick_stack and tree_list_free_list as static
12093         (init_expr_processing): Register quick_stack and
12094         tree_list_free_list roots.
12095
12096 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12097
12098         * parse.y (build_outer_field_access): New local `decl_ctx', use
12099         it. Check for field's context and current class immediate outer
12100         context inheritance.
12101         (outer_field_access_p): Consider fields inherited from the last
12102         enclosing context.
12103         (build_access_to_thisn): Stop at the last enclosing context if
12104         necessary.
12105         Fixes gcj/367.
12106
12107 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12108
12109         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12110
12111 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12112
12113         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12114         scratch buffer.
12115
12116 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12117
12118         * jv-scan.c (help): Document --complexity.
12119         (options): Added --complexity.
12120         (flag_complexity): New global.
12121         (main): Call `report'.
12122         * parse-scan.y (complexity): New global.
12123         (if_then_statement, if_then_else_statement,
12124         if_then_else_statement_nsi, switch_block_statement_group,
12125         while_expression, do_statement, for_begin, continue_statement,
12126         throw_statement, catch_clause, finally, method_invocation,
12127         conditional_and_expression, conditional_or_expression,
12128         conditional_expression): Update complexity.
12129         (reset_report): Reset complexity.
12130         (report): New function.
12131
12132 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12133
12134         * lex.c (yylex): Added STRICT_TK case.
12135         * parse.y (STRICT_TK): Added.
12136         * parse-scan.y (STRICT_TK): Added.
12137         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12138         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12139         file.
12140         * keyword.h: Rebuilt.
12141         * keyword.gperf (strictfp): Added.
12142
12143 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12144
12145         * lex.c (yylex): Recognize floating point constants with leading
12146         0.
12147
12148 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12149
12150         * java-tree.h (cyclic_inheritance_report): Constify.
12151         * parse.y (cyclic_inheritance_report): Likewise.
12152
12153 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12154
12155         * parse.y (goal): Remove call to ggc_add_string_root.
12156
12157 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12158
12159         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12160         Create string in scratch buffer, then pass to build_string.
12161
12162 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12163
12164         * parse.y (issue_warning_error_from_context): Add
12165         ATTRIBUTE_PRINTF.
12166
12167 2000-11-11  Anthony Green  <green@redhat.com>
12168
12169         * jcf-parse.c (process_zip_dir): Add finput parameter.
12170         (jcf_figure_file_type): Call process_zip_dir with appropriate
12171         argument.
12172
12173 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12174
12175         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12176         * jcf-parse.c (jcf_figure_file_type): Likewise.
12177
12178 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12179
12180         * parse.y (create_new_parser_context): Use memset () instead of
12181         bzero ().
12182
12183 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12184
12185         * gjavah.c (process_file): Only include gcj/cni.h when generating
12186         CNI stubs.
12187
12188 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12189
12190         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12191         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12192         instead of bzero ().
12193
12194 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12195
12196         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12197         * lex.c (IS_ZERO): New define.
12198         (java_perform_atof): Error on floating point underflow.
12199
12200 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12201
12202         * lex.c (java_parse_escape_sequence): Only read two octal
12203         characters if the first one is greater than 3.  Don't allow
12204         "octal" numbers to include the digits 8 or 9.
12205
12206 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12207
12208         * Make-lang.in (java.distdir): Remove.
12209
12210 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12211
12212         * Make-lang.in (java.dvi): New target.
12213         Partial fix for PR other/567.
12214
12215         * lang-options.h: Mention -Wout-of-date.
12216         * jcf-dump.c (flag_newer): New global.
12217         * gjavah.c (flag_newer): New global.
12218         * jcf-io.c (find_class): Only warn when flag_newer set.
12219         * lang.c (flag_newer): New global.
12220         (struct string_option): New declaration.
12221         (lang_W_options): New global.
12222         (process_option_with_no): New function.
12223         (lang_decode_option): Use it.
12224
12225         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12226         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12227         `$'.
12228
12229         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12230         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12231         * lex.c (java_read_unicode): Removed `term_context' argument.
12232         Recognize any number of `u' in `\u'.
12233         (java_read_unicode_collapsing_terminators): New function.
12234         (java_get_unicode): Use it.
12235         (java_lineterminator): Removed.
12236         (yylex): Produce error if character literal is newline or single
12237         quote.  Return if eof found in middle of `//' comment.  EOF in
12238         `//' comment is only an error if pedantic.
12239         (java_ignorable_control_p): New function.
12240         (java_parse_end_comment): Return if eof found in middle of
12241         comment.
12242         Include flags.h.
12243         * jv-scan.c (pedantic): New global.
12244
12245 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12246
12247         * parse.y (outer_field_access_p): Inherited fields aren't
12248         consider outer fields.
12249         (maybe_build_thisn_access_method): Use
12250         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12251         (resolve_expression_name): Trigger an error if a static field
12252         is being accessed as an outer field.
12253
12254 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12255
12256         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12257         Fixes gcj/365.
12258
12259 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12260
12261         * Make-lang.in: Move all build rules here from Makefile.in,
12262         adapt to new context.  Wrap all rules that change the current
12263         directory in parentheses.  Expunge all references to $(P).
12264         When one command depends on another and they're run all at
12265         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12266         all object-file generation rules.  Delete obsolete variables.
12267
12268         * Makefile.in: Delete.
12269         * config-lang.in: Delete outputs= line.
12270
12271 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12272
12273         * parse.y (patch_method_invocation): NULLify this_arg when already
12274         inserted.
12275         (maybe_use_access_method): Handle call to methods unrelated to the
12276         current class. Fixed comment.
12277         Fixes gcj/361.
12278
12279 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12280
12281         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12282         scope.
12283
12284 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12285
12286         * lex.c (java_new_lexer): Initialize new fields.  Work around
12287         broken iconv() implementations.
12288         (java_read_char): Swap bytes if required.  Use fallback decoder if
12289         required.
12290         (byteswap_init, need_byteswap): New globals.
12291         (java_destroy_lexer): Only close iconv handle if it is in use.
12292         * lex.h (java_lexer): New fields read_anything, byte_swap,
12293         use_fallback.
12294         Made out_buffer unsigned.
12295
12296 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12297
12298         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12299         where an enclosing context can be set on the jdep.
12300         (do_resolve_class): Fixed identation.
12301
12302 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12303
12304         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12305
12306         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12307         when requested.
12308
12309         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12310
12311         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12312
12313 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12314
12315         * jcf-write.c (OP1): Update `last_bc'.
12316         (struct jcf_block): Fixed indentation and typo in comments.  New
12317         field `last_bc'.
12318         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12319         follows `monitorenter'.
12320         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12321         `patch_string'.
12322         Fixes gcj/232.
12323
12324 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12325
12326         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12327         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12328         * lang-options.h: Added -MA, -MT, -MF..
12329         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12330         (DEPEND_TARGET_SET): New macro.
12331         (DEPEND_FILE_ALREADY_SET): Likewise.
12332         (init_parse): Handle new flags.
12333         * jcf.h (jcf_dependency_print_dummies): Declare.
12334         * Make-lang.in (s-java): Added mkdeps.o.
12335         * Makefile.in (BACKEND): Added mkdeps.o.
12336         (../gcjh$(exeext)): Added mkdeps.o.
12337         (../jcf-dump$(exeext)): Added mkdeps.o.
12338         * jcf-depend.c: Include mkdeps.h.
12339         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12340         add_entry): Removed.
12341         (jcf_dependency_reset): Rewrote.
12342         (dependencies): New global.
12343         (jcf_dependency_set_target): Rewrote.
12344         (jcf_dependency_add_target): Likewise.
12345         (jcf_dependency_add_file): Likewise.
12346         (munge): Removed.
12347         (print_ents): Removed.
12348         (jcf_dependency_write): Rewrote.
12349         (print_dummies): New global.
12350         (jcf_dependency_print_dummies): New function
12351         (jcf_dependency_write): Call deps_dummy_targets if required.
12352
12353 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12354
12355         * gjavah.c (add_class_decl): Removed unused variables `tname',
12356         `tlen' and `name_index'.
12357         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12358         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12359         in `wfl_operator' with value.
12360         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12361         (jcf_figure_file_type): Fixed identation.
12362         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12363         * parse.y (analyze_clinit_body): New function.
12364         (static_initializer:): Reset `current_static_block'.
12365         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12366         `wfl_operator' with new value.
12367         (lookup_cl): Use EXPR_WFL_FILENAME.
12368         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12369         analyze_clinit_body.
12370         (build_outer_field_access): Access to this$<n> built from
12371         current_class, not its outer context.
12372         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12373         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12374         (patch_method_invocation): Use `is_static_flag' when already
12375         initialized.
12376         (patch_newarray): Removed assignment in ternary operator.
12377
12378 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12379
12380         * except.c (free_eh_ranges): Don't free `whole_range'.
12381
12382 2000-10-15  Anthony Green  <green@redhat.com>
12383
12384         * decl.c (init_decl_processing): Call init_class_processing before
12385         anything else.
12386
12387 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12388
12389         * check-init.c (check_init): Fixed leading comment. Use
12390         LOCAL_FINAL_P.
12391         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12392         (give_name_to_locals): Likewise.
12393         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12394         fields in lang_decl_var.
12395         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12396         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12397         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12398         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12399         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12400         (LOCAL_FINAL): Rewritten.
12401         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12402         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12403         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12404         `init_final' fields.
12405         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12406         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12407         (TYPE_HAS_FINAL_VARIABLE): New macro.
12408         (struct lang_type): Added `afv' field.
12409         * parse.y (check_static_final_variable_assignment_flag): New function.
12410         (reset_static_final_variable_assignment_flag): Likewise.
12411         (check_final_variable_local_assignment_flag): Likewise.
12412         (reset_final_variable_local_assignment_flag): Likewise.
12413         (check_final_variable_indirect_assignment): Likewise.
12414         (check_final_variable_global_assignment_flag): Likewise.
12415         (add_inner_class_fields): Use LOCAL_FINAL_P.
12416         (register_fields): Handle local finals and final variables.
12417         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12418         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12419         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12420         on local finals.
12421         (java_complete_expand_methods): Loop to set
12422         TYPE_HAS_FINAL_VARIABLE. Call
12423         `reset_final_variable_local_assignment_flag' and
12424         `check_final_variable_local_assignment_flag' accordingly before
12425         and after constructor expansion. Call
12426         `reset_static_final_variable_assignment_flag'
12427         before expanding <clinit> and after call
12428         `check_static_final_variable_assignment_flag' if the
12429         current_class isn't an interface. After all methods have been
12430         expanded, call `check_final_variable_global_assignment_flag' and
12431         `check_static_final_variable_assignment_flag' if the current class
12432         is an interface.
12433         (maybe_yank_clinit): Fixed typo in comment.
12434         (build_outer_field_access_methods): Removed old sanity check. Use
12435         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12436         Don't create access methods for finals.
12437         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12438         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12439         existing DECL_INIT has been processed.
12440         (java_complete_lhs): Likewise.
12441         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12442         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12443         logic.
12444         (patch_assignment): Use LOCAL_FINAL_P.
12445         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12446         DECL_INITIAL is nullified.
12447         Fixes gcj/163.
12448
12449 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12450
12451         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12452
12453         * Makefile.in (parse.c, parse-scan.c): Likewise.
12454
12455 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12456
12457         * class.c (temporary_obstack): Remove.
12458         (make_class): Don't mess with obstascks.
12459         (push_class): Likewise.
12460         (set_super_info): Likewise.
12461         (add_method_1): Likewise.
12462         (add_method): Likewise.
12463         (add_field): Likewise.
12464         (build_utf8_ref): Likewise.
12465         (build_class_ref): Likewise.
12466         (build_static_field_ref): Likewise.
12467         (finish_class): Likewise.
12468         (push_super_field): Likewise.
12469         (layout_class): Likewise.
12470         (layout_class_methods): Likewise.
12471         (init_class_processing): Likewise.
12472         * constants.c (get_tag_node): Likewise.
12473         (build_constant_data_ref): Likewise.
12474         * decl.c (ggc_p): Remove.
12475         (copy_lang_decl): Use ggc_alloc.
12476         (complete_start_java_method): Don't mess with obstacks.
12477         (start_java_method): Likewise.
12478         (end_java_method): Likewise.
12479         * except.c (link_handler): Use xmalloc.
12480         (free_eh_ranges): New function.
12481         (method_init_exceptions): Use it.
12482         (add_handler): Use xmalloc.
12483         (expand_start_java_handler): Don't mess with obstacks.
12484         (prepare_eh_table_type): Likewise.
12485         (expand_end_java_handler): Likewise.
12486         * expr.c (push_value): Likewise.
12487         (create_label_decl): Likewise.
12488         (build_jni_stub): Likewise.
12489         (java_lang_expand_expr): Likewise.
12490         (note_instructions): Use xrealloc.
12491         (java_push_constant_from_pool): Don't mess with obstacks.
12492         (process_jvm_instruction): Likewise.
12493         * java-tree.h (cyclic_inheritance_report): Remove duplicate
12494         declaration.
12495         * jcf-parse.c (get_constant): Don't mess with obstacks.
12496         (read_class): Likewise.
12497         (jcf_parse): Likewise.
12498         * lex.c (expression_obstack): Remove.
12499         (java_lex): Don't use obstack_free.
12500         * parse.h (exit_java_complete_class): Don't mess with obstacks.
12501         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12502         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12503         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12504         * parse.y (gaol): Add more GC roots.
12505         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12506         (lookup_field_wrapper): Likewise.
12507         (obtain_incomplete_type): Don't mess with obstacks.
12508         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12509         macros.
12510         (craft_constructor): Don't mess with obstacks.
12511         (safe_layout_class): Likewise.
12512         (java_complete_class): Likewise.
12513         (source_end_java_method): Likewise.
12514         (build_outer_field_access_methods): Likewise.
12515         (build_outer_method_access_method): Likewise.
12516         (maybe_build_thisn_access_method): Likewise.
12517         (build_dot_class_method_invocation): Likewise.
12518         (java_complete_tree): Likewise.
12519         (java_complete_lhs): Likewise.
12520         (do_merge_string_cste): Likewise.
12521         (patch_string_cst): Likewise.
12522         (array_constructor_check_entry): Likewise.
12523         * typeck.c (build_java_array_type): Likewise.
12524         (parse_signature_string): Likewise.
12525         (build_java_signature): Likewise.
12526
12527 2000-10-12  Tom Tromey  <tromey@cygnus.com>
12528
12529         Fix for PR gcj/356:
12530         * gjavah.c (add_class_decl): Don't special-case inner classes.
12531         (add_namelet): Likewise.
12532
12533 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
12534
12535         * java-tree.h: Constify current_encoding.
12536         * lang.c: Constify current_encoding.
12537
12538 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
12539
12540         * jvgenmain.c (class_mangling_suffix): Omit `.'.
12541         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12542
12543 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12544
12545         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12546         patch. Fixes gcj/340.
12547
12548 2000-10-10  Tom Tromey  <tromey@cygnus.com>
12549
12550         * lex.c (java_new_lexer): Initialize out_first and out_last
12551         fields.
12552         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12553
12554 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12555
12556         * parse.y (pop_current_osb): New function.
12557         (array_type:): Use `dims:', changed actions
12558         accordingly. Suggested by Anthony Green.
12559         (array_creation_expression:): Used pop_current_osb.
12560         (cast_expression:): Likewise.
12561         (search_applicable_method_list): Fixed indentation.
12562
12563 2000-10-08  Anthony Green  <green@redhat.com>
12564
12565         * parse.y (array_type_literal): Remove production.
12566         (type_literals): Refer to array_type, not array_type_literal.
12567
12568 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12569
12570         Patch contributed by Corey Minyard.
12571         * decl.c (check_local_named_variable): New function.
12572         (tree check_local_unnamed_variable): Likewise.
12573         (find_local_variable): Splitted. Call check_local_{un}named_variable.
12574
12575 2000-10-07  Anthony Green  <green@redhat.com>
12576
12577         * class.c (layout_class): Handle case where superclass can't be
12578         layed out yet.
12579
12580 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12581
12582         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12583         gperf.
12584
12585 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12586
12587         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12588         * jvgenmain.c (class_mangling_prefix): Removed.
12589         (class_mangling_suffix): New global.
12590         (main): Use it.
12591         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12592         `$'.
12593         (print_method_info): Handle overrides for static and final
12594         methods.
12595         (process_file): Generate declaration for class object field.
12596         * class.c (cxx_keywords): New array.
12597         (utf8_cmp): New function.
12598         (cxx_keyword_p): New function.
12599         (layout_class_method): Mangle C++ keywords by appending `$'.
12600         (mangle_field): New function.
12601         (mangle_class_field): Use mangle_field.  Mangle class name as
12602         `class$'.
12603         (mangle_static_field): Use mangle_field.
12604
12605 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12606
12607         * decl.c (find_local_variable): Removed uncessary type check and
12608         fixed range check typo. From Corey Minyard.
12609
12610 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12611
12612         * decl.c (give_name_to_locals): New local `code_offset'. Call
12613         `maybe_adjust_start_pc'.
12614         * expr.c (note_instructions): New function.
12615         (expand_byte_code): Don't collect insn starts here.
12616         (peek_opcode_at_pc): New function.
12617         (maybe_adjust_start_pc): Likewise.
12618         * java-tree.h (maybe_adjust_start_pc): Declare.
12619         (note_instructions): Likewise.
12620         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12621
12622 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12623
12624         * parse.y (field_access:): Fixed indentation.
12625         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12626
12627 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12628
12629         Fix for PR gcj/307:
12630         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12631         JPRIMITIVE_TYPE_P, for arithmetic operators.
12632         (patch_method_invocation): Indentation fix.
12633         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12634         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12635         (do_unary_numeric_promotion): Cleaned up code.
12636         (valid_cast_to_p): Handle boolean correctly.
12637
12638 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12639
12640         * lex.c (java_read_unicode): Reset bs_count when finished with
12641         `\u' sequence.
12642
12643 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12644
12645         Convert to GC.
12646         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12647         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12648         (typeck.o): Depend on ggc.h.
12649         * class.c (add_method_1): Use GC functions for allocation.
12650         (init_class_processing): Register roots.
12651         * decl.c (ggc_p): Set to 1.
12652         (pending_local_decls): Make it static.
12653         (push_jvm_slot): Use GC functions for allocation.
12654         (init_decl_processing): Register roots.
12655         (give_name_to_locals): Use GC functions for allocation.
12656         (lang_mark_tree): New function.
12657         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12658         functions for allocation.
12659         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12660         * lex.c (java_lex): Use build_string, rather than replicating it
12661         inline.
12662         * parse.y (goal): Add more roots.
12663         (mark_parser_ctxt): New function.
12664         * typeck.c: Include ggc.h.
12665
12666 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12667
12668         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12669         contains something else than MODIFY_EXPR.
12670
12671 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
12672
12673         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12674         * Makefile.in (parse.o): Depend on ggc.h.
12675         (class.o): Likewise.
12676         (constants.o): Likewise.
12677         (decl.o): Likewise.
12678         (expr.o): Likewise.
12679         (jcf-parse.o): Likewise.
12680         (jcf-write.o): Likewise.
12681         (mangle.o): Likewise.
12682         * class.c: Include ggc.h.
12683         (build_static_field_ref): Register GC roots.
12684         (layout_class): Likewise.
12685         (init_class_processing): Likewise.
12686         * constants.c: Include ggc.h.
12687         (current_constant_pool_data_ref): Remove.
12688         (tag_nodes): Move it to ...
12689         (get_tag_node): ... here.  Register GC roots.
12690         * decl.c: Include ggc.h.  Remove many global tree definitions.
12691         (throw_node): Define.
12692         (java_global_trees): Likewise.
12693         (predef_filenames): Make the size a constant.
12694         (init_decl_processing): Adjust accordingly.
12695         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
12696         * expr.c: Include ggc.h.
12697         (init_expr_processing): Register GC roots.
12698         (build_invokeinterface): Likewise.
12699         * java-tree.h: Replace extern tree declarations with macros.
12700         (java_global_trees): New variable.
12701         (java_tree_index): New enumeration.
12702         (init_jcf_parse): Declare.
12703         * jcf-parse.c: Include ggc.h.
12704         (current_class): Remove declaration.
12705         (main_class): Likewise.
12706         (all_class_list): Likewise.
12707         (predefined_filename_p): Adjust for constant size of
12708         predef_filenames.
12709         (init_jcf_parse): New function.
12710         * jcf-write.c: Include ggc.h.
12711         (generate_classfile): Register GC roots.
12712         (append_synthetic_attribute): Likewise.
12713         (append_innerclass_attribute_entry): Likewise.
12714         * lang.c: Include ggc.h.
12715         (lang_print_error): Register GC roots.
12716         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12717         with macros.
12718         * parse.y: Include ggc.h.
12719         (wfl_operator): Remove.
12720         (goal): Register GC roots.
12721         (java_pop_parser_context): Adjust for new field names.
12722         (java_parser_context_save_global): Likewse.
12723         (java_parser_context_restore_global): Likewise.
12724         (java_parser_context_suspend): Likewise.
12725         (java_parser_context_resume): Likewise.
12726         (verify_constructor_circularity): Register GC roots.
12727         (lookup_cl): Likewise.
12728         (java_reorder_fields): Likewise.
12729         (build_current_this): Likewise.
12730         (class_in_current_package): Likewise.
12731         (argument_types_convertible): Likewise.
12732         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12733
12734 2000-09-14  Tom Tromey  <tromey@cygnus.com>
12735
12736         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12737
12738 2000-09-13  Tom Tromey  <tromey@cygnus.com>
12739
12740         * jcf-parse.c: Include <locale.h>.
12741         * jv-scan.c: Include <locale.h>.
12742
12743 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12744
12745         * expr.c (pop_type_0): Return `Object' if trying to merge two
12746         interface types.
12747         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12748         interface types; `Object' is always a valid supertype.
12749
12750 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12751
12752         Fix for PR gcj/33:
12753         * jv-scan.c (help): Document --encoding.
12754         (options): Added `encoding' entry.
12755         (OPT_ENCODING): New define.
12756         (main): Handle --encoding.
12757         Include <langinfo.h> if nl_langinfo exists.
12758         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12759         --encoding.
12760         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12761         (parse_source_file): Correctly call java_init_lex.  Added `finput'
12762         argument.  Use nl_langinfo to determine default encoding.
12763         * java-tree.h (current_encoding): Declare.
12764         * parse.y (java_parser_context_restore_global): Don't restore
12765         `finput'.
12766         (java_parser_context_save_global): Don't set `finput' field.
12767         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
12768         if required.
12769         * lang.c (current_encoding): New global.
12770         (lang_decode_option): Recognize `-fencoding='.
12771         (finish_parse): Don't close finput.
12772         * parse.h (struct parser_ctxt): Removed `finput' and
12773         `unget_utf8_value' fields.  Added `lexer' field.
12774         (java_init_lex): Fixed declaration.
12775         * lex.c (java_new_lexer): New function.
12776         (java_destroy_lexer): Likewise.
12777         (java_read_char): Added `lex' argument.  Handle iconv case.
12778         (java_read_unicode): Added `lex' argument.  Count backslashes in
12779         lexer structure.
12780         (java_init_lex): Added `finput' and `encoding' arguments.  Set
12781         `lexer' field in ctxp.
12782         (BAD_UTF8_VALUE): Removed.
12783         (java_lex): Handle seeing UEOF in the middle of a string literal.
12784         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12785         (java_lexer): New structure.
12786         (UNGETC): Removed.
12787         (GETC): Removed.
12788         (DEFAULT_ENCODING): New define.
12789         (java_destroy_lexer): Declare.
12790
12791 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12792
12793         Fix for PR gcj/343:
12794         * lex.c (java_init_lex): Initialize java_io_serializable.
12795         * parse.y (java_io_serializable): New global.
12796         (valid_ref_assignconv_cast_p): An array can be cast to
12797         serializable.
12798
12799 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12800
12801         * decl.c, expr.c: Include defaults.h if not already included.
12802         Don't define the *_TYPE_SIZE macros.
12803
12804 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
12805
12806         * typeck.c (build_java_array_type): Correct first parameter
12807         in ADJUST_FIELD_ALIGN invocation.
12808
12809 2000-09-06  Tom Tromey  <tromey@cygnus.com>
12810
12811         * lang-specs.h: Also recognize `-femit-class-files'.
12812
12813 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12814
12815         * verify.c (merge_types): Load the types to merge if necessary.
12816
12817 2000-09-02  Anthony Green  <green@redhat.com>
12818
12819         * jcf-io.c: Include zlib.h.
12820         (open_in_zip): Read compressed class file archives.
12821         * zipfile.h (ZipDirectory): Add uncompressed_size and
12822         compression_method fields.
12823         * zextract.c (read_zip_archive): Collect file compression info.
12824
12825 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
12826
12827         * parse.y (do_resolve_class): Also explore superclasses of
12828         intermediate enclosing contexts when searching for inner classes.
12829
12830 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12831
12832         * parse.y (variable_declarator_id:): Better error message.
12833         (expression_statement:): Use YYNOT_TWICE.
12834         (cast_expression:): Likewise.
12835         (assignment:): Likewise.
12836
12837 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12838
12839         * parse.y (do_merge_string_cste): New locals. Create new
12840         STRING_CSTs each time, use memcpy. Fixes gcj/311.
12841
12842 2000-08-07  Hans Boehm  <boehm@acm.org>
12843
12844         * boehm.c (mark_reference_fields): Set marking bits for all words in
12845         a multiple-word record.
12846         (get_boehm_type_descriptor): Use the procedure marking descriptor for
12847         java.lang.Class.
12848
12849 2000-08-31  Mike Stump  <mrs@wrs.com>
12850
12851         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12852         jcf-dump$(exeext)): Make parallel safe.
12853
12854 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12855
12856         * jcf-parse.c (set_source_filename): Constify a char *.
12857         * jcf-write.c (append_innerclasses_attribute,
12858         make_class_file_name): Constify a char *.  Don't recycle a
12859         variable for an unrelated purpose.
12860         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12861         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12862
12863 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12864
12865         * expr.c (can_widen_reference_to): Fixed indentation.
12866         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12867         * parse.y: `finit$' replaces `$finit$' in comments.
12868         (try_builtin_assignconv): Fixed leading comment.
12869
12870 2000-08-25  Greg McGary  <greg@mcgary.org>
12871
12872         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12873
12874 2000-08-24  Greg McGary  <greg@mcgary.org>
12875
12876         * lang.c (lang_decode_option): Use ARRAY_SIZE.
12877         * parse.y (BINOP_LOOKUP): Likewise.
12878
12879 2000-08-22  Andrew Haley  <aph@cygnus.com>
12880
12881         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12882         sign extending. Fixes gcj/321.
12883         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12884         combining to make a jlong. Fixes gcj/321.
12885
12886 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12887
12888         * lang-specs.h: Do not process -o or run the assembler if
12889         -fsyntax-only.
12890
12891 2000-08-16  Andrew Haley  <aph@cygnus.com>
12892
12893         * typeck.c (build_java_array_type): Rewrite code to do array
12894         alignment.  Take into account back-end macros when aligning array
12895         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12896         user to set alignment. Fixes gcj/252 and 160.
12897
12898 2000-08-09  Tom Tromey  <tromey@cygnus.com>
12899
12900         * parse.y (check_abstract_method_definitions): Now return `int'.
12901         Check implemented interfaces.  Fixes PR gcj/305.
12902
12903         * parse.y (patch_switch_statement): Disallow `long' in switch
12904         expressions.  Fixes PR gcj/310.
12905
12906 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12907
12908         * decl.c (finit_leg_identifier_node): New global.
12909         (init_decl_processing): Use `finit$' to initialize
12910         finit_identifier_node. Use `$finit$' to initialize
12911         finit_leg_identifier_node.
12912         * expr.c (expand_java_field_op): Use ID_FINIT_P.
12913         * java-tree.h (finit_identifier_node): Changed attached comment.
12914         (finit_leg_identifier_node): New declaration.
12915         (ID_FINIT_P): Take finit_identifier_node and
12916         finit_leg_identifier_node into account. This is a backward
12917         compatibility hack.
12918
12919 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12920
12921         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12922         Jan 6 2000 patch.
12923         (generate_bytecode_insns): Check `nargs' before emitting it.
12924         * verify.c (merge_type_state): Fixed typo.
12925         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12926         generate_bytecode_{conditional,insns}.
12927
12928 2000-08-13  Anthony Green  <green@redhat.com>
12929
12930         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12931         for -pg builds).
12932
12933 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12934
12935         * class.c (maybe_layout_super_class): Fixed indentation.
12936         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12937         (java_check_methods): New function declaration.
12938         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12939         instead of `str_ptr'.
12940         * jcf-write.c (generate_bytecode_insns): Emit number the of args
12941         of a `invokeinterface' at the right time.
12942         * parse.h (WFL_STRIP_BRACKET): New macro.
12943         (SET_TYPE_FOR_RESOLUTION): Use it.
12944         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12945         (check_class_interface_creation): Don't check for cross package
12946         innerclass name clashes.
12947         (method_header): Behave properly if MDECL is `error_mark_node'.
12948         (method_declarator): Return `error_mark_node' if bogus current
12949         class.
12950         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12951         (resolve_and_layout): New local `decl_type', set and used. Call
12952         java_check_methods.
12953         (java_check_methods): New method.
12954         (java_layout_classes): Use it.
12955         (resolve_qualified_expression_name): No EH check necessary in
12956         access$<n>.
12957         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12958         `case' statement.
12959         (patch_assignment): Set DECL_INITIAL on integral final local.
12960
12961 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12962
12963         * java-tree.h (flag_extraneous_semicolon): New extern.
12964         * lang-options.h: (-Wextraneous-semicolon): New option.
12965         * lang.c (flag_redundant): Fixed typo in leading comment.
12966         (flag_extraneous_semicolon): New global.
12967         (lang_decode_option): Set `flag_extraneous_semicolon' when
12968         -Wall. Decode `-Wextraneous-semicolon'.
12969         * parse.y (type_declaration:): Removed `SC_TK' hack, added
12970         `empty_statement' rule.
12971         (class_body_declaration): Likewise.
12972         (method_body:): Accept `;' as a method body.
12973         (static_initializer:): Removed `SC_TK' hack.
12974         (constructor_block_end:): Likewise.
12975         (empty_statement:): Report deprecated empty declaration. Fixes
12976         gcj/295
12977
12978 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12979
12980         * parse.y (build_dot_class_method_invocation): Changed parameter
12981         name to `type'. Build signature from `type' and convert it to a
12982         STRING_CST if it's an array.
12983         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12984         to use `ref_type' directly.
12985
12986 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
12987
12988         * lang-options.h: Added a comma after the last element to avoid
12989         syntax errors when other languages define additional options.
12990
12991 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
12992
12993         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
12994         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
12995         (jc1): Link with $(BACKEND).
12996         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
12997
12998 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
12999
13000         * jvspec.c: Adjust type of second argument to
13001         lang_specific_driver, and update code as necessary.
13002
13003         * class.c (build_dtable_decl): Initialize dummy.
13004
13005 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13006
13007         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13008         method bodies not to rule out discarding `<clinit>'; don't use
13009         <clinit> to initialize static fields with constant initializers.
13010
13011 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13012
13013         * gjavah.c (print_method_info): Added `synth' parameter. Skip
13014         synthetic methods.
13015         (method_synthetic): New global.
13016         (HANDLE_METHOD): Recognize synthetic method and tell
13017         `print_method_info' about it.
13018         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13019         processing a synthetic method.
13020         * jcf-reader.c (skip_attribute): New function.
13021         ( skip_attribute): Likewise.
13022
13023 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13024
13025         * parse.y (build_outer_field_access): Fixed comments.
13026         (fix_constructors): Emit the initialization of this$<n> before
13027         calling $finit$.
13028         (resolve_qualified_expression_name): Build an access to `decl' if
13029         necessary.
13030
13031 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13032
13033         * parse-scan.y (curent_class): Non longer const.
13034         (inner_qualifier, inner_qualifier_length): Deleted.
13035         (current_class_length): New global.
13036         (bracket_count): Fixed typo in leading comment.
13037         (anonymous_count): New global.
13038         (class_instance_creation_expression:): Handle anonymous classes.
13039         (anonymous_class_creation:): New rule.
13040         (push_class_context): Rewritten.
13041         (pop_class_context): Likewise.
13042         (INNER_QUALIFIER): Macro deleted.
13043         (report_class_declaration): call `push_class_context' when
13044         entering the function. `fprintf' format modified not to use
13045         INNER_QUALIFIER.
13046         (report_class_declaration): Assign `package_name' and
13047         `current_class' to NULL separately.
13048
13049 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13050
13051         * expr.c (build_invokeinterface): Call layout_class_methods on
13052         target interface.
13053
13054 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13055             Anthony Green  <green@cygnus.com>
13056             Alexandre Petit-Bianco  <apbianco@cygnus.com>
13057
13058         * class.c (make_class_data): Create vtable for abstract classes.
13059         (get_dispatch_table): Changed to cope with abstract classes.
13060
13061 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13062
13063         * parse.y (patch_method_invocation): Don't reverse the argument
13064         list when dealing with anonymous class constructors. Fixed typo in
13065         comment.
13066
13067 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13068
13069         * parse.y (build_alias_initializer_parameter_list): Reverse
13070         crafted list when building aliases for anonymous class
13071         constructors.
13072
13073 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13074
13075         * parse.y (jdep_resolve_class): Don't bother checking potential
13076         innerclass access if `decl' is NULL.
13077         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13078         WFL.
13079
13080 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13081
13082         * parse.c: Remove (again.)
13083
13084 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13085
13086         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13087         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13088         outside the `if' statement, alias to innerclass removed, `decl'
13089         used to mark the class complete.
13090
13091 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13092
13093         * parse.y (simple_name:): Fixed typo in error message.
13094
13095 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13096
13097         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13098         or its first operand can be error marks.
13099
13100 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13101
13102         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13103         * parse.y (method_header): Likewise.
13104
13105 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13106
13107         * parse.y (process_imports): Consider that one might be trying to
13108         import an innerclass. Fixes gcj/254
13109
13110 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13111
13112         * parse.y (find_as_inner_class): Handle the case where the
13113         enclosing context of an innerclass has been loaded as bytecode.
13114
13115 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13116
13117         * parse.y (simple_name:): Reject `$' in type names.
13118         (resolve_type_during_patch): Use `type' as a second
13119         argument to resolve_no_layout. Fixes gcj/257.
13120
13121 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13122
13123         * parse.y (find_most_specific_methods_list): Select the only
13124         non-abstract method even if max has been set.
13125         Fixes gcj/285, gcj/298.
13126
13127 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13128
13129         * lang-specs.h: Added %(jc1) to java compiler options.
13130
13131 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13132
13133         * .cvsignore: New file.
13134
13135 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13136
13137         * parse.y (not_accessible_p): Access granted to innerclasses
13138         (indirectly) extending the reference type. Fixes gcj/249.
13139
13140 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13141
13142         * parse.y (patch_method_invocation): Fixed comment.
13143         (maybe_use_access_method): Build this$<n>s to the context of the
13144         target method, or a type that extends it. Fixes gcj/242.
13145
13146 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13147
13148         * parse.c: Remove.
13149
13150 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13151
13152         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13153
13154 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13155
13156         * lang-specs.h: Added %{I*}.
13157
13158 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13159
13160         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13161
13162 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13163
13164         * parse-scan.c: Remove.
13165
13166 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13167
13168         * class.c (set_super_info): Handled protected inner classes.
13169         (common_enclosing_context_p): Bail early if arguments aren't both
13170         inner classes.
13171         (get_access_flags_from_decl): Handle private and protected inner
13172         classes.
13173         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13174         (CLASS_PROTECTED): Likewise.
13175         (struct lang_type): New bitfield `poic'.
13176         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13177         inner classes only.
13178         (check_inner_class_access): Renamed arguments, added
13179         comments. Handles protected inner classes (fixes gcj/225)
13180         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13181
13182 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13183
13184         * parse.y (resolve_qualified_expression_name): Verify qualified
13185         access to `this'. Fixes gcj/239.
13186
13187 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13188
13189         * jcf-write.c (generate_classfile): Don't install ConstantValue
13190         for null pointers.
13191
13192 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13193
13194         * parse.y (resolve_qualified_expression_name): Handle inner class
13195         access. Fixes gcj/256.
13196
13197 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13198
13199         * jcf-write.c (generate_classfile): Properly install the
13200         ConstantValue attribute and the initial value constant pool index
13201         on string constants.
13202         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13203         class files.
13204
13205 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13206
13207         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13208         construct.
13209         * parse.y (find_as_inner_class): Fixed typo.
13210         (do_resolve_class): Explore enclosing contexts when searching for
13211         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13212         (check_inner_class_access): Check `decl' which can be null in case
13213         of previous errors.
13214
13215 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13216
13217         * java-tree.h (java_debug_context): Declared `extern'.
13218         (safe_layout_class): Likewise.
13219         * parse.y (resolve_field_access): Field must be `static' in order
13220         to be replaced by its initial value. Added comments.
13221         (find_applicable_accessible_methods_list): Fixed typo.
13222         (find_most_specific_methods_list): Methods found in innerclasses
13223         take over methods founds in the enclosing contexts.
13224         (java_complete_tree): Loosen restrictions on the type of DECLs
13225         that can be replaced by their initialization values.
13226         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13227
13228 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13229
13230         * Make-lang.in (PARSE_DIR): New macro.
13231         (PARSE_RELDIR): Likewise.
13232         (PARSE_C): Likewise.
13233         (PARSE_SCAN_C): Likewise.
13234         ($(PARSE_C)): New target.
13235         ($(PARSE_SCAN_C)): Likewise.
13236         (SET_BISON): New macro.
13237         (BISONFLAGS): Likewise.
13238         (JAVABISONFLAGS): Likewise.
13239
13240 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13241
13242         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13243         argument on the first pass for CNI as well as JNI.
13244         (print_method_info): Set up method name on the first pass only.
13245
13246 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13247
13248         * parse.y (parser_qualified_classname): Removed parameter
13249         `is_static'.
13250         (create_interface): Removed first passed parameter to
13251         parser_qualified_classname.
13252         (create_class): Likewise. Don't install alias on static
13253         innerclasses. Fixes gcj/275.
13254
13255 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13256
13257         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13258         debugable statement with empty_stmt_node. Fixes gcj/272
13259
13260 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13261
13262         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13263         gcj/271.
13264
13265 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13266
13267         * jcf-write.c (push_long_const): Appropriately cast short negative
13268         constant to jword.
13269
13270 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13271
13272         * parse.y (verify_constructor_super): Use loop variable
13273         `m_arg_type' initialized with `mdecl_arg_type'.
13274
13275 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13276
13277         * parse.y (resolve_field_access): Handle case where `type_found'
13278         is NULL.
13279
13280 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13281
13282         * expr.c (lookup_field): The same field can be found through two
13283         different interface. Don't declare it ambiguous in that case.
13284
13285 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13286
13287         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13288         follows \r, then unget it at a lower level.
13289
13290 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13291
13292         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13293         java_complete_tree.
13294
13295 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13296
13297         * parse.y (for_statement): Wrap expression in a WFL if it is a
13298         constant.  For PR gcj/268.
13299
13300 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13301
13302         * parse.y (do_resolve_class): Minor optimiztion in the package
13303         list search. Removed unnecessary test and return statement.
13304         (valid_ref_assignconv_cast_p): Order of arguments to
13305         enclosing_context_p fixed.
13306
13307 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13308
13309         * expr.c (lookup_field): Print error and return error_mark_node if
13310         field reference is ambiguous.
13311
13312         * parse.y (check_abstract_method_definitions): Also check if
13313         `other_method' is abstract.
13314
13315 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13316
13317         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13318         classes.
13319         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13320         (struct lang_type): New field `pic'.
13321         (CLASS_PRIVATE): New macro.
13322         * parse.y (check_inner_class_access): New function.
13323         (jdep_resolve_class): Call it.
13324
13325 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13326
13327         * parse.y (patch_incomplete_class_ref): Initialize the returned
13328         class.  For PR gcj/260.
13329
13330 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13331
13332         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13333
13334 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13335
13336         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13337         Java specific checks.
13338         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13339         screened by DECL_P.
13340         * java-tree.def (CASE_EXPR): Marked 'e'.
13341         (DEFAULT_EXPR): Likewise.
13342         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13343         screened by DECL_P.
13344         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13345         Java specific checks.
13346         (generate_bytecode_insns): Test try_block for BLOCK before using
13347         BLOCK_EXPR_BODY.
13348         * parse.y (build_wfl_wrap): Added `location' argument. Set
13349         EXPR_WFL_LINECOL accordingly.
13350         (dim_expr:): Wrap constants with WFLs.
13351         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13352         (resolve_package): Check for `stmt' not being a BLOCK before
13353         building a debuggable statement with it.
13354         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13355         invocation.
13356         (resolve_field_access): Make sure `decl' is a DECL before treating
13357         it as such.
13358         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13359         IDENTIFIER_NODE before treating it as such.
13360         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13361         treating it as such.
13362         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13363         to be applied only on non array types.
13364
13365 2000-06-16  Per Bothner  <per@bothner.com>
13366
13367         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13368         define in terms of DECL_RESULT, as that fails when --enable-checking.
13369
13370 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13371
13372         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13373         types the same in comparison.
13374         (CHECK_OP): Add static prototype.
13375
13376 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13377
13378         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13379         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13380         * parse.c: Rebuilt.
13381
13382 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13383
13384         * decl.c (create_primitive_vtable): Prototype.
13385
13386         * jcf-write.c (generate_bytecode_insns): Initialize variable
13387         `saved_context'.
13388
13389         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13390
13391 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13392
13393         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13394         to track searched classes, and do not search the same class more than
13395         once. Call find_applicable_accessible_methods_list on immediate
13396         superclass, instead of search_applicable_method_list on all ancestors.
13397         Fix for PR gcj/238.
13398
13399 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13400
13401         * parse.y (register_fields): Permit static fields in inner classes
13402         if they are final. Fix for PR gcj/255.
13403
13404 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13405
13406         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13407         * parse.y (find_in_imports): Returned type changed to void,
13408         leading comment fixed.
13409         (register_package): New function.
13410         (qualify_and_find): Likewise.
13411         (package_declaration:): Use `register_package'.
13412         (single_type_import_declaration:): Removed local variable
13413         `node'. Added missing `;' for consistency.
13414         (type_import_on_demand_declaration:): Use `chainon' to link new
13415         entries.
13416         (lookup_field_wrapper): Lookup local variables defined in outer
13417         contexts first.
13418         (java_complete_class): Don't reverse the list of imported on demand.
13419         (do_resolve_class): Reorganized. Removed local variable
13420         `original_name'. Call `qualify_and_find' with the current package
13421         name, invoke `find_in_imports_on_demand' right after. Call
13422         `qualify_and_find' with the packages we've seen so far. Fixed
13423         operations numbering in comments.
13424         (java_expand_class): Don't reverse `package_list'.
13425         (find_most_specific_methods_list): New local variables `abstract'
13426         and `candidates'. Use them to pick the right method.
13427
13428 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
13429
13430         * parse.y (check_modifiers_consistency): Don't subtract out
13431         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13432
13433 2000-06-04  Philipp Thomas  <pthomas@suse.de>
13434
13435         * Makefile.in (INTLLIBS): New.
13436         (LIBS): Add above.
13437         (DEPLIBS): Ditto.
13438
13439 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13440
13441         * class.c (get_dispatch_table): Build the vtable dummy entry list
13442         element with a null purpose. Fixed leading comment.
13443         (build_dtable_decl): Build an accurate dtable type when appropriate
13444         and use it.
13445
13446 2000-06-02  Richard Henderson  <rth@cygnus.com>
13447
13448         * lang.c (lang_get_alias_set): New.
13449
13450 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13451
13452         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13453         before using it as the accessed field.
13454
13455 2000-05-31  Tom Tromey  <tromey@cygnus.com>
13456
13457         * java-tree.h (boolean_array_vtable, byte_array_vtable,
13458         char_array_vtable, short_array_vtable, int_array_vtable,
13459         long_array_vtable, float_array_vtable, double_array_vtable):
13460         Declare.
13461         * expr.c (get_primitive_array_vtable): New function.
13462         (create_primitive_vtable): New function.
13463         (java_lang_expand_expr): Enable code to statically generate
13464         arrays.
13465         * decl.c (init_decl_processing): Create primitive vtables.
13466         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13467         short_array_vtable, int_array_vtable, long_array_vtable,
13468         float_array_vtable, double_array_vtable): Define.
13469
13470 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
13471
13472         * java/parse.y (find_applicable_accessible_methods_list):
13473         Don't add an uninitialized value to the list.
13474
13475 2000-05-25  Tom Tromey  <tromey@cygnus.com>
13476
13477         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13478         when trying to see if field's class should be initialized.  Always
13479         initialize field's declaring class, not qualified class.
13480         For PR gcj/162.
13481
13482         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13483         `wfl_operator', to maybe_build_primttype_type_ref.
13484         Fixes PR gcj/235.
13485
13486 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
13487
13488         * parse.y (patch_method_invocation): Don't try to lookup methods
13489         in primitive types.
13490
13491 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13492
13493         * parse.y (resolve_field_access): Call the appropriate <clinit>
13494         before accessing the length of a static array. Craft a decl for
13495         the field while its time. Fixes PR gcj/129.
13496
13497 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13498
13499         * parse.y (resolve_package): Correctly set `*next' (was off by
13500         one.)
13501         (resolve_qualified_expression_name): Fixed comment.
13502
13503 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13504
13505         * jcf-parse.c (jcf_parse_source): Reset current_class and
13506         current_function_decl to NULL before parsing a new file.
13507
13508 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13509
13510         * parse.y (block_end:): If the collected block doesn't feature a
13511         statement, insert an empty statement.
13512
13513 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13514
13515         * parse.y (maybe_yank_clinit): New function.
13516         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13517         end of the list of methods belonging to a class.
13518         (java_complete_expand_method): Check whether <clinit> is really
13519         necessary and expand it accordingly.
13520
13521 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13522
13523         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13524         processed by the method's switch statement.
13525
13526 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13527
13528         * java-tree.h: Added init state enum.
13529         * decl.c (emit_init_test_initialization): Initialize class
13530         initialization check variable by looking at class' state.
13531
13532 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13533
13534         * java-tree.h (build_instanceof): Declare.
13535         (build_get_class): Declare.
13536         * parse.y (patch_binop): Use build_instanceof.
13537         * expr.c (build_instanceof): New function.  If class is final,
13538         don't make a function call.
13539         (expand_java_INSTANCEOF): Use it.
13540         (build_get_class): New function.
13541
13542 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
13543
13544         * jcf-write.c (generate_classfile): Scan the source_file for
13545         slashes with the right pointer variable.
13546
13547 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
13548
13549         * lang.c (lang_decode_option): Update -Wunused flags by calling
13550         set_Wunused.
13551         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13552
13553 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13554
13555         * check_init.c (check_init): Constify local char *.
13556         * class.c (push_class): Constify local char *.
13557         * java_tree.h: Update prototypes.
13558         * jcf-io.c (open_class): Constify filename parameter and
13559         return value.
13560         (find_class): Remove redundant string copy.  Cast return from
13561         open_class.
13562         * jcf-parse.c (read_class, parse_class_file, yyparse):
13563         Constify local char *.
13564         * jcf-write.c (generate_bytecode_insns, generate_classfile):
13565         Constify local char *.
13566         * jcf.h (JCF): Constify filename and classname.
13567         (JCF_FINISH): Cast args to FREE to char * when appropriate.
13568         * lang.c (init_parse): Constify parameter and return value.
13569         * lex.c (java_get_line_col): Constify filename parameter.
13570         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
13571         * parse.y (java_parser_context_suspend,
13572         issue_warning_error_from_context, safe_layout_class): Constify
13573         local char *.
13574         * parse.c: Regenerate.
13575
13576 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13577
13578         * expr.c (build_jni_stub): Cache the result of
13579         _Jv_LookupJNIMethod.
13580
13581 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13582
13583         * decl.c (predef_filenames_size): Now 7.
13584         (predef_filenames): New seventh entry.
13585
13586 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13587
13588         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13589         Keep track of when we've seen a reference field after a
13590         non-reference field.
13591         (get_boehm_type_descriptor): Handle case where we see
13592         non-reference fields but no trailing reference field.
13593         * decl.c (rawdata_ptr_type_node): Define.
13594         (init_decl_processing): Initialize rawdata_ptr_type_node.
13595         * java-tree.h (rawdata_ptr_type_node): Declare.
13596
13597 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13598
13599         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13600         specifiers in calls to fprintf.
13601
13602 2000-05-03  Andrew Haley  <aph@cygnus.com>
13603
13604         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13605
13606         * javaop.h (WORD_TO_INT): New function.
13607         (IMMEDIATE_s4): Use WORD_TO_INT.
13608         * jcf.h (JPOOL_INT): Ditto.
13609
13610         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13611         separator.
13612
13613 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13614
13615         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13616         on native function.
13617         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13618         JNI methods.
13619         * expr.c (build_jni_stub): New function.
13620         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13621         * parse.c: Rebuilt.
13622         * parse.y (java_complete_expand_methods): Expand a native method
13623         and call build_jni_stub if -fjni given.
13624         * lang-options.h: Document -fjni.
13625         * lang.c (flag_jni): New global.
13626         (lang_f_options): Added `jni' entry.
13627         * java-tree.h (soft_lookupjnimethod_node,
13628         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13629         Declare.
13630         (flag_jni): Declare.
13631         (build_jni_stub): Declare.
13632         (struct lang_decl): Added `native' flag.
13633         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13634         structure.
13635         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13636         soft_jnipopsystemframe_node): New globals.
13637         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13638         argument.
13639
13640         * java-tree.def: Put into `C' mode.
13641
13642 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13643
13644         Fix for PR gcj/2:
13645         * expr.c (expand_invoke): Generate check to see if object pointer
13646         is null in nonvirtual invocation case.
13647         * java-tree.h (soft_nullpointer_node): Declare.
13648         * decl.c (soft_nullpointer_node): New global.
13649         (init_decl_processing): Initialize soft_nullpointer_node.
13650         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13651         or `private' methods.
13652         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13653
13654 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13655
13656         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13657         from <clinit>
13658
13659 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13660
13661         * zextract.c (find_zip_file_start): New function.
13662         (read_zip_archive): Use it.
13663
13664 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13665
13666         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13667
13668 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13669
13670         * class.c (common_enclosing_context_p): New function.
13671         * java-tree.h (common_enclosing_context_p): Added prototype.
13672         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13673         classes sharing an outer context with the current instance.
13674         * parse.y (build_access_to_thisn): Fixed leading comment.
13675         (verify_constructor_super): New local `supper_inner'. Skip
13676         enclosing context argument in the case of inner class constructors.
13677         (patch_method_invocation): Insert proper context as second
13678         parameter to pure inner class constructor super invocations.
13679
13680 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13681
13682         * parse.y (end_class_declaration): Reset the interface number
13683         counter.
13684
13685 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13686
13687         * parse.y (source_start_java_method): Deleted unnecessary code.
13688         (patch_method_invocation): Fixed comment.
13689
13690 2000-04-24  Robert Lipe <robertlipe@usa.net>
13691
13692         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13693
13694 2000-04-23  Tom Tromey  <tromey@cygnus.com>
13695
13696         * boehm.c (mark_reference_fields): Use int_byte_position.
13697
13698 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13699
13700         * boehm.c (mark_reference_fields): Only call byte_position on
13701         non-static fields.
13702
13703 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13704
13705         * boehm.c (mark_reference_fields): Added `last_view_index'
13706         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
13707
13708 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
13709
13710         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13711         * parse.y (check_class_interface_creation): Fixed comments. Select
13712         permitted modifiers for (inner) interfaces. Changed error message
13713         to report rejected modifiers used with local classes.
13714
13715 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13716
13717         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13718         of directly inherited type considered in scope.
13719         * parse.y (do_resolve_class): Search inherited classes for inner
13720         classes.
13721
13722 2000-04-20  Tom Tromey  <tromey@cygnus.com>
13723
13724         * parse.y (not_accessible_p): Use member's class, not current
13725         class, when doing inheritance check for protected reference.
13726         Fixes PR gcj/124.
13727
13728 2000-04-20  Jason Schroeder  <shrode@subnature.com>
13729
13730         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13731
13732 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13733
13734         * parse.y (lookup_field_wrapper): Search for final local aliases.
13735         (resolve_expression_name): Let lookup_field_wrapper search for
13736         final local aliases. Force the value of `name' if one is found.
13737         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13738         an expression name. Fixed comments.
13739
13740 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13741
13742         * parse.y (yyerror): `msg' can be null, don't use it in that case.
13743
13744 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13745
13746         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13747
13748 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13749
13750         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13751
13752 2000-04-18  Tom Tromey  <tromey@cygnus.com>
13753
13754         PR gcj/211:
13755         * gjavah.c (utf8_cmp): Changed return value.
13756         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
13757         result.
13758         (cxx_keywords): New global.
13759         (get_field_name): Handle new result of cxx_keyword_subst.
13760         (print_method_info): Likewise.
13761
13762 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
13763
13764         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13765         with a newline, for CNI.
13766         (print_stub_or_jni): Print a space or newline before method name for
13767         CNI as well as JNI.
13768         (print_cxx_classname): Don't write leading "::" in CNI stub method.
13769         (process_file): Include gcj/cni.h if generating CNI stubs.
13770
13771 2000-04-16  Tom Tromey  <tromey@cygnus.com>
13772
13773         * gjavah.c (decompile_method): Use print_field_name.
13774         Fixes PR gcj/205.
13775
13776 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13777
13778         * parse.y (java_expand_classes): Reverse the package list once.
13779         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13780         reduction.
13781         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13782         the `==' and `!=' operators.
13783
13784 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13785
13786         * jcf-write.c (generate_bytecode_insns): At invocation time,
13787         always relate an interface method to the type of its selector.
13788
13789 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13790
13791         Fix for PR gcj/2:
13792         * expr.c (expand_invoke): Generate check to see if object pointer
13793         is null in nonvirtual invocation case.
13794         * java-tree.h (soft_nullpointer_node): Declare.
13795         * decl.c (soft_nullpointer_node): New global.
13796         (init_decl_processing): Initialize soft_nullpointer_node.
13797         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13798         or `private' methods.
13799         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13800
13801 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13802
13803         Fix for PR gcj/140:
13804         * parse.y (check_final_assignment): Recognize assignments to the
13805         `length' field of an array when generating class files.
13806
13807 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13808
13809         * class.c (decl_hash): Prototype removed.
13810         (decl_compare): Likewise.
13811
13812 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13813
13814         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13815         * parse.y (check_modifiers_consistency): Check for final/volatile
13816         clash.  Fixes PR gcj/164.
13817
13818 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13819
13820         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13821         made global.
13822         (java_hash_compare_tree_node): Renamed from `decl_compare, made
13823         global.
13824         (add_method_1): Use `java_hash_hash_tree_node' and
13825         `java_hash_compare_tree_node'.
13826         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13827         (java_hash_compare_tree_node): Likewise.
13828         * parse.y (find_applicable_accessible_methods_list): Create,
13829         delete and use a hash table to remember already searched interfaces.
13830
13831 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
13832
13833         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13834         with latest entry.
13835
13836 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13837
13838         * boehm.c (mark_reference_fields, set_bit): Prototype.
13839         (set_bit): Un-ANSI-fy definition.
13840
13841         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13842         Prototype.
13843
13844         * decl.c (emit_init_test_initialization): Likewise.
13845
13846         * gjavah.c (jni_print_char): Likewise.
13847
13848         * parse.y (create_new_parser_context): Likewise.
13849
13850 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13851
13852         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13853         patch missing hunk. Fixed indentation.
13854
13855 2000-03-30  Tom Tromey  <tromey@cygnus.com>
13856
13857         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13858         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13859
13860 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13861
13862         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13863         when negative *before* using it as an array index.
13864         * ChangeLog: Fixed typo.
13865
13866 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13867
13868         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13869         to 0 when it reaches -1.
13870
13871 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13872
13873         * jcf-parse.c (get_constant): Properly cast `num' during the
13874         invocation of `add_double'.
13875         * jcf-write.c (push_long_const): Properly cast `lo' before
13876         comparing it to short bounds.
13877         * parse-scan.y (interface_declaration:): Rule re-arrange so that
13878         `interface_body:' is reduced after the current interface is
13879         pushed.
13880
13881 2000-03-26  Tom Tromey  <tromey@cygnus.com>
13882
13883         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13884         Java-specific `-f' option.
13885
13886 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13887
13888         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13889         Adjust order of making types.
13890         Make bitsize_*_node values.
13891
13892 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13893
13894         * class.c (make_field_value): Use byte_position.
13895         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13896         (java_array_data_offset): Likewise.
13897         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13898         bzero call.
13899
13900 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13901
13902         * parse.y (check_abstract_method_definitions): New local
13903         `end_type_reached'. Make sure we also consider `end_type'.
13904         (java_check_abstract_method_definitions): Make sure we eventually
13905         consider `java.lang.Object'.
13906         (maybe_use_access_method): Don't use access method if not in the
13907         context of a pure inner class or if the method's context is right.
13908         (find_applicable_accessible_methods_list): New static flag
13909         `object_done'. Don't search abstract classes as interfaces. Fixed
13910         indentation. Fixed the `java.lang.Object' only search. Search
13911         class interface(s) first, then fully search enclosing contexts.
13912         (find_most_specific_methods_list): Pick the closest candidate when
13913         they're all abstract.
13914
13915 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13916
13917         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13918         properly initialize `finished_label'. Don't emit gotos for empty
13919         try statements.
13920
13921 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13922
13923         * except.c (emit_handlers): Clear catch_clauses_last.
13924
13925 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13926
13927         * parse.y (check_method_types_complete): New function.
13928         (create_class): Reset anonymous class counter only when seeing an
13929         non inner classe.
13930         (java_complete_class): JDEP_METHOD: Don't recompute signature
13931         if incomplete.
13932
13933 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13934
13935         * class.c (build_static_ref): Fixed indentation in comment.
13936         * java-tree.def (TRY_EXPR): Fixed typo in name.
13937         (CLASS_LITERAL): Likewise.
13938         * java-tree.h: (TYPE_DOT_CLASS): New macro.
13939         (struct lang_type): New field `dot_class'.
13940         * jcf-write.c (generate_bytecode_insns): Fixed error message.
13941         (generate_classfile): Method `class$' is synthetic.
13942         * parse.y (build_do_class_method): New function.
13943         (build_dot_class_method_invocation): Likewise.
13944         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13945         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13946         (qualify_ambiguous_name): Likewise.
13947         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13948         (build_try_statement): Fixed leading comment.
13949
13950 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13951
13952         * class.c (make_field_value): Properly handle sizes.
13953         (get_dispatch_vector): Use tree_low_cst and host_integerp.
13954         (layout_class_method): Count using trees.
13955         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13956         * expr.c (java_array_data_offset): Use int_bit_position.
13957         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13958         (build_invokevirtual): Use tree_low_cst and do computations with trees.
13959
13960 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13961
13962         * lang.c (flag_hash_synchronization): New global.
13963         (lang_f_options): Added `hash-synchronization'.
13964         * lang-options.h: Mention -fhash-synchronization.
13965         * java-tree.h (flag_hash_synchronization): Declare.
13966         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13967         hash table synchronization is disabled.
13968         * decl.c (init_decl_processing): Only push `sync_info' value when
13969         hash table synchronization is disabled.
13970         * class.c (make_class_data): Only push `sync_info' field when hash
13971         table synchronization is disabled.  Removed dead code.
13972
13973 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13974
13975         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13976
13977 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13978
13979         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13980         classes.
13981         * parse.y (patch_method_invocation): Handle anonymous classes
13982         creation in static context.
13983
13984 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13985
13986         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13987         * parse.y (resolve_qualified_expression_name): Use it.
13988         (patch_method_invocation): Likewise.
13989
13990 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13991
13992         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
13993         depending on the type of dependency which dictates what the
13994         current class is.
13995         (unresolved_type_p): Resolved types limited to the current class.
13996
13997 2000-03-15  Tom Tromey  <tromey@cygnus.com>
13998
13999         * decl.c (init_decl_processing): Set type of `sync_info' to be
14000         pointer to Object.
14001
14002         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14003         Correctly compute bit number for current slot.  Zero `high' and
14004         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
14005         mark_reference_fields.
14006         (mark_reference_fields): New function.
14007
14008 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14009
14010         * parse.y (register_incomplete_type): Fixed initialization of
14011         JDEP_ENCLOSING.
14012
14013 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14014
14015         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14016         static globals.
14017         (push_class_context, pop_class_context): New function.
14018         (class_body:): Call pop_class_context.
14019         (interface_body:): Likewise.
14020         (INNER_QUALIFIER): New macro.
14021         (report_class_declaration): Changed output format and use
14022         INNER_QUALIFIER. Call push_class_context.
14023
14024 2000-02-14  Andrew Haley  <aph@cygnus.com>
14025
14026         * check-init.c (check_init): Add new cases for unary and binary
14027         tree nodes.
14028
14029 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14030
14031         * parse.y (resolve_package): Set `next' once a type name has been
14032         progressively discovered.
14033         (resolve_qualified_expression_name): Propagate resolution only if
14034         there are remaining qualifiers. Take into account `q' might have
14035         been cleared after re-qualification.
14036         * parse.y (patch_method_invocation): New local `resolved'.
14037         Section dealing with qualified expression rewritten to use
14038         resolve_field_access.
14039
14040 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14041
14042         * parse.h (PUSH_CPC): Fixed indentation.
14043         (DEBUG_CPC): New macro.
14044         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14045         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14046         * parse.y (class_body_declaration:): Use
14047         SET_CPC_INSTANCE_INITIALIZER_STMT.
14048         (method_declaration:): Check for null current_function_decl.
14049         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14050         (java_parser_context_pop_initialized_field): Better handling of
14051         empty lists.
14052         (maybe_make_nested_class_name): Mark nested class name as
14053         qualified when necessary.
14054         (end_class_declaration): Don't call java_parse_context_resume when
14055         one or more error occurred.
14056         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14057         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14058         SET_CPC_INITIALIZER_STMT.
14059         (method_header): Check for inner classes declaring static methods.
14060         (resolve_qualified_expression_name): Handle situation where `this'
14061         is implied.
14062
14063 2000-03-13  Hans Boehm <boehm@acm.org>
14064
14065         * typeck.c (build_prim_array_type): Correctly set the high word too.
14066
14067 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14068
14069         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14070         ordinary methods.
14071         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14072         list of methods for interfaces.
14073
14074 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14075
14076         * parse.y (qualify_ambiguous_name): Properly handle expressions
14077         using `null'.
14078
14079 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14080
14081         * parse.y (check_final_assignment): Extended to process
14082         COMPOUND_EXPR.
14083         (patch_assignment): Have check_final_assignment called only once.
14084
14085 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14086
14087         * java-tree.h (IS_INIT_CHECKED): New flag.
14088         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14089         * parse.y (patch_string): Call force_evaluation_order on the
14090         completed string concatenation tree.
14091         * expr.c (force_evaluation_order): Call force_evaluation_order on
14092         function's arguments too.
14093
14094 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14095
14096         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14097         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14098         (build_anewarray): Likewise.
14099         * parse.y (patch_newarray): Likewise.
14100         * parse.c: Regenerated.
14101
14102 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14103
14104         * decl.c (init_decl_processing): Added new class fields `depth',
14105         `ancestors', and `idt' to class_type_node. Use
14106         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14107         * class.c (make_class_data): Push initial values for new fields.
14108         * java-tree.h: Updated prototype for `build_invokeinterface'.
14109         * expr.c (build_invokeinterface): Changed parameters to accept
14110         `method' tree. Calculate index of `method' in its declaring
14111         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14112         (expand_invoke): Call `build_invokeinterface' with new parameters.
14113         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14114         parameters.
14115
14116 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14117
14118         * typeck.c (lookup_do): Search superinterfaces first
14119         when looking up an interface method. From Godmar Back
14120         <gback@cs.utah.edu>
14121
14122 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14123
14124         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14125
14126 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14127
14128         * java-tree.h (lookup_argument_method2): Declared.
14129         (safe_layout_class): Prototype moved from parse.h.
14130         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14131         * parse.y (java_check_regular_methods): Local `super_class' gone.
14132         Call lookup_argument_method2 instead of lookup_argument_method.
14133         Perform modifier match for methods found declared in implemented
14134         interfaces. Fixed indentation problem. Overriding/hiding error
14135         report to take place only for methods found in classes.
14136         * typeck.c (lookup_argument_method): Changed leading
14137         comment. Re-written by calling lookup_do.
14138         (lookup_argument_method2): New function.
14139         (lookup_java_method): Re-written by calling lookup_do.
14140         (lookup_do): New function.
14141
14142 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14143
14144         * check-init.c (check_init): Removed dead code. Handle (blank)
14145         final variables.
14146         * parse.y (declare_local_variables): New local `final_p', set it
14147         and use it to initialize LOCAL_FINAL.
14148         (check_final_assignment): Only check FIELD_DECLs.
14149
14150 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14151
14152         * Makefile.in (JAVA_OBJS): Added boehm.o.
14153         (boehm.o): New target.
14154         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14155         * java-tree.h (flag_use_boehm_gc): Declare.
14156         (get_boehm_type_descriptor): Declare.
14157         * lang.c (lang_f_options): Added `use-boehm-gc'.
14158         (flag_use_boehm_gc): New global.
14159         * lang-options.h: Added -fuse-boehm-gc.
14160         * boehm.c: New file.
14161         * class.c (get_dispatch_table): If class uses a Boehm type
14162         descriptor, put it in the vtable.
14163         (make_class_data): Removed dead code.
14164
14165 2000-03-03  Per Bothner  <per@bothner.com>
14166
14167         * decl.c (init_decl_processing):  Initialize sizetype properly.
14168
14169 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14170
14171         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14172         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14173         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14174         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14175         (jcf_parse): New local `current'. Load innerclasses seen in outer
14176         context being processed.
14177         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14178         * jcf-write.c (append_innerclasses_attribute): New function.
14179         (append_innerclasses_attribute_entry): Likewise.
14180         (get_access_flags): Handle static classes. Set anonymous and local
14181         classes to be private.
14182         (generate_classfile): Attribute count adjusted. Call
14183         append_innerclasses_attribute.
14184         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14185         PURE_INNER_CLASS_TYPE_P.
14186         * parse.y (parser_qualified_classname): New parameter `is_static',
14187         produce non qualified name accordingly.
14188         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14189         (create_interface): Added argument to parser_qualified_classname.
14190         (create_class): Added argument to parser_qualified_classname. Setup
14191         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14192         (add_inner_class_fields): Fixed indentation.
14193         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14194         (method_declarator): Fixed typo in comment.
14195         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14196         (build_current_thisn): Likewise.
14197         (patch_method_invocation): Likewise.
14198
14199 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14200
14201         * decl.c (current_function_decl): Move to toplev.c.
14202
14203 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14204
14205         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14206         (DECL_BIT_INDEX): Use underlying representation.
14207         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14208
14209 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14210
14211         * expr.c (build_java_ret): Pass proper type to size_binop.
14212
14213 2000-02-25  Anthony Green  <green@cygnus.com>
14214
14215         * expr.c (build_class_init): Mark the decl to be ignored by
14216         check_init.
14217         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14218         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14219         * class.c (init_test_hash_newfunc): New function.
14220         (decl_hash): New function.
14221         (decl_compare): New function.
14222         * decl.c (emit_init_test_initialization): New function.
14223         (complete_start_java_method): Traverse the init test hashtable,
14224         calling emit_init_test_initialization.
14225         (always_initialize_class_p): Define.
14226         * expr.c (build_class_init): Use initialization tests when
14227         emitting class initialization code.
14228         (always_initialize_class_p): Declare.
14229         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14230         1.
14231         * java-tree.h: Include hash.h.
14232         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14233         (struct lang_decl): Add init_test_table field.
14234         (init_test_hash_entry): Define.
14235
14236 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14237
14238         * gjavah.c (main): Avoid using `argi' to report unimplemented
14239         options.
14240
14241 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14242
14243         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14244         initialize locals to avoid warnings. Local `exception_type' moved
14245         into if statement.
14246
14247 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14248
14249         * parse.y (resolve_expression_name): Use `orig' as a second
14250         argument to resolve_field_access.
14251         (resolve_field_access): Removed unnecessary code when dealing with
14252         static fields.
14253
14254 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14255
14256         * class.c (push_super_field): Don't push the field twice.
14257         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14258         * parse.h (java_reorder_fields): Prototyped.
14259         * parse.y (java_reorder_fields): New function.
14260         (java_layout_class): Simplified not to worry about re-ordering.
14261
14262 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14263
14264         * gjavah.c (print_name): In JNI case, correctly quote string.
14265         (print_method_info): Don't handle overrides in JNI mode.
14266
14267 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14268
14269         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14270         value type set to `boolean_type_node'.
14271
14272 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14273
14274         * jcf-dump.c (main): Test for correct condition after
14275         output file creation.
14276
14277 2000-02-19  Anthony Green  <green@cygnus.com>
14278
14279         * jcf-depend.c (add_entry): Fix test for first list entry.
14280
14281 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14282
14283         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14284         * constants.c (build_constants_constructor): Likewise.
14285
14286 2000-02-19  Anthony Green  <green@cygnus.com>
14287
14288         * jcf-depend.c (add_entry): Add entries to the end of the list.
14289
14290 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14291
14292         * decl.c (INT_TYPE_SIZE): Define if necessary.
14293         (expand_java_return): Handle the case of a native integer smaller
14294         than a JVM integer.
14295
14296 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14297
14298         * gjavah.c (help): Use GCCBUGURL.
14299         * jv-scan.c (help): Likewise.
14300         * jcf-dump.c (help): Likewise.
14301
14302 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14303
14304         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14305         `finally' clauses.
14306
14307 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14308
14309         * jcf-parse.c (load_class): Call `fatal' if no file containing
14310         the target class are found.
14311
14312 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14313
14314         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14315         lex.c, lex.h, and PARSE_H to...
14316         (parse.o, parse-scan.o): ...here, respectively.
14317
14318         * lex.c: Split out code that may trigger SIGFPE from yylex()
14319         to its own function.
14320         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14321
14322 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14323
14324         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14325
14326 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14327
14328         * parse.y (outer_field_access_p): Stop in time when outer contexts
14329         are exhausted.
14330         (resolve_qualified_expression_name): Properly qualify *everything*
14331         after a package.type to be resoled as expression names.
14332         (find_applicable_accessible_methods_list): Save/restore `class' to
14333         isolate it from a possible outer context search.
14334
14335 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14336
14337         * gjavah.c (jni_print_char): New function.
14338         (print_full_cxx_name): Use it.
14339         (decode_signature_piece): Likewise.
14340         (print_cxx_classname): Likewise.
14341
14342 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14343
14344         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14345         version.o.
14346         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14347
14348         * gjavah.c: Include version.h.
14349
14350         * jcf-dump.c: Likewise.
14351
14352         * jv-scan.c: Likewise.
14353
14354 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14355
14356         * parse.y (outer_field_access_fix): First parameter now a tree
14357         node. Check for assignment to final. First argument to
14358         build_outer_field_access_fix modified to accommodate prototype.
14359         (build_outer_field_access): Don't check for assignment to final
14360         here.
14361         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14362         possibly returned by outer_field_access_fix. Changed
14363         outer_field_access_fix's first argument.
14364         (check_final_assignment): $finit$'s context is OK.
14365         (patch_unaryop): Use node instead of its line/column value when
14366         calling outer_field_access_fix.
14367
14368 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14369
14370         * parse.y (interface_declaration:): No longer tagged
14371         <node>. Re-installed default action.
14372         (class_member_declaration:): Handle inner interfaces.
14373         (interface_member_declaration): Handle inner interfaces and
14374         classes.
14375         (create_interface): Push error if one seen. Suspend parsing
14376         context when processing an inner interface.
14377         (register_fields): Inner class static field limitations not to
14378         apply to inner interfaces.
14379
14380 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14381
14382         * jcf-parse.c (load_class): Update `java_error_count' when a
14383         class' file can't be found.
14384         (parse.y): Avoid (byte)code generation when errors seen.
14385
14386 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14387
14388         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14389         decodes a valid node.
14390         (patch_binop): Handle TRUNC_DIV_EXPR.
14391
14392 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14393
14394         * parse.y (resolve_package): New local `acc'. Try to progressively
14395         build and guess a package and type name.
14396
14397 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14398
14399         * parse.y (find_applicable_accessible_methods_list): Load and
14400         layout the search class if necessary.
14401         (java_complete_tree): Keep to original type of the folded initial
14402         value.
14403
14404 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14405
14406         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14407         Generate error message if circularity is detected. New static
14408         local `list'.
14409         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
14410         * jcf-write.c (generate_bytecode_insns): Very simply handle
14411         SAVE_EXPR.
14412         * parse.y (java_check_circular_reference): Use
14413         `cyclic_inheritance_report' during report, if necessary.
14414         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14415         walking NEW_ARRAY_INIT twice.
14416
14417 2000-02-09  Tom Tromey  <tromey@cygnus.com>
14418
14419         * parse.y (check_class_interface_creation): Allow inner classes to
14420         be `private' or `protected', check modifiers' consistency. Prevent
14421         block local classes from bearing any modifiers.
14422
14423 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14424
14425         * except.c (check_start_handlers): Re-add prototype lost in last
14426         patch.
14427         (maybe_start_try): Remove excess argument to `check_start_handlers'.
14428
14429 2000-02-09  Andrew Haley  <aph@cygnus.com>
14430
14431         * decl.c (clear_binding_level): Remove excess initializer.
14432         (maybe_poplevels): Remove unused variable.
14433         (force_poplevels): Ditto.
14434         (struct binding_level): Add comment.
14435
14436 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14437
14438         * jcf-write.c (generate_classfile): Don't consider
14439         pre-initialization with reference value (use <clinit> instead.)
14440         * parse.y (java_fix_constructors): No generated constructor for
14441         interfaces.
14442         (build_outer_field_access): Removed debug message.
14443         (outer_field_expanded_access_p): Adapted to bytecode generation.
14444         (build_outer_field_access_method): Use fix_method_argument_names.
14445         (build_outer_method_access_method): Fixed indentation. Added
14446         comment. Handle access method generation for static and also void
14447         methods.
14448         (build_access_to_thisn): Inserted debug message.
14449         (maybe_build_thisn_access_method): Use fix_method_argument_names.
14450         (resolve_qualified_expression_name): Fixed comment.
14451         (not_accessible_p): Adapted to bytecode generation. Added comment.
14452         (patch_method_invocation): Added comment.
14453         (maybe_use_access_method): Fixed leading comment. Handle static
14454         methods.
14455         (java_complete_lhs): Don't shortcut handling of initialized upon
14456         declaration String type static fields when generating bytecode.
14457         (patch_unaryop): Handle outer field access when generating
14458         bytecode.
14459
14460 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14461
14462         * java-tree.h (FIELD_THISN): New macro.
14463         * jcf-write.c (append_synthetic_attribute): New function.
14464         (generate_classfile): Set "Synthetic" attribute on this$<n>,
14465         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14466         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14467         this$<n> fields.
14468         (build_outer_field_access): Turned on access functions usage and
14469         generation when compiling to bytecode.
14470         (maybe_use_access_method): Likewise.
14471
14472 2000-01-25  Andrew Haley  <aph@cygnus.com>
14473
14474         * java-except.h (struct eh_range): Add `expanded' field.
14475         (maybe_start_try): Add end_pc arg.
14476         (maybe_end_try): Ditto.
14477         * java-tree.h (force_poplevels): new function.
14478         * expr.c (expand_byte_code): Don't call maybe_start_try or
14479         maybe_end_try.
14480         * except.c (add_handler): Reset expanded.
14481         (expand_start_java_handler): Set expanded.
14482         (check_start_handlers): Don't expand a start handler that's
14483         already been expanded.
14484         (maybe_start_try): Add end_pc arg.  Only expand a handler which
14485         ends after end_pc.
14486         (expand_end_java_handler): call force_poplevels.
14487         (force_poplevels): new function.
14488         * decl.c (binding_level): Add start_pc of binding level.
14489         (maybe_pushlevels): Call maybe_start_try when pushing binding
14490         levels.
14491         (maybe_poplevels): Call maybe_end_try when popping binding levels.
14492         (LARGEST_PC): Define.
14493         (clear_binding_level): Use LARGEST_PC.
14494
14495         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14496         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14497         (binding_depth, is_class_level, current_pc): new variables.
14498         (struct binding_level): ditto.
14499         (indent): new function.
14500         (push_jvm_slot): add debugging info.
14501         (maybe_pushlevels): ditto.
14502         (maybe_poplevels): ditto.
14503         (pushlevel): ditto.
14504         (poplevel): ditto.
14505         (start_java_method): ditto.
14506         (give_name_to_locals): comment only.
14507         * except.c (binding_depth, is_class_level, current_pc):
14508         new variables.
14509         (expand_start_java_handler): add debugging info.
14510         (expand_end_java_handler): ditto.
14511
14512 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14513
14514         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14515         (print_name_for_stub_or_jni, process_file): Constify a char*.
14516
14517 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14518
14519         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14520
14521 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14522
14523         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14524         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14525         defined to be 1.
14526
14527 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14528
14529         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14530         * java-tree.h (TYPE_II_STMT_LIST): New macro.
14531         (struct lang_type): New field `ii_block'.
14532         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14533         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14534         * parse.h (struct parser_ctxt): New field `instance_initializers'.
14535         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14536         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14537         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14538         macros.
14539         * parse.y (add_instance_initializer): New function.
14540         (in_instance_initializer): New static global.
14541         (class_body_declaration:): Link instance initializer block.
14542         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14543         (array_creation_expression:): Remove unused local.
14544         (java_parser_context_push_initialized_field): Fixed leading
14545         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14546         CPC_INSTANCE_INITIALIZER_LIST.
14547         (java_parser_context_pop_initialized_field): Likewise.
14548         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14549         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14550         CPC_INITIALIZER_STMT.
14551         (fix_constructors): New local `class_type'. Use it. Call
14552         add_instance_initializer.
14553         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14554         (patch_return): Forbid return in instance initializers.
14555         (patch_throw_statement): Enforce exception handling in the context
14556         of instance initializers.
14557
14558 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14559
14560         * Make-lang.in (java.mostlyclean): Remove executables in
14561         `mostlyclean'.
14562
14563 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14564
14565         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14566         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14567         (java_float_finite): Convert to use union Word from javaop.h.
14568         (java_double_finite): Convert to use union DWord from javaop.h.
14569
14570 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14571
14572         * gjavah.c (options): Added `jni' entry.
14573         (help): Document -jni.
14574         (flag_jni): New global.
14575         (process_file): Handle JNI output.  Don't print text from
14576         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14577         suffix if it actually exists.
14578         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14579         correct output file name with `--jni'.
14580         (print_include): Mangle header name differently in JNI case.
14581         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14582         method list.
14583         (print_method_info): Handle JNI case.  Put signature info into
14584         method name.  Handle case when STREAM is NULL.
14585         (print_name_for_stub_or_jni): New function.
14586         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14587         (print_cxx_classname): Handle JNI.
14588         (print_full_cxx_name): Likewise.
14589         (decode_signature_piece): Likewise.
14590         (overloaded_jni_method_exists_p): New function.
14591         (struct method_name): Added `signature' and `sig_length' fields.
14592         (HANDLE_END_FIELD): Do nothing in JNI mode.
14593
14594 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14595
14596         * jv-scan.c: Include version.c, <getopt.h>.
14597         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14598         (options): New array.
14599         (usage): New function.
14600         (version): New function.
14601         (main): Use getopt_long to parse command line.
14602         * jcf-dump.c: Include version.c, <getopt.h>.
14603         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14604         OPT_JAVAP): New macros.
14605         (options): New array.
14606         (usage): Return `void'.  Changed message.
14607         (help): New function.
14608         (version): New function.
14609         (main): Use getopt_long_only to parse command line.
14610         * gjavah.c: Include <getopt.h>.
14611         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14612         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14613         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14614         (options): New array.
14615         (java_no_argument): Removed.
14616         (help): Updated with missing options.
14617         (main): Use getopt_long_only to parse command line.
14618         (usage): Changed message.
14619
14620 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14621
14622         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14623         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14624         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14625         * parse.y (array_creation_expression:): Handle anonymous arrays.
14626         (build_array_from_name): Don't set `ret_name' if null.
14627         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14628         (qualify_ambiguous_name): Likewise.
14629         (java_complete_expand_class): Likewise.
14630
14631 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14632
14633         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14634         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14635         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14636         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14637         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14638         AIPL_FUNCTION_COMPLETED_INVOCATION.
14639         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14640         AIPL_FUNCTION_INVOCATION_READY.
14641         (AIPL_FUNCTION_DECLARATION): New enum entry.
14642         * parse.y (reorder_static_initialized): New function.
14643         (java_parser_context_pop_initialized_field): Use it.
14644         (add_inner_class_fields): Use
14645         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14646         augmented. Install marker after last alias initializer, if any.
14647         (generate_finit): Fixed typo. Don't try to retain only the used
14648         fields.
14649         (method_header): Compute and set DECL_FUNCTION_NAP.
14650         (method_declarator): Fixed comment. Insert alias initializer in
14651         parameter list.
14652         (build_alias_initializer_parameter_list): Fixed leading
14653         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14654         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14655         (java_complete_expand_class): Code to retain only used aliases
14656         removed.
14657         (java_complete_expand_methods): New local `first_decl'. Generate
14658         $finit$ first, then expand the constructors, regular methods and
14659         <clinit>.
14660         (java_complete_expand_method): Don't report error on missing
14661         return statement if previously detected bogus.
14662         (fix_constructors): Don't patch constructor parameters list.
14663         (patch_method_invocation): Use new AIPL enum values. Reverse
14664         alias initializer list for anonymous classes.
14665
14666 2000-01-30  Anthony Green  <green@redhat.com>
14667
14668         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14669         determine how many stack slots to pop.
14670
14671 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14672
14673         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14674         error handling/recovery.
14675         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14676
14677 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14678
14679         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14680         FIELD_LOCAL_ALIAS_USED): New macros.
14681         (DECL_FUNCTION_NAP): New macro.
14682         (struct lang_decl): New field `nap'.
14683         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14684         (struct lang_type): New fields `finit_stmt_list' and
14685         `clinit_stmt_list'.
14686         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14687         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14688         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14689         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14690         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14691         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14692         (BUILD_THROW): Macro line separator re-indented.
14693         * parse.y (end_class_declaration): New function.
14694         (maybe_generate_pre_expand_clinit): New name for
14695         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14696         pre-expand static fields.
14697         (maybe_generate_clinit): Function deleted.
14698         (check_for_static_method_reference): Prototype's parameter list
14699         indented.
14700         (generate_finit): New name for maybe_generate_finit. Changed
14701         leading comment. Function rewritten to use
14702         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14703         (build_alias_initializer_parameter_list): New function.
14704         (java_parser_context_pop_initialized_field): Likewise.
14705         (add_inner_class_fields): Likewise.
14706         (type_declaration:): Call end_class_declaration.
14707         (class_member_declaration:): Likewise.
14708         (formal_parameter_list:): Fixed typos.
14709         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14710         element. Improved error handling.
14711         (block_statement:): Call end_class_declaration.
14712         (anonymous_class_creation:): Likewise.
14713         (create_anonymous_class): Fixed comments.
14714         (create_class): Call add_inner_class_fields.
14715         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14716         (method_header): Use MARK_FINAL_PARMS.
14717         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14718         (method_declarator): Propagate final argument flag.
14719         (craft_constructor): New local `artificial'. Call
14720         build_alias_initializer_parameter_list. Use
14721         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14722         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14723         necessary.
14724         (complete_expand_class): Get rid of unused outer context local
14725         alias fields.
14726         (java_complete_expand_methods): Fixed leading
14727         comment. Generate/pre-expand <clinit> first. Changed method
14728         expansion order to regular, $finit$, constructors, <clinit>.
14729         (java_complete_expand_method): Set current_function_decl.
14730         (fix_constructors): Fix constructor parameter list to account for
14731         outer context local alias initializers.
14732         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14733         (resolve_expression_name): Lookup outer context local aliases. New
14734         local `access', use it.
14735         (patch_method_invocation): Patch inner class ctor invocation with
14736         outer context local aliases initialization values. $finit$
14737         invocation patching now includes things generated with
14738         build_alias_initializer_parameter_list.
14739         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14740         (build_super_invocation): Likewise.
14741         (patch_assignment): Changed comment.
14742
14743 2000-01-27  Andrew Haley  <aph@cygnus.com>
14744
14745         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14746         (emit_if): Ditto.
14747         (emit_jsr): Ditto.
14748
14749 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14750
14751         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14752         concatenation.
14753         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14754
14755         * parse.y (register_fields): Don't pass a format specifier to
14756         OBSOLETE_MODIFIER_WARNING.
14757         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14758         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14759         specifier.
14760         (check_modifiers): Change function into a macro.
14761         (check_class_interface_creation): Pass a literal format string.
14762
14763 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14764
14765         * buffer.h: PROTO -> PARAMS.
14766         * check-init.c: Likewise.
14767         * class.c: Likewise.
14768         * constants.c: Likewise.
14769         * convert.h: Likewise.
14770         * decl.c: Likewise.
14771         * except.c: Likewise.
14772         * expr.c: Likewise.
14773         * gjavah.c: Likewise.
14774         * java-except.h: Likewise.
14775         * java-tree.h: Likewise.
14776         * jcf-depend.c: Likewise.
14777         * jcf-dump.c: Likewise.
14778         * jcf-parse.c: Likewise.
14779         * jcf-path.c: Likewise.
14780         * jcf-reader.c: Likewise.
14781         * jcf-write.c: Likewise.
14782         * jcf.h: Likewise.
14783         * jv-scan.c: Likewise.
14784         * jvgenmain.c: Likewise.
14785         * jvspec.c: Likewise.
14786         * lang.c: Likewise.
14787         * lex.c: Likewise.
14788         * lex.h: Likewise.
14789         * parse-scan.y: Likewise.
14790         * parse.h: Likewise.
14791         * parse.y: Likewise.
14792         * typeck.c: Likewise.
14793         * verify.c: Likewise.
14794         * xref.c: Likewise.
14795         * xref.h: Likewise.
14796         * zextract.c: Likewise.
14797         * zipfile.h: Likewise.
14798
14799 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14800
14801         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14802         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14803         * constants.c (build_constant_data_ref): Check for cached
14804         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14805         in TYPE_CPOOL_DATE_REF.
14806         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14807         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14808         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14809         (LOCAL_FINAL): New macro.
14810         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14811         constant pool -- don't try to reuse.
14812         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14813         TYPE_LANG_SPECIFIC.
14814         (find_in_current_zip): Use TYPE_JCF.
14815         * parse.h (java_check_final): Prototype removed.
14816         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14817         (maybe_create_class_interface_decl,
14818         check_class_interface_creation): Likewise.
14819         (java_expand_finals): Function removed.
14820         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14821         (block_statement:): Fixed comment.
14822         (anonymous_class_creation:): Likewise.
14823         (check_class_interface_creation): Reversed Jan 12, 2000 extra
14824         argument patch.
14825         (check_class_interface_creation): Loosened error report on (inner)
14826         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14827         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14828         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14829         argument patch.
14830         (create_interface): Likewise.
14831         (anonymous_class_counter): New static global.
14832         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14833         patch. Fixed comments.
14834         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14835         anonymous_class_counter when declaring a toplevel class.
14836         (craft_constructor): Fixed constructor name when handling
14837         anonymous classes. Anonymous class constructors to feature hidden
14838         this$<n> parameter.
14839         (java_fix_constructors): Added comment.
14840         (java_check_final): Function removed.
14841         (java_complete_expand_methods): Fixed comment. Don't generate
14842         class data, save its outgoing constant pool instead.
14843         (verify_constructor_super): Skip anonymous class constructor
14844         hidden this$<n> parameter.
14845         (java_expand_classes): New local `saved_ctxp'. Removed call to
14846         java_expand_finals and java_check_final. Expand anonymous class
14847         constructors. Generate class data.
14848         (build_super_invocation): Skip anonymous class hidden this$<n>
14849         parameter.
14850         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14851         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14852         (set_java_signature): Likewise.
14853
14854 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14855
14856         * gjavah.c: Delete ACC_VISIBILITY define.
14857         * jcf.h: Add ACC_VISIBILITY define.
14858         * parse.y: final: rule tagged <value>.
14859         (java_check_regular_methods): Use ACC_VISIBILITY define for
14860         default package access check.
14861         (local_variable_declaration_statement): Use final: rule.
14862
14863 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14864
14865         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14866         (final:): New rule.
14867
14868 2000-01-17  Tom Tromey  <tromey@cygnus.com>
14869
14870         * gjavah.c (print_field_info): Allow non-static final fields.
14871
14872 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14873
14874         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14875         * parse.y (patch_anonymous_class): New function.
14876         (create_anonymous_class): Register incomplete type when the
14877         class/interface to extends/implement isn't known yet.
14878         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14879         (verify_constructor_super): Tuned error message.
14880
14881 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14882
14883         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14884         (ANONYMOUS_CLASS_P): New macro.
14885         (TYPE_SIGNATURE, TYPE_JCF): New macros.
14886         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14887         * parse.y (create_class): Added leading argument.
14888         (maybe_create_class_interface_decl,
14889         check_class_interface_creation): Likewise.
14890         (craft_constructor): New function.
14891         (verify_constructor_super): Added argument in prototype.
14892         (class_declaration:): Inserted leading argument.
14893         (for_begin:): Use FOR_LOOP_P.
14894         (anonymous_class_creation): Create WFL of the anonymous class to
14895         instantiate. Call build_new_invocation. Added comments.
14896         (check_class_interface_creation): Handle parameter `anonymous' in
14897         verbose mode class creation announce.
14898         (link_nested_class_to_enclosing): Exclude anonymous classes.
14899         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14900         anonymous class, even though they appear to have an enclosing
14901         context.
14902         (create_interface): Pass extra argument to
14903         check_class_interface_creation.
14904         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14905         (create_class): Call check_class_interface_creation and
14906         maybe_create_class_interface_decl with extra new argument. Don't
14907         add private this$<n> to anonymous classes.
14908         (method_declarator): Insert hidden this$<n> to anonymous class
14909         constructors.
14910         (java_fix_constructors): Deleted code creating default
14911         constructor. Call craft_constructor instead.
14912         (java_check_regular_methods): Set `saw_constructor' to 1 for
14913         anonymous classes.
14914         (fix_constructors): Pass extra argument to verify_constructor_super.
14915         (verify_constructor_super): New local `sdecl', use it. Search for
14916         matching constructor (possibly featuring arguments) in super
14917         class.
14918         (lookup_method_invoke): Craft constructor according to arguments
14919         list when dealing with anonymous class constructors.
14920         (build_super_invocation): Pass arguments to anonymous class super
14921         constructors.
14922         (search_loop): Use FOR_LOOP_P.
14923         (labeled_block_contains_loop_p): Likewise.
14924
14925 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14926
14927         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14928         (enclosing_context_p): New function.
14929         (get_access_flags_from_decl): Handle CLASS_STATIC.
14930         (maybe_layout_super_class): Extra first argument passed to
14931         do_resolve_class.
14932         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14933         ID_INIT_P.
14934         * decl.c (access0_identifier_node): New global.
14935         (init_decl_processing): access0_identifier_node initialized.
14936         (pushdecl): Set DECL_CONTEXT only on non type decls.
14937         * expr.c (lookup_field): Lookup inner class fields in enclosing
14938         contexts.
14939         (expand_invoke): Use ID_INIT_P.
14940         (expand_java_field_op): Use DECL_CLINIT_P.
14941         * java-tree.def (CLASS_LITERAL): New tree code.
14942         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14943         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14944         (struct lang_decl): New field `inner_access'.
14945         (enclosing_context_p): Prototyped.
14946         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14947         ID_CLINIT_P): New macros.
14948         (CLASS_STATIC): New macro.
14949         (CLASS_ACCESS0_GENERATED_P): New macro.
14950         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14951         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14952         INNER_CLASS_P): New macros.
14953         (DECL_INNER_CLASS_LIST): New macro.
14954         * jcf-parse.c (yyparse): Avoid the use of ANSI string
14955         concatenation.
14956         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14957         the shift value to int. Fixed typo in comment.
14958         * lex.c (inst_id, wpv_id): Initialize.
14959         * mangle.c (unicode_mangling_length): Take `$' into account.
14960         * parse.h (DRECOVER, RECOVER): Terminate properly.
14961         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14962         (typedef struct _jdep): New field `enclosing'.
14963         (JDEP_ENCLOSING): New macro.
14964         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14965         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14966         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14967         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14968         GET_ENCLOSING_CPC_CONTEXT): New macros.
14969         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14970         (do_resolve_class): Added extra argument in prototype.
14971         * parse.y (resolve_class): Added extra argument in prototype.
14972         (maybe_create_class_interface_decl): Likewise.
14973         (maybe_use_access_method, build_wfl_wrap): New functions.
14974         (java_complete_expand_classes, java_complete_expand_class):
14975         Likewise.
14976         (java_parser_context_push_initialized_field,
14977         java_parser_context_suspend, java_parser_context_resume):
14978         Likewise.
14979         (maybe_make_nested_class_name, make_nested_class_name,
14980         set_nested_class_simple_name_value,
14981         link_nested_class_to_enclosing, find_as_inner_class,
14982         find_as_inner_class_do, check_inner_class_redefinition,
14983         build_thisn_assign, build_current_thisn, build_access_to_thisn,
14984         maybe_build_thisn_access_method, build_outer_field_access,
14985         build_outer_field_access_methods, build_outer_field_access_expr,
14986         build_outer_method_access_method, build_new_access_id,
14987         build_outer_field_access_method, outer_field_access_p,
14988         outer_field_expanded_access_p, outer_field_access_fix,
14989         build_incomplete_class_ref, patch_incomplete_class_ref,
14990         create_anonymous_class): Likewise.
14991         (inst_id, wpv_id): New static global variables.
14992         (synchronized:): New rule, tagged <node>.
14993         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
14994         rules.
14995         (anonymous_class_creation:): New rule, tagged <node>.
14996         (NEW_TK): Tagged <node>.
14997         (type_literals, array_type_literal): New rules, tagged <node>.
14998         (class_declaration:): Removed action when reducing by class_body:
14999         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15000         using GET_CPC in sub-rules.
15001         (class_member_declaration): Handle inner classes.
15002         (method_declaration): When reducing method_header:, reset
15003         current_function_decl when appropriate.
15004         (method_declarator:): Set the number of formal parameter to 0 for
15005         method declared without arguments.
15006         (constructor_declarator:): Likewise.
15007         (static_initializer:): List of elements kept in a list.
15008         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15009         use of the keyword `static' for type declarations.
15010         (block_statement:): Handle inner class declarations.
15011         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15012         type qualified `this'.
15013         (class_instance_creation_expression): Use anonymous_class_creation:
15014         to handle inner class instances creation. Handle qualified `new'.
15015         (something_dot_new): Added appropriate actions.
15016         (create_new_parser_context): New function.
15017         (java_push_parser_context, java_parser_context_save_global,
15018         java_parser_context_suspend): Use create_new_parser_context.
15019         (check_modifiers): Changed leading comment.
15020         (check_class_interface_creation): Handle interclasses.
15021         (add_superinterfaces): Fixed comment.
15022         (create_interface): Build qualified name from the raw_name instead
15023         of its matching WFL. Push the initialized fields list. raw_name added
15024         as an extra argument to maybe_create_class_interface_decl.
15025         (create_class): Build qualified name from the raw_name instead of
15026         its matching WFL. Removed assignment to current_parsed_class_un.
15027         Call PUSH_ERROR before returning an error. Suspend the current
15028         parser context when processing an inner class. Push the
15029         initialized fields list. raw_name added as an extra argument to
15030         maybe_create_class_interface_decl. Add the private this$<n>
15031         field.
15032         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15033         (register_fields): Get the class type from GET_CPC and handle
15034         previous errors.  Added code to handle the creation of static
15035         fields in inner classes. Initialized fields initialization
15036         statements kept in a list of lists.
15037         (maybe_generate_finit): Initialized fields initialization
15038         statements kept in a list of lists. Use GET_CPC.
15039         (maybe_generate_clinit): Likewise.
15040         (method_header): Use GET_CPC and GET_CPC_UN.
15041         (parser_qualified_classname): Handle inner classes.
15042         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15043         (java_fix_constructors): Hide pointer to enclosing context
15044         instance in constructor list when dealing with inner classes.
15045         (jdep_resolve_class): Call resolve_class with extra first argument
15046         JDEP_ENCLOSING.
15047         (resolve_class): Add enclosing context as a first extra argument
15048         to do_resolve_class.
15049         (do_resolve_class): Call find_as_inner_class. Handle WFLs
15050         properly.
15051         (resolve_no_layout): Extra argument added to resolve_class
15052         invocation.
15053         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15054         (java_get_real_method_name): Use GET_CPC_UN.
15055         (check_abstract_method_definitions): Use DECL_CLINIT_P.
15056         (java_check_abstract_methods): Handle static method declared in
15057         inner classes by an error.
15058         (java_check_regular_methods): Use DECL_CLINIT_P.
15059         (source_start_java_method): Also set DECL_MAX_LOCALS.
15060         (create_artificial_method): Call java_parser_context_save_global
15061         and java_parser_context_restore_global instead of saving/restoring
15062         the context by hand.
15063         (expand_start_java_method): Improved verbose mode message.
15064         (java_complete_expand_methods): Fixed leading comment. Use
15065         DECL_CLINIT_P.
15066         (fix_constructors): Added assignment to this$<n> if necessary.
15067         (java_expand_classes): Call java_complete_expand_classes instead
15068         of java_complete_expand_methods.
15069         (make_qualified_primary): Simplified.
15070         (merge_qualified_name): Optimized for missing left or right parts.
15071         (resolve_expression_name): Handle access to outer class fields from
15072         interclasses.
15073         (resolve_qualified_expression_name): New macro
15074         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15075         classes. Report error on non appropriate qualification of
15076         `new'. Handle qualified `this'.
15077         (not_accessible_p): Allow access to outer class private fields from
15078         inner classes.
15079         (patch_method_invocation): Handle method invocations through
15080         access methods and inner class constructor invocations.
15081         (find_applicable_accessible_methods_list): Search enclosing
15082         contexts of an inner class.
15083         (search_applicable_methods_list): Fixed typo.
15084         (argument_types_convertible): Handle inner class constructors'
15085         hidden outer context reference argument.
15086         (qualify_ambiguous_name): Handle qualified `this'.
15087         (java_complete_lhs): Handle use of field accessed through
15088         artificial access methods in various cases of assignments. Handle
15089         CLASS_LITERAL node.
15090         (check_final_assignment): Use DECL_CLINIT_P.
15091         (valid_ref_assignconv_cast_p): Handle the destination being an
15092         enclosing context of the source.
15093         (patch_unaryop): Handle use of field accessed through artificial
15094         access methods.
15095         (patch_return): Use DECL_CLINIT_P.
15096         (patch_throw_statement): Use DECL_CLINIT_P.
15097         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15098         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15099         ID_INIT_P.
15100
15101 2000-01-16  Anthony Green  <green@cygnus.com>
15102
15103         * parse.y (build_string_concatenation): Only use
15104         StringBuffer(String) shortcut if String arg is constant.
15105
15106 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15107
15108         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15109         the shift value to int. Fixed typo in comment.
15110
15111 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15112
15113         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15114         * jcf-write.c: Likewise.
15115         * parse.y: Likewise.
15116         * parse.c: Regenerate.
15117
15118 2000-01-09  Anthony Green  <green@cygnus.com>
15119
15120         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15121         bytecodes in the correct order.
15122
15123 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15124
15125         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15126
15127 2000-01-06  Anthony Green  <green@cygnus.com>
15128
15129         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15130         before building constant array decl.
15131
15132 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15133
15134         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15135         method invocation and typo in conditional expression.
15136         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15137         the appropriate NOTE_POP.
15138         * parse.y (patch_binop): Shift value mask to feature the right
15139         type.
15140
15141 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15142
15143         * class.c (assume_compiled, assume_compiled_node): Add static
15144         prototype.
15145         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15146
15147         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15148
15149         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15150
15151         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15152         to `__modifier' to avoid stringifying it.
15153
15154         * parse.y (verify_constructor_circularity): Don't call a variadic
15155         function with a non-literal format string.
15156         (java_check_abstract_methods): Move unreachable code inside
15157         `continue' statement.
15158         (lookup_method_invoke): Call xstrdup, not strdup.
15159
15160         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15161         concatenation.
15162
15163         * jcf-parse.c (yyparse): Likewise.
15164
15165         * jv-scan.c (main): Likewise.
15166
15167 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15168
15169         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15170         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15171         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15172         concatenation.
15173
15174         * parse.y (synchronized, variable_redefinition_error,
15175         check_class_interface_creation, create_interface, create_class,
15176         method_header, finish_method_declaration,
15177         check_modifiers_consistency, method_declarator,
15178         complete_class_report_errors, check_abstract_method_definitions,
15179         java_check_regular_methods, check_throws_clauses,
15180         java_check_abstract_methods, read_import_dir,
15181         check_pkg_class_access, declare_local_variables, fix_constructors,
15182         cut_identifier_in_qualified, resolve_expression_name,
15183         resolve_qualified_expression_name, patch_method_invocation,
15184         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15185         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15186         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15187         patch_try_statement, patch_synchronized_statement,
15188         patch_throw_statement, check_thrown_exceptions,
15189         patch_conditional_expr): Likewise.
15190
15191 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15192
15193         * Makefile.in (LIBDEPS): Added gcc's errors.o
15194         (../jcf-dump$(exeext):): Link with gcc's errors.o
15195         (../gcjh$(exeext):): Likewise.
15196         * expr.c (expand_java_NEW): Layout the entire target type instead of
15197         laying out its methods only.
15198         (lookup_field): Layout the class after having loaded it.
15199         * java-tree.h (java_debug_context): Declared.
15200         * jcf-io.c (toplev.h): Included.
15201         (find_class): Removed assignment to jcf's outofsynch
15202         field. Force source file to be read if newer than its matching
15203         class file. Tweaked debug messages.
15204         * jcf-parse.c (jcf_out_of_synch): Deleted.
15205         (read_class): Call to jcf_out_of_synch removed.
15206         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15207         (jcf_out_of_synch): Prototype deleted.
15208         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15209         `deprecated' and `class_err': integer turned into bit-fields.
15210         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15211         * parse.y (package_list): New global.
15212         (package_declaration:): Record newly parsed package name.
15213         (extra_ctxp_pushed_p): Static global deleted.
15214         (java_parser_context_save_global): Create buffer context for the
15215         purpose of saving globals, if necessary.
15216         (java_parser_context_restore_global): Pop context pushed for the
15217         purpose of saving globals, if necessary.
15218         (java_debug_context_do): New prototype and function.
15219         (java_debug_context): Likewise.
15220         (do_resolve_class): Use already parsed package names to qualify
15221         and lookup class candidate.
15222         (java_pre_expand_clinit): Removed unnecessary local variable.
15223
15224 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15225
15226         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15227         fixes PR gcj/119.
15228         (process_file): Use `\n\' at end of each line in string.
15229
15230 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15231
15232         * expr.c (expand_invoke): Layout the loaded class before
15233         attempting to use it.
15234         (expand_java_field_op): Allow final field assignments to take
15235         place in $finit$.
15236         * typeck.c (convert): Return error_mark_node if expr is null.
15237
15238 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15239
15240         * class.c (class_depth): Return -1 if the class doesn't load
15241         properly.
15242         * expr.c (can_widen_reference_to): Check for errors during depth
15243         computation and return 0 accordingly.
15244         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15245         create default constructors and add an other error check.
15246         * parse.h (java_fix_constructors): Prototyped.
15247         * parse.y (java_pre_expand_clinit): Likewise.
15248         (build_super_invocation): Re-prototyped to feature one argument.
15249         (java_check_circular_reference): Directly use `current'.
15250         (java_fix_constructors): New function.
15251         (java_check_regular_methods): Don't create default constructors
15252         here, but abort if none were found.
15253         (java_complete_expand_methods): Pre-process <clinit> calling
15254         java_pre_expand_clinit.
15255         (java_pre_expand_clinit): New function.
15256         (fix_constructors): build_super_invocation invoked with the
15257         current method declaration as an argument.
15258         (build_super_invocation): Use the context of the processed method
15259         decl argument instead of current_class.
15260         * typeck.c (lookup_java_method): Take WFLs in method names into
15261         account.
15262
15263 1999-12-14  Per Bothner  <per@bothner.com>
15264
15265         * class.c (make_class_data): flag_keep_inline_functions to keep
15266         private methods in the method array.
15267
15268 1999-12-15  Anthony Green  <green@cygnus.com>
15269
15270         * check-init.c (check_init): Take into account both types of
15271         `throw's when checking for uninitialized variables.
15272
15273 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15274
15275         * parse.y (java_complete_lhs): Force conversion of array
15276         dimensions to int_type_node, that's what runtime's ABI expects.
15277
15278 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15279
15280         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15281         operand of a WFL, until the Java front-end gets fixed with regard
15282         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15283
15284 1999-12-10  Andrew Haley  <aph@cygnus.com>
15285
15286         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15287         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15288         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15289         java-tree.h: Ditto.
15290         jcf-write.c: Ditto.
15291
15292 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15293
15294         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15295         before calling expand_eh_region_start and expand_start_all_catch.
15296         * except.c (expand_start_java_handler): Switch to permanent
15297         obstack before calling expand_eh_region_start.
15298         (expand_end_java_handler): Switch to permanent obstack before
15299         calling expand_start_all_catch.
15300
15301 1999-12-5  Anthony Green  <green@cygnus.com>
15302
15303         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15304         function with side effects.
15305         (init_decl_processing): Mark all memory allocating DECLs with
15306         DECL_IS_MALLOC.
15307
15308 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15309
15310         * except.c (expand_end_java_handler): Call
15311         expand_resume_after_catch and end_catch_handler.
15312
15313 1999-11-30  Anthony Green  <green@cygnus.com>
15314
15315         * verify.c (verify_jvm_instructions): Create new return label
15316         chain if non existent (don't rely on the verified state of the jsr
15317         target.)
15318
15319 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15320
15321         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15322         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15323
15324         * parse.y (patch_assignment): Removed bogus final class test on
15325         lhs when checking on whether to emit an ArrayStoreException runtime
15326         check.
15327         * expr.c (expand_java_arraystore): Likewise.
15328
15329 1999-11-28 Anthony Green <green@cygnus.com>
15330
15331         * decl.c (find_local_variable): Reuse single slot decls when
15332           appropriate.
15333
15334 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15335
15336         * jcf-parse.c (saw_java_source): Global variable removed.
15337         (read_class): Don't use `saw_java_source'. Added extra braces.
15338         (yyparse): Code setting `saw_java_source' removed.
15339
15340 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15341
15342         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15343
15344 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15345
15346         * verify.c (merge_type_state): Non verified subroutines being
15347         considered more than once to trigger passive type merge.
15348
15349 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15350
15351         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15352         in case of error. Error message tuned.
15353
15354 1999-11-21  Anthony Green  <green@cygnus.com>
15355
15356         * constants.c (find_methodref_index): Unwrap method names before
15357         inserting them in the constant pool.
15358
15359         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15360
15361         * class.c (assume_compiled_node): New typedef.
15362         (assume_compiled_tree): New static data.
15363         (find_assume_compiled_node): New function.
15364         (add_assume_compiled): New function.
15365         (assume_compiled): New function.
15366         * class.c (make_class_data): Use assume_compiled.
15367         (is_compiled_class): Use assume_compiled.
15368
15369         * java-tree.h (add_assume_compiled): Declare.
15370
15371         * lang.c (lang_decode_option): Parse new options.
15372
15373 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15374
15375         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15376         int_type_node: that's what `_Jv_AllocObject' expects.
15377
15378 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15379
15380         * parse.y (lookup_method_invoke): Use lang_printable_name to
15381         reliably build the type name during error report. Fixes PR gcj/97.
15382
15383 1999-11-09  Tom Tromey  <tromey@cygnus.com>
15384
15385         * jcf-path.c: Include <sys/stat.h>.
15386         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
15387         (DIR_UP): New macro.
15388
15389 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15390
15391         * parse.y (source_end_java_method): Resume permanent allocation,
15392         reversing Apr 27 1998 patch.
15393         (patch_string_cst): Pop obstacks after having pushed the permanent
15394         ones.
15395
15396 1999-11-05  Tom Tromey  <tromey@cygnus.com>
15397
15398         * class.c (finish_class): Emit inlined methods if any native
15399         methods exist in the class.  Fixes PR gcj/85.
15400
15401 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15402
15403         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15404         (qualify_ambiguous_name): Likewise.
15405
15406 1999-11-03  Godmar Back <gback@cs.utah.edu>
15407
15408         * typeck.c: (lookup_java_method):  search all inherited
15409         interfaces when looking up interface method.
15410
15411 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15412
15413         * parse.y (method_header:): Issue error message for rule `type
15414         error'.
15415         (synchronized:): Error report when not using synchronized.
15416
15417 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15418
15419         * parse.y (resolve_qualified_expression_name): Prevent `this' from
15420         being used before the superclass constructor has been called.
15421         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15422         instead of `CALL_THIS_CONSTRUCTOR_P'.
15423
15424 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
15425
15426         * check-init.c: Fix typo in comment.
15427
15428 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15429
15430         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15431         and final method.
15432
15433 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15434
15435         * parse.y (expression_statement:): Call function to report
15436         improper invocation of a constructor.
15437         (parse_ctor_invocation_error): New function.
15438
15439 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
15440
15441         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15442         remember_end_note.
15443
15444 1999-10-21  Tom Tromey  <tromey@cygnus.com>
15445
15446         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15447         in generated `main'.
15448
15449 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15450
15451         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15452         (qualify_ambiguous_name): Likewise.
15453
15454 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15455
15456         * parse.y (java_complete_tree): fold_constant_for_init to work on
15457         permanent_obstack.
15458         (java_complete_lhs): Likewise.
15459         (array_constructor_check_entry): Complete an initializer element
15460         on permanent_obstack.
15461
15462 1999-10-19  Tom Tromey  <tromey@cygnus.com>
15463
15464         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15465         From Mike Moreton <mike@pillim.demon.co.uk>.
15466
15467 1999-10-15  Greg McGary  <gkm@gnu.org>
15468
15469         * java-tree.h (flag_bounds_check): Remove extern decl.
15470         * lang.c (flag_bounds_check): Remove global variable.
15471         (lang_f_options): Remove "bounds-check" entry.
15472         (lang_init_options): Default flag_bounds_check to "on".
15473
15474 1999-10-14  Tom Tromey  <tromey@cygnus.com>
15475
15476         * jvgenmain.c (usage): New function.
15477         (main): Use it.  Also, handle `-D' options.
15478         * jvspec.c (lang_specific_driver): Recognize -D.
15479         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15480
15481         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15482
15483 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15484
15485         * jcf-dump.c (print_constant, disassemble_method): Don't call a
15486         variadic function with a non-literal format string.
15487
15488         * parse-scan.y (report_main_declaration): Likewise.
15489
15490         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15491
15492         * parse.y (read_import_dir, patch_assignment, patch_binop,
15493         patch_array_ref): Likewise.
15494
15495         * typeck.c (build_java_array_type): Likewise.
15496
15497         * verify.c (verify_jvm_instructions): Likewise.
15498
15499 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15500
15501         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15502
15503 1999-10-07  Anthony Green  <green@cygnus.com>
15504
15505         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15506         where CHECK_PUT may fail for valid reasons.
15507
15508         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15509         UNSAFE_PUTN): New macros.
15510
15511 1999-10-04  Tom Tromey  <tromey@cygnus.com>
15512
15513         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15514         well.  Fixes Java PR gcj/59.
15515         * parse-scan.y (yyerror): Report errors.
15516
15517 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
15518
15519         * decl.c (insert_block): Remove unconditional `abort'.
15520
15521 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
15522
15523         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
15524         FUNCTION_CODE now of type int.  All callers changed.
15525         Set the builtin's DECL_BUILT_IN_CLASS.
15526
15527 1999-09-23  Tom Tromey  <tromey@cygnus.com>
15528
15529         * jvspec.c (lang_specific_driver): Don't read spec file if
15530         -fsyntax-only given.
15531
15532 1999-09-22  Tom Tromey  <tromey@cygnus.com>
15533
15534         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15535
15536         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15537         (WORDS_TO_LONG): Likewise.
15538         (WORDS_TO_DOUBLE): Likewise.
15539
15540 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15541
15542         * jcf-write.c (RELOCATION_VALUE_0): New macro.
15543         (RELOCATION_VALUE_1): Likewise.
15544         (emit_iinc, emit_reloc, push_constant1, push_constant2,
15545         push_in_const, push_long_const): Prototyped.
15546         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15547         (push_constant2): Likewise.
15548         (push_int_const): Cast find_constant1's integer arguments to `jword'.
15549         (find_constant_wide): Cast find_constant2's integer arguments to
15550         `jword'.
15551         (find_constant_index): Cast find_constant2's and find_constant2's
15552         integer arguments to `jword'.
15553         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15554         (emit_switch_reloc): Use RELOCATION_VALUE_0.
15555         (emit_if): Use RELOCATION_VALUE_1.
15556         (emit_goto): Likewise.
15557         (emit_jsr): Likewise.
15558         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15559         argument to push_long_const to HOST_WIDE_INT.
15560
15561 1999-09-15  Andreas Schwab  <schwab@suse.de>
15562
15563         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15564
15565 1999-09-20  Nick Clifton  <nickc@cygnus.com>
15566
15567         * lang.c (lang_decode_option): Extend comment.
15568
15569 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15570
15571         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15572         instead of fndecl.
15573
15574 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15575
15576         * gjavah.c (get_field_name, print_method_info, print_include,
15577         add_namelet): Use xmalloc, not malloc.
15578
15579         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15580         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15581         NULL pointer.
15582
15583         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15584
15585         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15586
15587         * jcf-path.c (add_entry): Likewise.
15588
15589         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15590
15591         * jv-scan.c (xmalloc): Remove definition.
15592
15593         * jvgenmain.c (xmalloc): Likewise.
15594
15595         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15596
15597         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15598
15599         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15600         concat, not xmalloc/sprintf.
15601         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15602         (xstrdup): Remove definition.
15603
15604         * parse.y (duplicate_declaration_error_p,
15605         constructor_circularity_msg, verify_constructor_circularity,
15606         check_abstract_method_definitions, java_check_regular_methods,
15607         java_check_abstract_methods, patch_method_invocation,
15608         check_for_static_method_reference, patch_assignment, patch_binop,
15609         patch_cast, array_constructor_check_entry, patch_return,
15610         patch_conditional_expr): Use xstrdup, not strdup.
15611
15612         * zextract.c (ALLOC): Use xmalloc, not malloc.
15613
15614 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15615
15616         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15617
15618         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15619         (do_spec, lang_specific_pre_link, lang_specific_driver,
15620         input_filename, input_filename_length): Don't declare.
15621         (main_class_name, jvgenmain_spec, lang_specific_driver):
15622         Constify a char*.
15623         (lang_specific_driver): All calls to the function pointer
15624         parameter now explicitly call `fatal'.
15625
15626 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15627
15628         * parse.y (find_applicable_accessible_methods_list): Search
15629         abstract classes as interfaces.
15630
15631 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15632
15633         * class.c (finish_class): We're now outside a valid method
15634         declaration. Tell the rest of gcc so.
15635
15636 1999-09-08  Bruce Korb  autogen@linuxbox.com
15637
15638         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15639
15640 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15641
15642         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15643         java-array.h.
15644         (decode_signature_piece): Don't emit "::" in JArray<>.
15645         (print_namelet): Only print trailing `;' when printing a class.
15646
15647 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15648
15649         * java-tree.h: Delete declarations for all tree nodes now moved to
15650         global_trees.
15651         * decl.c: Delete their definitions.
15652
15653 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15654
15655         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15656         * Makefile.in (OBJS): Add ggc-callbacks.o.
15657         (OBJDEPS): Likewise.
15658
15659 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15660
15661         * parse.y (strip_out_static_field_access_decl): Return operand if
15662         it satisfies JDECL_P.
15663
15664 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15665
15666         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15667         Handle nested arrays, like `[[I'.
15668
15669 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15670
15671         * class.c (finish_class): Remove unused parameter, all callers
15672         changed.
15673
15674         * expr.c (build_java_athrow): Change return type to void.
15675         (java_lang_expand_expr): Make sure each case in switch returns a
15676         value.
15677
15678         * java-tree.h (finish_class): Fix prototype to take void args.
15679
15680         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15681         (main): Issue return from main, not exit.
15682
15683         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15684
15685         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15686
15687         * jv-scan.c (main): Issue return from main, not exit.
15688
15689         * parse.y (check_abstract_method_definitions,
15690         java_check_abstract_method_definitions): Add static prototypes.
15691         (java_complete_expand_methods): Fix call to `finish_class'.
15692
15693         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15694         and `prevpc'.
15695
15696 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15697
15698         * lang.c (language_string): Constify.
15699
15700 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15701
15702         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15703         Remove hacks for stuff which comes from libiberty.
15704
15705         * Make-lang.in: Likewise.
15706
15707 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
15708
15709         * Makefile.in (xref.o): Depend on xref.c explicitly.
15710
15711 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15712
15713         * java-tree.h (lang_printable_name): Constify a char*.
15714
15715         * lang.c (lang_printable_name): Likewise.
15716
15717 1999-08-27  Jeffrey A Law  (law@cygnus.com)
15718
15719         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15720         comments in C code.
15721
15722 1999-08-26  Tom Tromey  <tromey@cygnus.com>
15723
15724         * gjavah.c (print_cxx_classname): Print "::" before qualified
15725         name.
15726
15727 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15728
15729         * parse.y (lookup_cl): Changed leading comment. Now does its best
15730         to set the column number.
15731         (qualify_ambiguous_name): Take WFL wrappers into account.
15732
15733 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
15734
15735         * verify.c (verify_jvm_instructions): Don't check instruction
15736         validity beyond end of method.
15737
15738 1999-08-25  Tom Tromey  <tromey@cygnus.com>
15739
15740         * jvspec.c (lang_specific_driver): Correctly handle --help again.
15741
15742 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15743
15744         * gjavah.c (print_name, print_base_classname, utf8_cmp,
15745         cxx_keyword_subst, generate_access, name_is_method_p,
15746         get_field_name, print_field_name, super_class_name, print_include,
15747         decode_signature_piece, print_class_decls, usage, help,
15748         java_no_argument, version, add_namelet, print_namelet): Add static
15749         prototype.
15750         (print_base_classname, utf8_cmp, cxx_keyword_subst,
15751         name_is_method_p): Constify a char*.
15752         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
15753         Provide a final else clause in an if-else-if.
15754         (print_field_info): Add missing final arg in function call to
15755         `print_field_name'.
15756         (print_method_info, decompile_method, decode_signature_piece,
15757         print_c_decl, print_full_cxx_name, print_stub,
15758         print_mangled_classname, super_class_name, print_include,
15759         add_namelet, add_class_decl, print_class_decls, process_file,
15760         help): Constify a char*.
15761
15762         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15763         push_int_const, find_constant_wide, find_constant_index,
15764         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15765         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15766         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15767         emit_if, emit_goto, emit_jsr, call_cleanups,
15768         make_class_file_name): Add static prototypes.
15769         (generate_bytecode_return, generate_bytecode_insns): Pass a
15770         NULL_PTR, not a NULL_TREE.
15771
15772         * jv-scan.c: Include "jcf.h".
15773         (main): Declare using DEFUN macro.
15774
15775         * jvspec.c (find_spec_file, lang_specific_pre_link,
15776         lang_specific_driver): Add prototypes.
15777         (find_spec_file): Constify a char*.
15778
15779         * keyword.gperf (hash, java_keyword): Add prototypes.
15780
15781         * lang.c (lang_print_error): Add static prototype.
15782         (lang_init): Prefer memcpy over bcopy to avoid casts.
15783
15784         * lex.c (yylex): Add static prototype.
15785
15786         * parse-scan.y: Include "lex.c" earlier.
15787
15788         * parse.h: Remove redundant declaration for `yylex'.
15789
15790         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15791         labeled_block_contains_loop_p): Add static prototypes.
15792         (not_accessible_p): Make static to match prototype.
15793
15794         * verify.c (start_pc_cmp): Don't needlessly cast away const.
15795
15796 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15797
15798         * parse.y (check_method_redefinition): Changed leading comment.
15799         (check_abstract_method_definitions): New function.
15800         (java_check_abstract_method_definitions): New function.
15801         (java_check_regular_methods): Call it.
15802         (verify_constructor_super): Fixed indentation.
15803         (lookup_method_invoke): Likewise.
15804
15805 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15806
15807         * parse.y (method_header): Return a null pointer if the current
15808         class node is null.
15809         (finish_method_declaration): Return if the current function decl
15810         is null.
15811         (source_start_java_method): Likewise.
15812         (java_method_add_stmt): Likewise.
15813
15814 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15815
15816         * class.c (emit_register_class): Removed unnecessary call to
15817         start_sequence.
15818         * parse.y (labeled_block_contains_loop_p): Removed unused local
15819         variable.
15820
15821 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15822
15823         * parse.y (java_refold): Added prototype.
15824
15825 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15826
15827         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15828         (java_stabilize_reference): Removed unnecessary `else'.
15829         (java_complete_lhs): Set flag to remember boolean. Call
15830         java_refold. Added comments.
15831         (java_decl_equiv): New function.
15832         (binop_compound_p): Likewise.
15833         (java_refold): Likewise.
15834         (patch_unaryop): Striped static field access assigned to decl and
15835         op. Changed promotion scheme for ++/-- operators.
15836         (search_loop): New function.
15837         (labeled_block_contains_loop_p): Likewise.
15838         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15839         comment.
15840         (patch_bc_statement): Call search_loop. Fixed comment.
15841
15842 1999-08-14  Anthony Green  <green@cygnus.com>
15843
15844         * expr.c (java_lang_expand_expr): Mark static array data as
15845         referenced.
15846
15847 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
15848
15849         * jvgenmain.c (main): NUL-terminate name_obstack.
15850
15851 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15852
15853         * check-init.c (check_bool2_init, done_alternative): Add static
15854         prototypes.
15855
15856         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15857         (add_method, build_utf8_ref, build_class_ref,
15858         append_gpp_mangled_type, layout_class_method): Constify a char*.
15859
15860         * decl.c (push_promoted_type, make_binding_level): Add static
15861         prototypes.
15862         (push_promoted_type, pushdecl): Constify a char*.
15863
15864         * except.c (find_handler_in_range, link_handler,
15865         check_start_handlers): Add static prototypes.
15866
15867         * expr.c (process_jvm_instruction): Constify a char*.
15868
15869         * gjavah.c (main): Constify a char*.
15870
15871         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15872         Constify a char*.
15873
15874         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15875         static prototypes.
15876         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15877         munge, print_ents): Constify a char*.
15878
15879         * jcf-dump.c (disassemble_method): Constify a char*.
15880         (print_constant_pool, print_exception_table): Add static prototypes.
15881         (print_constant, print_exception_table, main, disassemble_method):
15882         Constify a char*.
15883
15884         * jcf-io.c (find_classfile, find_class): Likewise.
15885
15886         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15887         (set_source_filename, predefined_filename_p): Add static prototypes.
15888         (set_source_filename, get_constant, get_class_constant,
15889         find_in_current_zip): Constify a char*.
15890
15891         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15892         static prototypes.
15893         (add_entry, add_path, jcf_path_classpath_arg,
15894         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15895
15896         * jcf-reader.c (get_attribute, jcf_parse_preamble,
15897         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15898         jcf_parse_one_method, jcf_parse_methods,
15899         jcf_parse_final_attributes): Add static prototypes.
15900         (get_attribute): Constify a char*.
15901
15902         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15903         jcf_dependency_add_target, jcf_path_classpath_arg,
15904         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15905
15906         * jv-scan.c (main): Constify a char*.
15907         (gcc_obstack_init): Add prototype arguments.
15908
15909         * jvgenmain.c (gcc_obstack_init): Likewise.
15910         (main): Constify a char*.
15911
15912         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15913         static prototypes.
15914         (put_decl_string, lang_print_error): Constify a char*.
15915         (lang_init): Remove redundant extern prototype.
15916
15917         * mangle.c (emit_unicode_mangled_name): Constify a char*.
15918
15919         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15920         Add static prototypes.
15921         (get_type_from_signature): Constify a char*.
15922
15923         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15924         Add static prototypes.
15925         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15926         (verify_jvm_instructions): Constify a char*.
15927
15928         * xref.c (xref_flag_value): Likewise.
15929
15930         * xref.h (xref_flag_value): Likewise.
15931
15932         * zextract.c (makeword, makelong): Add static prototypes.
15933         (makeword, makelong): Constify a uch*.
15934
15935 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15936
15937         * lang.c (java_dummy_print): Constify a char*.
15938         (lang_print_error): Likewise.
15939         (lang_init): Remove redundant prototype for `print_error_function'.
15940         (lang_init_source): Likewise.
15941         (lang_identify): Constify a char*.
15942
15943 1999-08-09  Tom Tromey  <tromey@cygnus.com>
15944
15945         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15946         (WORDS_TO_LONG): Likewise.
15947         (WORDS_TO_DOUBLE): Likewise.
15948
15949 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15950
15951         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15952
15953         * expr.c (java_stack_pop, java_array_data_offset,
15954         build_java_throw_out_of_bounds_exception, case_identity,
15955         build_java_check_indexed_type): Add static prototypes.
15956         (linenumber_table, expand_invoke, expand_java_field_op,
15957         build_primtype_type_ref, expand_byte_code): Constify a char*.
15958
15959         * java-tree.h (build_primtype_type_ref, linenumber_table):
15960         Constify a char*.
15961         (java_lang_expand_expr): Add prototype.
15962
15963         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
15964         `java_lang_expand_expr'.
15965
15966         * lex.c (java_lex_error): Constify a char*.
15967         (java_get_unicode, java_read_char, java_allocate_new_line,
15968         java_unget_unicode, java_sneak_unicode): Prototype.
15969
15970         * parse-scan.y (current_class, package_name, method_declarator,
15971         report_class_declaration, yyerror): Constify a char*.
15972
15973         * parse.h (java_report_errors): Prototype.
15974         (yyerror): Constify a char*.
15975
15976         * parse.y (classitf_redefinition_error, check_modifiers,
15977         parse_jdk1_1_error, lookup_package_type,
15978         lookup_package_type_and_set_next, get_printable_method_name,
15979         purify_type_name): Constify a char*.
15980         (build_super_invocation, maybe_generate_finit,
15981         verify_constructor_super, parser_add_interface,
15982         add_superinterfaces, jdep_resolve_class, note_possible_classname,
15983         java_complete_expand_methods, java_expand_finals,
15984         cut_identifier_in_qualified, java_stabilize_reference,
15985         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15986         merge_string_cste): Prototype.
15987         (single_type_import_declaration, yyerror,
15988         variable_redefinition_error, build_array_from_name,
15989         build_unresolved_array_type, check_class_interface_creation,
15990         resolve_class, complete_class_report_errors,
15991         note_possible_classname, read_import_dir,
15992         find_in_imports_on_demand, resolve_package, fix_constructors,
15993         check_deprecation, lookup_method_invoke,
15994         maybe_build_primttype_type_ref, array_constructor_check_entry):
15995         Constify a char*.
15996         (java_complete_expand_methods, java_expand_finals): Make static.
15997         (convert_narrow): Remove static prototype.
15998
15999 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
16000
16001         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16002
16003 1999-08-02  Richard Henderson  <rth@cygnus.com>
16004
16005         * decl.c: Include defaults.h instead of expr.h.
16006         * parse.y: Likewise.
16007
16008 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
16009
16010         * java/decl.c (start_java_method): Change all uses of
16011         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16012         Ensure expr.h is included.
16013         * java/expr.c (pop_arguments): Ditto.
16014         * java/parse.y (expand_start_java_method): Ditto.
16015
16016 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16017
16018         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16019
16020 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
16021
16022         * decl.c: Include "function.h".
16023         * except.c: Likewise.
16024         * parse.y: Likewise.
16025         * Makefile.in: Update dependencies.
16026
16027 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16028
16029         * expr.c (build_java_soft_divmod): Provide a default case in switch.
16030         (java_lang_expand_expr): Mark parameters `target', `tmode' and
16031         `modifier' with ATTRIBUTE_UNUSED.
16032
16033         * gjavah.c (process_file): Add braces around ambiguous `else'.
16034
16035         * jcf-dump.c (print_access_flags, localvar_free): Change return
16036         type to void.
16037
16038         * parse.y (java_complete_expand_method): Initialize variable
16039         `exception_copy'.
16040         (resolve_qualified_expression_name): Likewise for `field_decl'.
16041         (patch_method_invocation): Likewise for `class_to_search'.
16042         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16043         (patch_assignment): Likewise for `lhs_type'.
16044
16045         * verify.c (verify_jvm_instructions): Remove unused variable
16046         `caller'.
16047
16048 1999-07-25  Richard Henderson  <rth@cygnus.com>
16049
16050         * decl.c (va_list_type_node): New.
16051
16052 1999-07-25  Anthony Green  <green@cygnus.com>
16053
16054         * gjavah.c (print_stub): New function.
16055         (METHOD_IS_NATIVE): New macro.
16056         (print_mangled_classname): Make static.
16057         (HANDLE_END_FIELD): Don't emit fields during stub generation.
16058         (process_file): Perform stub generation.
16059         (HANDLE_METHOD): Don't emit class decls during stub
16060         generation.
16061         (HANDLE_END_METHOD): Take into account stub generation.
16062         (print_method_info): Handle stub generation.
16063         (print_stub): New function.
16064         (print_cxx_classname): Make signature consistant with others.
16065         (help): Describe -stubs option.
16066         (main): Create stub file.
16067         (version): Use version.c.
16068         (print_full_cxx_name): New function.
16069         (print_c_decl): Use print_full_cxx_name.
16070
16071 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16072
16073         * check-init.c (check_init): Handle MAX_EXPR.
16074
16075 1999-07-15  Andrew Haley  <aph@cygnus.com>
16076
16077         * lang.c (flag_use_divide_subroutine): New variable.
16078         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16079         fp-to-integer conversion.
16080         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16081         is not set.
16082
16083         * expr.c (build_java_soft_divmod): New function.
16084         (build_java_binop): Call build_java_soft_divmod if
16085         flag_use_divide_subroutine is set.
16086         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16087         soft_lrem_node: new builtin functions.
16088         (init_decl_processing) Initialize the new builtins.
16089         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16090         soft_lrem_node: new builtin functions.
16091         (build_java_soft_divmod): New function.
16092         * parse.y: Call build_java_soft_divmod if
16093         flag_use_divide_subroutine is set.
16094         * parse.c: Rebuilt.
16095
16096         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16097         a --specs= arg) even if not linking.
16098         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16099         -fuse-divide-subroutine
16100
16101 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16102
16103         * parse.y (resolve_and_layout): Check methods only once.
16104         (resolve_qualified_expression_name): Verify thrown exceptions
16105         compatibility.
16106         (check_thrown_exceptions): Reject exceptions thrown in
16107         initializer. Error message tuned.
16108
16109 1999-07-14  Andrew Haley  <aph@cygnus.com>
16110
16111         * expr.c (expand_expr): Do not return the last statement in a
16112         block as the block's value.
16113
16114 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16115
16116         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16117         CALL_EXPR, to avoid order of evaluation changes.
16118
16119 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16120
16121         * parse.y (qualify_ambiguous_name): Do not use
16122         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16123
16124 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16125
16126         * check-init.c (check_init): Handle MAX_EXPR.
16127         * expr.c (force_evaluation_order): Force method call arguments to
16128         be evaluated in left-to-right order.
16129         * parse.y (qualify_ambiguous_name): Loop again to qualify
16130         NEW_ARRAY_EXPR properly.
16131
16132 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16133
16134         * parse.y (patch_invoke): Resolve unresolved invoked method
16135         returned type.
16136         (qualify_ambiguous_name): STRING_CST to qualify expression for
16137         type name resolution.
16138
16139 1999-06-24  Andrew Haley  <aph@cygnus.com>
16140
16141         * class.c (finish_class): Whenever a deferred method is
16142         output, rescan the list of methods to see if a new candidate for
16143         output can be found.
16144
16145 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16146
16147         * jvspec.c (lang_specific_driver): Recognize --help.
16148
16149 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16150
16151         * parse.y (resolve_package): Fixed bogus return statement.
16152         (patch_method_invocation): Resolve method invocation beginning with
16153         a package name qualifier.
16154
16155 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16156
16157         * Make-lang.in (java.stage1): Depend on stage1-start.
16158         (java.stage2): Likewise for stage2-start.
16159         (java.stage3): Likewise for stage3-start.
16160         (java.stage4): Likewise for stage4-start.
16161
16162 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16163
16164         * parse.y (java_complete_lhs): When doing cross referencing, don't
16165         try to keep file location on a WFL expanded as a CALL_EXPR.
16166
16167 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16168
16169         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16170         compiling to class file a void method with an empty method body.
16171         As a side effect, the bytecode backend will generate the
16172         appropriate `return' instruction.
16173
16174 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16175
16176         * parse.y (lookup_package_type_and_set_next): New function prototype.
16177         (resolve_package): Search current and imported packages.
16178         (lookup_package_type_and_set_next): New function.
16179
16180 1999-06-22  Andrew Haley  <aph@cygnus.com>
16181
16182         * verify.c (verify_jvm_instructions): Check for pending blocks
16183         before invalid PC test and opcode switch, not after.
16184
16185 1999-06-21  Andrew Haley  <aph@cygnus.com>
16186
16187         * except.c (find_handler_in_range): The upper limit for exception
16188         ranges is exclusive, not inclusive: (start <= pc < end).
16189         (link_handler): find child pointer which points to outer by
16190         searching sibling list: previous code incorrectly assumed that
16191         outer->outer->first_child must point to outer.
16192         * verify.c (verify_jvm_instructions): FIXME added to code for
16193         `athrow'.
16194         (verify_jvm_instructions): Do not assume that the last block
16195         processed in a subroutine is a block which ends with a `ret'
16196         instruction.  With some control flows it is possible that the last
16197         block ends with an `athrow'.
16198
16199 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16200
16201         * parse.y (qualify_ambiguous_name): Reorganized the post
16202         evaluation of non WFL leading expression nodes.
16203
16204 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16205
16206         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16207         CONVERT_EXPR.
16208
16209 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16210
16211         * parse.y (qualify_ambiguous_name): Handle qualified expression
16212         beginning with a STRING_CST.
16213
16214 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16215
16216         * parse.y (register_fields): Set DECL_INITIAL on both
16217         pre-initialized static and public fields.
16218         (resolve_field_access): Static field access expressions to always
16219         use pointer types.
16220         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16221         qualification. CONVERT_EXPR to be resolved as an expression name.
16222         (java_complete_lhs): Identify and access qualified final
16223         initialized field in switch statement case expression.
16224         (fold_constant_for_init): Pre-initialized field decl constant to
16225         be folded.
16226
16227 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16228
16229         * parse.y (note_possible_classname): Mark returned node with
16230         QUALIFIED_P only if the original class name contained a '/'.
16231
16232 1999-06-05  Anthony Green  <green@cygnus.com>
16233
16234         * Make-lang.in (gcjh): More parallel build fixes.
16235
16236 1999-06-03  Mike Stump  <mrs@wrs.com>
16237
16238         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16239
16240 1999-06-02  Anthony Green  <green@cygnus.com>
16241
16242         * except.c (link_handler): Chain exception handlers in order.
16243
16244 1999-06-02  Anthony Green  <green@cygnus.com>
16245
16246         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16247         with nops and process as usual in order to always set correct EH
16248         ranges.  Emit detailed warnings about unreachable bytecodes.
16249
16250 1999-06-02  Anthony Green  <green@cygnus.com>
16251
16252         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16253         constant.
16254
16255 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16256
16257         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16258           or the searched field decl.
16259
16260 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16261
16262         * parse.y (fold_constant_for_init): Convert numerical constant
16263         values to the type of the assigned field.
16264
16265 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16266
16267         * expr.c (lookup_field): Relaxed the test on class loading error
16268         detection.
16269         * parse.y (fold_constant_for_init): Enabeled old code.
16270
16271 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16272
16273         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16274         decide the validity of the cast of a java.lang.Cloneable reference
16275         to an array.
16276         (patch_conditional_expr): Fixed first argument passed to
16277         binary_numeric_promotion.
16278
16279 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16280
16281         * parse.y (qualify_ambiguous_name): Take into account that a
16282         CONVERT_EXPR might specify a type as a WFL.
16283
16284 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16285
16286         * parse.y (patch_assignment): Save the rhs before using it as an
16287         argument to _Jv_CheckArrayStore.
16288
16289 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16290
16291         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16292
16293 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16294
16295         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16296         floating point literal only when the exponent indicator has been
16297         parsed.
16298
16299 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16300
16301         * parse.y (formal_parameter:): Construct argument tree list
16302         element even if a yet unsupported final parameter was encountered.
16303
16304 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16305
16306         * parse.y (finish_method_declaration): Issue errors for native or
16307         abstract methods declared with a method body, as well as for non
16308         native or non abstract methods with no method body.
16309
16310 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16311
16312         * class.c (build_utf8_ref): Initialize variable `field'.
16313
16314         * decl.c (init_decl_processing): Initialize variable `field'.
16315
16316         * expr.c (build_known_method_ref): Mark parameters `method_type',
16317         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16318         (process_jvm_instruction): Likewise for parameter `length'.
16319
16320         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16321         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16322         ATTRIBUTE_UNUSED.
16323
16324         * parse.y (maybe_generate_clinit): Remove unused variable
16325         `has_non_primitive_fields'.
16326         (find_in_imports_on_demand): Initialize variables `node_to_use'
16327         and `cl'.
16328         (patch_binop): Likewise for variable `prom_type'.
16329         (patch_unaryop): Likewise for variable `prom_type'.
16330
16331         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16332
16333         * xref.c (xref_table): Add missing initializer.
16334
16335 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16336
16337         * java-except.h (struct eh_range): Removed unused `next' member.
16338         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16339         after adding all exception handlers.  Sort exception ranges in
16340         order of start PC.
16341         (struct pc_index): New structure.
16342         (start_pc_cmp): New function.
16343         * except.c (add_handler): Return `void'.  Don't call link_handler;
16344         instead construct an ordinary linked list and do range
16345         coalescing.
16346         (check_nested_ranges): New function.
16347         (link_handler): Changed interface to allow merging of eh_ranges.
16348         Split overlapping ranges.  Return `void'.
16349
16350 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16351
16352         * parse.y (constructor_block_end:): New rule, tagged <node>.
16353         (constructor_body:): Use `constructor_block_end' instead of
16354         `block_end'.
16355
16356 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16357
16358         * parse.y (statement_nsi:): Pop `for' statement block.
16359         (java_complete_lhs): Labeled blocks containing no statement are
16360         marked as completing normally.
16361
16362 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16363
16364         * xref.c (xref_set_current_fp): New function, defined.
16365         * xref.h (xref_set_current_fp): New function, prototyped.
16366
16367 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16368
16369         * check-init.c (check_init): Take into account that
16370         LABELED_BLOCK_STMT can be empty.
16371
16372 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16373
16374         * parse.y (java_check_regular_methods): Warning check on not
16375         overriding methods with default access in other packages does not
16376         apply to `<clinit>'.
16377         (java_complete_lhs): If block body is an empty_stmt_node, replace
16378         it by NULL_TREE. This prevents gcc from generating an irrelevant
16379         warning.
16380
16381 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16382
16383         * check-init.c (check_init): Removed code accepting to see things
16384         falling through default:, when doing xrefs.
16385         * java-tree.h (do_not_fold): New global variable, declared.
16386         * parse.y (do_not_fold): New global variable, defined.
16387         (java_complete_expand_method): Set `do_not_fold' to the value of
16388         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16389         and reinstall them after them have been purged; do not check for
16390         initializations; do not issue missing return errors.
16391         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16392         when doing xrefs.
16393         (patch_binop): Skip the fold part when doing xrefs.
16394         (build_string_concatenation): Skip the concatenation part when
16395         doing xrefs.
16396         (patch_synchronized_statement): Do not generate a try-finally when
16397         doing xrefs.
16398         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16399         and keep the location where the throw was seen.
16400         * typeck.c (convert): When `do_not_fold' is set, do not attempt
16401         any treatment on the converted node an simply return a NOP_EXPR of
16402         the targeted type.
16403         * xref.c (xref_get_data): New function, defined.
16404         * xref.h (xref_get_data): New function, declared.
16405         (XREF_GET_DATA): Use xref_get_data.
16406
16407 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16408
16409         * gjavah.c (print_include): Cast the result of `strlen' to int
16410         when comparing against a signed value.
16411         (add_namelet): Likewise.
16412
16413 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16414
16415         * expr.c (expand_invoke): Mark parameter `nargs' with
16416         ATTRIBUTE_UNUSED.
16417         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16418
16419         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16420         ATTRIBUTE_UNUSED.
16421
16422         * jcf-reader.c (get_attribute): Cast a value to long
16423         when comparing against a signed expression.  Likewise.
16424
16425         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16426         HOST_BITS_PER_CHAR.
16427
16428 1999-05-11  Andrew Haley  <aph@cygnus.com>
16429
16430         * parse.y (source_end_java_method): If the current method contains
16431         any exception handlers, force asynchronous_exceptions: this is
16432         necessary because signal handlers in libjava may throw exceptions.
16433         * decl.c (end_java_method): Ditto.
16434
16435 1999-05-11  Tom Tromey  <tromey@cygnus.com>
16436
16437         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16438         flags.
16439         * jvspec.c (THREAD_NAME): Removed.
16440         (GC_NAME): Likewise.
16441         (MATHLIB): Likewise.
16442         (WITHLIBC): Likewise.
16443         (GCLIB): Likewise.
16444         (THREADLIB): Likewise.
16445         (MATH_LIBRARY): Likewise.
16446         (lang_specific_driver): Don't add `-l' options to command line.
16447         Instead, add a single --specs option.  Recognize `-L' options and
16448         use them to search for spec file.
16449         (find_spec_file): New function.
16450         (SPEC_FILE): New define.
16451
16452 1999-05-11  Dave Brolley  <brolley@cygnus.com>
16453
16454         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16455         cpplib-enabled build.
16456
16457 1999-05-05  Per Bothner  <bothner@cygnus.com>
16458
16459         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
16460         temporarily zero it while calling rest_of_decl_compilation.
16461
16462         * java-tree.h (string_ptr_type_node):  Add declaration.
16463         * decl.c:  Define and initialize string_ptr_type_node.
16464         * parse.y (patch_string_cst):  Use string_ptr_type_node.
16465
16466         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
16467         * parse.y (for_statement):  Now unconditionally exit_block.
16468         (finish_labeled_statement):  No longer exit_block if for-loop.
16469         (patch_loop_statement):  Check harder if the loop is already labeled.
16470
16471         * parse.y (patch_initialized_static_field):  Removed function.
16472         (maybe_generate_clinit):  Removed special handling for interfaces.
16473         (java_complete_expand_methods):  Do a preliminary java_complete_tree
16474         on <clinit> to determine if it can be removed.
16475         (java_complete_expand_method):  Remove special handling for <clinit>.
16476         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
16477         optimize if we get back empty_stmt_node.
16478         For MODIFY_EXPR, re-do checking of static initializers.
16479         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
16480         For VAR_DECL, pass correct context.
16481
16482         * verify.c (verify_jvm_instructions):  Better error messages.
16483
16484 1999-05-03  Tom Tromey  <tromey@cygnus.com>
16485
16486         * parse-scan.y (interface_declaration): Call
16487         report_class_declaration for interfaces.
16488
16489 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
16490
16491         * Makefile.in: Remove -v from bison command lines.
16492
16493 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16494
16495         * check-init.c (check_init): Exclude a case of error when doing
16496         xrefs.
16497         * class.c (layout_class_method): Don't generate the error message
16498         twice when compiling from source.
16499         * lang-options.h: Added `-Wredundant-modifers' and
16500         `-Wunusupported-jdk11' flags and help text.
16501         * lang.c (lang_decode_option): Added support for
16502         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16503         flag_static_local_jdk11 and flag_redundant set accordingly.
16504         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16505         * parse.h (EXPR_WFL_ADD_COL): New macro.
16506         (DECL_END_SOURCE_LINE): Likewise.
16507         (DECL_INHERITED_SOURCE_LINE): Likewise.
16508         * parse.y (static_ref_err): New function, prototyped.
16509         (CCB_TK): Now tagged <operator>.
16510         (class_body:): Remember the location of the closing '}' of a class
16511         definition when doing xrefs.
16512         (block:): Likewise.
16513         (block_end:): Likewise.
16514         (create_class): Remember the location of the inherited class
16515         identifier when doing xrefs.
16516         (register_fields): Added test on first operand of `init' before
16517         testing it TREE_CODE.
16518         (method_header): Store the location of the class identifier in the
16519         class decl when doing xrefs.
16520         (finish_method_declaration): Don't combine first/last method line
16521         when doing xref.
16522         (java_check_regular_methods): Warning check on not overriding
16523         methods with default access on other packages move before check on
16524         static methods. Initialization of `aflags' also moved up.
16525         (resolve_expression_name): Call static_ref_err to report the error.
16526         (static_ref_err): New function, implemented.
16527         (resolve_field_access): Returned simplified static field access
16528         when doing xrefs.
16529         (resolve_qualified_expression_name): Check for illegal use of
16530         static fields in a non static context. Call static_ref_err to
16531         report error in various places.
16532         (java_complete_tree): Do not fold initialized static fields when
16533         doing xrefs.
16534         (java_complete_lhs): Likewise.
16535
16536 1999-04-29  Anthony Green  <green@cygnus.com>
16537
16538         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16539         create internal labels.
16540         (lookup_label): Ditto.
16541
16542 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16543
16544         * class.c (layout_class_method): Generate <clinit>'s rtl for
16545         interfaces.
16546         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16547         for interfaces' <clinit>.
16548         * expr.c (lookup_field): Search for fields in interfaces.
16549         (expand_invoke): Fixed indentation.
16550         (expand_java_field_op): Likewise. Use IS_CLINIT.
16551         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16552         (IS_CLINIT): New macro.
16553         * parse.y (type_declaration:): Call maybe_generate_clinit after an
16554         interface was parsed.
16555         (maybe_generate_clinit): Don't generate if the current class is an
16556         interface with only fields of primitive types.
16557         (reset_method_name): Use IS_CLINIT.
16558         (java_complete_expand_method): Expand <clinit> when it exists for
16559         interfaces. Use IS_CLINIT.
16560         (resolve_expression_name): Use DECL_CONTEXT instead of
16561         current_class to build static field references.
16562         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16563         ARRAY_REF when doing xreferencing.
16564         (check_final_assignment): Fixed typo in leading comment. Use
16565         IS_CLINIT.
16566         (patch_array_ref): Don't fully expand array references when
16567         xreferencing.
16568         (patch_return): Use IS_CLINIT.
16569         (patch_throw_statement): Likewise.
16570
16571 1999-04-22  Tom Tromey  <tromey@cygnus.com>
16572
16573         * Make-lang.in (JAVA_SRCS): Added check-init.c.
16574
16575 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16576
16577         * decl.c (predef_filenames, predef_filenames_size): New globals
16578         (init_decl_processing): predef_filenames and predef_filenames_size
16579         initialized.
16580         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16581         extern.
16582         * jcf-parse.c (predefined_filename_p): New function.
16583         (yyparse): Check that files on the command line are specified only
16584         once and issue a warning otherwise.
16585         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16586         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16587         avoid a gcc warning with -W -Wall turned on.
16588         (java_expand_classes): Abort if errors were encountered.
16589         (java_complete_lhs): If the cross reference flag is set, wrap
16590         field DECL node around a WFL when resolving expression name.
16591
16592 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16593
16594         * lang.c (lang_decode_option): Fixed returned value when parsing
16595         `-fxref=...' and `-Wall'.
16596         * parse.y (source_end_java_method): Do not generate code when
16597         flag_emit_xref is set.
16598         (resolve_expression_name): Do not build static field access when
16599         flag_emit_xref is set.
16600         (resolve_field_access): No special treatment on `length' when
16601         flag_emit_xref is set. Do not build qualified static field access
16602         when flag_emit_xref is set.
16603         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16604         when flag_emit_xref is set.
16605         (patch_assignment): Do not generate array store runtime check when
16606         flag_emit_xref is set.
16607         * xref.c (xref_flag_value): Fixed function declaration
16608         indentation.
16609         (xset_set_data): New function.
16610         * xref.h (xref_set_data): Added prototype for new function.
16611         (typedef struct xref_flag_table): New field data.
16612         (XREF_GET_DATA): New macro.
16613
16614 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16615
16616         * xref.h (enum): Removed trailing comma.
16617
16618         * parse.y (resolve_qualified_expression_name): Added missing
16619         `break'.
16620
16621 1999-04-15  Anthony Green  <green@cygnus.com>
16622
16623         * gjavah.c: New prototypes for java_float_finite and
16624         java_double_finite.
16625
16626 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16627
16628         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16629         references.
16630
16631 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16632
16633         * Makefile.in (TREE_H): Add tree-check.h.
16634         (RTL_H): Add genrtl.h.
16635
16636 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16637
16638         * parse.y (patch_assignment): Added ArrayStoreException runtime
16639         check.
16640
16641 1999-04-06  Per Bothner  <bothner@cygnus.com>
16642
16643         * expr.c (pop_type_0):  New function.
16644         (pop_type):  Use pop_type_0.
16645         * java-tree.h (pop_type_0):  New declaration.
16646         * verify.c (verify_jvm_instructions):  Check return instructions.
16647
16648         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16649         class files.
16650
16651 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16652
16653         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16654
16655         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16656         (main_jcf): Don't define.
16657         (process_file): Don't set `main_jcf'.
16658
16659         * java-tree.h (main_jcf): Don't declare.
16660
16661         * jcf-parse.c (main_jcf): Add static definition.
16662
16663         * lang.c (main_jcf): Don't define.
16664
16665 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16666
16667         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16668
16669         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16670
16671         * jcf-depend.c: Include "config.h", not <config.h>.
16672
16673         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16674         `bcopy' to PTR.
16675
16676         * jcf-path.c: Include "config.h", not <config.h>.
16677
16678         * lex.c: Don't include various system header files.
16679         (java_init_lex): Cast the argument of `bzero' to PTR
16680
16681         * parse-scan.y (java_push_parser_context): Likewise.
16682
16683         * parse.y (java_push_parser_context): Likewise.
16684         (patch_bc_statement): Match format specifier to variable argument.
16685
16686         * xref.c: Don't include <stdio.h>.
16687
16688 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16689
16690         * parse.y (struct parser_ctxt *ctxp): Now global.
16691         (declare_local_variables): Use WFL compound value for the
16692         declaration source line value, when doing cross-referencing.
16693
16694 1999-03-31  Tom Tromey  <tromey@cygnus.com>
16695
16696         * gjavah.c (print_field_info): Allow constants of other types.
16697         (print_include): Generate include when new name is proper prefix
16698         of already printed name.
16699         (add_namelet): Likewise.
16700         (cxx_keyword_subst): New function.
16701         (print_method_info): Use it.
16702         (print_field_name): New function.
16703         (get_field_name): New function.
16704         (print_field_info): Use get_field_name and print_field_name.
16705
16706 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16707
16708         * Makefile.in (keyword.h): Generate using gperf language 'C', not
16709         'KR-C', so gperf uses the `const' keyword on strings.
16710
16711         * keyword.gperf (java_keyword): Const-ify a char*.
16712
16713 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16714
16715         * parse.y (patch_bc_statement): Fixed identation and a bogus
16716         `printf' format.
16717
16718 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16719
16720         * parse.y (patch_assignment): Allow static variables in other
16721         classes to be assigned.
16722
16723 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16724
16725         * class.c (maybe_add_interface): Remove unused variable
16726         `interface_binfo'.
16727         (make_class_data): Use = for assignment, not ==.  Likewise.
16728         (emit_register_classes): Remove unused variable `decl'.
16729
16730         * lex.c: Fix comment so as not to contain an embedded `/*'.
16731
16732         * verify.c (verify_jvm_instructions): Remove unused variable
16733         `self_type'.
16734
16735 1999-03-27  Per Bothner  <bothner@cygnus.com>
16736
16737         * parse.y (complete_loop_body):  Rename to finish_loop_body.
16738         (complete_labeled_statement):  Rename to finish_labeled_statement.
16739         (complete_for_loop):  Rename to finish_for_loop.
16740         (complete_method_declaration):  Rename to finish_method_declaration.
16741
16742         * java-tree.h (continue_identifier_node):  New global node.
16743         * decl.c:  Define and initialize continue_identifier_node.
16744         * parse.y (generate_labeled_block):  Remove - no longer needed.
16745         (build_loop_body):  Use continue_identifier_node for continue block.
16746         (finish_labeled_statement):  Also do pop_labeled_block actions.
16747         (java_complete_lhs):  POP_LOOP even if error.
16748         (build_labeled_block):  Special handling for continue_identifier_node.
16749         (patch_loop_statement):  Re-organize.
16750         (patch_bc_statement):  Re-write.
16751
16752 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16753
16754         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16755         using a WFL compound value.
16756         * parse.y (xref.h): Include.
16757         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16758         WFL compound value.
16759         (register_fields): Set WFL compound value to lineno if doing
16760         xrefs.
16761         (java_complete_expand_method): Call expand_xref if flag_emit_xref
16762         is set.
16763         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16764         * xref.h (expand_xref): Prototype renamed from xref_generate.
16765
16766 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16767
16768         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16769         (GET_CURRENT_BLOCK): New macro.
16770         * parse.y (current_static_block): New global variable.
16771         (method_body:): Define action.
16772         (complete_method_declaration): Set current_function_decl to NULL
16773         when work on the current method is done.
16774         (declare_local_variables): Use GET_CURRENT_BLOCK.
16775         (java_method_add_stmt): Likewise.
16776         (java_complete_expand_method): Disable the use of `this' when
16777         expanding <clinit>.
16778         (enter_a_block): If no current method exist, use
16779         current_static_block to link static initializer blocks.
16780         (exit_block): Rewritten to use current_static_block when no current
16781         method decl exists.
16782         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16783         (patch_return): Forbid the use of `return' in static initializers.
16784         (patch_throw_statement): Fixed indentation. Issue specific error
16785         for uncaught thrown checked exception in static initializer
16786         blocks. Removed FIXME.
16787
16788 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
16789
16790         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16791         Link gcj from gcc.o.
16792
16793 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16794
16795         * parse.y (find_applicable_accessible_methods_list): When dealing
16796         with interface: ensure that a given interface or java.lang.Object
16797         are searched only once.
16798
16799 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16800
16801         * gjavah.c (print_c_decl): Remove unused argument `flags'.
16802
16803         * jcf-dump.c (print_access_flags): Add braces around if-else.
16804
16805         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16806         COMBINE_INPUTS.
16807
16808         * lex.c (build_wfl_node): Add static prototype.
16809
16810         * lex.h (build_wfl_node): Remove static prototype.
16811
16812         * parse.y: Include lex.c early enough to declare everything needed.
16813         Ensure calls to `build_wfl_node' pass the proper arguments.
16814         (create_class): Remove unused variable `super_decl'.
16815         (get_printable_method_name): Initialize variable `name'.
16816
16817 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16818
16819         * Changelog: Fixed 1999-03-22 typos.
16820         * lang.c (lang_decode_option): Fixed typo in error string in the
16821         XARG section.
16822
16823 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16824
16825         * Makefile.in (JAVA_OBJS): Added entry xref.o.
16826         (xref.o): New rule.
16827         * java-tree.h (flag_emit_xref): Declared extern.
16828         * lang.c (xref.h): Included.
16829         (flag_emit_xref): New global variable.
16830         (lang_decode_option): Added support for -fxref.
16831         * xref.c: Created.
16832         * xref.h: Likewise.
16833
16834 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
16835
16836         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16837         linked with.
16838
16839 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16840
16841         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16842         $(srcdir)/../system.h and $(JAVA_TREE_H).
16843         (jcf-io.o): Depend on $(JAVA_TREE_H).
16844         (mangle.o): Likewise.
16845
16846         * check-init.c (check_cond_init): Add static prototype.
16847
16848         * class.c (build_java_method_type, hashUtf8String,
16849         make_field_value, get_dispatch_vector, get_dispatch_table,
16850         append_gpp_mangled_type, mangle_static_field): Likewise.
16851         (strLengthUtf8): Hide unused definition.
16852         (hashUtf8String): Const-ify.
16853         (make_field_value): Un-ANSI-fy.
16854
16855         * constants.c: Move inclusion of jcf.h above java-tree.h.
16856         (set_constant_entry, find_class_or_string_constant,
16857         find_name_and_type_constant, get_tag_node,
16858         build_constant_data_ref): Add static prototype.
16859
16860         * decl.c (push_jvm_slot, builtin_function,
16861         lookup_name_current_level): Likewise.
16862         (builtin_function): Const-ify.
16863
16864         * except.c (expand_start_java_handler, expand_end_java_handler):
16865         Add static prototype.
16866
16867         * expr.c (flush_quick_stack, push_value, pop_value,
16868         java_stack_swap, java_stack_dup, build_java_athrow,
16869         build_java_jsr, build_java_ret, expand_java_multianewarray,
16870         expand_java_arraystore, expand_java_arrayload,
16871         expand_java_array_length, build_java_monitor, expand_java_pushc,
16872         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16873         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16874         expand_compare, expand_test, expand_cond, expand_java_goto,
16875         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16876         expand_java_field_op, java_push_constant_from_pool): Likewise.
16877
16878         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16879         (build_java_arraynull_check): Mark parameters `node' and `type'
16880         with ATTRIBUTE_UNUSED.
16881         (note_label): Likewise for parameter `current_pc'.
16882         (expand_java_call, expand_java_ret): Hide unused definition.
16883
16884         * java-tree.h (make_class, build_constants_constructor,
16885         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16886         init_outgoing_cpool, register_class, emit_register_classes,
16887         java_layout_seen_class_methods): Prototype.
16888         (unicode_mangling_length): Const-ify.
16889         (append_gpp_mangled_name, append_gpp_mangled_classtype,
16890         emit_unicode_mangled_name, format_int, format_uint,
16891         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16892         jcf_print_utf8_replace, open_class): Prototype.
16893
16894         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
16895         <stdio.h>.  Include tree.h/java-tree.h.
16896         (utf8_equal_string usage, process_class): Add static prototype.
16897         (open_class): Don't prototype this here.
16898         (utf8_equal_string): Match arguments to format specifiers.
16899         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16900         TABLE_SWITCH, disassemble_method): Likewise.
16901
16902         * jcf-io.c: Include tree.h/java-tree.h.
16903         (open_class, find_classfile, jcf_print_utf8,
16904         jcf_print_utf8_replace): Const-ify.
16905
16906         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16907         parse_class_file): Add static prototype.
16908         (find_in_current_zip): Match definition to existing static
16909         prototype.
16910
16911         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16912         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16913         finish_jcf_block, define_jcf_label, get_jcf_label_here,
16914         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16915         write_chunks, adjust_typed_op, generate_bytecode_conditional,
16916         generate_bytecode_return, perform_relocations, init_jcf_state,
16917         init_jcf_method, release_jcf_state, generate_classfile):
16918         Add static prototype.
16919         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16920         (make_class_file_name): Const-ify.
16921
16922         * jcf.h (find_classfile): Const-ify.
16923
16924         * jv-scan.c (reset_report): Remove prototype.
16925
16926         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16927         (error): Rewrite to allow varargs.
16928
16929         * lang.c (lang_f_options): Const-ify.
16930
16931         * lex.c (java_parse_escape_sequence): Add static prototype.
16932         (java_allocate_new_line): Match definition to existing static
16933         prototype.
16934
16935         * mangle.c Include tree.h/java-tree.h.
16936         (unicode_mangling_length, emit_unicode_mangled_name,
16937         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16938
16939         * parse.h (jdep_code): Remove trailing comma in enumeration.
16940         (java_get_line_col): Move prototype outside of !JC1_LITE test.
16941         (reset_report): Add prototype.
16942
16943         * verify.c (push_pending_label, merge_types): Add static
16944         prototypes.
16945
16946         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16947
16948 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16949
16950         * parse.y (find_applicable_accessible_methods_list): Extend the
16951         search to superinterfaces when relevant.
16952         (search_applicable_methods_list): New function.
16953
16954 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16955
16956         * class.c (unmangle_classname): Implemented stricter testing
16957         before setting the QUALIFIED_P flag on an identifier.
16958
16959 1999-03-16  Per Bothner  <bothner@cygnus.com>
16960
16961         * parse.y (java_complete_lhs):  Call force_evaluation_order
16962         after patch_newarray.
16963         (patch_binop):  Don't call fold if there are side effects.
16964
16965 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16966
16967         * parse.y (java_stabilize_reference): Use save_expr instead of
16968         building a SAVE_EXPR node.
16969         (java_complete_lhs): Patch the resulting string of the `+='
16970         operator (if necessary) and complete the RHS after having built
16971         the cast.
16972
16973 1999-03-15  Per Bothner  <bothner@cygnus.com>
16974
16975         * class.c (make_class):  Don't set CLASS_P here (because
16976         this function is also called by build_java_array_type).
16977         (push_class):  Set CLASS_P here instead.
16978         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
16979
16980         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
16981         context.  If the context is class, perfer "super" over "synchronized".
16982         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
16983
16984         * parse.y (create_class):  Don't call parser_check_super here;
16985         it is not robust.  Always wait until later.
16986
16987         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
16988         match what JDK 1.2 does), but don't set ACC_PUBLIC.
16989
16990 1999-03-13  Per Bothner  <bothner@cygnus.com>
16991
16992         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
16993         * lex.h (UNGETC):  Change misleading macro.
16994
16995 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16996
16997         * parse.y (java_stabilize_reference): Return NODE when patching a
16998         COMPOUND_EXPR.
16999         (java_complete_lhs): Put parenthesis around truth values.
17000
17001 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17002
17003         * class.c (layout_class_method): Don't make rtl for interface
17004         methods.
17005         * parse.h (GET_TYPE_NAME): New macro.
17006         * parse.y (if_then_statement:): Fixed indentation.
17007         (if_then_else_statement:): Likewise.
17008         (for_statement:): Fixed spacing.
17009         (try_statement:): Fixed indentation.
17010         (create_interface): Don't force interfaces to be abstract.
17011         (method_header): Abstract methods are OK in interfaces.
17012         (declare_local_variables): Fixed typo in comment.
17013         (java_complete_expand_method): Fixed indentation.
17014         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17015         non accessible fields.
17016         (java_stabilize_reference): New function.
17017         (java_complete_lhs): Fixed indentation. Use
17018         java_stabilize_reference in compound assignment. Insert the
17019         cast. If not processing `+' fix string constants before processing
17020         binop.
17021
17022 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17023
17024         * constants.c (find_class_or_string_constant): Cast variable `j'
17025         to a `jword' when comparing against one.
17026
17027         * expr.c (java_lang_expand_expr): Remove unused variables
17028         `has_finally_p' and `op0'.
17029
17030         * gjavah.c (print_field_info): Cast a value to jint when comparing
17031         against one.  Likewise for a jlong.
17032         (add_namelet): Likewise cast a `sizeof' to an int when comparing
17033         against a signed quantity.
17034
17035         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17036         (print_signature): Don't needlessly dereference variable `str'
17037
17038         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17039         `max_locals' with ATTRIBUTE_UNUSED.
17040         (jcf_parse_class): Likewise for variable `index'.
17041
17042         * parse.h (reverse_jdep_list): Remove static prototype.
17043
17044         * parse.y (build_jump_to_finally): Remove prototype and definition.
17045         (reverse_jdep_list): Add static prototype.
17046
17047         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17048         `assignment' and `expr_decl'.
17049
17050         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17051
17052 1999-03-12  Andrew Haley  <aph@cygnus.com>
17053
17054         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17055         we'll need a directory separator and a null character.
17056
17057 1999-03-10  Per Bothner  <bothner@cygnus.com>
17058
17059         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17060
17061 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17062
17063         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17064         interfaces.
17065
17066 1999-03-05  Per Bothner  <bothner@cygnus.com>
17067
17068         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17069
17070         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17071
17072         * class.c (layout_class_method):  A static method in a base class
17073         is never overridden, so treat it like it doesn't exist.
17074         However, do complain about private non-static method overriding
17075         public static method.
17076
17077         * parse.y:  Don't set unused INITIALIZED_P flag.
17078         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17079
17080         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17081         (build_array_from_name):  Re-order &index[string] to &string[index].
17082
17083         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17084         error_mark (it might catch more errors, but it is more likely to lose).
17085
17086 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17087
17088         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17089         (parse-scan.o): Depend on toplev.h.
17090
17091         * class.c (make_method_value): Add prototype.  Make it static.
17092         Remove unused second argument, caller changed.
17093
17094         * expr.c (java_lang_expand_expr): Remove unused variable
17095         `return_label'.
17096
17097         * java-tree.h: Don't prototype find_in_current_zip.
17098         Add prototypes for verify_constant_pool, start_java_method,
17099         end_java_method, give_name_to_locals, expand_byte_code,
17100         open_in_zip, set_constant_value, find_constant1, find_constant2,
17101         find_utf8_constant, find_string_constant, find_class_constant,
17102         find_fieldref_index, find_methodref_index, write_constant_pool,
17103         count_constant_pool_bytes and encode_newarray_type.
17104
17105         * jcf-dump.c: Remove unused variable `LONG_temp'.
17106
17107         * jcf-parse.c: Include parse.h.
17108         (jcf_parse_source): Remove unused parameter, all callers changed.
17109         (jcf_figure_file_type): Add static prototype.
17110         (find_in_current_zip): Likewise.  Also remove unused parameter,
17111         all callers changed.
17112         (read_class): Initialize variable `saved_pos'.
17113
17114         * jcf-reader.c (jcf_parse_preamble): Mark variables
17115         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17116
17117         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17118         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17119         (java_parse_doc_section): Initialize variable `seen_star'.
17120         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17121         (java_lex_error): Mark parameters `msg' and `forward' with
17122         ATTRIBUTE_UNUSED.
17123         (java_get_line_col): Mark parameters `filename' and `line' with
17124         ATTRIBUTE_UNUSED.
17125
17126         * parse-scan.y: Include toplev.h.
17127         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17128
17129         * parse.h: use `struct JCF', not plain `JCF'.
17130         (java_parser_context_save_global, java_expand_classes
17131         java_parser_context_restore_global, java_parse): Add prototypes.
17132
17133         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17134         `node'.
17135
17136 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17137
17138         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17139
17140 1999-02-26  Per Bothner  <bothner@cygnus.com>
17141
17142         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17143         explicit build_decl.  (Avoids crash in reload when optimizing.)
17144
17145 1999-02-25  Per Bothner  <bothner@cygnus.com>
17146
17147         * decl.c (complete_start_java_method):  Handle synchronized method
17148         even when compiling from bytecode.
17149
17150 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17151
17152         * gjavah.c (add_class_decl): Only generate `#include' if outer
17153         class is not the name of the class we are processing.  Correctly
17154         append `.h' in #include.
17155         (process_file): Clean up newlines around generated `#include's.
17156         (decode_signature_piece): Correctly handle inner classes.
17157         (struct include): New structure.
17158         (all_includes): New global.
17159         (print_include): New function.
17160         (add_class_decl): Use it.
17161         (process_file): Likewise.
17162         (add_class_decl): Generate include for java-array.h if array
17163         seen.
17164         (process_file): Don't generate java-array.h include.
17165
17166         * gjavah.c (add_namelet): Check for standard package names here.
17167         (add_class_decl): Don't check for standard package names here.
17168
17169 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17170
17171         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17172         When reading a zip file, only use strncmp if both strings are
17173         bigger than the buffer length.  Initialize `k' when looping
17174         through zip file.
17175
17176 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17177
17178         * gjavah.c (struct namelet): New structure.
17179         (add_namelet): New function.
17180         (print_namelet): New function.
17181         (print_class_decls): Use add_namelet and print_namelet to generate
17182         namespaces and not classes.
17183         (method_printed): New global.
17184         (HANDLE_END_METHOD): Examine method_printed.
17185         (print_method_info): Set method_printed when required.  Print
17186         error if function to be ignored is marked virtual.  Handle $finit$
17187         method.
17188         (METHOD_IS_FINAL): New macro.
17189         (print_field_info): Use it.
17190         (HANDLE_METHOD): Clear method_printed.
17191         (method_pass): New global.
17192         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17193         (process_file): Do two passes over both fields and methods.
17194         (HANDLE_METHOD): Examine method_pass.
17195         (root): New global.
17196         (add_class_decl): New function.
17197         (print_class_decls): Don't scan over entire constant pool.
17198
17199 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17200
17201         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17202         disable linking in that case.
17203
17204 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17205
17206         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17207         not 0x1f.
17208
17209 1999-02-21  Per Bothner  <bothner@cygnus.com>
17210
17211         * decl.c (build_result_decl), java-tree.h:  New method.
17212         (complete_start_java_method):  Handle synchronized methods.
17213         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17214         (start_java_method):  Call build_result_decl here instead  ...
17215         * parse.y (java_complete_expand_method):  ... and here.
17216         (expand_start_java_method): Don't call complete_start_java_method here.
17217         (java_complete_expand_method):  Call it here instead.
17218         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17219         * java-tree.h:  ... here.
17220
17221         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17222         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17223         for ARRAY_REF - it doesn't work when array bounds are checked.
17224         (patch_array_ref):  Handle it here instead.
17225
17226         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17227
17228 1999-02-19  Per Bothner  <bothner@cygnus.com>
17229
17230         Force left-to-right evaluation of binary operations etc.
17231         * expr.c (force_evaluation_order), java-tree.h:  New function.
17232         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17233         calls, and ARRAY_REFs to force_evaluation_order.
17234         (various):  Set TREE_SIDE_EFFECTS more carefully.
17235
17236         Tolerate random (non-UTF8) encoding in comments without complaining.
17237         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17238         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17239
17240         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17241         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17242
17243         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17244         COMPOUND_EXPR.  Don't complain about empty statement after return.
17245
17246 1999-02-19  Per Bothner  <bothner@cygnus.com>
17247
17248         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17249         in TREE_LIST - just chain the POINTER_TYPEs together.
17250         (resolve_class):  If type already resolved, return decl.
17251         After resolving, update TREE_TYPE(class_type), and name (if array).
17252         * parse.h (do_resolve_class), parse.y:  Make non-static.
17253         * class.c (maybe_layout_super_class):  Take this_class argument.
17254         Do do_resolve_class if necessary.
17255         (layout_class, layout_class_methods): Adjust calls appropriately.
17256         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17257         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17258         * typeck.c (build_java_array_type):  Don't call layout_class.
17259
17260 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17261
17262         * parse.y (check_pkg_class_access): Allow private class access
17263         within the same package.
17264         (strip_out_static_field_access_decl): New function.
17265         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17266         operator argument before testing its nature.
17267
17268 1999-02-03  Per Bothner  <bothner@cygnus.com>
17269
17270         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17271         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17272         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17273         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17274         * expr.c (java_lang_expand_expr):  Likewise.
17275         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17276         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17277         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17278         (build_try_statement):  Remove finally parameter and handling.
17279         (build_try_finally_statement):  New function.
17280         (patch_try_statement):   No longer need to support finally clause.
17281         (try_statement):  Update grammar action rules.
17282         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17283         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17284
17285 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17286
17287         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17288         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17289
17290 1999-02-17  Andrew Haley  <aph@cygnus.com>
17291
17292         * class.c (build_utf8_ref): Back out broken patch which was
17293         intended to to output signatures using '.' as a separator.
17294
17295         * class.c (make_class_data): Output signatures using '.' as a
17296         separator, rather than '/'.
17297         (mangled_classname): Likewise.
17298         (make_field_value): Likewise.
17299         (make_method_value): Likewise.
17300         * constants.c (alloc_class_constant): Likewise.
17301         * expr.c (build_invokeinterface): Likewise.
17302
17303 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17304
17305         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17306         of an ancient workaround.
17307
17308 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17309
17310         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17311         here anymore.
17312
17313 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17314
17315         * lex.c (yylex): Encode \0 as UTF8.
17316
17317 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17318
17319         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17320         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17321         (libgcj_zip): Renamed.
17322         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17323         LIBJAVA_ZIP_FILE.
17324         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17325
17326         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17327         (GC_NAME): Renamed -lgc to -lgcjgc.
17328
17329 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17330
17331         * lex.c (java_lang_cloneable): Initialize.
17332         * parse.y (java_lang_cloneable): New static variable.
17333         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17334         doing one more qualification round.
17335         (valid_ref_assignconv_cast_p): Reject null source or
17336         destination. Allow an array to be cast into java.lang.Cloneable.
17337         (patch_cast): Swapped two first arguments to first call to
17338         valid_ref_assignconv_cast_p.
17339
17340 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17341
17342         * parse.h: DECL_P renamed JDECL_P.
17343         * parse.y: DECL_P replaced by JDECL_P.
17344         (build_array_from_name): Always use pointer's type.
17345         (patch_bc_statement): Extra code to search continue target in a
17346         for loop. Fixed comments. Continue target is current loop when
17347         unlabeled.
17348
17349 1999-02-05  Andrew Haley  <aph@cygnus.com>
17350
17351         * class.c (make_class_data): The superclass of an interface should
17352         be null, not class Object.
17353
17354         * lex.c (java_lex): Sign extend hex literals.
17355
17356 1999-02-04  Andrew Haley  <aph@cygnus.com>
17357
17358         * class.c (build_utf8_ref): Output signatures using '.' as a
17359         separator, rather than '/'.
17360         (make_class_data): Likewise.
17361
17362 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17363
17364         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17365         mkstemp.o.  Get them from libiberty now.
17366
17367 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17368
17369         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17370
17371 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17372
17373         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17374         from libiberty.h
17375
17376 1999-02-02  Per Bothner  <bothner@cygnus.com>
17377
17378         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17379         * jcf-write.c (generate_bytecode_return):  New function.
17380         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
17381
17382         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
17383         generate special [fd]const_[01] instructions.
17384
17385         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
17386
17387         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
17388         handling OPCODE_lookupswitch or OPCODE_tableswitch.
17389
17390 1999-02-01  Per Bothner  <bothner@cygnus.com>
17391
17392         * parse.y (patch_method_invocation):  Handle calling static methods,
17393         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17394
17395         * parse.y (java_complete_lhs):  Don't complain about unreachable
17396         exit condition in a do-while statement.
17397
17398 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17399
17400         * lex.c (java_read_char): Fixed utf8 decoding.
17401         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17402         range.
17403         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17404         comments. Local variable `all_primitive' is gone. Broadened
17405         acceptance of `0' to floating point targets. `long' can now be
17406         widened to `double' or `float'.
17407         (valid_method_invocation_conversion_p): Added leading
17408         comment. Fixed tabulation.
17409         (build_string_concatenation): Optimize out left or right empty
17410         string constants.
17411
17412 1999-01-28  Per Bothner  <bothner@cygnus.com>
17413
17414         * jcf-write.c (localvar_alloc):  Only emit entry for
17415         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17416         (generate_bytecode_insns):  Only call put_linenumber if
17417         debug_info_level > DINFO_LEVEL_NONE.
17418         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
17419         is specified, add -g1 (for compatibility wih javac).
17420
17421 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
17422
17423         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17424         gjavah.o, check-init.o, jv-scan.o
17425
17426 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17427
17428         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17429
17430         * gjavah.c: Include config.h and system.h.
17431
17432         * javaop.h (inline): Don't define, its handled by system.h.
17433         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17434         from `inline' to `static inline'.
17435
17436         * jcf.h (inline): Don't define, its handled by system.h.
17437
17438         * lex.c (inline): Likewise.
17439
17440 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
17441
17442         * lang-specs.h: Map -Qn to -fno-ident.
17443
17444 1999-01-29  Richard Henderson  <rth@cygnus.com>
17445
17446         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17447
17448 1999-01-29  Tom Tromey  <tromey@cygnus.com>
17449
17450         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17451         then cast it to Object before calling `append' method.
17452
17453 1999-01-28  Per Bothner  <bothner@cygnus.com>
17454
17455         * check-init.c (check_bool2_init, check_bool_init, check_init):
17456         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17457         * jcf-write.c (generate_bytecode_insns):  Likewise.
17458
17459 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17460
17461         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17462         * parse.y (patch_cast): Allow a boolean to be cast into a
17463         boolean.
17464
17465 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17466
17467         * parse.y: (class_declaration:): Fixed indentation.
17468         (class_member_declaration:): Extra `;' after field declaration now
17469         accepted.
17470         (interface_declaration:): Removed debug messages in error reports.
17471         (patch_binop): Nodes created and returned inherit the orignal
17472         node's COMPOUND_ASSIGN_P flag value.
17473         (patch_cast): Fix cast from char to floating point.
17474
17475 1999-01-25  Andrew Haley  <aph@cygnus.com>
17476
17477         * except.c, java-except.h (expand_resume_after_catch): new
17478         function.
17479         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17480         to branch back to main flow of control after a catch block.
17481
17482 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17483
17484         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17485         $(srcdir)/../system.h.
17486         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17487         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17488         (jcf-write.o): Likewise.
17489         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17490         (mangle.o): Depend on $(srcdir)/../toplev.h.
17491         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17492         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17493
17494         * class.c: Include output.h and parse.h.
17495         (mangled_classname): Add the `const' keyword to a char*.
17496         (find_named_method): Hide unused function definition.
17497         (build_utf8_ref): Change type of variable `c' to unsigned char.
17498         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17499         (build_class_ref): Add the `const' keyword to a char*.
17500         (layout_class_method): Remove unused variable `buf'.
17501
17502         * decl.c (find_local_variable): Remove unused variable `rtl'.
17503         (pushdecl): Likewise for variables `different_binding_level' and
17504         `oldglobal'.
17505         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17506         (maybe_build_cleanup): Likewise for parameter `decl'.
17507
17508         * except.c (expand_start_java_handler): Mark parameter `range'
17509         with ATTRIBUTE_UNUSED.
17510
17511         * expr.c: Include except.h.
17512         (pop_type): Remove unused variable `i'.
17513         (pop_value): Likewise for variables `n_words' and `i'.
17514         (expand_java_arrayload): Likewise for variable `convert'.
17515         (java_lang_expand_expr): Likewise for variables `op0', `type',
17516         `mode', `unsignedp', `node' and `elements'.
17517         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17518         `eh_ranges'.
17519         (process_jvm_instruction): Add a `const' qualifier to a char*.
17520
17521         * gjavah.c (output_directory): Add the `const' keyword to a char*.
17522         (temp_directory): Likewise.
17523         (print_c_decl): Likewise.
17524         (print_method_info): Likewise.
17525         (decode_signature_piece): Likewise.
17526         (print_mangled_classname): Likewise.
17527
17528         * java-except.h: Provide prototypes for maybe_start_try,
17529         maybe_end_try and add_handler.
17530
17531         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17532         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
17533         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17534         init_expr_processing, push_super_field, init_class_processing,
17535         can_widen_reference_to, class_depth, verify_jvm_instructions,
17536         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17537         set_local_type, merge_type_state, push_type, load_type_state,
17538         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17539         emit_unicode_mangled_name): Add prototypes.
17540
17541         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17542         (print_signature_type): Use ISDIGIT, not isdigit.
17543         (print_signature): Remove unused variable `j'.
17544
17545         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17546         int when comparing against one.
17547
17548         * jcf-parse.c: Include toplev.h.
17549
17550         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
17551         (localvar_free): Remove unused variable `i'.
17552         (generate_bytecode_conditional): Likewise for variable `kind'.
17553
17554         * jv-scan.c: Include config.h and system.h.  Remove redundant
17555         OS header and gansidecl.h includes.
17556         (warning): Add the `const' keyword to a char*.  Also add
17557         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
17558         __STDC__, when determining whether to use ANSI-isms.
17559         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
17560         (xmalloc): Don't redundantly prototype here.
17561         (main): Remove unused parameter `envp'.  Also fix the arguments
17562         passed to function `fatal' to match the format specifier.
17563
17564         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17565
17566         * mangle.c: Include toplev.h.
17567         (emit_unicode_mangled_name): Declare parameter `len'.
17568
17569         * parse.y (parse_warning_context): Add the `const' keyword to a
17570         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
17571         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17572         (issue_warning_error_from_context): Add the `const' keyword to
17573         a char*.
17574         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17575         not `__STDC__' for whether to use ANSI-isms.
17576
17577         * typeck.c (incomplete_type_error): Mark parameters `value' and
17578         `type' with ATTRIBUTE_UNUSED.
17579         (parse_signature_type): Use ISDIGIT, not isdigit.
17580
17581         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17582         (verify_jvm_instructions): Likewise.  Remove unused variables
17583         `field_name' and `default_val'.
17584
17585         * zextract.c: Include config.h and system.h.  Remove redundant
17586         OS header includes.
17587
17588         * zipfile.h: Prototype `read_zip_archive'.
17589
17590 1999-01-21  Andrew Haley  <aph@cygnus.com>
17591
17592         * typeck.c (convert): Allow conversions to void type: some
17593         optimizations in gcc do this.
17594
17595 1999-01-21  Andrew Haley  <aph@cygnus.com>
17596
17597         * typeck.c (convert_ieee_real_to_integer): New function.
17598         (convert): When not using fast-math and using hardware fp, convert
17599         an IEEE NaN to zero.
17600
17601 1999-01-18  Andrew Haley  <aph@cygnus.com>
17602
17603         * parse.y (patch_binop): Do a type conversion from signed to
17604         unsigned and then back to signed when a ">>>" is found.
17605
17606 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17607
17608         * java-tree.h: (check_for_initialization): Added prototype.
17609         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17610         * parse.y (do_resolve_class): Removed unused locals.
17611         (read_import_dir): Likewise.
17612         (resolve_qualified_expression_name): Array creation
17613         expressions are valid primary expressions.
17614         (qualify_ambiguous_name): Likewise.
17615         (patch_synchronized_statement): Removed unused local.
17616
17617 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17618
17619         * Makefile.in (zextract.o): Add dependencies.
17620
17621         * Makefile.in: Do not put ^Ls at the start of a line.
17622
17623 1999-01-15  Per Bothner  <bothner@cygnus.com>
17624
17625         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17626         sub-type the result of the call that gets the exception value.
17627
17628         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17629         don't call finish_class.
17630
17631         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17632         clear found before continuing.
17633
17634         * verify.c (verify_jvm_instructions):  On an array load, allow
17635         and handle top of stack to be TYPE_NULL.
17636
17637         * gjavah.c (generate_access):  Translate Java package private or
17638         protected access to C++ public, but with a comment.
17639
17640 1999-01-13  Andrew Haley  <aph@cygnus.com>
17641
17642         * expr.c (generate_name): Name prefix changed to avoid clashes
17643         with assembler temp labels.
17644
17645         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17646         MODIFY_EXPR.  Without this, code for the assignment may not be
17647         generated at all and the synchronized statement will read an
17648         uninitialized variable.
17649
17650 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17651
17652         * class.c (maybe_layout_super_class): Fixed returned value.
17653         * lex.c: Added 1999 to the copyright.
17654         (java_init_lex): Initialize java_lang_imported.
17655         * lex.h: Added 1999 to the copyright.
17656         * parse.h: Added 1999 to the copyright.
17657         (REGISTER_IMPORT): Fixed typo in trailing macro.
17658         (CURRENT_OSB): New macro.
17659         (struct parser_ctxt): New fields osb_depth, osb_limit.
17660         * parse.y (java_lang_id): New global variable.
17661         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17662         (array_creation_expression:): Use CURRENT_OSB.
17663         (dims:): Uses a stack to keep track of array dimensions.
17664         (cast_expression:): Use CURRENT_OSB.
17665         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17666         conditions.
17667         (register_fields): Fixed typos in comment.
17668         (check_method_redefinition): Fixed comment indentation.
17669         (java_check_regular_methods): Set saved found wfl to NULL after
17670         having reinstalled it in the previously found DECL_NAME.
17671
17672 1999-01-10  Richard Henderson  <rth@cygnus.com>
17673
17674         * gjavah.c (java_float_finite): Use a union to do type punning.
17675         (java_double_finite): Likewise.
17676
17677 1999-01-09  Per Bothner  <bothner@cygnus.com>
17678
17679         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
17680         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17681         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
17682         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
17683         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17684         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
17685
17686 1999-01-08  Per Bothner  <bothner@cygnus.com>
17687
17688         * check-init.c (check_init):  If compiling to native, we don't
17689         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
17690
17691 1999-01-08  Tom Tromey  <tromey@cygnus.com>
17692
17693         * parse-scan.y (variable_declarator_id): Set or increment
17694         bracket_count.
17695         (bracket_count): New global.
17696         (formal_parameter): Handle case where bracket pairs trail variable
17697         declarator id.
17698
17699 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
17700
17701         * jcf-parse.c (yyparse): variable len changed from a char to an
17702         int to prevent overflow.
17703
17704 1999-01-06  Per Bothner  <bothner@cygnus.com>
17705
17706         * java-tree.h:  Declare read_class.
17707         * jcf-parse.c (read_class):  New function.
17708         (load_class):  Now just call read_class.
17709
17710         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
17711         * jcf-parse.c (parse_source_file):  Declare save_error_count,
17712         which is needed by java_parse_abort_on_error macro,
17713         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
17714
17715         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
17716         constructor, if initializing a static field.
17717         (patch_new_array_init):  Set TREE_CONSTANT if it is.
17718         * expr.c (java_lang_expand_expr):  For a static array constructor
17719         of primitive elements, allocate the array itself statically.
17720         Disabled until we can set the vtable field statically.
17721
17722         * check-init.c:  New file.  Checks for definite assignment.
17723         * Makefile.in (JAVA_OBJS):  Add check-init.o.
17724         * parse.y (java_complete_expand_method): Call check_for_initialization.
17725         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
17726
17727 1999-01-06  Graham <grahams@rcp.co.uk>
17728
17729         * parse.y : include system.h instead of including
17730         standard headers directly with the exception of <dirent.h>.
17731
17732 1999-01-06  Per Bothner  <bothner@cygnus.com>
17733
17734         * lex.h:  Moved static function declarations to lex.c,
17735         to shut up some -Wall warnings.
17736         * lex.c:  Static function declarations moved here.
17737         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
17738
17739 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17740
17741         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17742
17743 1998-12-22  Per Bothner  <bothner@cygnus.com>
17744
17745         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
17746         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
17747
17748         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
17749         (localvar_alloc):  Change return type to void,
17750         (emit_unop):  Remove unused variable size.
17751
17752         * jcf-write.c (struct jcf_block):  Add new union.
17753         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
17754         (call_cleanups):  New functions.
17755         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
17756         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
17757         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17758         * lang.c (lang_init):  Call using_eh_for_cleanups.
17759         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
17760         completing operands to patch_synchronized_statement.
17761         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17762         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17763         WITH_CLEANUP_EXPR instead of TRY_EXPR.
17764
17765 1998-12-20  John F. Carr  <jfc@mit.edu>
17766
17767         * Make-lang.in: Comment out control-Ls; they upset some makes.
17768
17769 1998-12-18  Tom Tromey  <tromey@cygnus.com>
17770
17771         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17772         consistently.
17773
17774 1998-12-17  Tom Tromey  <tromey@cygnus.com>
17775
17776         * parse.y (DIR_SEPARATOR): New define.
17777         (check_class_interface_creation): Use it.
17778
17779         * parse-scan.y (report_main_declaration): Recognize
17780         `java.lang.String' in argument to main.
17781
17782 1998-12-16  Per Bothner  <bothner@cygnus.com>
17783
17784         * parse.y (create_interface):  Remove bogus test.
17785
17786 1998-12-16  Per Bothner  <bothner@cygnus.com>
17787
17788         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
17789         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
17790
17791 1998-12-16  Tom Tromey  <tromey@cygnus.com>
17792
17793         * parse-scan.y (qualified_name): Use correct sprintf format.
17794
17795 1998-12-15  Tom Tromey  <tromey@cygnus.com>
17796
17797         * gjavah.c (print_field_info): Changed how most negative number is
17798         printed.
17799
17800 1998-12-14  Per Bothner  <bothner@cygnus.com>
17801
17802         * parse.y (fold_constant_for_init):  New function.
17803         (resolve_expression_name):  Don't replace static final
17804         constant-initialized fields by its value.
17805         (java_complete_lhs):  New.  Same as java_complete_tree, except does
17806         not replace static final constant-initialized fields by their values.
17807         (register_fields):  If there is an initializer, set DECL_INITIAL and
17808         MODIFY_EXPR_FROM_INITIALIZATION_P.
17809         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
17810         Only call patch_initialized_static_field if
17811         MODIFY_EXPR_FROM_INITIALIZATION_P.
17812         (patch_initialized_static_field):  If not valid constant, clear
17813         DECL_INITIAL.
17814
17815         * parse.y (lookup_field_wrapper):  Fix thinko.
17816
17817         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
17818         set and restore global lineno.
17819
17820 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17821
17822         * gjavah.c (print_field_info): If value to print is the smallest
17823         value of its size, then print as hex to avoid later warnings from
17824         C++ compiler.
17825
17826 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17827
17828         * gjavah.c (decompile_method): Decompile `return null'.
17829         (process_file): Generate `#pragma interface'.
17830         (method_declared): New global.
17831         (print_method_info): Set it.
17832         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17833         (print_method_info): Handle abstract methods.
17834
17835 1998-12-13  Per Bothner  <bothner@cygnus.com>
17836
17837         * parse.y (patch_method_invocation):  If class_decl is null
17838         (e.g. an array type), use original type.
17839
17840         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
17841         errors about uncaught exception from clone (of array, specifically).
17842
17843 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17844
17845         * gjavah.c (decompile_method): Handle all types of `return'
17846         opcode.  Decompile `return this' and `return'.
17847         (method_access): New global.
17848         (print_method_info): Set it.
17849         (decompile_method): Don't decompile a synchronized method.
17850
17851 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17852
17853         * jcf-reader.c (jcf_parse_one_method): Recognize
17854         HANDLE_END_METHOD.
17855         * gjavah.c (HANDLE_END_METHOD): New macro.
17856         (HANDLE_CODE_ATTRIBUTE): New macro.
17857         (decompile_method): New function.
17858         (print_method_info): Don't print `;\n' at end of function decl.
17859         Include java-opcodes.h.
17860         (decompiled): New global.
17861
17862 1998-12-12  Per Bothner  <bothner@cygnus.com>
17863
17864         * class.c (build_class_ref):  Handle PRIMTYPE.class if
17865         flag_emit_class_files.
17866         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
17867         if flag_emit_class_files.
17868         * parse.y (java_complete_tree):  Pre-liminary support for
17869         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17870
17871         * parse.y (patch_synchronized_statement):   Don't call monitorexit
17872         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
17873
17874         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
17875
17876         * zipfile.h (opendir_in_zip):  New declaration.
17877         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
17878         (opendir_in_zip):  New function, using code from open_in_zip.
17879         (open_in_zip):  Call opendir_in_zip.
17880         (find_class):  Remove no-longer-used do_class_file parameter,
17881         but add source_ok parameter.  Change logic so if we find a .java file,
17882         we don't look for .class in later classpath emtries.
17883         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
17884         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
17885         * gjavah.c: Update call to find_class.
17886         * jcf-dump.c:  Likewise.
17887
17888         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
17889         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
17890         nothing if body is empty_stmt_node.
17891         Various little fixes so SP gets correctly adjusted.
17892         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17893         For CALL_EXPR, test if static first.
17894         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
17895         such as the ones we create for Object and Class.
17896         Set and restore current_function_decl.
17897         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17898         (note_possible_classname):  New function.
17899         (read_import_entry):  Removed.  Merged with read_import_dir.
17900         (read_import_dir):  Don't call find_class - that only gives us
17901         the first classpath entry having the needed package.
17902         Use the struct buffer data structure from buffer.h.
17903         (read_import_dir, find_in_imports_on_demand):  The remembered
17904         class names now use '.' (not '/') as package separator.
17905
17906         * parse.y (java_complete_expand_methods):  Call write_classfile
17907         here, and not in java_expand_classes (which only gets first class).
17908
17909 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17910
17911         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
17912         (register_fields):  If a static fields has an initializer, just
17913         chain it on ctxp->static_initialized, and handle later.
17914         (java_complete_expand_methods):  Force <clinit> first.
17915         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
17916         - it's already been completed.
17917         (patch_initialized_static_field):  New function.
17918         (java_complete_field):  Call it.
17919
17920 1998-12-12  Per Bothner  <bothner@cygnus.com>
17921
17922         * expr.c (encode_newarray_type, build_new_array):  New functions.
17923         * java-tree.h:  Declare build_new_array.
17924         * jcf-write.c (patch_newarray):  Use build_new_array.
17925
17926         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
17927         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
17928
17929         * parse.y (patch_new_array_init):  Re-organize.
17930         Now is passed the actual array (pointer) type of the value.
17931         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17932         (patch_array_constructor):  Removed - merged into patch_new_array_init.
17933         (java_complete_tree):  Update patch_new_array_init.
17934
17935         * jcf-write.c (find_constant_index):  New function.
17936         (generate_bytecode_insns):  Use find_constant_index.
17937         (generate_classfile):  Use find_constant_index for ConstantValue.
17938
17939 1998-12-11  Tom Tromey  <tromey@cygnus.com>
17940
17941         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17942         * decl.c (init_decl_processing): Renamed dtable -> vtable.
17943         * class.c (make_class_data): Renamed dtable -> vtable, and
17944         dtable_method_count -> vtable_method_count.
17945
17946 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17947
17948         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17949         global variables, initialized.
17950         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17951         Declared new global variables.
17952         * lex.c (java_lex): Return long_zero_node, float_zero_node,
17953         double_zero_node, integer_zero_node upon direct matching.
17954         * parse.y (purify_type_name): Added function prototype.
17955         (duplicate_declaration_error_p): Consider new_type as potentially
17956         being a incomplete type. Use purify_type_name on type string.
17957         (method_header): saved_type: unused variable removed. Don't figure
17958         return type if method name is invalid.
17959         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17960         processed by patch_unaryop.
17961         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17962         increment/decrement node into its original type after binary
17963         numeric promotion on its operands.
17964
17965 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17966
17967         * parse.y (array_initializer:): Array init operand is NULL_TREE
17968         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17969         now an error. Fixed indentation problems.
17970         (patch_string): Handle error_mark_node as an argument.
17971         (patch_new_array_init): Fixed indentation problems.
17972         (array_constructor_check_entry): Removed check on null wfl_value.
17973         Return an error if wfl_value's walk returns an error.
17974
17975 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17976
17977         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17978         * lex.c (java_lex): Remember column position before advancing one
17979         token. Retain location information on OCB_TK.
17980         * lex.h (typedef struct java_lc): Added new field.
17981         * parse.h (GET_SKIP_TYPE): New macro.
17982         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17983         * parse.y (build_new_array_init, patch_new_array_init,
17984         patch_array_constructor, maybe_build_array_element_wfl,
17985         array_constructor_check_entry): New function prototypes.
17986         (switch_block:): Tagged <node>.
17987         (OCB_TK): Tagged <operator>.
17988         (array_initializer:): Installed actions.
17989         (variable_initializer): Build location information on element if
17990         necessary.
17991         (switch_statement:): Fixed indentation typo.
17992         (switch_block:): Redefined default action.
17993         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
17994         (patch_assignment): Removed duplicate code.
17995         (maybe_build_array_element_wfl, build_new_array_init,
17996         patch_new_array_init, patch_array_constructor,
17997         array_constructor_check_entry): New functions.
17998
17999 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18000
18001         * parse.y (array_initializer): Tagged <node>.
18002         (variable_initializer:): Use default rule.
18003         (array_initializer:): Defined actions.
18004         (variable_initializers:): Likewise.
18005         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18006         non-static field accesses.
18007         (patch_invoke): Fixed indentation typo.
18008         (java_complete_tree): Likewise.
18009         (build_labeled_block): Changed leading comment. Generate an error
18010         in case of duplicate loop labels.
18011         (patch_conditional_expr): Patch results of string concatenation
18012         operations.
18013
18014 1998-12-06  Per Bothner  <bothner@cygnus.com>
18015
18016         * constants.c (find_methodref_index):  When the class is an interface,
18017         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18018
18019         * decl.c (finit_identifier_node):  Use "$finit$", rather than
18020         "<finit>" (which Sun's verifier rejects).
18021         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
18022         (generate_field_initialization_code):  Removed.
18023         (fix_constructors)  Don't add call to $finit$ here (wrong order).
18024         (patch_method_invocation):  Add $finit$ call here.
18025
18026         * java-tree.h (CALL_USING_SUPER):  New macro.
18027         * parse.y (patch_invoke):  Remove im local variable.
18028         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
18029         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
18030         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
18031
18032         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
18033
18034         * parse.y (java_complete_tree):  Don't complain about unreachable
18035         statement if it is empty_stmt_node.
18036
18037         * jcf-write.c (find_constant_wide):  New function.
18038         (push_long_const):  Use find_constant_wide.
18039
18040         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
18041         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
18042         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18043         Emit invokeinterface when calling an interface method.
18044         Emit invokespecial also when calling super or private methods.
18045
18046         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
18047
18048 1998-12-06  Per Bothner  <bothner@cygnus.com>
18049
18050         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
18051
18052 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18053
18054         * java-tree.h (java_layout_seen_class_methods): New function
18055         prototype.
18056         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18057         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18058         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18059         * parse.y (method_declarator:): Defined action.
18060         (issue_warning_error_from_context): input_filename saved, set to
18061         the appropriate value and restored after java_error is called.
18062         (build_unresolved_array_type): Fixed comment.
18063         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18064         (method_header): Deal with return type the same way type are
18065         handled for fields and method's parameters and local variables
18066         types are handled.
18067         (check_method_redefinition): Removed extra CR.
18068         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18069         (java_layout_seen_class_methods): New function.
18070         (java_layout_classes): Call java_layout_seen_class_methods.
18071
18072 1998-12-03  Per Bothner  <bothner@cygnus.com>
18073
18074         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18075
18076 1998-12-03  Per Bothner  <bothner@cygnus.com>
18077
18078         * jcf-dump.c (main):  Fix error message.
18079         * jcf-path.c (add_entry):  Style fix.
18080
18081 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18082
18083         * class.c (layout_class_method): Call build_java_argument_signature
18084         on constructors too.
18085         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18086         (patch_method_invocation): Define a primary when resolving an
18087         expression name. Augmented comment on code checking illegal `this'
18088         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18089
18090 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18091
18092         * class.c (layout_class_method): Don't report error on non-static
18093         overriding static if the method is private.
18094         * java-tree.h (finish_class): Prototype added.
18095         * lex.c (java_get_line_col): Handle col argument -2 value.
18096         * parse.h: All static method declarations moved to parse.y.
18097         * parse.y: Now contains all static method declarations previously
18098         found in parse.h.
18099         (find_expr_with_wfl, missing_return_error,
18100         unreachable_stmt_error): New functions.
18101         (java_get_real_method_name): Identify constructors bearing class
18102         names in source code compiled classes only.
18103         (java_complete_expand_methods): Call missing_return_error.
18104         (invocation_mode): Private methods invoked as static methods.
18105         (java_complete_tree): Call unreachable_stmt_error.
18106
18107 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18108
18109         * Makefile.in (+target): Removed.
18110         (+xmake_file): Likewise.
18111         (+tmake_file): Likewise.
18112         (.NOEXPORT): Removed duplicate.
18113
18114 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18115
18116         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18117
18118         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18119
18120         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18121         libiberty.h.  Provide an xmalloc definition.
18122
18123         * jvspec.c: Remove the xmalloc prototype.
18124
18125         * parse-scan.y: Include config.h and system.h.  Don't include
18126         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18127         Provide an xstrdup definition.
18128
18129 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18130
18131         * jcf-path.c (add_entry): Recognize ".jar" too.
18132         * lang-specs.h: Likewise.
18133
18134 1998-11-26  Per Bothner  <bothner@cygnus.com>
18135
18136         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18137         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18138
18139         * jcf-write.c (generate_bytecode_insns):
18140         Handle pre/post-increment/decrement of long.
18141
18142         * jcf-write.c (generate_bytecode_insns):
18143         Handle missing exception handler (finally for synchronized).
18144
18145 1998-11-25  Per Bothner  <bothner@cygnus.com>
18146
18147         * java-tree.h (end_params_node):  Declare global.
18148         * decl.c (end_params_node):  New global.
18149         (init_decl_processing, start_java_method):  Use end_params_node for
18150         end of list of parameter types.  Follows correct gcc conventions.
18151         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18152         * lang.c (put_decl_node):  Likewise.
18153         * typeck.c (various places):  Likewise.
18154         * class.y (various places):  Likewise.
18155         * parse.y (various places):  Likewise.
18156
18157         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18158         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18159
18160         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18161
18162         * class.c (layout_class_method):  Remove commented-out code, re-format.
18163         Don't add vtable entry (or index) for private methods.
18164         * expr.c (expand_invoke):  A private method is implicitly final.
18165         * class.c (make_class_data):  If inlining or optimizing,
18166         skip private methods.
18167
18168         * class.c (finish_class):  New function.  Calls existing methods,
18169         but alls emits deferred inline functions.
18170         * jcf-parse.c (parse_class_file):  Call finish_class.
18171         * parse.y (java_complete_expand_methods):  Likewise.
18172
18173         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18174
18175         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18176
18177 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18178
18179         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18180
18181 1998-11-24  Per Bothner  <bothner@cygnus.com>
18182
18183         * (generate_classfile): Always write class access flag with
18184         ACC_SUPER set.
18185
18186 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18187
18188         * class.c (maybe_layout_super_class): New function.
18189         (layout_class): Reorganized. Loop on class methods dispatched into
18190         a new function. Call maybe_layout_super_class.
18191         (layout_class_methods, layout_class_method): New functions.
18192         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18193         class.
18194         (expand_invoke): Likewise.
18195         * java-tree.h (all_class_list): New global variable declared.
18196         (layout_class_methods, layout_class_method): New function
18197         prototypes.
18198         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18199         * jcf-parse.c (all_class_list): New global variable.
18200         (load_class): Extended what class_or_name can be. Use parser
18201         context mechanism to save globals before calling jcf_parse.
18202         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18203         is set on the file name.
18204         (jcf_parse): Layout class methods when Object is loaded, otherwise
18205         record class in all_class_list for delayed method layout.
18206         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18207         * lang.c (put_decl_node): Decode <init> into the decl context
18208         class name.
18209         * lex.c (java_allocate_new_line): Use xmalloc.
18210         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18211         pointers, not TREE_LIST elements.
18212         (struct parser_ctxt): Fixed comment indentations, added comments
18213         and reordered some fields.
18214         (java_check_methods): Function prototype removed.
18215         * parse.y (java_push_parser_context): Use xmalloc.
18216         (java_parser_context_restore_global): Pop extra pushed ctxp only
18217         when there's nothing next.
18218         (maybe_create_class_interface_decl): Fixed comment, add new
18219         created class decl to all_class_list.
18220         (method_header): Use GET_REAL_TYPE on argument's types.
18221         (method_declarator): Use GET_REAL_TYPE, change type to the real
18222         type in TREE_LIST dependency node. Build argument list with the
18223         real type.
18224         (create_jdep_list): Use xmalloc. Removed allocation error message.
18225         (obtain_incomplete_type): Fixed leading comment. Broadened
18226         incoming argument meaning.
18227         (register_incomplete_type): Use xmalloc. Removed allocation error
18228         message.
18229         (safe_layout_class): Fixed leading comment.
18230         (jdep_resolve_class): Reversed if statement condition and switch
18231         if and else bodies.
18232         (resolve_and_layout): Fixed leading comment. Broadened incoming
18233         argument meaning.
18234         (complete_class_report_errors): New local variable name, for
18235         clarity. purify_type_name used for all error cases.
18236         (java_get_real_method_name): Stricter check on constructors.
18237         (java_check_regular_methods): Reverse methods list only if not
18238         already laid out. Layout artificial constructor.
18239         (java_check_methods): Deleted.
18240         (source_start_java_method): Obtain incomplete type for patchable
18241         method arguments.
18242         (java_layout_classes): Fixed leading comment. Use
18243         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18244         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18245         before returning. Fixed comments.
18246         (java_expand_classes): Check for errors up front.
18247         (patch_method_invocation): Class to search is resolved and laid
18248         out.
18249
18250 1998-11-24  Per Bothner  <bothner@cygnus.com>
18251
18252         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18253
18254         * javaop.h (int8):  Removed - not used.
18255         (jbyte):  Redefine portably with correct signedness.
18256
18257         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18258
18259         * jcf-write.c (generate_bytecode_insns):  Fix typo
18260         OPCODE_getstatic to OPCODE_getfield.
18261
18262         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18263         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18264         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18265
18266 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18267
18268         * jcf-parse.c (jcf_parse_source): Function returned type is
18269         void. Added prototype.
18270         (jcf_parse): Function returned type is void.
18271         (yyparse): Remove call to fclose on the last parsed file.
18272
18273         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18274
18275 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18276
18277         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18278         (layout_class): Cope with methods featuring WFL in decl names.
18279         * decl.c (unqualified_object_id_node): New global variable,
18280         initialized.
18281         (build_decl_no_layout): Removed.
18282         * expr.c (build_primtype_type_ref): Handle Double.
18283         (java_lang_expand_expr): Fixed indentations.
18284         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18285         (flag_wall, flag_redundant, flag_not_overriding,
18286         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18287         variable declarations.
18288         (build_decl_no_layout): Removed prototype.
18289         (java_get_real_method_name): Added prototype.
18290         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18291         (java_parse_abort_on_error): Macro now just returns.
18292         * jcf-parse.c (jcf_parse_source): Check fclose returned
18293         value. Call emit_register_classes if java_report_errors returns
18294         zero.
18295         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18296         flag_static_local_jdk1_1): New integer flags.
18297         (lang_decode_option): New flags set here.
18298         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18299         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18300         the flag_redundant variable.
18301         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18302         when parsing java.lang.Object class.
18303         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18304         NULL_TREE to build.
18305         (resolve_qualified_expression_name): Fixed indentation.
18306         (patch_array_ref): Changed prototype.
18307         (not_initialized_as_it_should_p): Prototype removed.
18308         (java_report_errors): Added function prototype.
18309         * parse.y (formal_parameter:): Changed error message for not yet
18310         supported final parameters.
18311         (class_type_list:): Set both PURPOSE and VALUE of created
18312         TREE_LIST to be class_type.
18313         (primary_no_new_array:): Handle class literals on primitive types.
18314         (parse_warning_context): Reinstalled correct force_error and
18315         do_warning flags setups.
18316         (java_report_errors): Changed prototype. Return java_error_count
18317         value.
18318         (variable_redefinition_error): Consider treating variable type as
18319         a fake pointer.
18320         (create_interface): Warn about redundant abstract modifier if
18321         flag_redundant is set. Changed error message.
18322         (lookup_field_wrapper): Save/restore globals before/after looking
18323         up field.
18324         (duplicate_declaration_error_p): Consider treating declaration
18325         type as a fake pointer.
18326         (register_fields): Extract real type from dependency node. Check
18327         for duplicate field declaration after type adjustment. Use
18328         DECL_INITIAL to store static final initialized values.
18329         (method_header): Extract real function type from dependency node.
18330         (check_abstract_method_header): Use GET_METHOD_NAME.
18331         (obtain_incomplete_type): Layout fake pointer type.
18332         (safe_layout_class): Don't try to check for methods before layout.
18333         (java_complete_class): Don't check for correct throws clause
18334         elements inheritance here.
18335         (resolve_and_layout): Broadened name parameter meaning.
18336         (reset_method_name): Use GET_METHOD_NAME.
18337         (java_get_real_method_name): New function.
18338         (java_check_regular_methods): Don't check methods in
18339         java.lang.Object.  Verify lineage of throws clause elements. Use
18340         flag_no_overriding in warning report.
18341         (check_throws_clauses): Don't check if class was from
18342         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18343         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18344         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18345         warning on unsupported final local variables. Use build_decl
18346         instead of build_decl_no_layout. Get real local variable type from
18347         dependency node.
18348         (source_start_java_method): Get real parameter type from
18349         dependency node. Call build_decl instead of build_decl_no_layout.
18350         (java_layout_classes): Reverse tree and layout type and class as
18351         required. Mark class as loaded when done.
18352         (resolve_field_access): Fixed indentation. Restricted condition
18353         leading to static field access code generation. Set field_type
18354         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18355         (resolve_qualified_expression_name): Initialize type_found to
18356         null. Handle static field resolved during qualification. Fixed
18357         layout on non primitive field decl types.
18358         (not_accessible_p): Fixed typo in comment.
18359         (patch_method_invocation): Resolve and layout class to search from
18360         type.
18361         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18362         layout non primitive type, if necessary. Make method node only to
18363         report errors.
18364         (find_applicable_accessible_methods_list): Consider WFL'ed method
18365         decl names. Fixed indentation.
18366         (argument_types_convertible): Resolve and layout target type if
18367         necessary.
18368         (java_complete_tree): Fixed indentation problems. Rewrote
18369         CALL_EXPR thrown exceptions check. Re-installed further processing
18370         of the assignment in certain cases.
18371         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18372         inlining on class literals.
18373         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18374         0 literal.
18375         (valid_method_invocation_conversion_p): Likewise.
18376         (patch_string): Temporary disable forbidden use of `this' in
18377         explicit constructor invocations when doing string concatenation
18378         within their scope.
18379         (patch_unaryop): Added comment. Reinstalled code to disable
18380         further check on assignment operation with cast expression RHS.
18381         (patch_switch_statement): Fixed indentation.
18382         (build_try_statement): Call build_decl instead of
18383         build_decl_no_layout.
18384         (patch_synchronized_statement): Likewise.
18385         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18386         IS_UNCHECKED_EXPRESSION_P.
18387         (check_thrown_exceptions_do): Changed leading comment. Resolve and
18388         layout argument exception type.
18389         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18390         of IS_UNCHECKED_EXPRESSION_P.
18391
18392 1998-11-18  Anthony Green  <green@cygnus.com>
18393
18394         * jcf-parse.c (yyparse): Open class file in binary mode.
18395
18396 1998-11-15  Per Bothner  <bothner@cygnus.com>
18397
18398         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
18399
18400         * jcf-write.c (perform_relocations):  Move check out one loop.
18401
18402 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
18403
18404         * Make-lang.in: Fix reference to srcdir.
18405         * jv-scan.c: Add missing xmalloc prototype.
18406         * jvgenmain.c: Ditto.
18407
18408 1998-11-15  Per Bothner  <bothner@cygnus.com>
18409
18410         * decl.c (error_mark_node), java-tree.h:  New global.
18411         * parse.y:  Use empty_stmt_node instead of size_zero_node.
18412         (build_if_else_statement):  If missing else, use empty_stmt_node.
18413
18414         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
18415         (java_complete_expand_method):  Complain if return is missing.
18416         (java_check_regular_methods):  Comment out incorrect error check.
18417         (not_accessible_p):  Fix incorrect handling of protected methods.
18418         (patch_method_invocation):  Pass correct context to not_accessible_p.
18419         (find_applicable_accessible_methods_list):  Likewise.
18420         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
18421         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
18422         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
18423         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
18424
18425         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
18426         (push_int_const):  Remove reundant NOTE_PUSH.
18427         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
18428         (- case SWITCH_EXPR):  Fix code generation bug.
18429         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
18430         (generate_classfile):  More robust for abstract methods.
18431
18432 1998-11-15  Anthony Green  <green@cygnus.com>
18433
18434         * Makefile.in: jv-scan and jvgenmain all require libiberty.
18435         * Make-lang.in: Ditto.
18436
18437         * jv-scan.c: Remove xmalloc and xstrdup definitions.
18438         * jvgenmain: Ditto.
18439
18440 1998-11-15  Per Bothner  <bothner@cygnus.com>
18441
18442         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
18443
18444         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
18445
18446 1998-11-14  Per Bothner  <bothner@cygnus.com>
18447
18448         Allow uses of interface types to verify.  This is not really
18449         type-safe, but it matches what Sun does, and is OK as long as
18450         there are appropriate run-time checks.
18451         * verify.c (merge_types):  If merging two interface types,
18452         just set the result to java.lang.Object.
18453         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
18454
18455 1998-11-13  Tom Tromey  <tromey@cygnus.com>
18456
18457         * gjavah.c (main): Handle --output-class-directory argument.
18458         * jvspec.c (lang_specific_driver): Translate `-d' into
18459         -foutput-class-dir.
18460         * jcf.h (jcf_write_base_directory): Declare.
18461         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18462         * lang-options.h: Mention -foutput-class-dir.
18463         * jcf-write.c (jcf_write_base_directory): New global.
18464         (make_class_file_name): Put generated .class file into `-d'
18465         directory, or into source directory if -d not given.  Function now
18466         static.
18467         (write_classfile): Free class file name.  Handle case where class
18468         file name is NULL.
18469         (DIR_SEPARATOR): New macro.
18470         Include <sys/stat.h>
18471
18472         * Makefile.in (prefix): New macro.
18473
18474 1998-11-12  Per Bothner  <bothner@cygnus.com>
18475
18476         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
18477         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
18478         here (done in patch_invoke instead).
18479         (case_identity):  Moved here from parse.y.
18480
18481         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
18482         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
18483         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
18484         so they can be efficiently scanned without recursion.
18485         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18486         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
18487         in BLOCK iteratively, rather than recursively.
18488
18489         * parse.y (do_unary_numeric_promotion):  New function.
18490         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
18491
18492         * parse.y (patch_newarray):  Various fixes.
18493
18494         Re-do handling of switch statements (for proper block scoping).
18495         * parse.y:  Add just a single block for the enture switch block,
18496         but don't create any "case blocks".
18497         (group_of_labels):  Rmeoved unneeded non-terminal.
18498         CASE_EXPR and DEFAULT_EXPR are added to current block.
18499         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
18500         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18501         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
18502         * parse.y (wfl_operator, print_int_node): Make non-static.
18503         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
18504         as part of recursive scan of block.
18505         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
18506         (patch_switch_statement):  Most tests move dinto java_complete_tree.
18507
18508         * parse.y:  Make various production be non-typed (void).
18509         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
18510         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
18511         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
18512
18513         * jcf-write.c (struct jcf_handler):  New type.
18514         (struct jcf_switch_state):  New type.
18515         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
18516         (alloc_handler, emit_unop, emit_reloc):  New functions.
18517         (adjust_typed_op):  Add extra parameter ("max type" offset).
18518         (emit_switch_reloc, emit_case-reloc):  New function.
18519         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
18520         (generate_bytecode_insns):  Support REAL_CST, switch statements,
18521         exception handling, method calls, object/array creation, and more.
18522
18523         * class.c:  Remove some unused variables.
18524         * constants.c (find_string_constant):  New function.
18525         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
18526         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
18527         if flag_emit_class_files.
18528
18529 1998-11-12  Tom Tromey  <tromey@cygnus.com>
18530
18531         * jcf-io.c (find_class): Added explanatory comment.
18532
18533         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
18534         trailing slash to `.zip' entries.
18535
18536         * jvspec.c (lang_specific_driver): Correctly handle case where
18537         GC_NAME not defined.
18538
18539 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18540
18541         * jvspec.c (GC_NAME): New define.
18542         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
18543         if required.
18544         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18545
18546 1998-11-11  Per Bothner  <bothner@cygnus.com>
18547
18548         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
18549
18550 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18551
18552         * jcf-dump.c (main): Correctly recognize `--'-style long options.
18553
18554 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18555
18556         * class.c (is_compiled_class): Call safe_layout_class for class
18557         compiled from source.
18558         * conver.h (convert_to_integer, convert_to_real,
18559         convert_to_pointer): Added prototypes.
18560         * decl.c (init_decl_processing): Non longer push the decls of
18561         `methodtable', `constants', `Class', `Field', `dispatchTable'
18562         `jexception' and `Method'.
18563         * expr.c (build_invokeinterface): New function.
18564         (expand_invoke): static variable CLASS_IDENT now in
18565         build_invokeinterface. Use build_invokeinterface.
18566         (expand_java_field_op): Moved code to inline
18567         java.lang.PRIMTYPE.TYPE into a function.
18568         (build_primtype_type_ref): New function.
18569         * java-tree.def (INSTANCEOF_EXPR): New tree code.
18570         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18571         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18572         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18573         (DECL_LOCAL_STATIC_VALUE): New macro.
18574         (build_invokeinterface, build_primtype_type_ref): New function
18575         prototypes.
18576         (java_parse_abort_on_error): Macro rewritten.
18577         * jcf-parse.c (current_method): Add comment to declaration.
18578         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18579         Function prototypes fixed.
18580         (jcf_parse_source): push/pop parser context. save/restore global.
18581         (parse_source_file): Fixed leading comment. Now take a
18582         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18583         classes and pop the parser context anymore.
18584         (yyparse): Push parser context, save globals, parse the source
18585         file, restore globals and pop the parser context when processing a
18586         source file.
18587         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18588         * lex.c (java_parse_doc_section): New function.
18589         (java_lex): Call java_parse_doc_section when appropriate. Build an
18590         operator around INSTANCEOF_TK.
18591         * lex.h (java_lineterminator, java_sprint_unicode,
18592         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18593         Prototypes rewritten.
18594         (java_parse_escape_sequence, java_letter_or_digit_p,
18595         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18596         java_read_unicode, java_store_unicode, java_read_char,
18597         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18598         Added function prototypes.
18599         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18600         define.
18601         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18602         New macros
18603         (struct parser_ctxt): New fields: deprecated,
18604         current_parsed_class_un, gclass_list.
18605         (fix_method_argument_names, issue_warning_error_from_context,
18606         resolve_package, lookup_package_type): New function prototypes.
18607         (resolve_expression_name): Fixed function prototype.
18608         (find_applicable_accessible_methods_list): Fixed indentation, added
18609         extra argument in prototype.
18610         (check_final_assignment, build_null_of_type, check_deprecation,
18611         check_method_redefinition, reset_method_name,
18612         java_check_regular_methods, java_check_abstract_methods,
18613         maybe_build_primttype_type_ref): New function prototype.
18614         * parse.y (conver.h): Include.
18615         (INSTANCEOF_TK): Tagged <operator>.
18616         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18617         (relational_expression:): Build binop for instanceof.
18618         (java_push_parser_context): Remember ctxp->gclass_list across
18619         contexts.
18620         (java_pop_parser_context): Simply return if no context
18621         exists. Remember gclass_list across contexts.
18622         (issue_warning_error_from_context): New function.
18623         (parse_error_context): Don't setup ctxp->elc here. Call
18624         issue_warning_error_from_context instead.
18625         (parse_warning_context): Likewise.
18626         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18627         setup. Link new class/interface to ctxp->gclass_list.
18628         (add_superinterfaces): Register interface as incomplete if not
18629         loaded.
18630         (create_class): Remember class unqualified name in
18631         ctxp->current_parsed_class_un. Check class deprecation.
18632         (register_fields): Check field deprecation. Remember static final
18633         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18634         processing INIT.
18635         (method_header): New local variable ORIG_ARG. Use unqualified
18636         current class name for check on constructor errors. Promote return
18637         type if of record type. Argument list fix moved in
18638         fix_method_argument_names, called here. Check method deprecation.
18639         (fix_method_argument_names): New function.
18640         (method_declarator): Promote record typed arguments.
18641         (safe_layout_class): Check class methods before layout.
18642         (java_complete_class): Compute field layout when patched.
18643         (do_resolve_class): Try to load class after having it renamed
18644         after the package name.
18645         (get_printable_method_name): Use DECL_CONTEXT.
18646         (reset_method_name): New function.
18647         (check_method_redefinition): Use reset_method_name.
18648         (java_check_regular_methods): New local variable
18649         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18650         names for error report. Check for compile-time error when method
18651         found has default (package) access.
18652         (java_check_abstract_methods): Now takes an interface DECL node as
18653         an argument. Also reinstall real name on unchecked
18654         overriding/hiding methods for error report.
18655         (java_check_methods): Fixed leading comment. Get classes to verify
18656         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18657         CLASS_METHOD_CHECKED_P on class verification.
18658         (lookup_java_method2): Get real method name if necessary.
18659         (find_in_imports): Don't check package class access here.
18660         (resolve_package, lookup_package_type): New functions.
18661         (java_layout_classes): Fixed leading comment. Take classes to be
18662         laid out from ctxp->gclass_list.
18663         (java_complete_expand_methods): Don't expand native and abstract
18664         methods.
18665         (java_expand_classes): New function.
18666         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18667         values of static final field of primitive types.
18668         (resolve_field_access): Handles static final field of promotive
18669         type.
18670         (resolve_qualified_expression_name): Handle STRING_CST as
18671         primaries and package name resolution. Check deprecation on found
18672         decls. Set where_found and type_found on non static field resolved
18673         during qualification. Layout non primitive field decl types.
18674         (check_deprecation): New function.
18675         (maybe_access_field): Simplified.
18676         (patch_method_invocation_stmt): Local variable CLASS_TYPE
18677         removed. Reverse method's argument when primary is a type. Don't
18678         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18679         instead. Include abstract class in the list of class searchable
18680         for constructors. Use DECL_CONTEXT of found method for access
18681         checks. Check method deprecation.
18682         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18683         converting arguments. Handle INVOKE_INTERFACE.
18684         (lookup_method_invoke): Search constructor using existing
18685         infrastructure (don't rely on lookup_java_constructor anymore).
18686         (find_applicable_accessible_methods_list): Extra argument flag
18687         LC. Now include constructor in the search.
18688         (qualify_ambiguous_name): Conditional expression are primaries.
18689         (not_initialized_as_it_should_p): static final are always
18690         initialized.
18691         (java_complete_tree): Pass extra NULL argument to
18692         resolve_expression_name. Stricter test to carry on patching
18693         assignments. New case for INSTANCEOF_EXPR.
18694         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18695         (check_final_assignment, maybe_build_primttype_type_ref): New
18696         functions.
18697         (patch_assignment): Detect resolved static finals and carry normal
18698         assignment error check on them. Inline PRIMTYPE.TYPE read access.
18699         (try_builtin_assignconv): Access constant 0 on all primitive
18700         types.
18701         (valid_builtin_assignconv_identity_widening_p): Accept identical
18702         types. Accept all promoted type on int type.
18703         (valid_ref_assignconv_cast_p): Accept a null pointer to be
18704         assigned to a reference.
18705         (valid_method_invocation_conversion_p): Accept to check null
18706         pointers.
18707         (build_binop): Merge declaration and initialization of local
18708         variable BINOP.
18709         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18710         numeric types. Improved validity test for qualify operators on
18711         references.
18712         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18713         and PREINCREMENT_EXPR. Also detect resolved static finals of a
18714         primitive type and issue the appropriate error message.
18715         (resolve_type_during_patch): Mark class loaded when resolved.
18716         (patch_cast): Allow null to be cased to reference types.
18717         (build_null_of_type): New function.
18718         (patch_array_ref): Handle array on references correctly.
18719         (patch_return): Removed unused local variable MODIFY. Force
18720         boolean to be returned as integers. Allows null to be returned by
18721         a function returning a reference.
18722         * typeck.c (convert_to_integer, convert_to_real,
18723         convert_to_pointer): Prototypes moved to convert.h
18724         (lookup_argument_method): Use method real name, if necessary.
18725
18726 1998-10-30  Tom Tromey  <tromey@cygnus.com>
18727
18728         * class.c (build_class_ref): Changed name of primitive classes to
18729         start with `_Jv_'.
18730
18731         * class.c (make_class_data): Renamed fields: nmethods to
18732         method_count, method_count to dtable_method_count.  Always set
18733         `state' field to 0.
18734         * decl.c (init_decl_processing): Likewise.
18735
18736 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18737
18738         * class.c (layout_class): Don't mangle <finit>, produce
18739         __finit<class> instead. Don't verify artificial methods.
18740         * decl.c (finit_identifier_node): New declared global.
18741         (init_decl_processing): finit_identifier_node initialized.
18742         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18743         * java-tree.h (finit_identifier_node): Declared as extern.
18744         (struct lang_decl): New field called_constructor.
18745         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18746         (CLASS_HAS_FINIT_P): New macro.
18747         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18748         explicit constructor invocation.
18749         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18750         CALL_SUPER_CONSTRUCTOR_P): New macros.
18751         (write_classfile): Added prototype.
18752         * jcf-parse.c (jcf_parse_source): Parse and remember for
18753         generation if the file was seen on the command line.
18754         (parse_source_file): Don't write the class file here.
18755         (yyparse): Loop on files rewritten. Set current_jcf.
18756         (parse_zip_file_entries): Parse class file only if it was found.
18757         * lang.c (init_parse): Don't open command line provided filename
18758         here.
18759         (lang_parse): Don't set main_jcf anymore.
18760         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18761         (JCONSTRUCTOR_CHECK): New macro.
18762         (JBSC_TYPE_P): New macro.
18763         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18764         (COMPLETE_CHECK_OP_2): New macro.
18765         (struct parse_ctxt): New field explicit_constructor_p.
18766         (check_class_interface_creation): Fixed prototype indentation.
18767         (patch_method_invocation_stmt): Prototype reflects added argument.
18768         (patch_invoke): Likewise.
18769         (complete_method_declaration, build_super_invocation,
18770         verify_constructor_circularity,
18771         build_this_super_qualified_invocation, get_printable_method_name,
18772         patch_conditional_expr, maybe_generate_finit, fix_constructors,
18773         verify_constructor_super, create_artificial_method,
18774         start_artificial_method_body, end_artificial_method_body,
18775         generate_field_initialization_code): New function prototypes.
18776         * parse.y: Fixed leading comment
18777         (constructor_header:, constructor_body:, block_end:): Rules tagged
18778         <node>.
18779         (type_declaration:): Call maybe_generate_finit.
18780         (method_declaration:): Action for method_body: placed in new
18781         function complete_method_declaration, called here.
18782         (constructor_declaration:): Defined actions. Removed leading
18783         FIXME.
18784         (constructor_header:): New rule with action.
18785         (constructor_body:): Rule rewritten using block_begin: and
18786         block_end:. Defined actions.
18787         (constructor_declarator:, explicit_constructor_invocation:):
18788         Defined actions.
18789         (block:): Use new rules block_begin: block_end:.
18790         (block_begin:, block_end:): New rules and actions.
18791         (block_statements:): Fixed error message for explicit
18792         constructors.
18793         (method_invocation:): Call build_this_super_qualified_invocation
18794         if primary is `this' or `super' was seen.
18795         (conditional_expression:): Action defined.
18796         (extra_ctxp_pushed_p): New static global flag.
18797         (java_parser_context_save_global): Create parser context if
18798         necessary. Use extra_ctxp_pushed_p to remember it.
18799         (java_parser_context_restore_global): Pop extra parser context if
18800         one exists.
18801         (build_array_from_name): Array on primitive types are marked
18802         loaded.
18803         (register_fields): Restore new name in field initializer
18804         expression if type was altered. Non static fields initialized upon
18805         declaration marked initialized.
18806         (maybe_generate_finit): New function.
18807         (maybe_generate_clinit): Use create_artificial_method,
18808         start_artificial_method_body, end_artificial_method_body. Generate
18809         debug info for enclosed initialization statements.
18810         (method_header): Fixed leading comment. Check constructor
18811         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18812         accordingly.
18813         (complete_method_declaration, constructor_circularity_msg,
18814         verify_constructor_circularity): New functions.
18815         (get_printable_method_name): New function.
18816         (check_method_redefinition): Don't rename <finit> methods. Fix
18817         declared constructor names. Error message for
18818         constructors modified.
18819         (java_check_regular_methods): Local variable seen_constructor
18820         renamed saw_constructor. Skip verification on constructors. Create
18821         default constructor with create_artificial_method.
18822         (java_check_methods): Removed unnecessary empty line.
18823         (create_artificial_method, start_artificial_method_body,
18824         end_artificial_method_body): New functions.
18825         (java_layout_classes): Changed leading comment. Reverse fields
18826         list if necessary. Always layout java.lang.Object if being
18827         defined.
18828         (java_complete_expand_methods): Verify constructor circularity.
18829         (java_complete_expand_method): Call fix_constructor on
18830         constructors.  Local variable no_ac_found removed. Restore
18831         bindings if method body expansion failed.
18832         (fix_constructors, verify_constructor_super,
18833         generate_field_initialization_code): New function.
18834         (java_expand_classes): Fixed leading comment. Write class file
18835         here.
18836         (resolve_expression_name): Check for illegal instance variable
18837         usage within the argument scope of an explicit constructor
18838         invocation.
18839         (resolve_qualified_expression_name): Pass extra from_super flag
18840         when invoking patch_method_invocation_stmt. New case for
18841         conditional expression when used as a primary. Check for error
18842         when acquiring super.
18843         (patch_method_invocation_stmt): Added extra argument super. New
18844         local variable is_static_flag. Set class_to_search according to
18845         the nature of the constructor invocation. Don't add `this'
18846         argument when expanding NEW_CLASS_EXPR. Check for illegal method
18847         invocation within the argument scope of explicit constructor
18848         invocation. Set is_static according to is_static_flag. Provide
18849         extra `super' argument to patch_invoke invocation.
18850         (patch_invoke): New argument from_super. Loop on arguments
18851         indentation fixed. Pass from_super to invocation_mode. New switch
18852         case INVOKE_SUPER. Fixed error message in switch default case.
18853         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18854         value.
18855         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18856         (lookup_method_invoke): Fixed prototypes in candidates list. Error
18857         message takes constructors into account.
18858         (find_applicable_accessible_methods_list): Fixed indentation.
18859         (qualify_ambiguous_name): Take explicit constructor invocation
18860         into account. Deal with a conditional expression as a primary to
18861         a method call.
18862         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18863         case. Added extra argument to patch_method_invocation_stmt.
18864         Register calls made to explicit constructor `this'. Don't call
18865         save_expr in ARRAY_REF case when emitting class files. Check for
18866         illegal use of this when expanding explicit constructor invocation
18867         arguments.
18868         (complete_function_arguments): Set and reset parser context
18869         explicit_constructor_p field value when appropriate.
18870         (build_super_invocation, build_this_super_qualified_invocation):
18871         New functions.
18872         (patch_assignment): Fixed typo.
18873         (patch_unaryop): Check on final fields occurs only when a decl
18874         exits.
18875         (patch_return): Take constructors into account.
18876         (patch_conditional_expr): New function.
18877         * typeck.c (build_java_signature): Removed unnecessary empty line.
18878
18879 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18880
18881         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18882
18883 1998-10-28  Tom Tromey  <tromey@cygnus.com>
18884
18885         * decl.c (init_decl_processing): Renamed fields.
18886         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18887         interface_len, msize fields.
18888
18889         * class.c (make_class_data): Removed subclass_head and
18890         subclass_next fields.
18891         * decl.c (init_decl_processing): Removed subclass_head and
18892         subclass_next fields.
18893
18894 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18895
18896         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18897         * mangle.c (emit_unicode_mangled_name): Similarly.
18898
18899 1998-10-26  Nick Clifton  <nickc@cygnus.com>
18900
18901         * jcf-parse.c (get_constant): Place braces around code to compute
18902         'd' when REAL_ARITHMETIC is not defined.
18903
18904 1998-10-25  H.J. Lu  (hjl@gnu.org)
18905
18906         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18907         dependency.
18908
18909 1998-10-23  Tom Tromey  <tromey@cygnus.com>
18910
18911         * lang-specs.h: `.zip' files are input to jc1.
18912
18913 1998-10-22  Per Bothner  <bothner@cygnus.com>
18914
18915         * jvspecs.c:  Add (but don't enable) support for combining multiple
18916         .class and .java input filenames to a single jc1 invocation.
18917         Add support for -C flag (copile to .class files).
18918         Translate -classpath and -CLASSPATH arguments.
18919         * lang-specs.h:  Don't set %2 spec.
18920
18921 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18922
18923         * jcf-path.c (add_entry): Don't add trailing separator if entry is
18924         a .zip file.
18925         (add_path): Don't add trailing separator to non-empty path
18926         elements.
18927
18928         * lang.c (lang_decode_option): Check for -fclasspath and
18929         -fCLASSPATH before examining other `-f' options.
18930
18931         * java-tree.h (finalize_identifier_node): Don't declare.
18932         * class.c (make_class_data): Don't push "final" field.
18933         * decl.c (init_decl_processing): Don't push "final" field.
18934         (finalize_identifier_node): Removed.
18935         (init_decl_processing): Don't set finalize_identifier_node.
18936
18937         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18938
18939 1998-10-11  Anthony Green  <green@cygnus.com>
18940
18941         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18942         (JV_SCAN_SOURCES): New macro.
18943         (JCF_DUMP_SOURCES): Likewise.
18944         (jcf-dump$(exeext)): New target.
18945         (jv-scan$(exeext)): New target.
18946
18947 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18948
18949         * Makefile.in (LEX): Removed.
18950         (LEXFLAGS): Likewise.
18951         (SET_BISON): New macro.
18952         (BISON): Removed.
18953         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
18954         spurious diffs in parse.c.
18955         ($(PARSE_SCAN_C)): Likewise.
18956         (PARSE_DIR): New macro.
18957         (PARSE_C): Use it.
18958         (PARSE_SCAN_C): Likewise.
18959         (PARSE_RELDIR): New macro.
18960
18961         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18962
18963         * jcf-io.c (find_class): Use saw_java_source to determine when to
18964         look for `.java' file.
18965         * jcf-parse.c (saw_java_source): New global.
18966         (yyparse): Set it if `.java' file seen.
18967
18968         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18969         (GCJH_SOURCES): Likewise.
18970         * Makefile.in (datadir): New macro.
18971         (libjava_zip): Likewise.
18972         (JAVA_OBJS): Added jcf-path.o.
18973         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18974         (../gcjh$(exeext)): Likewise.
18975         (jcf-path.o): New target.
18976         * java-tree.h (fix_classpath): Removed decl.
18977         * jcf-parse.c (fix_classpath): Removed.
18978         (load_class): Don't call fix_classpath.
18979         * parse.y (read_import_dir): Don't call fix_classpath.
18980         * lex.h: Don't mention classpath.
18981         * lex.c (java_init_lex): Don't initialize classpath.
18982         * jcf-io.c (classpath): Removed global.
18983         (find_class): Use jcf_path iteration functions.  Correctly search
18984         class path for .java file.
18985         (open_in_zip): New argument `is_system'.
18986         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
18987         classpath-related options.
18988         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18989         and -I.
18990         (lang_init): Call jcf_path_init.
18991         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
18992         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
18993         Correctly put braces around second string in each entry.
18994         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
18995         classpath-related options.
18996         (help): Updated for new options.
18997         * jcf.h: Declare functions from jcf-path.c.  Don't mention
18998         `classpath' global.
18999         * jcf-path.c: New file.
19000
19001         * jcf-depend.c: Include jcf.h.
19002
19003         * jcf-write.c (localvar_alloc): Returns `void'.
19004         (localvar_free): Removed unused variable.
19005
19006         * lang.c (OBJECT_SUFFIX): Define if not already defined.
19007         (init_parse): Use OBJECT_SUFFIX, not ".o".
19008
19009 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19010
19011         * class.c (emit_register_classes): Renamed from
19012         emit_register_class.
19013         * java-tree.h (emit_register_classes): Prototype renamed from
19014         emit_register_class.
19015         * jcf-parse.c (yyparse): Call emit_register_classes once before
19016         returning.
19017         * parse.y (java_expand_classes): No longer register classes.
19018
19019 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19020
19021         * class.c (is_compiled_class): New local variable
19022         seen_in_zip. Identify classes found in currently compiled source
19023         file(s).
19024         * decl.c (complete_start_java_method): Fixed typo.
19025         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19026         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19027         (CLASS_P): Moved around.
19028         (java_parse_abort_on_error): Macro moved from jcf-parse.c
19029         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19030         java-tree.h
19031         (jcf_parse_source): Changed leading comment. Removed unnecessary
19032         fclose and CLASS_FROM_SOURCE_P marking.
19033         (parse_source_file): New local variables remember_for_generation
19034         and filename. Mark parsed file name identifier node. Removed block
19035         executed when parse_only was null. Set remember_for_generation.
19036         Use it as an argument to java_pop_parser_context.
19037         (yyparse): New local variables several_files, list, next node and
19038         current_file_list. Split ampersand separated file names into
19039         current_file_list. Iterate through the list and parse accordingly.
19040         * parse.h (java_pop_parser_context): New function prototype.
19041         * parse.y (ctxp_for_generation): New static global variable.
19042         (java_pop_parser_context): New argument generate. Link popped ctxp
19043         to ctxp_for_generation list accordingly.
19044         (java_complete_expand_methods): Fixed indentation.
19045         (java_expand_classes): New function.
19046
19047 1998-10-17  Per Bothner  <bothner@cygnus.com>
19048
19049         * Makefile.in:  Link with libiberty.a instead of memmove.o.
19050
19051 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19052
19053         * lex.c (setjmp.h): No longer included.
19054         * lex.h (setjmp.h): Included.
19055         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19056         (duplicate_declaration_error_p): Renamed from
19057         duplicate_declaration_error.
19058         (build_array_from_name): New function prototype.
19059         * parse.y (setjmp.h): No longer included.
19060         (variable_declarator_id): Define action.
19061         (build_array_from_name): New function.
19062         (duplicate_declaration_error_p): Renamed from
19063         duplicate_declaration_error.  Fixed leading comment.
19064         (register_fields): Main `for' loop reorganized. Uses
19065         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19066         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19067         build_array_from_name.
19068         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19069         types.
19070         (read_import_dir): Don't try to skip `.' and `..'.
19071         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19072         build_array_from_name. Main `for' loop reorganized.
19073         (resolve_qualified_expression_name): When building access to a
19074         field, use the type where the field was found, not its own type.
19075         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19076         field was found is null.
19077         (qualify_ambiguous_name): Sweep through all successive array
19078         dimensions.
19079
19080 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19081
19082         * java-tree.h (pop_labeled_block, lang_printable_name,
19083         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19084         interface_of_p, inherits_from_p, fix_classpath,
19085         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19086         make_class_data, register_class, alloc_name_constant): New
19087         function prototypes.
19088         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19089         indentation. Added cast to remove warning.
19090         (lang_printable_name): Set v argument unused.
19091         (lang_print_error): Added argument to lang_printable_name call.
19092         (java_dummy_print, print_lang_decl, print_lang_type,
19093         print_lang_identifier, lang_print_xnode): All argument marked
19094         unused.
19095         * lex.c (java_unget_unicode): Removed unnecessary argument.
19096         (java_allocate_new_line): Unused local variable is gone.
19097         (java_read_char): Added parenthesis in expressions to remove
19098         warnings.  Added final return statement.
19099         (java_read_unicode): Added parenthesis in expression to remove
19100         warning.
19101         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19102         (java_parse_escape_sequence): Likewise.
19103         (java_lex): Unused local variables are gone. Fixed
19104         java_unget_unicode invocation.
19105         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19106         defined.
19107         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19108         lang_printable_name invocation in macro.
19109         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19110         Likewise.
19111         (duplicate_declaration_error): Suppressed unused argument in
19112         prototype.
19113         (identical_subpath_p): Function declaration is gone.
19114         (patch_invoke): Suppressed unused argument in prototype.
19115         (patch_cast, build_labeled_block, check_thrown_exceptions):
19116         Likewise.
19117         * parse.y (setjmp.h): Included
19118         (toplev.h): Likewise.
19119         (field_declaration:): Suppressed unused local
19120         (label_decl:): Fixed build_labeled_block invocation.
19121         (java_pop_parser_context): Put extra parenthesis around assignment
19122         in if.
19123         (yyerror): Suppressed unused local variables.
19124         (variable_redefinition_error): Fixed lang_printable_name
19125         invocation.
19126         (create_interface): Suppressed unused local variables.
19127         (create_class): Likewise.
19128         (duplicate_declaration_error): Suppressed unused argument. Fixed
19129         lang_printable_name invocation.
19130         (register_fields): Suppressed unused local variable. Fixed
19131         duplicate_declaration_error invocation.
19132         (method_header): Suppressed unused local variable.
19133         (method_declarator, parser_check_super): Likewise.
19134         (java_complete_class): Suppressed unused local variable. Fixed
19135         fatal error message.
19136         (complete_class_report_errors): Added default: in switch.
19137         (java_check_regular_methods): Fixed lang_printable_name
19138         invocations.
19139         (check_throws_clauses): Likewise.
19140         (java_check_abstract_methods): Suppressed unused local
19141         variable. Fixed lang_printable_name invocation.
19142         (read_import_entry): Added supplemental return statement.
19143         (read_import_dir): Suppressed unused local variables.
19144         (check_pkg_class_access, declare_local_variables): Likewise.
19145         (source_start_java_method): Suppressed unused extern variable
19146         declarations
19147         (expand_start_java_method): Suppressed unused extern and local
19148         variable declarations.
19149         (java_complete_expand_methods): Likewise.
19150         (java_complete_expand_method): Suppressed unused local variables.
19151         (make_qualified_name): Likewise.
19152         (resolve_qualified_expression_name): Added default: in
19153         switch. Fixed lang_printable_name invocation.
19154         (class_instance_creation_expression): Added parenthesis around
19155         expressions.
19156         (patch_method_invocation_stmt): Fixed lang_printable_name and
19157         patch_invoke invocations.
19158         (check_for_static_method_reference): Fixed lang_printable_name
19159         invocation.
19160         (patch_invoke): Suppressed unused arguments and local variables.
19161         (lookup_method_invoke): Suppressed unused local variables.
19162         (qualify_ambiguous_name): Added default: in switch.
19163         (identical_subpath_p): Function removed.
19164         (patch_assignment): Suppressed unused local variables. Suppressed
19165         unnecessary if statement. Fixed lang_printable_name invocations.
19166         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19167         (valid_ref_assignconv_cast_p): Parenthesis around
19168         expression. Suppressed unused local variables.
19169         (build_binop): Suppressed unused local variables. fixed
19170         lang_printable_name invocations.
19171         (string_constant_concatenation): Suppressed unused local
19172         variables.
19173         (patch_unaryop): Fixed lang_printable_name invocation.
19174         (patch_cast): Suppressed unnecessary argument. Fixed
19175         lang_printable_name invocation.
19176         (patch_array_ref): Fixed lang_printable_name invocation.
19177         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19178         (build_labeled_block): Suppressed unused argument.
19179         (generate_labeled_block): Fixed build_labeled_block invocation.
19180         (build_loop_body): Suppressed unused local variables.
19181         (patch_loop_statement): Likewise.
19182         (patch_exit): Fixed lang_printable_name invocation.
19183         (patch_switch_statement): Likewise.
19184         (case_identity): First argument marked unused.
19185         (patch_try_statement): Fixed lang_printable_name invocations.
19186         (patch_synchronized_statement, patch_throw_statement): Likewise.
19187         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19188         lang_printable_name invocations.
19189         (check_thrown_exceptions_do): Suppressed unused argument.
19190
19191 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19192
19193         * jcf-write.c (write_classfile): Add output class file as target.
19194         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19195         * jcf.h: Added declarations for dependency-tracking functions.
19196         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19197         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19198         (finish_parse): Call jcf_dependency_write.
19199         (dependency_tracking): New global.
19200         (DEPEND_SET_FILE): New define.
19201         (DEPEND_ENABLE): New define.
19202         (init_parse): Enable dependency tracking if required.
19203         Include "flags.h".
19204         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19205         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19206         (../gcjh$(exeext)): Likewise.
19207         (jcf-depend.o): New target.
19208         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19209         (GCJH_SOURCES): Likewise.
19210         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19211         dep_name argument.
19212         (find_classfile): Added dep_name argument.
19213         (find_class): Compute name of dependency.
19214         (open_in_zip): Call jcf_dependency_add_file.
19215         * gjavah.c (output_file): No longer global.
19216         (usage): Don't mention "gjavah".
19217         (help): Likewise.
19218         (java_no_argument): Likewise.
19219         (version): Likewise.
19220         (main): Recognize and handle -M family of options.
19221         (print_mangled_classname): Return is void.
19222         (process_file): Handle case where output is suppressed.
19223         (HANDLE_END_FIELD): Likewise.
19224         (HANDLE_METHOD): Likewise.
19225         * jcf-depend.c: New file.
19226
19227 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19228
19229         * java-tree.def: Add missing newline at EOF.
19230
19231 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19232
19233         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19234         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19235         function.
19236         Include <config.h> and "system.h".
19237         (disassemble_method): Undefine RET to avoid clash with
19238         config/i386/i386.h.
19239
19240 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19241
19242         * decl.c (runtime_exception_type_node, error_exception_type_node):
19243         New global variables.
19244         (init_decl_processing): Initialized.
19245         * expr.c (java_lang_expand_expr): Set caught exception type to
19246         null if catch handler argument doesn't exit.
19247         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19248         tree codes.
19249         * java-tree.h (runtime_exception_type_node,
19250         error_exception_type_node): Global variables declared.
19251         (DECL_FUNCTION_THROWS): New macro.
19252         (DECL_FUNCTION_BODY): Modified comment.
19253         (DECL_SPECIFIC_COUNT): Likewise.
19254         (struct lang_decl): New field throws_list.
19255         (IS_UNCHECKED_EXPRESSION_P): New macro.
19256         * lex.c (java_lex): Generate location information for THROW_TK.
19257         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19258         EXCEPTIONS_P): New macros.
19259         (enum jdep_code): New value JDEP_EXCEPTION.
19260         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19261         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19262         PATCH_METHOD_RETURN_ERROR): New macros.
19263         (patch_method_invocation_stmt): Added new argument to prototype.
19264         (patch_synchronized_statement, patch_throw_statement,
19265         check_thrown_exceptions, check_thrown_exceptions_do,
19266         purge_unchecked_exceptions, check_throws_clauses): New function
19267         prototypes.
19268         * parse.y Fixed typo in keyword section.
19269         (throw:): Rule tagged <node>.
19270         (THROW_TK): Keyword tagged <operator>.
19271         (method_header:): Last argument to call to method_header passed
19272         from throws: rule.
19273         (throws:, class_type_list:, throw_statement:,
19274         synchronized_statement:, synchronized:): Defined actions.
19275         (method_header): New local variable current. Register exceptions
19276         from throws clause.
19277         (java_complete_tree): Complete and verify exceptions from throws
19278         clause.
19279         (complete_class_report_errors): Error message on exceptions not
19280         found
19281         (java_check_regular_methods): Fixed typo. Shortcut on private
19282         overriding methods. Changed error message on method
19283         redefinition. Check for throws clause compatibility.
19284         (check_throws_clauses): New function.
19285         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19286         method. Changed error message on method redefinition.
19287         (currently_caught_type_list): New static variable.
19288         (java_complete_expand_methods): Purge unchecked exceptions from
19289         throws clause list. Call PUSH_EXCEPTIONS before walk and
19290         POP_EXCEPTIONS after.
19291         (resolve_qualified_expression_name): Pass new argument as NULL to
19292         patch_method_invocation_stmt.
19293         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19294         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19295         argument list when appropriate. Use new argument if non null to
19296         store selected method decl.
19297         (patch_invoke): Convert if necessary args of builtin types before
19298         forming CALL_EXPR. Argument list no longer reversed here.
19299         (invocation_mode): Treat final methods as static methods.
19300         (java_complete_tree): New cases for THROW_EXPR: and
19301         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19302         function call.
19303         (complete_function_arguments): No more RECORD_TYPE
19304         conversion. Function parameter nodes no longer saved.
19305         (valid_ref_assignconv_cast_p): Avoid handling null type.
19306         (patch_binop): Fixed null constant reference handling.
19307         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19308         BUILD_THROW macros.
19309         (patch_try_statement): Fixed comments. Record caught types in
19310         list, push the list, expand try block and pop the list.
19311         (patch_synchronized_statement, patch_throw_statement,
19312         check_thrown_exceptions, check_thrown_exceptions_do,
19313         purge_unchecked_exceptions): New functions.
19314         * typeck.c (lookup_argument_method): Allow WFL in place of method
19315         DECL_NAME during method definition check
19316
19317 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19318
19319         * gjavah.c (decode_signature_piece): New function.
19320         (print_c_decl): Use it.  Added `name_override' argument.
19321         (print_method_info): Use name_override argument to print_c_decl.
19322         (seen_fields): Removed.
19323         (print_field_info): Don't update seen_fields.
19324         (struct method_name): New structure.
19325         (method_name_list): New global.
19326         (print_method_info): Add new method to list of methods.
19327         (name_is_method_p): New function.
19328         (print_field_info): If field name has same name as method, then
19329         change field name.
19330         (process_file): Parse methods before fields.
19331         (field_pass): New global.
19332         (HANDLE_END_FIELD): Take field_pass into account.
19333
19334 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19335
19336         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19337         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19338
19339 1998-10-03  Anthony Green  <green@cygnus.com>
19340
19341         * jvspec.c: Fix bug in jvgenmain_spec patch.
19342
19343 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19344
19345         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19346         * decl.c (soft_exceptioninfo_call_node): New global variable.
19347         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19348         takes extra integer argument. soft_exceptioninfo_call_node
19349         initialized.
19350         * except.c (java_set_exception_lang_code): New function
19351         (method_init_exceptions): Called here.
19352         (prepare_eh_table_type): New function.
19353         (expand_end_java_handler): Called here.
19354         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19355         one argument. Modified generation of call to
19356         soft_badarrayindex_node to use new argument.
19357         (build_java_arrayaccess): Pass faulty index value to
19358         build_java_throw_out_of_bounds_exception.
19359         (generate_name): New function.
19360         (java_lang_expand_expr): New local variables node, current,
19361         has_finally_p. Expand TRY_EXPR node.
19362         (process_jvm_instruction): Replace top of the stack with thrown
19363         object reference when entering exception handler.
19364         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19365         specific tree codes.
19366         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19367         global.
19368         (DECL_SPECIFIC_COUNT): New macro.
19369         (prepare_eh_table_type, java_set_exception_lang_code,
19370         generate_name): New function declarations.
19371         (match_java_method): Declaration deleted.
19372         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19373         macros.
19374         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19375         * parse.h (redefinition_error, refine_accessible_methods_list,
19376         can_cast_to_p): Function declaration removed.
19377         (classitf_redefinition_error, variable_redefinition_error,
19378         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19379         find_most_specific_methods_list, argument_types_convertible,
19380         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19381         valid_cast_to_p, valid_method_invocation_conversion_p,
19382         try_reference_assignconv, add_stmt_to_compound,
19383         build_jump_to_finally, build_tree_list, patch_try_statement,
19384         java_get_catch_block): New function declarations.
19385         * parse.y (string_buffer_type): Global variable deleted.
19386         (group_of_labels, catches, catch_clause, catch_clause_parameter,
19387         finally): Rules tagged <node>.
19388         (TRY_TK, CATCH_TK): Token tagged <operator>.
19389         (class_body_declaration:, class_member_declaration:,
19390         formal_parameter:, explicit_constructor_invocation:,
19391         interface_member_declaration:, constant_declaration:,
19392         primary_no_new_array:, class_instance_creation_expression:,
19393         array_creation_expression:): Issue error on unsuported JDK1.1
19394         features.
19395         (try_statement:, catches:, finally:): Define actions.
19396         (catch_clause_parameter): New rule.
19397         (catch_clause:): Use new rule catch_clause_parameter.
19398         (parse_jdk1_1_error): New function.
19399         (redefinition_error): Renamed classitf_redefinition_error.
19400         (variable_redefinition_error): New function.
19401         (check_class_interface_creation): Call
19402         classitf_redefinition_error.
19403         (java_complete_tree): Added error message on JDEP_TYPE: case.
19404         (complete_class_report_errors): Fixed indentation.
19405         (declare_local_variables): Call variable_redefinition_error.
19406         (source_end_java_method): Call java_set_exception_lang_code and
19407         emit_handlers where appropriate.
19408         (java_method_add_stmt): Call add_stmt_to_block.
19409         (add_stmt_to_block): New function.
19410         (lookup_method_invoke): Fixed outside comment. new local variable
19411         candicates.  Call find_applicable_accessible_methods_list and
19412         find_most_specific_methods_list when searching for a
19413         method. Modified error report to list possible candidates when
19414         applicable.
19415         (find_applicable_accessible_methods_list,
19416         find_most_specific_methods_list, argument_types_convertible): New
19417         function.
19418         (refine_accessible_methods_list): Function deleted.
19419         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19420         expr (if applicable) before calling patch_array_ref.
19421         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19422         (enter_block): Fixed comment.
19423         (enter_a_block): New function.
19424         (patch_assignment): Reorganized. Call try_reference_assignconv for
19425         references. Call valid_cast_to_p instead of can_cast_to_p.
19426         (try_reference_assignconv,
19427         valid_builtin_assignconv_identity_widening_p): New functions.
19428         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19429         (valid_cast_to_p, valid_method_invocation_conversion_p): New
19430         functions.
19431         (build_string_concatenation): Don't resolve StringBuffer.
19432         (patch_cast): Fixed inverted arguments.
19433         (patch_array_ref): Code to save array expr deleted. Call
19434         valid_cast_to_p instead of can_cast_to_p.
19435         (generate_labeled_block): Call generate_name.
19436         (build_jump_to_finally, build_try_statement, java_get_catch_block,
19437         patch_try_statement): New functions.
19438         * typeck.c (match_java_method): Function deleted.
19439
19440 1998-10-02  Anthony Green  <green@cygnus.com>
19441
19442         * jvspec.c: jvgenmain_spec uses different temporary file names.
19443
19444 1998-10-02  Anthony Green  <green@cygnus.com>
19445
19446         * jvspec.c (lang_specific_driver): Fail if user specifies
19447         --main= when not linking.
19448
19449 1998-09-28  Tom Tromey  <tromey@cygnus.com>
19450
19451         * class.c (make_class_data): Push value for `thread' field.
19452         * decl.c (init_decl_processing): Added `thread' field to class.
19453
19454         * class.c (add_field): Always make static fields externally
19455         visible.
19456
19457 1998-09-26  Anthony Green  <green@cygnus.com>
19458
19459         * expr.c (build_java_athrow,
19460         build_java_throw_out_of_bounds_exception, expand_invoke,
19461         build_newarray, expand_java_multianewarray, build_java_monitor):
19462         Update comments to reflect _Jv_* function names.
19463
19464 1998-09-25  Per Bothner  <bothner@cygnus.com>
19465
19466         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
19467         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
19468         * parse.y (expand_start_java_method):  Likewise.
19469
19470 1998-09-24  Per Bothner  <bothner@cygnus.com>
19471
19472         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
19473
19474         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19475         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
19476         * expr.c:  Remove no-longer-needed calls to promote_type.
19477         * decl.c (give_name_to_locals):  Liekwise.
19478         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
19479         * parse.y:  Add/remove promote_type calls as appropriate.
19480         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
19481         (parse_signature_string):  Likewise.
19482         (build_java_array_type):  Fix for now signature convenions.
19483
19484         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
19485
19486 1998-09-23  Tom Tromey  <tromey@cygnus.com>
19487
19488         * class.c (init_class_processing): libjava function renamed to
19489         _Jv_RegisterClass.
19490
19491 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19492
19493         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19494         * java-tree.def: Fixed DEFTREECODE third argument.
19495         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19496         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19497         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19498         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19499         JAVA_THIS_EXPR): Now replaced by tree code definitions.
19500         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19501         * lang.c (java_tree_code_type, java_tree_code_length,
19502         java_tree_code_name): New arrays.
19503         (lang_init): Append Java tree node definitions to Gcc ones.
19504         * lex.c (expression_obstack): Declared as extern when JC1_LITE
19505         defined.
19506         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19507         wfl_to_string.
19508         (java_lex): Allow declaration of empty string constants. Retain
19509         location information on CASE_TK and DEFAULT_TK.
19510         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19511         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19512         Modified to be more robust.
19513         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19514         (build_new_invocation, try_builtin_assignconv,
19515         patch_switch_statement, string_constant_concatenation,
19516         build_string_concatenation, patch_string_cst, patch_string,
19517         java_expand_switch): New function declarations.
19518         * parse.y: Rules related to switch and EH tagged <node>.
19519         (label_id): Set to NULL_TREE
19520         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19521         tree nodes.
19522         (this_or_super:): Fixed indentation.
19523         (statement:, statement_nsi:, statement_without_trailing_substatement:,
19524         statement_expression:): Removed call to RULE on all sub-rules.
19525         (switch_expression:, switch_labels:): New rules.
19526         (switch_statement:, switch_block:, switch_block_statement_groups:,
19527         switch_block_statement_group:, switch_labels:, switch_label:):
19528         Defined actions.
19529         (throw_statement:, synchronized_statement:, try_statement:):
19530         Defined temporary actions.
19531         (class_instance_creation_expression:): Call
19532         build_new_invocation. Fixed indentation.
19533         (field_access): Fixed indentation.
19534         (method_invocation): Likewise.
19535         (make_qualified_primary): Use THIS_EXPR.
19536         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19537         resolving from SUPER, set *type_found.
19538         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19539         (java_complete_tree): Removed unused local variable `location'. Case
19540         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19541         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19542         on MODIFY_EXPR: and all binary operator tree code cases. Removed
19543         STRING_CST: case. default: checks for patchable strings.
19544         (complete_function_arguments): Transform string constant or
19545         crafted StringBuffer if necessary.
19546         (build_method_invocation): Fixed comments.
19547         (build_new_invocation): New function.
19548         (patch_assignment): Call try_builtin_assignconv to figure a valid
19549         assignment conversion between builtin types.
19550         (try_builtin_assignconv): New function.
19551         (build_binop): Use URSHIFT_EXPR directly to call build.
19552         (operator_string): Use UNARY_PLUS_EXPR.
19553         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19554         operator.
19555         (do_merge_string_cste, merge_string_cste,
19556         string_constant_concatenation, build_string_concatenation,
19557         patch_string, patch_string_cst): New function.
19558         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19559         (patch_unaryop): Likewise. New test of valid ++/-- operands.
19560         (build_newarray_node): Use NEW_ARRAY_EXPR.
19561         (build_this): Use THIS_EXPR.
19562         (build_return): Enable debug information on return statement.
19563         (build_if_else_statement): Likewise.
19564         (complete_labeled_statement): Fixed related comment.
19565         (build_loop_body): Fixed comment.
19566         (build_bc_statement): Enable debug information on break/continue
19567         statements.
19568         (patch_bc_statement): Fixed typos. Handle SWITCH statement
19569         context.
19570         (patch_switch_statement, case_identity, java_expand_switch): New
19571         functions.
19572
19573 1998-09-21  Per Bothner  <bothner@cygnus.com>
19574
19575         * buffer.h (BUFFER_INIT):  New macro.
19576         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19577         Pass (struct jcf_partial *state) to most functions.
19578         (jcf_block, jcf_relocation):  New types.
19579         Support labels, branches, conditionals, loops.
19580
19581 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19582
19583         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19584
19585 1998-09-21  Per Bothner  <bothner@cygnus.com>
19586
19587         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19588         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19589         not integer_type_node (INT_TYPE_SIZ bits).
19590
19591         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19592
19593         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19594         * jcf-dump.c (print_exception_table):  New function.
19595         (disassemble_method):  Better handling of wide instructions.
19596         Make more robust for bad input.
19597
19598 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19599
19600         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19601         FreeBSD.
19602
19603 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19604
19605         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19606
19607 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19608
19609         * Makefile.in ($(PARSE_H)): Removed target.
19610
19611 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19612
19613         * Makefile.in (JAVA_OBJS): Add memmove.o
19614         (memmove.o): New target & rules.
19615
19616 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19617
19618         * expr.c (expand_invoke): Don't generate a call to the class init
19619         code.
19620
19621 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19622
19623         * Makefile.in: Add many missing dependencies.
19624         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19625         as appropriate.
19626         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19627         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19628
19629 1998-09-11  Per Bothner  <bothner@cygnus.com>
19630
19631         * decl.c (complete_start_java_method):  If method is static (and
19632         not private) call _Jv_InitClass.
19633         * expr.c (expand_invoke):  Don't call build_class_init.
19634
19635         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19636
19637 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19638
19639         * Make-lang.in (GCJ): Define before using.
19640
19641 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19642
19643         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19644         losing due to namespace pollution in GNU getopt.h
19645
19646 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19647
19648         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19649         (java.all.cross): Likewise.
19650         (java.rest.encap): Likewise.
19651
19652 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19653
19654         * gjavah.c (print_class_decls): Fix thinko in arglist
19655         * jcv-io.c (find_classfile): Similarly.
19656
19657 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19658
19659         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19660
19661 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19662
19663         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19664         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19665         * Makefile.in (PARSE_C): New macro.
19666         (PARSE_H): Likewise.
19667         (PARSE_SCAN_C): Likewise.
19668         ($(PARSE_C)): Target renamed from parse.c.
19669         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19670         (clean): Remove parse-scan.c as well.
19671         (parse.o): Depend on $(PARSE_C).
19672
19673 1998-09-05  Anthony Green  <green@cygnus.com>
19674
19675         * README, license.terms: Removed.
19676
19677         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19678         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19679         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19680         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19681         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19682         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19683         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19684         and Java trademark attribution.
19685
19686 1998-09-04  Tom Tromey  <tromey@cygnus.com>
19687
19688         * Makefile.in: Use gcjh, not gjavah.
19689         * config-lang.in (stagestuff): Use gcjh, not gjavah.
19690         * Make-lang.in: Changed gjavah to gcjh everywhere.
19691
19692 1998-09-03  Per Bothner  <bothner@cygnus.com>
19693
19694         * gjavah.c:  Support new -prepend -add -append flags.
19695         (print_method_info):  Method is not virtual if class is final.
19696
19697 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19698
19699         * jv-scan.c: Fixed copyright assignment.
19700         * keyword.gperf: Likewise.
19701         * keyword.h: Likewise.
19702         * lex.c: Fixed copyright assignment.
19703         (java_lex): Push unicode back when parsing '<'.
19704         * lex.h: Fixed copyright assignment.
19705         * parse-scan.y: Likewise.
19706         * parse.h: Fixed copyright assignment.
19707         (build_debugable_stmt, complete_for_loop): New function prototypes.
19708         * parse.y: Fixed copyright assignment.
19709         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19710         size_zero_node when completing a loop with no exit condition.
19711         (for_statement_nsi:): Define action.
19712         (for_init:, for_update:): Return size_zero_node when empty.
19713         (declare_local_variables): Call build_debugable_stmt.
19714         (build_debugable_stmt): New function.
19715         (build_loop_body): Build debugable statement around loop
19716         condition part.
19717         (complete_loop_body): Take into account the debugable statement
19718         around the EXIT_EXPR.
19719         (complete_loop_body): New function.
19720         (patch_exit_expr): Fixed condition inversion.
19721
19722 1998-09-02  Tom Tromey  <tromey@cygnus.com>
19723
19724         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19725         name of thread define.
19726         * jvspec.c (THREAD_NAME): New macro.
19727         (GCLIB): Likewise.
19728         (THREADLIB): Likewise.
19729         (lang_specific_driver): Recognize attempt to link with thread
19730         library or gc library.  Recognize -ljava on command line so it
19731         isn't linked against more than once.
19732
19733 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19734
19735         * parse-scan.y (report_main_declaration): Name of the class
19736         containing `main' can be a qualified name.
19737
19738 1998-08-31  Tom Tromey  <tromey@cygnus.com>
19739
19740         * config-lang.in: Changed gjavac to gjc everywhere.
19741         * Make-lang.in: Changed gjavac to gjc everywhere.
19742
19743 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19744
19745         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19746         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19747         and install the files.
19748         * Makefile.in (JAVA_OBJS_LITE): New variable.
19749         (compiler:): Now include jv-scan as a dependency.
19750         (../jv-scan$(exeext), parse-scan.c): New targets.
19751         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19752         * config-lang.in (compilers): Removed gcj, gjavah from the list.
19753         * jcf-parse.c (parse_source_file): Call java_layout_classes and
19754         check for errors even if parse_only.
19755         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19756         defined.
19757         (yylex): New function. Uses java_lex body.
19758         (java_lex): Removed commented out statement. Remove local variable
19759         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19760         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19761         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19762         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19763         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19764         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19765         where appropriate.
19766         (java_lex_error): Empty if JC1_LITE is defined.
19767         (java_get_line_col): Return 0 if JC1_LITE is defined.
19768         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19769         SET_MODIFIER_CTX): Moved into the section containing the macros
19770         conditionally defined by JC1_LITE.
19771         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19772         argument if JC1_LITE is defined.
19773         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19774         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19775         is defined.
19776         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19777         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19778         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19779         to different values according to JC1_LITE.
19780         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19781         declared if JC1_LITE set.
19782         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19783         defined if JC1_LITE not set.
19784         (struct parser_ctx): Reorganized and skip the jc1 front end part
19785         if JC1_LITE set.
19786         (java_layout_classes): New function definition.
19787         (java_push_parser_context, java_init_lex, yyparse, yylex,
19788         yyerror): Prototype always declared. All other static function
19789         prototypes declared only if JC1_LITE is not set.
19790         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19791         declared in parse.h.
19792         (java_layout_classes): New function.
19793         (java_complete_expand_methods): No longer layout the class here.
19794         * parse-scan.y: New file.
19795         * jv-scan.c: New file.
19796
19797 1998-08-25  Tom Tromey  <tromey@cygnus.com>
19798
19799         * gjavah.c (main): Handle -friend option.
19800         (friend_specs): New global.
19801         (generate_access): Handle friend_specs.
19802         (process_file): Likewise.
19803         (MAX_FRIENDS): New macro.
19804         (friend_count): New global.
19805         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
19806         Changed all callers.
19807
19808 1998-08-24  Per Bothner  <bothner@cygnus.com>
19809
19810         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
19811         (main):  Handle processing all the entries of a named .zip archive.
19812         * jcf-io.c (jcf_trim_old_input):  New function.
19813         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
19814
19815 1998-08-24  Per Bothner  <bothner@cygnus.com>
19816
19817         * lang.c (flag_assume_compiled):  Make default be on.
19818
19819 1998-08-21  Per Bothner  <bothner@cygnus.com>
19820
19821         * jcf-dump.c:  Add bunches of flags to control output more.
19822         (process_class):  New function;  support printing more than one class.
19823         (main): Support new --print-main and --javap flags.
19824         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
19825         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
19826
19827 1998-08-20  Per Bothner  <bothner@cygnus.com>
19828
19829         Change mangling of dispatch table to match C++ vtable (w/thunks).
19830         * class.c (build_dtable_decl), java-tree.h:  New function.
19831         (make_class_data):  Call it.
19832         * decl.c (init_decl_processing):  Likewise.
19833
19834 1998-08-19  Warren Levy  <warrenl@cygnus.com>
19835
19836         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19837         soft_anewarray; adjust args passed.
19838         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19839         match _Jv_NewObjectArray.
19840
19841 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19842
19843         * decl.c (push_labeled_block, pop_labeled_block): New functions.
19844         * expr.c (loopup_label): Call create_label_decl.
19845         (create_label_decl): New function.
19846         (java_lang_expand_expr): Call expand_start_bindings with argument
19847         set to zero.
19848         * java-tree.h Added space after PROTO in function declarations
19849         when necessary.
19850         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19851         (create_label_decl, push_labeled_block): New function
19852         declarations.
19853         * lex.c (label_id): Initialize.
19854         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19855         switch.
19856         * parse.h Added space after PROTO in function declarations when
19857         necessary.
19858         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19859         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19860         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19861         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19862         macros.
19863         (struct parser_ctxt): New fields current_loop,
19864         current_labeled_block.
19865         (build_if_else_statement, patch_if_else_statement,
19866         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19867         generate_labeled_block, complete_labeled_statement,
19868         build_bc_statement, patch_bc_statement, patch_loop_statement,
19869         build_new_loop, build_loop_body, complete_loop_body): New function
19870         declarations.
19871         * parse.y (java_warning_count): New global variable.
19872         (label_id): New static variable.
19873         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19874         (block:): Return size_zero_node when block is empty.
19875         (empty_statement:): Return size_zero_node.
19876         (statement:): Implement supplemental action when for_statement: is
19877         reduced.
19878         (label_decl:): New rule.
19879         (labeled_statement:): Rewritten using label_decl. Actions
19880         implemented.
19881         (labeled_statement_nsi:): Likewise.
19882         (if_then_statement): Actions implemented.
19883         (while_expression): New rule.
19884         (while_statement:): Rewritten using while_expression. Actions
19885         implemented.
19886         (while_statement_nsi:): Likewise.
19887         (do_statement_begin:): New rule.
19888         (do_statement:): Rewritten using do_statement_begin. Actions
19889         implemented.
19890         (for_statement:): Rewritten using for_begin. Actions implemented.
19891         (for_statement_nsi:): Likewise.
19892         (for_header:, for_begin:): New rules.
19893         (for_init:): Actions implemented.
19894         (statement_expression_list:, break_statement:,
19895         continue_statement:): Likewise.
19896         (yyerror): Count number of issued warning(s).
19897         (java_report_errors): Report error(s) and/or warning(s).
19898         (java_complete_class): Use build_java_argument_signature to
19899         recompute completed method signature.
19900         (java_check_regular_methods): New locals method_wfl and aflags.
19901         Use method_wfl instead of lookup_cl during error reports. Fixed
19902         indentation and modified some error messages. Use
19903         lang_printable_name in method instead of the DECL_NAME. New code
19904         to issue warnings on methods not overriding corresponding methods
19905         private to a different package.
19906         (java_method_add_stmt): Call add_stmt_to_compound.
19907         (add_stmt_to_compound): New function.
19908         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19909         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19910         (build_if_else_statement, patch_if_else_statement,
19911         build_labeled_block, generate_labeled_block,
19912         complete_labeled_statement, build_new_loop, build_loop_body,
19913         complete_loop_body, patch_loop_statement, build_bc_statement,
19914         patch_bc_statement, patch_exit_expr): New functions.
19915         * typeck.c (build_java_signature): Build argument signature before
19916         enclosing it in between parenthesis.
19917
19918 1998-08-17  Warren Levy  <warrenl@cygnus.com>
19919
19920         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19921         (JAVA_OBJS): Added reminder comment
19922
19923 1998-08-13  Nick Clifton  <nickc@cygnus.com>
19924
19925         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19926         be interpreted as a long long.
19927
19928 1998-08-13  Warren Levy  <warrenl@cygnus.com>
19929
19930         * decl.c (init_decl_processing): Use _Jv_InitClass, not
19931         soft_initialise_class.  Use _Jv_NewMultiArray, not
19932         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
19933         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
19934         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
19935         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19936
19937 1998-08-12  Per Bothner  <bothner@cygnus.com>
19938
19939         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19940         length_identifier_node):  New global tree node constants.
19941         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
19942         Replace uses by super_identifier_node etc.
19943         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
19944
19945         * parse.y (resolve_field_access):  Don't special-case ".length" if
19946         flag_emit_class_files.
19947         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
19948         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
19949         and ARRAY.length.
19950
19951 1998-08-11  Per Bothner  <bothner@cygnus.com>
19952
19953         * decl.c (init_decl_processing): Remove unused method_type_node fields.
19954         * class.c (make_method_value):  Remove init for removed fields.
19955
19956         * class.c (layout_class):  Use build_java_argument_signature.
19957         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
19958
19959         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
19960         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
19961         (build_java_signature):  Don't use push_java_argument_signature.
19962
19963         * typeck.c (lookup_argument_method):  New function.
19964         * parse.y (java_check_regular_methods):  Use lookup_argument_method
19965         instead of lookup_java_method2 followed by lookup_java_method.
19966
19967         * parse.y (check_method_redefinition):  Minor optimization.
19968
19969         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
19970         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19971
19972 1998-08-10  Tom Tromey  <tromey@cygnus.com>
19973
19974         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19975         c-pragma.o.
19976
19977         * gjavah.c (java_float_finite): Use K&R-style definition.
19978         (java_double_finite): Likewise.
19979         (generate_access): Now returns void.  Changed all callers.
19980         (last_access_generated): Removed.
19981         (process_file): Only make a single pass over the .class file.
19982
19983 1998-07-29  Per Bothner  <bothner@cygnus.com>
19984
19985         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
19986         for compatibility for G++ (with -fvtable-thunks).
19987         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
19988
19989         * gjavah.c (process_file):  Use public inheritance for super-class.
19990
19991 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19992
19993         * lex.c (java_init_lex): Initialize ctxp->package.
19994         * parse.h (struct parser_ctxt): package and package_len replaced
19995         by tree package, an identifier node. Field method_decl_list is
19996         gone. Fixed comments.
19997         (lookup_field_wrapper, merge_qualified_name, not_accessible,
19998         class_in_current_package): New function prototypes.
19999         * parse.y (array_type:): Set class loaded flag on primitive type
20000         arrays.
20001         (package_declaration:): Assign ctxp->package to the
20002         identifier node.
20003         (method_invocation:): Handle invocation of method qualified by
20004         `super'.
20005         (single_type_import_declaration:): Removed ambiguity check.
20006         (java_pop_parser_context): New local variable `next'. Reset and
20007         set IMPORT_CLASSFILE_NAME flags on current and previous import
20008         list.
20009         (java_accstring_lookup): Use new local macro COPY_RETURN.
20010         (lookup_field_wrapper): New function.
20011         (parser_qualified_classname): Use merge_qualified_name.
20012         (parser_check_super_interface): Broaden error message.
20013         (do_resolve_class): Check for qualified class name in the current
20014         compilation unit if appropriate.
20015         (process_imports): Check for already defined classes.
20016         (check_pkg_class_access): Got rid of call to
20017         get_access_flags_from_decl.
20018         (java_complete_expand_methods): Call safe_layout_class based on
20019         the current class size.
20020         (make_qualified_primary): Build a WFL qualification on primary if
20021         none exists.
20022         (merge_qualified_name): New function.
20023         (make_qualified_name): Use merge_qualified_name.
20024         (resolve_expression_name): Use safe_lookup_field.
20025         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20026         (resolve_qualified_expression_name): Likewise. Check on resolved
20027         element accessibility.
20028         (not_accessible_p, class_in_current_package): New functions.
20029         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20030         (patch_method_invocation_stmt): Merged common pieces. Check
20031         accessibility of invoked method.
20032         (check_for_static_method_reference): Add returned type in error
20033         message.
20034         (invocation_mode): Get rid of bogus check on PRIVATE methods.
20035         (refine_accessible_methods_list): Merged two conditions in test.
20036         (java_complete_class): Sanity check on stabilize_ref gone.
20037         * zextract.c (read_zip_archive): Cast lseek second argument to long.
20038
20039 1998-07-28  Per Bothner  <bothner@cygnus.com>
20040
20041         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
20042
20043 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20044
20045         * gjavah.c (F_NAN): Removed.
20046         (F_NAN_MASK): New macro.
20047         (F_POSITIVE_INFINITY): Removed.
20048         (F_NEGATIVE_INFINITY): Likewise.
20049         (java_float_finite): Rewrote.
20050         (D_NAN_MASK): Renamed.
20051         (java_double_finite): Rewrote.
20052         (D_POSITIVE_INFINITY): Removed.
20053         (D_NEGATIVE_INFINITY): Likewise.
20054
20055         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20056         If verbose, print underlying representation of value in hex.
20057
20058 1998-07-24  Per Bothner  <bothner@cygnus.com>
20059
20060         * buffer.h, buffer.c:  New files.
20061         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20062
20063         Support locals variables and writing their debug entries to .class.
20064         * jcf-write.c:  Simplify some by user new buffer type.
20065         (vode_buffer_grow):  Removed.
20066         (struct localvar_info):  New type.
20067         (localsvars, localvartable):  New buffers.
20068         (localvar_alloc, localvar_free):  New functions.
20069         (generate_bytecode_insns):  Handle local variables.
20070         (generate_classfile):  Write LocalVariableTable attribute.
20071
20072 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20073
20074         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20075         * zipfile.h (ZIPMAGIC): New macro.
20076
20077 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20078
20079         * Makefile.in (gjavah.o): Updated dependencies.
20080         (jcf-dump.o): Likewise.
20081         (all.indirect): Use ../gjavah.
20082         (../gjavah$(exeext)): Likewise.
20083         (clean): Don't remove gjavah.
20084         (clean): Remove parse.c, not java/parse.c.
20085         * Make-lang.in (java): Added gjavah.
20086         (gjavah$(exeext)): New target.
20087         (GJAVAH_SOURCES): New macro.
20088         (java.all.build): Added gjavah.
20089         (java.all.cross): Likewise.
20090         (java.rest.encap): Likewise.
20091         * config-lang.in (compilers, stagestuff): Added gjavah.
20092
20093 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20094
20095         * gjavah.c (java_float_finite): New function.
20096         (java_double_finite): Likewise.
20097         (F_POSITIVE_INFINITY): New macro.
20098         (F_NEGATIVE_INFINITY): Likewise.
20099         (F_NAN): Likewise.
20100         (D_POSITIVE_INFINITY): Likewise.
20101         (D_NEGATIVE_INFINITY): Likewise.
20102         (D_NAN): Likewise.
20103         (print_field_info): Use java_float_finite and java_double_finite.
20104
20105 1998-07-23  Per Bothner  <bothner@cygnus.com>
20106
20107         * parse.y (method_header):  Name "this" implicit argument.
20108
20109 1998-07-22  Per Bothner  <bothner@cygnus.com>
20110
20111         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20112         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20113         (put_linenumber):  New function.
20114         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20115
20116 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20117
20118         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20119         (lookup_name, build_known_method_ref, build_class_init,
20120         build_invokevirtual, invoke_build_dtable, match_java_method,
20121         build_field_ref, pushdecl_force_head, build_java_binop,
20122         binary_numeric_promotion, build_decl_no_layout,
20123         build_java_arrayaccess, build_newarray, build_anewarray,
20124         build_java_array_length_access, build_java_arraynull_check): New
20125         extern function prototypes.
20126         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20127         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20128         java-tree.h.
20129         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20130         to NULL
20131         * jcf.h (jcf_out_of_synch): New extern function prototype.
20132         * parse.h: Static/global function implemented in parse.y
20133         prototyped and declarations moved at the end of the file.
20134         (DECL_P): Check that the argument isn't null.
20135         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20136         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20137         (QUAL_DECL_TYPE): New macro.
20138         (PARAMS): Macro definition removed.
20139         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20140         (return_statement:): Call build_return.
20141         (field_access:): Call make_qualified_primary in sub rule.
20142         (method_invocation:): Build method invocation and call
20143         make_qualified_primary when processing primaries.
20144         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20145         get_type_from_signature.
20146         (java_check_regular_method): Extra integer 0 argument when calling
20147         lookup_java_method2.
20148         (lookup_java_interface_method2): Extra method DECL argument when
20149         calling lookup_java_interface_method2.
20150         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20151         COMPOUND_EXPR node.
20152         (java_complete_expand_method): Layout current class iff not
20153         already done. Don't process interface's methods.
20154         (java_complete_expand_method): Use super class only if it
20155         exists. Use current class otherwise.
20156         (make_qualified_primary): New function.
20157         (resolve_expression_name): Process qualified expression or
20158         expression from primary the same way.
20159         (resolve_expression_name): Two last arguments to
20160         resolve_field_access are now NULL_TREEs.
20161         (resolve_field_access): New variable is_static. Local field must
20162         be DECLs. is_static computed on field DECLs only. Append code in
20163         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20164         to initialize field_type.
20165         (resolve_qualified_expression_name): New local variable,
20166         previous_call_static and is_static. Handle primaries with function
20167         calls, casts, array references and `this'. `super' now handled as
20168         `(super_class)this'. Use is_static to clarify boolean expressions.
20169         Added code to handle case where a proper handle is required to
20170         access a field. Use QUAL_DECL_TYPE where applicable.
20171         (maybe_access_field): New function.
20172         (patch_method_invocation_stmt): New arguments primary, where,
20173         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20174         deleted. Use `where' as a type to search from if specified. Check
20175         for static method reference where forbidden. Append primary or
20176         current_this to the argument list if not calling constructor nor
20177         static methods.
20178         (check_for_static_method_reference): New function.
20179         (patch_invoke): Layout the class on which new is done if
20180         necessary.
20181         (lookup_method_invoke): Changed format to report errors on
20182         methods.
20183         (qualify_ambiguous_name): New local variable this_found. Now
20184         handle things from primaries. Method call are considered
20185         expression names.
20186         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20187         changed into NULLs.
20188         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20189         (java_complete_tree): New case fo RETURN_EXPR. Process function
20190         call arguments in separate function.
20191         (complete_function_arguments): New function.
20192         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20193         anymore.
20194         (patch_assignment): Take the return function slot into account as
20195         a RHS. Distinguish assignment from a return.
20196         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20197         when checking methods in interfaces.
20198         (resolve_type_during_patch): NULL argument to unresolve_type_p
20199         instead of NULL_TREE.
20200         (patch_newarray): Fixed typo in comment.
20201         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20202         (build_return, patch_return): New functions.
20203         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20204
20205 1998-07-21  Per Bothner  <bothner@cygnus.com>
20206
20207         * constants.c (find_name_and_type_constant, find_fieldref_index,
20208         find_methodref_index):  New methods.
20209         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20210         just return given method.  Also, rename to build_known_method_ref.
20211         (expand_invoke):  Rename call to build_invoke_non_interface.
20212         * java-tree.h, parse.h:  Update prototype.
20213         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20214         (such as expand_expr_stmt) if flag_emit_class_files.
20215         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20216         STACK_TARGET, IGNORE_TARGET):  New macros.
20217         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20218         (generate_bytecode_insn):  New function to generate method's bytecode.
20219         (generate_classfile):  Node generate Code attribute for a method.
20220         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20221         push_long_const, field_op, adjust_typed_op, maybe_wide):
20222         New functions used by generate_bytecode_insn.
20223
20224         * typeck.c (signature_include_return):  Remove variable.
20225         (push_java_argument_signature, build_java_argument_signature):  New.
20226         (build_java_signature):  Use push_java_argument_signature.
20227         * parse.y:  Use build_java_argument_signature instead of fiddling
20228         with signature_include_return.
20229
20230 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20231
20232         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20233         types.
20234
20235         * Makefile.in (all.indirect): Added gjavah$(exeext).
20236         (gjavah$(exeext)): Added $(exeext).
20237         (clean): Likewise.
20238
20239 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20240
20241         * class.c (layout_class): Call to java_layout_parsed_class replace
20242         by safe_layout_class.
20243         * expr.c (build_java_array_length_access): Removed static storage
20244         class in the function definition.
20245         (build_java_arraynull_check): Likewise.
20246         Also fixed typos in two comments.
20247         * lex.c (java_init_lex): Initialize static global kw_length.
20248         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20249         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20250         java_lex_error.
20251         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20252         * parse.h (resolve_no_layout): New static function declaration.
20253         (get_identifier_in_static): Declaration removed.
20254         (java_layout_parsed_class): Function name declaration changed to
20255         safe_layout_class.
20256         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20257         not_initialized_as_it_should_p, build_this): New static function
20258         declarations.
20259         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20260         binary_numeric_promotion, stabilize_reference,
20261         build_decl_no_layout, build_java_arrayaccess): Extern function
20262         declarations moved into their own section.
20263         (build_newarray, build_anewarray, build_java_array_length_access,
20264         build_java_arraynull_check): New extern function declarations.
20265         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20266         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20267         fake tree codes.
20268         (CALL_CONSTRUCTOR_P): New macro.
20269         * parse.y (kw_length): New static global tree node.
20270         (return_statement): Tagged <node>.
20271         (RETURN_TK): Tagged <operator>.
20272         (variable_declarator_id:): Build variable declaration with an
20273         empty initialization value if a syntax error was found in the
20274         initialization part of the variable declaration.
20275         (statement_without_trailing_substatement:): return_statement: now
20276         uses the default rule.
20277         (return_statement:): Temporarily fixed to return NULL_TREE.
20278         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20279         (class_instance_creation_expression:): Class creation rules now
20280         call build_method_invocation upon reduction.
20281         (array_creation_expression:): Rules call build_newarray_node upon
20282         reduction.
20283         (dim_exprs:): Build a list of dimension expressions.
20284         (dim_expr:): Store location of the OSB_TK in the dimension
20285         expression node.
20286         (method_invocation:): Added a new error rule.
20287         (build_unresolved_array_type): WFL argument may also be an array
20288         on a primitive type. Name of the argument changed to reflect this.
20289         (method_declarator): Insert argument type at the beginning of the
20290         argument type list and later reverse the list.
20291         (unresolved_type_p): Argument 'returned' may be optionally
20292         NULL_TREE.
20293         (java_layout_class_from_source): Function renamed
20294         safe_layout_class.
20295         (resolve_and_layout): Now call resolve_no_layout and
20296         safe_layout_class.
20297         (resolve_no_layout): New function.
20298         (purify_type_name): New function.
20299         (complete_class_report_errors): Call purify_type_name during error
20300         report on a type not found.
20301         (process_imports): error_found local variable doesn't need to be
20302         initialized to zero.
20303         (declare_local_variables): New local type_wfl. Fixed typo in error
20304         message. type_wfl assigned to unresolved type and used to register
20305         incomplete type. Build a WFL around the variable initialization
20306         statement so that debug info can be generated on it.
20307         (source_start_java_method): Reverse argument list after they've
20308         been processed.
20309         (current_this): New static global variable.
20310         (java_complete_expand_methods): Set current_this when appropriate.
20311         (resolve_expression_name): Build correct static and non static
20312         field access bearing a simple name.
20313         (resolve_field_access): Resolve the length field of arrays. Handle
20314         f.m() cases.
20315         (patch_method_invocation_stmt): Set the type of the method
20316         invocation to error_mark_node. This value is later overridden by a
20317         valid type, if any. Don't handle qualified constructor invocation
20318         as qualified method invocation. Call lookup_method_invoke with its
20319         new flag. It's no longer necessary to access the selected method
20320         as the value of a tree list. Handle constructor invocation.
20321         (patch_invoke): Reverse argument list when invoking non interface
20322         methods. Insert call to new as the first argument of the
20323         constructor.
20324         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20325         defined within a final class. Return INVOKE_STATIC if the invoked
20326         method is a constructor.
20327         (lookup_method_invoke): New lc argument is a flag to indicate a
20328         constructor lookup. Now handle constructor lookup. Choose the most
20329         specific method in case several were matching the invocation
20330         requirements. Return a method decl instead of a tree list featuring
20331         one single method decl element.
20332         (refine_accessible_methods_list): New lc flag argument to
20333         indicate that a constructor is being looked up.
20334         (not_initialized_as_it_should_p): New function.
20335         (java_complete_tree): Now process fake tree codes
20336         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20337         save_expr on resolved function call arguments. Case on
20338         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20339         (patch_assignment): LHS can be a field access expression. When
20340         dealing with reference, lhs_type is the promoted type of the
20341         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20342         applicable.
20343         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20344         (patch_binop): Use not_initialized_as_it_should_p where
20345         applicable.
20346         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20347         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20348         where applicable.
20349         (resolve_type_during_patch): New function.
20350         (patch_cast): Call resolve_type_during_patch to resolve type and
20351         report error accordingly.
20352         (patch_array_ref): Use not_initialized_as_it_should_p where
20353         applicable. Array base expression is saved before being
20354         used. Promote the type of an array elements if it contains non
20355         builtin types.
20356         (build_newarray_node, patch_newarray, build_this): New functions.
20357
20358 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20359
20360         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20361         increment it in `for' statement.
20362         (print_field_info): If number is inf or nan, don't print it.
20363         (print_method_info): If method name is `delete', just ignore it.
20364         (print_c_decl): Special-case jstringArray.
20365
20366         * gjavah.c (help): New function.
20367         (no_argument): New function.
20368         (usage): Changed text.
20369         (main): Rewrote argument handling.  Now handles -v, --help,
20370         --version.
20371         (version): New function.
20372         (found_error): New global.
20373         (main): Return found_error.
20374         (generate_access): Set found_error.
20375         (print_c_decl): Likewise.
20376
20377 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20378
20379         * gjavah.c (print_c_decl): Don't print "," when examining field.
20380         Skip type name when looking at "[L" types.
20381         (process_file): Now static.
20382         (generate_access): Now returns int.
20383         (last_access_generated): New global.
20384         (process_file): Clear last_access_generated; make multiple passes
20385         over the class.
20386         (print_field_info): Just return if generate_access returns true.
20387         (print_method_info): Likewise.  Also, allow <init> functions to
20388         pass through.
20389         (print_c_decl): Added is_init argument.  Print constructors
20390         properly.
20391         (print_cxx_classname): Use UTF8_GET to extract characters from
20392         string.
20393         (print_base_classname): New function.
20394         (print_class_decls): New function.
20395         (process_file): Use it.
20396         (utf8_cmp): New function.
20397
20398 1998-07-13  Nick Clifton  <nickc@cygnus.com>
20399
20400         * lang-options.h: Format changed to match changes in gcc/toplev.c
20401         to implement a --help option.
20402
20403 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
20404
20405         * decl.c (init_decl_processing): Revert change to dtable_type.
20406
20407 1998-07-09  Per Bothner  <bothner@cygnus.com>
20408
20409         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20410
20411 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
20412
20413         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20414
20415         * lang.c (lang_init): Default flag_exceptions to 1, without
20416         checking to see if it's 2 first.
20417
20418 1998-07-08  Jeffrey A Law  (law@cygnus.com)
20419
20420         * constants.c: Include "system.h".
20421         * decl.c: Likewise.
20422         * lang.c (flag_new_exceptions): Get via extern now.
20423         (lang_init_options): New functions.  Turn on flag_new_exceptions.
20424
20425 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20426
20427         * lex.c (java_lex): Return 0 when we see an invalid character in
20428         the input.
20429
20430         * lex.c (java_read_char): Specify extra argument when calling
20431         java_lex_error.
20432         (java_read_unicode, java_parse_end_comment,
20433         java_parse_escape_sequence): Likewise,
20434         (java_lex): Specify extra argument when calling
20435         java_lex_error. Test that IDs are beginning with a legal character
20436         for IDs. Handle invalid characters with an error message and a
20437         call to java_lex_error.
20438         (java_lex_error): Adjust column position by new argument
20439         `forward'. Issue an error even if in the middle of reporting an
20440         other error.
20441
20442 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
20443
20444         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20445         we don't explicitly put a null pointer when we're copying it.
20446
20447 1998-07-07  Tom Tromey  <tromey@cygnus.com>
20448
20449         * gjavah.c (print_cxx_classname): New function.
20450         (super_class_name): Likewise.
20451         (print_super_fields): Removed.
20452         (in_super): Removed.
20453         (print_field_info): Never generate #defines.
20454         (print_c_decl): Changed generated types to match JNI.  No longer
20455         print class name before method name.
20456         (print_method_info): Print "static" before static methods.
20457         Print "virtual" before non-final methods.
20458         (usage): Use exit(1), not exit(-1).
20459         (main): Likewise.
20460         (print_field_info): Use %.17g to print a double.
20461         (last_access): New globals.
20462         (process_file): Initialize last_access.
20463         (usage): Now static.
20464         (ACC_VISIBILITY): New define.
20465         (generate_access): New function.
20466         (print_field_info): Call it.
20467         (print_method_info): Likewise.  Also, generate information for all
20468         methods, not just native methods.  Return void.
20469         (print_c_decl): Return void.
20470         (print_field_info): Return void.
20471
20472 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20473
20474         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20475         processing the jc1 grammar file. Prefix bison functions and
20476         variables with java_.
20477         (parse.c): Dependencies on parse.h and lex.h
20478         * expr.c (build_java_arrayaccess): Function now global.
20479         * java-tree.h: Comment reorganized to carry on previous
20480         classification effort.
20481         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20482         RESOLVE_TYPE_NAME_P): New flags on WFLs.
20483         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20484         java_parse (new prefix java_ generated by bison).
20485         (java_layout_parsed_class, java_register_parsed_class): Function
20486         call removed.
20487         (yyparse): Removed unnecessary call to init_outgoing_cpool.
20488         * lex.c (static tree wfl_op): Variable deleted.
20489         (java_init_lex): Initialize kw_super and kw_this. Initialize more
20490         ctxp fields to NULL_TREE.
20491         (java_lex): No longer create WFL for operators. Filename caching
20492         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20493         created as STRING_CST and later expanded. Removed extra argument
20494         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20495         and SUPER.
20496         (build_wfl_node): Removed code in comments.
20497         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20498         store token and location data in the current bison token.
20499         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20500         static/extern function declaration at the beginning of the file.
20501         (struct qualification): Data structure definition deleted.
20502         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20503         (qualify_ambiguous_name): Function declaration modified. Function
20504         now returns nothing.
20505         (build_array_ref, patch_array_ref, make_qualified_name,
20506         resolve_qualified_expression_name, maybe_generate_clinit,
20507         resolve_field_access): New static function declarations.
20508         (build_java_arrayaccess): New extern function declaration.
20509         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20510         (CALL_EXPR_PRIMARY): Macro deleted.
20511         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20512         (struct parser_ctxt): Field initialized_final
20513         removed. non_static_initialized, static_initialized: New fields.
20514         * parse.y (static tree kw_super, static tree kw_this): New global
20515         static.
20516         (%union): tree wfl field of operator member replaced by int
20517         location. WFLs are non longer created for operators.
20518         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20519         (qualified_name:): Now calls make_qualified_name to build the
20520         identifier.
20521         (type_declaration:): Consider generating <clinit> when class
20522         parsing completed.
20523         (variable_declarator:): Directly build an assignment node when the
20524         variable is initialized when declared.
20525         (this_or_super:): Build a WFL and set current location when THIS
20526         or SUPER are parsed.
20527         (expression_statement:): Wrap statement around a WFL.
20528         (primary_no_new_array:): Fixed typo. Changed value returned by
20529         THIS_TK because of its new type (temporary).
20530         (dim_exprs:): Temporary fix because of OSB_TK's new type.
20531         (field_access:): Build qualified name with SUPER.
20532         (method_invocation:): Fixed returned value because of SUPER's new
20533         type.
20534         (array_access:): Use OSB_TK location information.
20535         (post_increment_expression:, post_decrement_expression:,
20536         unary_expression:, pre_increment_expression:,
20537         pre_decrement_expression:, unary_expression_not_plus_minus:,
20538         cast_expression:, multiplicative_expression:,
20539         additive_expression:, shift_expression:, relational_expression:,
20540         equality_expression:, and_expression:, exclusive_or_expression:,
20541         inclusive_or_expression:, conditional_and_expression:,
20542         conditional_or_expression:, assignment:): Use new location/token
20543         information available on operators.
20544         (create_class): Set super_decl_type to NULL_TREE when processing
20545         java.lang.Object.
20546         (register_fields): Field initialization is now a MODIFY_EXPR
20547         node. Chain initialization code to the matching lists (according
20548         to the field declaration modifiers).
20549         (maybe_generate_clinit): New function.
20550         (method_header): Don't set method's DECL_NAME to a WFL when adding
20551         methods to java.lang.Object.
20552         (resolve_and_layout): Now can return NULL_TREE if the type
20553         resolution fails. Otherwise, return the class DECL instead of its
20554         TYPE.
20555         (check_method_redefinition): Don't patch method DECL_NAME if it
20556         belongs to java.lang.Object.
20557         (process_imports): Simply assign error_found to the value returned
20558         by check_pkg_class_access.
20559         (declare_local_variables): Don't use their init statements (if
20560         any) when parsing error were previously found. Reuse MODIFY_EXPR
20561         build during parsing as an init statement.
20562         (java_method_add_stmt): Now return the current method body.
20563         (java_layout_parsed_class, java_register_parsed_class): Functions
20564         removed.
20565         (java_complete_expand_methods): Initialize the constant pool on a
20566         per class basis. Layout the classes before expanding their method
20567         bodies. Don't try expand artificial constructor code if error were
20568         found. Make the classes data and register them if no error were
20569         found.
20570         (java_complete_expand_method): Retrieve an artificial constructor
20571         argument list before entering its body. Assign the top block to
20572         the artificial constructor function body and set types of declared
20573         blocks and compound statements to void. Walk method body if not an
20574         artificial constructor.
20575         (make_qualified_name, cut_identifier_in_qualified): New functions.
20576         (resolve_expression_name): Fixed comments. Save/restore the
20577         current class CLASS_LOADED_P flag value. Build non qualified
20578         static field access and handle qualified expression names.
20579         (resolve_field_access, resolve_qualified_expression_name): New
20580         functions.
20581         (patch_method_invocation_stmt): Use the new expression resolution
20582         scheme, calling resolve_field_access when the function call is
20583         resolved as an expression.
20584         (qualify_ambiguous_name): Function rewritten to work on qualified
20585         expression produced by make_qualified_name.
20586         (java_complete_tree): Promote type when function's argument are
20587         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20588         the assignment to discover further errors if RHS is a expression
20589         name that fails to evaluate. Declare LHS initialized even though
20590         the assignment failed. Don't use the location variable and removed
20591         extra argument in patch function calls. Now handle the ARRAY_REF
20592         case and build internal string representation when STRING_CSTs are
20593         walked.
20594         (build_method_invocation): Don't wrap function call around a WFL.
20595         (build_assignment): Likewise. Use the operator location
20596         information.
20597         (patch_assignment): Handle array access LHSs. Handle error
20598         provenance, resulting in a better error report.
20599         (build_binop): Use op_location from operator as binop location
20600         information.
20601         (build_unaryop, build_incdec, build_cast): Likewise.
20602         (patch_binop): Extract location information from the node. Fixed
20603         typo in error message.
20604         (patch_unary_op): Extract location information from the node.
20605         (build_array_ref, patch_array_ref): New functions.
20606
20607 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20608
20609         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20610         match _Jv_IsInstanceOf.
20611         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20612         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20613
20614 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20615
20616         * decl.c (init_decl_processing): Functions are now named
20617         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20618
20619 1998-06-29  Per Bothner  <bothner@cygnus.com>
20620
20621         * java-tree.h (load_class):  Add prototype.
20622         * class.c (is_compiled_class):  Add missing arg to load_class.
20623         * expr.c (expand_java_NEW):  Call load_class.
20624         * parse.y (process_import):  Removed bogus use of void return value.
20625
20626 1998-06-25  Per Bothner  <bothner@cygnus.com>
20627
20628         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20629         Function name is "_Jv_Throw" instead of "soft_athrow".
20630         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20631         Function name is "_Jv_AllocObject" instead of "soft_new".
20632         Takes an extra parameter (object size).
20633         * expr.c:  Update calls.
20634
20635 1998-06-24  Per Bothner  <bothner@cygnus.com>
20636
20637         * lex.c (java_get_line_col):  Handle end-of-file.
20638         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20639
20640 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20641
20642         * lang.c (lang_init): Make -fexceptions the default.
20643         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20644         exception handling is not turned on.
20645
20646 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20647
20648         * lang.c (flag_new_exceptions): Make this this default.
20649         * decl.c (end_java_method): Call emit_handlers.
20650         * except.c (method_init_exceptions): Set language code and version.
20651         (expand_start_java_handler): Enable exception, and call
20652         expand_eh_region_start.
20653         (expand_end_java_handler): Enable exception, and set up catch blocks.
20654         (emit_handlers): New routine to generate the saved handlers.
20655         * java-except.h (emit_handlers): Add prototype.
20656
20657 1998-06-12  Per Bothner  <bothner@cygnus.com>
20658
20659         We used to have three different representations of the constant pool:
20660         the CPool structure, the tree_constant_pool, and the constructures
20661         used to build the Class object (which may need class and string
20662         constants) in compiled code.  None were appropriate for compiling
20663         to .class files, so I did a major overhaul.
20664
20665         First, the tree_constant_pool array was removed.  Things were
20666         modified to the CPool structure in the JCF could be used.
20667         Second, a "capacity" field was added to the CPool, and functions
20668         written to search for a matching constant, adding one if not found.
20669         The code that generated the Class object was changed to use a CPool.
20670         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20671         the static Class object are now only in build_constants_constructor.
20672         Finally, I wrote code which can generate a .class file (including its
20673         constant pool) from the RECORD_TYPE of a class.  This is a big step
20674         on the way to compiling Java source into .class files.
20675
20676         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
20677         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
20678
20679         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20680         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
20681         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20682         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20683         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
20684         (lang_type):  Removed constant_pool field.
20685         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
20686         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20687         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
20688         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20689
20690         * constants.c (current_constant_pool_tags, current_constant_pool_data,
20691         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20692         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
20693         (set_constant_entry, find_constant1, find_constant2,
20694         find_class_constant, count_constant_pool_bytes, write_constant_pool,
20695         find_utf8_constant, find_class_or_string_constant):  New functions.
20696
20697         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
20698         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
20699         (give_name_to_class, get_class_constant):  Likewise.
20700         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
20701         (get_name_and_type_constant, get_ref_constant):  Removed.
20702         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
20703         * parse.y:  Don't save/restore tree_constant_pool.
20704         * verify.c (verify_jvm_instructions):  Update for new approach.
20705         * expr.c (expand_invoke, expand_java_field_op): Likewise.
20706
20707         * lang-options.h:  Added -femit-class-file, -femit-class-files.
20708         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
20709         (lang_f_options):  Added "emit-class-file(s)".
20710
20711         * expr.c (build_java_arrayaccess):  Generate more efficient array
20712         bounds checking, by using unsigned compare.
20713
20714         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
20715
20716 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20717
20718         * parse.h: New comment on the handling of unresolved type
20719         identifiers. JDEPs are now part of the jdep_code enum.
20720         (typedef struct jdep): Now use enum jdep_code or int, depending on
20721         availability. Both are narrowed down to an 8 bits bitfield.
20722         (CALL_EXPR_PRIMARY): Fixed comment.
20723
20724 1998-06-10  Tom Tromey  <tromey@cygnus.com>
20725
20726         * Make-lang.in (java): Added gjavac and jvgenmain.
20727         (java.start.encap): Depend on gjavac.
20728         (java.rest.encap): Depend on jvgenmain.
20729
20730         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20731         (JAVA_CROSS_NAME): Likewise.
20732         (java.all.build): Depend on jvgenmain and gjavac.
20733         (java.all.cross): Depend on jvgenmain and gjavac-cross.
20734         (jvgenmain$(exeext)): New target.
20735         (java.install-common): Wrote.
20736         * config-lang.in (compilers, stagestuff): Added gjavac and
20737         jvgenmain.
20738
20739 1998-06-10  Dave Brolley  <brolley@cygnus.com>
20740
20741         * lang.c (lang_decode_option): New argc/argv interface.
20742
20743 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20744
20745         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20746         * decl.c (build_decl_no_layout): New function.
20747         * expr.c (java_lang_expand_expr): Layout declarations found in
20748         blocks before they're pushed.
20749         * jcf-parse.c (load_class): Save current line when parsing class
20750         file.
20751         (parse_source_file): Register class before expanding their
20752         methods.
20753         * lang.c (put_decl_node): Produce `null' when `void *' is
20754         processed.
20755         * lex.c (static tree wfl_op): New static global, for error report
20756         on casts.
20757         (java_init_lex): wfl_operator and wfl_op initialized
20758         here. Filename caching added for wfl_op. Return wfl_op when `(' is
20759         parsed.
20760         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20761         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20762         build_unresolved_array_type): New static function definitions.
20763         (build_decl_no_layout): New extern function declared.
20764         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20765         faulty modifier exists.
20766         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20767         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20768         (UNARY_PLUS_EXPR): New fake operator.
20769         (struct parser_ctxt): New field osb_number.
20770         * parse.y (static tree wfl_operator): New static WFL for operator
20771         bound error messages.
20772         (DECR_TK, INCR_TK): Moved.
20773         (OP_TK): Tagged <operator>.
20774         (array_type:): Now call build_unresolved_array_type.
20775         (dim_expr:): Count the number of '[' seen.
20776         (post_increment_expression, post_decrement_expression,
20777         pre_increment_expression, pre_decrement_expression,
20778         unary_expression_not_plus_minus, unary_expression:): Actions are
20779         now building the corresponding unary expressions.
20780         (cast_expression:): Actions are now building cast expressions.
20781         (build_unresolved_array_type): New function.
20782         (create_interface): Reset the number of declared interfaces.
20783         (create_class): Likewise.
20784         (method_header): Methods declared within the scope of an interface
20785         are now implicitly set public and abstract.
20786         (java_complete_class): Variable's and parameter's type are patched
20787         with a promoted type.
20788         (declare_local_variables): Resolved non builtin types are promoted
20789         before being used to build a variable decl. Removed type patch
20790         posted on variable initialization statement.
20791         (source_start_java_method): Use build_decl_no_layout to build the
20792         decl of a parameter of incomplete type.
20793         (java_register_parsed_class): Process interfaces too. Call
20794         rest_of_decl_compilation on each processed class declarations.
20795         (java_complete_expand_methods): Don't attempt to expand things in
20796         interfaces.
20797         (java_complete_tree): Process CONVERT_EXPR, even though it always
20798         has a type. Propagate error_mark_node to node's type too. Promote
20799         method's call argument type and return error_mark_node if
20800         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20801         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20802         handle unary operator nodes.
20803         (build_assignment): Added comment.
20804         (print_int_node): New function.
20805         (patch_assignment): New second argument. New error handling. Use
20806         print_int_node. Handle references. Use can_cast_to_p to issue
20807         different error message according to the context and check upon
20808         the initialization of the RHS.
20809         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20810         (operator_string): Handle more operators.
20811         (patch_binop): No longer use a function static
20812         wfl_operator. Improved error message on shift distance.
20813         (build_unaryop, build_incdec, build_cast, patch_unaryop,
20814         patch_cast): New functions.
20815
20816 1998-06-05  Per Bothner  <bothner@cygnus.com>
20817
20818         * jvspec.c:  New file.
20819         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
20820
20821         * java-tree.h (identifier_subst):  Add declaration.
20822
20823 1998-06-04  Tom Tromey  <tromey@cygnus.com>
20824
20825         * jvgenmain.c (main): Generate call to JvRunMain.
20826
20827         * class.c (make_class_data): Push value for "sync_info" field.
20828         * decl.c (init_decl_processing): Push "sync_info" field.
20829
20830 1998-06-03  Per Bothner  <bothner@cygnus.com>
20831
20832         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
20833         Java (source) name, not signature.
20834         Set TYPE_ALIGN to (at least) that of element_type.
20835
20836 1998-06-02  Per Bothner  <bothner@cygnus.com>
20837
20838         * class.c:  Moved classname-mangling-rekated code to ...
20839         * mangle.c:  ... this new file.
20840         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
20841         * Makefile.in:  Update for above changes.
20842
20843 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20844
20845         * expr.c (truthvalue_conversion): Convert integer and floating
20846         point value to their truth value.
20847         * lex.c (java_lex): Handle the `null' literal.
20848         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20849         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20850         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20851         New macros.
20852
20853         * parse.y: Reorganization/documentation on token declaration.
20854         (binop_lookup[]): New added new tree codes.
20855         (relational_expression): Build corresponding binary operators.
20856         (equality_expression, conditional_and_expression,
20857         conditional_or_expression): Likewise.
20858         (java_complete_class): Fix crash in debug message.
20859         (java_complete_tree): Check initialization of method call
20860         arguments. Further bogus node evaluation to detect more error
20861         during assignments. Handles more binary operators.
20862         (patch_assignment): Use DECL_P.
20863         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20864         code.
20865         (operator_string): Handle more case. Compacted source.
20866         (patch_binop): Changed function comment. Checking for
20867         uninitialized first operand takes the compound assignment into
20868         account and uses DECL_P. Checking for uninitialized second operand
20869         delayed to routine's end. Use macros to issue type bound error
20870         messages and issue messages on both operands if their types are
20871         different. Force fixed type into node. Handle all binary
20872         operators.
20873
20874 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20875
20876         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20877         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20878         build operator node and return tokens.
20879         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20880         * parse.h (java_complete_tree): Changed returned type in prototype.
20881         (build_method_invocation, build_assignment, patch_assignment,
20882         patch_binop): New static function declarations.
20883         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20884         BUILD_EXPR_WFL): New macros.
20885         * parse.y (enum tree_code binop_lookup[]): New static for token to
20886         TREE_CODE lookup.
20887         (%union): Parser union has new sub-structure `operator'.
20888         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20889         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20890         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20891         ASSIGN_ANY_TK): Tokens tagged `operator'.
20892         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20893         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20894         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20895         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20896         (assignment_operator:): Rule tagged `operator'.
20897         (expression_statement:): Re-installed default rule.
20898         (method_invocation:): Sub rules call build_method_invocation.
20899         (postfix_expression:): Don't attempt to resolve name here. Just
20900         return an ID.
20901         (multiplicative_expression:): Sub-rules build corresponding binop
20902         expression node.
20903         (additive_expression:, shift_expression:, and_expression:,
20904         exclusive_or_expression:, inclusive_or_expression:): Likewise.
20905         (assignment:): Sub rule invoke build_assignment.
20906         (assignment_operator:): Default rules on sub rules.
20907         (force_error): Added documentation on this variable.
20908         (declare_local_variables): Build initialization calling
20909         build_assignment.
20910         (expand_start_java_method): Removed unused rtx declaration. Mark
20911         arguments as already initialized.
20912         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20913         (java_complete_expand_methods): Don't process next method if
20914         completion of the previous one triggered errors.
20915         (java_complete_expand_method): Call source_end_java_method if no
20916         error were found during completion.
20917         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20918         locals declaratilon. Handle names found within a class. Return
20919         error_mark_node when things aren't found.
20920         (patch_method_invocation_stmt): Return error_mark_node on failures.
20921         (patch_invoke): Removed unused local. Return the correct node.
20922         (java_complete_tree): Now returns a value. The BLOCK section binds
20923         local identifiers and the type of a BLOCK is now void. Assign the
20924         result of operand completion on COMPOUND_EXPR. Assign the
20925         encapsulated node of a WFL to the result of its completion, except
20926         when the node is an identifier. Now handle MODIFY_EXPR and several
20927         binary operators. Return error_mark_node on errors.
20928         (build_method_invocation, build_assignment, patch_assignment,
20929         build_binop, operator_string, patch_binop): New functions.
20930         * typeck.c (binary_numeric_promotion): New function.
20931
20932 1998-05-21  Per Bothner  <bothner@cygnus.com>
20933
20934         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
20935         Replace most uses of ident_subst by identifier_subst.
20936
20937         * class.c (push_class_static_dummy_field):  Removed function.
20938         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
20939         instead of looking got "class" static field.  Create that decl here.
20940         (class_identifier_node):  Removed;  no longer needed.
20941         (init_class_processing):  Don't init class_identifier_node.
20942         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
20943         Do nreverse 0 times (instead of twice) for Object and Class.
20944         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20945
20946 1998-05-20  Per Bothner  <bothner@cygnus.com>
20947
20948         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
20949         while initializing linenumber_count and linenumber_table.
20950         Do it before init_function_start (which calls emit_line_note).
20951         * expr.c (expand_byte_code):  Don't need to clear lineno here.
20952
20953 1998-05-18  Tom Tromey  <tromey@cygnus.com>
20954
20955         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20956         then mangle number as _N_.
20957
20958         * class.c (mangle_class_field): New function.
20959         (build_class_ref): Set assembler name of class reference using
20960         mangle_class_field.
20961         (push_class_static_dummy_field): Likewise.
20962
20963 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
20964
20965         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20966         of assigning to TREE_CODE.  The latter method exploits a feature
20967         of GCC that is not ANSI compliant.
20968
20969 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20970
20971         * decl.c (pushdecl_force_head): New function.
20972         (pushlevel): Removed conditional printf.
20973         (complete_start_java_method): Don't enter local variable scope if
20974         function is compiled from source code.
20975         * expr.c: parse.h now included
20976         (java_lang_expand_expr): New function.
20977         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20978         printf. Terminate buffer when doing directories.
20979         * jcf-parse.c (parse_source_file): Call lang_init_source before
20980         parsing and before code generation.
20981         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20982         use printf if the macro is defined.
20983         * lang.c (lang_init): Install lang_expand_expr hook on
20984         java_lang_expand_expr.
20985         (java_dummy_print): New function.
20986         (lang_init_source): New function.
20987         * lex.c (java_lex): Remember location of an opening brace at the
20988         second nesting level.
20989         (java_is_eol): Unget character seen after a CR if it is EOF.
20990         * parse.h: Now includes lex.h
20991         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
20992         printf if the macro is defined.
20993         (expand_start_java_method, build_expr_block, enter_block,
20994         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
20995         New static function declarations.
20996         (pushdecl_force_head): New extern function declaration.
20997         (INCOMPLETE_TYPE_P): New macro.
20998         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
20999         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21000         BLOCK_EXPR_ORIGIN): New macros.
21001         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21002         DECL_SOURCE_LINE_LAST): New macros.
21003         (struct parser_ctxt): Removed field current_method_decl, redundant
21004         with the field current_function_decl. Added fields
21005         first_ccb_indent1 and pending_block.
21006         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21007         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21008         tagged <node>
21009         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21010         (compilation_unit:): Cosmetic on sub rule.
21011         (type_declaration:): Cosmetic on sub rules. Added an error rule.
21012         (variable_initializer:): Installed default rule on expression:.
21013         (method_declaration:): method_header: starts a new
21014         method. method_body: installs the function body, absorbs blocks
21015         emitted for temporary variable scopings, pops function's body block
21016         and merges function's last statement lineno in DECL_SOURCE_LINE.
21017         (method_body:): Installed default rules.
21018         (block:): Call enter_block when an opening brace is seen.  Absorb
21019         scoping blocks and call exit_block when a closing brace is seen.
21020         (block_statement:): Cosmetic changes.
21021         (method_invocation:): Create WFL around CALL_EXPR node.
21022         (patch_stage): Added comment around definition.
21023         (method_header): Try to use first_ccb_indent1 as the first line of
21024         the method, so BP debug info are emitted at the first opening
21025         brace of the function. If the function has no body, use the
21026         location of the function's name. Override currently defined method
21027         name with the matching WFL so we can point redefinition errors
21028         using the location where the function's name was declared.
21029         (check_abstract_method_header): Interprets DECL_NAME as an
21030         identifier or as a WFL, accordingly.
21031         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21032         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21033         location and name information out of it and reinstall DECL_NAME to
21034         its original identifier node value.
21035         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21036         function's source code).
21037         (read_import_dir): Test the value returned by find_class and issue
21038         a fatal accordingly.
21039         (declare_local_variables): Push a new block for the scope of the
21040         new variable(s) if code has been already generated at that nesting
21041         level. Pinpoint redefinition errors using the variable id
21042         WFLs. Generate initialization code if necessary. If the variable
21043         type is incomplete, register a patch on its decl.
21044         (source_start_java_method): Rewritten. Define a new block for the
21045         function's parameters. Build parameter decl out of function's
21046         arguments and register them for a patch if their types are
21047         incomplete.
21048         (expand_start_java_method): Includes the part of
21049         source_start_java_method that was pushing the parameter decls and
21050         completing the method start code.
21051         (source_end_java_method): Removed call the expand_end_bindings and
21052         poplevel (already taken care of). Reinstall function's arguments
21053         and get function's last line of code before calling
21054         expand_function_end.
21055         (java_method_add_stmt): New comment before the function's
21056         code. Complement the second operand of the current COMPOUND_EXPR
21057         if necessary.
21058         (java_complete_expand_methods): Don't generate debug info on line
21059         zero when expanding a generated constructor.
21060         (java_complete_expand_method): Set start and end line numbers for
21061         a artificially generated constructor to one and manually call
21062         enter_block and exit_block when defining it. For all methods:
21063         expand function's start calling the new expand_start_java_method
21064         and invoke java_complete_tree on the effective method's body, if
21065         any.
21066         (resolve_expression_name): Now use lookup_name_in_blocks to search
21067         local variable decls and print out an error when variables are
21068         undefined.
21069         (patch_method_invocation_stmt): Inserted comment before the
21070         function's code.
21071         (lookup_method_invoke): Chain method's arguments using chainon
21072         with the current arg list as a second argument. Inserted missing
21073         IDENTIFIER_POINTER when reporting an error on methods not found.
21074         (refine_accessible_methods_list): Don't retain constructors.
21075         (patch_arguments): Function removed.
21076         (java_complete_tree): Inserted comment before the function's
21077         code. New case for BLOCKs. Moved the WFL case a bit
21078         further. Complete function's arguments.
21079         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21080         maybe_absorb_scoping_blocks): New functions.
21081
21082 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21083
21084         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21085         previously set.
21086         * jcf-parse.c (parse_source_file, java_error_count): New forward
21087         and extern declarations.
21088         (java_parse_abort_on_error): Macro moved.
21089         (jcf_parse_source): fatal called if fopen fails. Now calls
21090         parse_source_file.
21091         (parse_source_file): New parse_only parameter. Reflects the
21092         elimination of the second pass.
21093         (yyparse): parse_source_file called with argument set to 0.
21094         * jcf.h (JCF_ZERO): Sets java_source to zero.
21095         * lex.c (java_init_lex): pass argument is gone. Function modified
21096         to be called once during the analysis of a file.
21097         (java_unget_unicode): Fixed typo in fatal message.
21098         (java_get_line_col): Likewise.
21099         (java_lval): Likewise. String literals no longer built during
21100         second pass.
21101         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21102         account.
21103         * parse.h (MODIFIER_WFL): New macro.
21104         (parse_check_super, parser_check_super_interface): Now return int.
21105         (parser_chain_incomplete_item, not_builtin_p,
21106         complete_method_decl): Declarations removed.
21107         (build_method_invocation_stmt, build_invoke): Renamed using the
21108         `patch' instead of `build'
21109         (register-incomplete_type, obtain_incomplete_type,
21110         java_complete_tree, java_complete_expand_method,
21111         unresolved_type_p, create_jdep_list): New function declarations.
21112         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21113         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21114         (jdep): New typedef on new struct _jdep.
21115         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21116         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21117         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21118         JDEP_RESOLVED_P): New macros.
21119         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21120         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21121         JDEP_VARIABLE): New enum values and jdep kinds.
21122         (jdeplist): New typedef on struct _jdeplist.
21123         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21124         macros.
21125         (CALL_EXPR_PRIMARY): New macro.
21126         (struct parser_ctxt): Fields java_pass, current_method_decl,
21127         method_decl_list deleted. New field jdeplist.
21128         (INCOMPLETE_P): Macro deleted.
21129         * parse.y (single_type_import_declaration:): Removed pass switch.
21130         (type_import_on_demand_declaration): Likewise.
21131         (field_declaration:): Removed pass switch on all sub rules.
21132         (class_declaration:): Call the complete_class_decl removed on
21133         class_body rules.
21134         (method_declaration:): Removed second pass switch. No longer chain
21135         methods decl when method_header reduced.
21136         (method_header:): Sub rules no longer depend on pass switch.
21137         (method_declarator:): Likewise.
21138         (method_body:): Likewise.
21139         (abstract_method_declaration:): Likewise.
21140         (block_statement:): Likewise.
21141         (local_variable_declaration:): Likewise.
21142         (argument_list:): Likewise.
21143         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21144         removed. Partial CLASS_EXPR tree node built instead.
21145         (postfix_expression:): Removed pass switch on all sub rules.
21146         (java_pop_parser_context): Free classd_list content.
21147         (yyerror): Call obstrack_grow0 to finalize error message.
21148         (check_class_interface_creation): Comment modified to reflect new
21149         returned value meaning. Removed second pass switch. Return 1 if an
21150         error was found, 0 otherwise. Adjust pointer on filename if a
21151         leading path separator was found.
21152         (maybe_create_class_interface_decl): Removed first pass switch
21153         when linking the class decl to the class_list. Install a new
21154         jdep_list for the class.
21155         (add_superinterfaces): List of unresolved interfaces is
21156         gone. Unresolved interfaces are directly added to the current
21157         dependencies list.
21158         (create_interface): Second pass shortcut removed.
21159         ctpx->modifier_ctx access through MODIFIER_WFL.
21160         (create_class): Second pass shortcut removed. Call to
21161         register_incomplete_type replaces the call to
21162         parser_chain_incomplete_item.
21163         (complete_class_decl): Function removed.
21164         (duplicate_declaration_error): New way of retrieving redeclared
21165         item type.
21166         (register_fields): Call to lookup_modifier_cl replaced by
21167         MODIFIER_WFL. New way of handling unresolved type, using
21168         unresolved_type_p and obtain_incomplete_type.
21169         register_incomplete_type replaces call to parser_chain_incomplete_item.
21170         (patch_stage): New static global variable.
21171         (method_header): New way of handling unresolved type, using
21172         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21173         indicates that the method decl needs to be patched.
21174         (check_abstract_method_header): Call to lookup_modifier_cl
21175         replaced by MODIFIER_WFL.
21176         (method_declarator): Incomplete argument type are registered
21177         calling register_incomplete_type. Patch on the declared method is
21178         issued in that case.
21179         (unresolved_type_p): New function.
21180         (parser_check_super_interface): New comment to reflect function's
21181         modified returned type (int). Function and has a new argument
21182         this_wfl. Call to parse_error_context uses this_wfl instead of
21183         relying on lookup_cl.
21184         (parser_check_super): Comment reflects function's new returned
21185         type (int). Function returns nonzero value on error.
21186         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21187         register_incomplete_type, jdep_resolve_class): New functions to
21188         handle incomplete types in declarations.
21189         (java_complete_class): Rewritten to work with the new incomplete
21190         type handling scheme.
21191         (complete_class_report_errors): Likewise.
21192         (complete_method_decl): Removed: it jobs is now handled by
21193         java_complete_class.
21194         (do_resolve_class): Class loaded in not already loaded and not
21195         found in Java source code.
21196         (java_check_regular_methods, java_check_abstract_methods): Don't
21197         call complete_method_decl anymore.
21198         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21199         (read_import_dir): Got rid of the pass number dependency.
21200         (declare_local_variables): New handling of unresolved types (patch
21201         issued).
21202         (source_start_java_method): New parameter level. Function called
21203         with level set to 1 when argument types are potentially
21204         unresolved.  Called to complete the job with level set to 2 once
21205         types are complete.
21206         (source_end_java_method): Call to permanent_allocation
21207         removed. Waiting to be replaced by a more suitable obstack
21208         management.
21209         (java_complete_expand_methods, java_complete_expand_method,
21210         java_expand_finals): New functions.
21211         (build_method_invocation_stmt): Renamed
21212         patch_method_invocation_stmt. Extracts function call expression
21213         (wfl) and arguments (args) from CALL_EXPR tree operands.
21214         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21215         call. Patch the function and argument operand of the CALL_EXPR
21216         tree argument.
21217         (patch_argument, java_complete_tree): New functions.
21218
21219 1998-04-20  Per Bothner  <bothner@cygnus.com>
21220
21221         Recover from missing fields and methods (i.e. error instead of fatal).
21222         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21223         * expr.c (expand_invoke):  Recover from missing method.
21224         (expand_java_field_op):  Recover from missing field.
21225         Inline references to java.lang.{Integer,Char,...}.TYPE.
21226         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21227         * class.c (add_method):  Use get_type_from_signature.
21228         (build_class_ref):  Handle a class that was not found.
21229         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21230         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21231         instead of lookup_field to handle missing fields.
21232
21233         * jcf-parse.c (process_zip_dir):  Set java_source.
21234
21235 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21236
21237         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21238
21239 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21240
21241         * jcf-parse.c (load_class): Don't change input_filename before
21242         calling jcf_parse_source (but still do it before calling
21243         jcf_parse).
21244         (jcf_parse_source): Assign input_filename after having saved the
21245         parser context.
21246         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21247         list. ctxp->modifier_ctx zeroed according to its new
21248         definition. ctxp->filename initialized. Removed
21249         JAVA_MODIFIER_CTX_UNMARK.
21250         (java_unget_unicode): Update the character based column position.
21251         (java_allocate_new_line): ref_count not used anymore. Always free
21252         ctxp->p_line. Initialize c_line->char_col to 0.
21253         (java_get_unicode): Update the character based column position.
21254         (java_lex): Use ctxp->elc to store current position in source
21255         file, at the beginning of the parsed token. Set modifier_ctx entry
21256         corresponding to the parse modifier to a WFL node. Return a WFL
21257         node when an identifier is parsed.
21258         (java_lex_error): Now uses ctxp->elc to store current position in
21259         source.
21260         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21261         * lex.h (build_wfl_node): New function definitions.
21262         (struct java_line): ref_count and next fields are gone. New field
21263         char_col.
21264         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21265         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21266         (JAVA_COLUMN_DELTA): New macro.
21267         (java_lc): New typedef on new struct _java_lc.
21268         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21269         (parse_error_context, parse_warning_context): Changed prototypes.
21270         (java_get_line_col): Added as an available global function.
21271         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21272         (IC_DECL): Replaced by macro IC_TYPE
21273         (DEPEND_WFL): New macro.
21274         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21275         wrong modifier.
21276         (exit_java_complete_class): Removed a commented out statement.
21277         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21278         now an array of tree nodes. Deleted fields line_list and
21279         e_line. New field elc, to replace e_line.
21280         * parse.y (array_type:): Build WFL node.
21281         (qualified_name:): Build a single WFL node out of two. Retain
21282         the location information of the first node in the resulting node.
21283         (package_declaration:): Use package name as a WFL node
21284         (single_type_import_declaration:): Use imported name as a WFL node.
21285         (type_import_on_demand_declaration:): Use root of the imported
21286         packages as a WFL node.
21287         (field_declaration:): Removed unused local variable cl.
21288         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21289         (yyerror): New static elc. Removed static error_line, error_pos.
21290         New local code_from_source. Save ctxp->elc into elc at the first
21291         pass. Call java_get_line_col to get a string of the line where
21292         the error occurred.
21293         (debug_line): Removed static function.
21294         (parse_error_context, parse_warning_context): Parameter cl is now
21295         a WFL node. Use its value to initialize ctxp->elc.
21296         (redefinition_error): Parameter cl is now a WFL node.
21297         (parse_add_interface): New parameter wfl. No longer call
21298         lookup_cl, use wfl instead.
21299         (check_class_interface_creation): Parameter cl is now a WFL node.
21300         (maybe_create_class_interface_decl): Likewise.
21301         (add_superinterfaces): New function.
21302         (create_interface): Removed local cl, node, super_decl,
21303         super_decl_type.  Function now uses id as a WFL node. Better
21304         warning/error report on obsolete or forbidden mix of
21305         modifiers. Now calls add_superinterfaces to register interfaces.
21306         (create_class): Removed local cl, node. Local variable id is used
21307         as a WFL node. Better error report on forbidden modifier
21308         mix. Uses add_superinterfaces to register interfaces.
21309         (find_field): Argument cl is now a WFL node. Now store the WFL
21310         node of a fields that needs to be checked for their
21311         initialization.
21312         (method_header): Local variable node non longer used. Local
21313         variable id replaces cl.
21314         (check_modifiers_consistency): Local variable cl is now a WFL
21315         node.
21316         (method_declarator): Local variable cl replaced by parameter id.
21317         (parser_qualified_name): Now uses parameter name as a WFL node.
21318         (parser_check_super_interface): New parameter wfl, for achieve
21319         greater accuracy during error reports.
21320         (parser_chain_incomplete_item): New parameter named location. Used,
21321         along the decl, to construct the incomplete item node.
21322         (java_complete_class): resolve_class now uses WFL node extracted
21323         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21324         where appropriate.
21325         (complete_method_decl): Unresolved function's argument types are WFL.
21326         (resolve_class): Parameter cl is now a WFL node.
21327         (resolve_and_layout): Likewise.
21328         (do_resolve_class): Likewise. Try first to use cl and then do the
21329         lookup on the decl when calling check_pkg_class_access.
21330         (complete_class_report_errors): Use IC_TYPE in place of
21331         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21332         instead of doing a lookup over the decl.
21333         (java_check_final): Use WFL info from field tree list.
21334         (lookup_cl): Rewritten and returns a statically defined WFL node.
21335         (lookup_modifier_cl): Now uses information from WFL nodes.
21336         (process_imports): Likewise.
21337         (read_import_dir): name and cl arguments replaced by a single WFL
21338         node. Function modified accordingly.
21339         (find_in_imports_on_demand): Now uses WFL node.
21340         (check_pkg_class_access): cl argument is now a WFL node.
21341         (declare_local_variables): Fixed to use WFL nodes.
21342         (resolve_expression_name): Likewise.
21343         (build_method_invocation_stmt): name_combo argument renamed
21344         wfl. Function modified to use WFL nodes.
21345         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21346         (lookup_method_invoke): cl is now a WFL node. Added missing
21347         IDENTIFIER_POINTER to class type decl name.
21348
21349 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21350
21351         * lang.c (init_parse): Now returns char* containing the filename.
21352
21353 1998-04-10  Per Bothner  <bothner@cygnus.com>
21354
21355         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21356
21357         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21358         * class.c (make_class_data):  If flag_assume_compiled, initial class
21359         state is CSTATE_PREPARED; make superclass and interfaces direct
21360         references, rather than constant pool indexes.
21361
21362 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21363
21364         * parser.y: Include flags.h. Removed debug variable pl.
21365         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21366         (block:): Likewise.
21367         (labeled_statement_nsi:): Generate debug info when reducing
21368         expression_statement:.
21369         (check_pkg_class_access): get_access_flags_from_decl invocation
21370         fixed for new CLASS_* flags location.
21371         (source_end_java_method): Save/restore parser context when
21372         entering/leaving this routine. Restore lineno to its right value
21373         before calling expand_end_bindings.
21374         (build_method_invocation_stmt): build_invoke called with the
21375         current line information.
21376         (build_invoke): New argument cl. Wrap the function call around a
21377         wfl node.
21378         (refine_accessible_methods_list): Changed comment, removed
21379         unnecessary code.
21380         * parse.h: Fixed typo in comments.
21381         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21382         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21383         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21384         parser_ccb_indent.
21385         * lex.c (java_lex): Record the last closing curly bracket of a
21386         function.
21387         * jcf-parse.c (jcf_parse_source): Now calls
21388         java_check_methods. Clarified comment, fixed typo.
21389
21390 1998-04-09  Dave Brolley  <brolley@cygnus.com>
21391
21392         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21393         (finish_parse): Expose for non USE_CPPLIB builds.
21394
21395 1998-04-08  Jeffrey A Law  (law@cygnus.com)
21396
21397         * lang.c (lang_print_xnode): New function.
21398
21399 1998-04-03  Per Bothner  <bothner@cygnus.com>
21400
21401         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
21402         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
21403         used to build a class's dispatch table.
21404         (make_class_data):  Generate dispatch table if flag_assume_compiled.
21405         Set dtable of class object to address of class_dtable_decl.
21406
21407         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
21408         be volatile and have side effects - generates better code.
21409
21410         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
21411         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21412
21413         * expr.c (expand_invoke):  If class is final, method is
21414         effectively final, so can call it directly.
21415
21416         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
21417
21418         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
21419
21420 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21421
21422         * parse.y (build_method_invocation_stmt): Removed extra argument
21423         to build_invoke.
21424
21425 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21426
21427         * expr.c (dtable_indent): Now static global.
21428         (expand_invoke): Now call invoke_build_dtable and
21429         build_invokevirtual.
21430         (invoke_build_dtable, build_invokevirtual): New functions.
21431         * jcf-io.c (find_class): Defer issuing a warning by setting
21432         jcf->outofsynch to 1.
21433         * jcf-parse.c (jcf_out_of_synch): New function.
21434         (load_class): Test this_jcf.outofsynch flag and call
21435         jcf_out_of_synch accordingly.
21436         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21437         comment indentation.
21438         * lex.c (java_get_unicode): Fixed code indentation.
21439         (java_lex): Create string literal. Fixed typo. Removed several
21440         premature obstack_free.
21441         * parse.h: New enums for name resolution and invocation mode.
21442         (struct qualification): New data structure.
21443         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21444         (do_resolve_class, build_method_invocation_stmt,
21445         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21446         debug_line, identical_subpath_p, invocation_mode,
21447         refine_accessible_methods_list, build_invoke,
21448         lookup_method_invoke): New functions declared.
21449         (build_invokevirtual, invoke_build_dtable, match_java_method,
21450         build_field_ref, jcf_out_of_synch): New references to external
21451         functions.
21452         (struct parse_ctxt): Removed artificial_constructor field.
21453         * parse.y: (array_type:): Type defined for this rule.
21454         (class_type:): Installed default rule for interface_type:.
21455         (array_type:): Now build Java array type.
21456         (qualified_name:): Now use obstack_grow0.
21457         (method_declaration:): Skip the artificial constructor added to
21458         the list, if any.
21459         (abstract_method_declaration:): Execute the code only during pass 1.
21460         (block:): Installed default rule in block_statements:.
21461         (block_statement:): Add the statement to the method during pass 2.
21462         (statement_expression): Installed default rule for
21463         method_invocation:.
21464         (argument_list:): Added code to build the argument list.
21465         (method_invocation:): Added call to create the method invocation
21466         node.
21467         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21468         (debug_line): New function for debug.
21469         (complete_class_decl): No longer do something during pass 1.
21470         (method_header): Use BUILD_PTR_FROM_NAME.
21471         (parser_qualified_classname): Use obstack_grow0. Removed bogus
21472         obstack_free.
21473         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21474         function's main comment.
21475         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21476         classes.
21477         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21478         (resolve_class): Now works with arrays.
21479         (do_resolve_class, resolve_and_layout): New functions.
21480         (java_check_regular_methods): Reverse method list before and after
21481         having processed it. No longer set ctxp->artificial_constructor.
21482         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21483         accordingly. Fixed typo in issued error message. Now use
21484         obstack_grow0.
21485         (find_in_imports_on_demand): Now use obstack_grow0.
21486         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21487         (source_end_java_method): Call expand_expr_stmt instead of
21488         expand_expr. Calls it before calling expand_function_end.
21489         (java_method_add_stmt): Do nothing if errors were found during
21490         parsing.
21491         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21492         (build_method_invocation_stmt, build_invoke, invocation_mode,
21493         lookup_method_invoke, refine_accessible_methods_list,
21494         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21495         New functions.
21496         * typeck.c (build_java_signature): Properly end method signature
21497         if return type skipped.
21498         (match_java_method): New function.
21499
21500 1998-03-16  Per Bothner  <bothner@cygnus.com>
21501
21502         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
21503
21504 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21505
21506         * expr.c (build_invoke_non_interface): New function.
21507         (methods_ident, ncode_ident): Now static globals.
21508         (expand_invoke): Use build_invoke_non_interface.
21509         * java-tree.h (struct lang_decl): New field function_decl_body.
21510         (DECL_FUNCTION_BODY): New macro.
21511         * jcf-parse.c (jcf_parse_source): Deeper check before setting
21512         CLASS_FROM_SOURCE_P.
21513         (parse_source_file): Fixed typos. Call java_layout_parsed_class
21514         before starting pass 2. Call to java_generate_parsed_class replaced
21515         by java_register_parsed_class.
21516         * lex.c: Fixed typo in header. Some line width related formating.
21517         * lex.h: Some line width related formating.
21518         * parse.h (source_end_java_method, resolve_expression_name,
21519         complete_class_decl, maybe_create_class_interface_decl,
21520         check_class_interface_creation): New static function declarations.
21521         (java_layout_parsed_class, java_method_add_stmt): New function
21522         declarations.
21523         (struct parser_ctxt): Field mark_class_generate removed. New
21524         fields class_list and artificial_constructor.
21525         * parse.y: Fixed typo in header.
21526         (class_declaration:): Call complete_class_decl when class body
21527         parsed.
21528         (method_declaration:): Call source_end_java_method in pass 2 when
21529         the method body is defined.
21530         (postfix_expression:): Do expression name resolution on sub-rule
21531         name during pass 2.
21532         (create_class, create_interface): Merged common pieces.
21533         (check_class_interface_creation, maybe_create_class_interface_decl):
21534         New functions.
21535         (complete_class_decl): New function.
21536         (register_fields): Fixed line width related typo.
21537         (method_header): Correctly skip first argument when fixing
21538         argument line. Changed the loop.
21539         (java_check_circular_reference): Now use ctxp->class_list.
21540         (java_complete_class): Removed start/stop marking.
21541         (java_check_regular_methods): Now takes a class decl as an
21542         argument.  Add default constructor if none were encountered.
21543         (java_check_methods): Now use ctxp->class_list. Changed call to
21544         java_check_regular_methods.
21545         (source_start_java_method): Set DECL_ARG_TYPE for each function
21546         arguments.
21547         (source_end_java_method, java_method_add_stmt): New functions.
21548         (java_generate_parsed_class): No longer exists.
21549         (java_layout_parsed_class, java_register_parsed_class): New functions.
21550         (resolve_expression_name): New function.
21551
21552 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21553
21554         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21555         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21556         until pass initializations are done. Call read_import_dir with
21557         pass set to 0.
21558         * parse.h: (lookup_modifier_cl): New function declared.
21559         (INTERFACE_FIELD_MODIFIERS): New macro.
21560         (OBSOLETE_MODIFIER_WARNING): New macro.
21561         * parse.y: (register_fields): Class type and current field name in
21562         local variables. Check modifier(s) if adding field(s) to an interface.
21563         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21564         and report errors using the faulty modifier line context.
21565         (lookup_modifier_cl): New function.
21566         (read_import_dir): Detect and report default import processing
21567         failure.
21568
21569 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
21570
21571         Add a pair of -fassume-compiled/-fno-assume-compiled options.
21572         * class.c (is_compiled_class): Return 1 after making sure it
21573         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21574         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21575         * java-tree.h (flag_assume_compiled): Add decl.
21576         * lang.c (lang_f_options): Add the flag.
21577         (flag_assume_compiled): Add decl, default to 0.
21578
21579 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21580
21581         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21582         (is_compiled_class): Likewise.
21583         (layout_class): Likewise.
21584         (layout_class): Detect and lay out classes defined in source code.
21585         (interface_of_p, add_interface_do, may_add_interface): New
21586         function.
21587         (add_interface): Now use add_interface_do.
21588         (add_method_1): New function.
21589         (add_method): Now use add_method_1.
21590         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21591         (complete_start_java_method): New function.
21592         (start_java_mehod): Now call complete_start_java_method.
21593         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21594         (expand_invoke): Likewise and fixed typo.
21595         *gjava.c: (print_super_field): Use new argument to find_class
21596         DO_CLASS_FILE.
21597         (main): Likewise.
21598         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21599         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21600         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21601         IDENTIFIER_NODE.
21602         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21603         (add_method_1, push_class): New prototypes.
21604         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21605         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21606         directory where the class was found.
21607         (find_class): New argument DO_CLASS_FILE. Function find_class
21608         modified accordingly.
21609         *jcf-parse.c: (fix_class_path): New function.
21610         (load_class): Use new VERBOSE argument. load_class now finds and
21611         loads/parses .class/.java files. Save read_state of current_jcf
21612         if necessary.
21613         (java_parser_abort_on_error): New macro.
21614         (jcf_parse_source, parse_source_file): New function.
21615         (jcf_parse): Fixed typo.
21616         (yyparse): Call parse_source_file () only.
21617         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21618         writing the real class name back in the zip directory entry.
21619         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21620         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21621         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21622         (find_class): Prototype fixed.
21623         *lex.c: Added 1998 time stamp.
21624         Removed all static global variables, moved into the parser
21625         context data structure.. Now include unistd.h if SEEK_SET not
21626         defined.
21627         (java_init_lex): Rewritten.
21628         (java_sneak_unicode): Modified current unicode access in current line.
21629         (java_unget_unicode): Likewise.
21630         (java_allocate_new_line): New allocation management.
21631         (java_read_char): Modified access and storage of unget_utf8_value.
21632         New way of processing current unicode.
21633         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21634         (java_get_unicode): Now use the parser context.
21635         (java_lineterminator): Likewise.
21636         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21637         of the reentrant parser implementation. Function now use the
21638         parser context data structure and java_lval. Fixed production of
21639         the float and double constant "out of range" error message. Fixed
21640         obstack use. Return integer value when hitting a modifier. Now
21641         return type for TRUE, FALSE and other predefined types. Return
21642         identifier as a TREE_LIST list containing the current line context
21643         as the TREE_VALUE sub-node.
21644         (java_unicode_2_utf8): Fixed typo in declaration.
21645         (java_lex_error): Now use the parser context data structure.
21646         *lex.h: Added 1998 time stamp.
21647         (struct java_line): New fields ref_count and next.
21648         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21649         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21650         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21651         *parse.h: Added 1998 time stamp.
21652         (java_parse_source_file): Renamed from parse_source_file.
21653         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21654         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21655         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21656         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21657         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21658         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21659         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21660         (struct parser_ctxt): New data structure to keep the parser context.
21661         *parse.y: Added 1998 time stamp, got rid of static global variables.
21662         (java_error_count, ctxp): New global variables.
21663         (%union): New value field.
21664         (numeric_type, integral_type): Rules removed.
21665         (primitive_type): Rule defined to handle integral, float, double and
21666         boolean types.
21667         (qualified_name, package_declaration,
21668         single_type_import_declaration, type_import_on_demand_declaration,
21669         modifiers, class_declaration, super, interfaces,
21670         interface_type_list, class_body, field_declaration,
21671         field_declaration, variable_declarators, variable_declarator,
21672         variable_declarator_id, method_declaration, method_header,
21673         formal_parameter_list, formal_parameter, method_body, block,
21674         static, interface_declaration, extends_interfaces,
21675         abstract_method_declaration, local_variable_declarators): Rules now
21676         define actions.
21677         (force_error, do_warning): New global statics.
21678         (push_parser_context, parser_context_save_global,
21679         parser_context_restore_global, pop_parser_context): New functions.
21680         (yyerror): Now uses the global parser context. Fixed use of obstack.
21681         (parse_error, parse_error_context, parse_warning_context,
21682         java_accstring_lookup, redefinition_error, check_modifiers,
21683         parser_add_interface, create_interface, create_class, find_field,
21684         duplicate_declaration_error, register_fields, method_header,
21685         check_modifiers_consistency, check_abstract_method_header,
21686         method_declarator, parser_qualified_classname,
21687         parser_check_super_interface, parser_check_super,
21688         parser_chain_incomplete_item, java_check_circular_reference,
21689         layout_class_from_source, java_complete_class,
21690         complete_method_decl, resolve_class, complete_class_report_errors,
21691         java_check_final, check_method_redefinition,
21692         java_check_regular_methods, java_check_abstract_methods,
21693         java_check_methods, lookup_java_interface_method2,
21694         lookup_java_method2, lookup_cl, find_name_in_single_imports,
21695         process_imports, find_in_imports, read_import_entry,
21696         read_import_dir, find_in_imports_on_demand,
21697         check_pkg_class_access, not_builtin_p, declare_local_variables,
21698         source_start_java_method, java_generate_parsed_class): New
21699         functions.
21700         *typeck.c: (signature_include_return): New global variable.
21701         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21702         to add the function returned type in the signature.
21703
21704 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
21705
21706         * jcf-io.c (open_in_zip): Use strncmp and LEN.
21707
21708 1998-01-29  Dave Brolley  <brolley@cygnus.com>
21709
21710         * Make-lang.in (java.info): Added.
21711         (java.install-info): Added
21712
21713 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
21714
21715         * Makefile.in (clean): Also remove java/parse.c.
21716
21717 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
21718
21719         Add a pair of -fbounds-check/-fno-bounds-check options.
21720         * lang.c (lang_decode_option): Add code to grok arguments.
21721         (flag_bounds_check): Add decl.
21722         (lang_f_options): New array w/ the option in it.
21723         * java-tree.h (flag_bounds_check): Add decl.
21724         * lang-options.h: New file.
21725         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21726         of a static macro value.
21727         (JAVA_ARRAY_EXCEPTION): Delete macro.
21728
21729 1998-01-23  Per Bothner  <bothner@cygnus.com>
21730
21731         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
21732         * expr.c (build_anewarray):  Add missing promote_type.
21733
21734 1998-01-22  Per Bothner  <bothner@cygnus.com>
21735
21736         Add array types with known length to optimize bounds checking.
21737         * typeck.c (build_java_array_type):  Take length parameter.
21738         (java_array_type_length, build_prim_array_type):  New functions.
21739         * java-tree.h:  Update for new functions.
21740         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21741         * class.c:  Use build_prim_array_type.
21742         * expr.c (can_widen_reference_to):  Handle known-length array types.
21743         (verify_jvm_instructions):  Keep track of integer push instructions
21744         followed by newarray/anewarray, so we can build known-length arrays.
21745         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
21746         (java_array_data_offset):  New function.
21747         (build_java_array_length_access):  New function.  Optimize if constant.
21748         (build_java_arrayaccess):  Constant fold bounds check.
21749         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
21750         (build_newarray, build_anewarray):  New functions.
21751         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
21752         * verify.c (merge_types):  Handle known-lengh array types.
21753
21754 1998-01-19  Per Bothner  <bothner@cygnus.com>
21755
21756         * expr.c (expand_byte_code):  Fix performace bug, which caused
21757         searching linenumber_table to be linear rather than constant.
21758
21759 1997-12-12  Per Bothner  <bothner@cygnus.com>
21760
21761         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
21762
21763         * decl.c, java-tree.h (soft_fmod_node):  New global.
21764         * decl.c (init_decl_processing):  Define __builtin_fmod.
21765         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
21766         using __builtin_fmod.
21767
21768 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21769
21770         * keyword.h: New file, output of keyword.gperf as processed by
21771         gperf.
21772         * lex.c (java_lex_init): Initialize java_error_flag.
21773         * parse.c (YYERROR_NOW): Uses java_error_flag.
21774         * parse.y: New static java_error_flag. Useless definition of
21775         buffer_error gone.
21776         * parse.y (java_error): Portable error recovery using
21777         java_error_flag (not yet completely tuned).
21778
21779 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
21780
21781         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21782
21783 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21784
21785         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21786         (parse.c, lex.c, keyword.h): New rules for Java source code
21787         front-end.
21788         * parse.c: Renamed into jcf-parse.c.
21789         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21790         * keyword.gperf: New file, Java keywords.
21791         * parse.y: New file, Java language grammar.
21792         * parse.h: New file, Java language grammar definitions.
21793         * lex.c: New file, Java language lexer.
21794         * lex.h: New file, Java language lexer definitions.
21795
21796 1997-12-03  Per Bothner  <bothner@cygnus.com>
21797
21798         * decl.c (clinit_identifier_node), java-tree.h:  New global.
21799         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
21800         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
21801         * expr.c (expand_java_field_op):  Check for invalid assignment
21802         to final field.
21803
21804         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
21805
21806 1997-10-27  Per Bothner  <bothner@cygnus.com>
21807
21808         * verify.c (verify_jvm_instructions):  When processing a handler,
21809         attempt to set the current_subr to the right value.
21810         (More complicated code combines Sep 17 and Oct 22 versions.)
21811
21812 1997-10-24  Per Bothner  <bothner@cygnus.com>
21813
21814         * class.c (push_class):  Figure out (guess) name of source file.
21815         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
21816         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
21817         (parse_class_file):  Change return type from int to void.
21818         Call debug_start_source_file/debug_end_source_file.
21819
21820         * expr.c (build_java_binop):  Fix masking 2nd operand.
21821         * decl.c (init_decl_processing):  Set sizetype first.
21822
21823 1997-10-22  Per Bothner  <bothner@cygnus.com>
21824
21825         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
21826         (Revert Sep 17 change.)
21827
21828 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21829
21830         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21831         .class extension in their name and fix thing so we don't process
21832         them parse_zip_file_entries().
21833         (parse_zip_file_entries): Cleaned unused local variables.
21834
21835 1997-10-20  Per Bothner  <bothner@cygnus.com>
21836
21837         * expr.c (can_widen_reference_to):  Allows equal array element types.
21838         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
21839         * jcf-dump.c (RET):  Get (and print) index.
21840
21841         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21842         Promote element type to POINTER_TYPE.
21843
21844 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21845
21846         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21847         find_in_current_zip, jcf_figure_file_type): Moved from
21848         jcf-reader.c to parse.c.
21849         * zextract.c: (read_zip_archive): takes file_comment_length possible
21850         field into account.
21851
21852 1997-10-20  Per Bothner  <bothner@cygnus.com>
21853
21854         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
21855
21856         * verify.c (merge_types):  Handle array types even better ...
21857
21858 1997-10-17  Per Bothner  <bothner@cygnus.com>
21859
21860         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
21861
21862         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
21863         * class.c (make_class_data):  Don't build fields_decl if no fields.
21864         When building fields_decl, skip if DECL_ARTIFICIAL.
21865
21866         * expr.c (java_stack_swap):  Update stack_type_map.
21867         * verify.c (merge_types):  Handle array types better.
21868
21869 1997-10-15  Per Bothner  <bothner@cygnus.com>
21870
21871         * class.c (add_field):  Don't promote short integral fields to
21872         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21873         * expr.c (push_value):  Promote and convert short integral values.
21874
21875         * decl.c, java-tree.h (integer_two_node):  New constant node.
21876         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
21877
21878 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21879
21880         * class.c (append_gpp_mangled_type): Use function argument
21881         unpromoted type to generate mangled name.
21882
21883 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21884
21885         * constants.c (build_constant_data_ref): Now uses current_class
21886         instead of main_class.
21887         (build_constants_constructor): Now uses current_class instead of
21888         main_class.
21889         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21890         of the global variable SeepZipFiles done here.
21891         * zextract.c (read_zip_archive): extra_field optional field taken
21892         into account while computing the position of the class file in the
21893         archive.
21894         * verify.c (verify_jvm_instructions): Use current_jcf to search
21895         the constant pool.
21896         * parse.c (load_class): First search for the class to load in the
21897         current zip file. Saves current_jcf (restored before returning
21898         from that function). Don't call JCF_FINISH in the class was found
21899         in the current ZIP file.
21900         (jcf_parse): If the class was found in the current ZIP file, save
21901         its tree_constant_pool (for later reuse).
21902         (parse_class_file): New function. Process each method defined in
21903         the current class and record the class as to be later registered.
21904         (yyparse): Rewritten. Figure the type of the current file and switch
21905         accordingly.
21906         * lang.c: New global variable current_jcf.
21907         (lang_init): Removed compiling_from_source test (done later, in
21908         yyparse). Removed call the jcf_parse ().
21909         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21910         (typedef struct JCF): New fields seen_in_zip (to mark a class found
21911         in the current ZIP file) and zip_offset (offset to the class data in
21912         the current zip file).
21913         * jcf-reader.c: zipfile.h included.
21914         localToFile: New ZipFileCache static global variable
21915         (parse_zip_file_entries): New function. Browse the current ZIP
21916         file directory and process each class found.
21917         (process_zip_dir): New function. Register each class found in the
21918         ZIP file directory. The class aren't parsed but a valid JCF is
21919         link to each of them.
21920         (find_in_current_zip): New function. Search for a class in the
21921         current ZIP file directory. If found, prepare the class so that it
21922         can be loaded.
21923         (jcf_figure_file_type): New function. Examine the file structure
21924         to figure a class file, a ZIP file. If none of these categories are
21925         matched, a source file is assumed.
21926         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21927         SeenZipFile: New global variable.
21928         (open_in_zip): Use zipmember's length to accelerate the search for
21929         a member. If zipmember was NULL and zip file successfully read,
21930         return 0.
21931         * java-tree.h: New global variable current_jcf declared.  Added
21932         declaration for current_constant_pool_tags, current_constant_pool_data,
21933         current_constant_pool_length, current_constant_pool_data_ref.
21934         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21935         store the JCF of classes seen in a zip file) and tree *constant_pool
21936         (to save a loaded class constant pool). current_class declared here.
21937         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21938         retrieve method_ref_constant.
21939         (PUSHC): java_push_constant_from_pool now uses current_jcf.
21940         (OBJECT): get_class_constant now uses current_jcf.
21941         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21942         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21943         (expand_invoke): Now uses current_class instead of main_class
21944         (build_class_init): Now uses current_class instead of main_class
21945         * class.c: New static global variable registered_class.
21946         (register_class): New function.
21947         (emit_register_class): Modified to use registered_class instead of
21948         main_class
21949         (is_compiled_class): Now take into account class seen in the archive.
21950
21951 1997-10-06  Per Bothner  <bothner@cygnus.com>
21952
21953         * except.h:  Renamed to: java-except.h.
21954         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
21955         * except.c:  Add semi-working (commented out) implementation.
21956
21957         * expr.c (expand_iinc):  Add needed flush_quick_stack.
21958         * parse.c (set_source_filename):  New function.
21959         (give_name_to_class):  Set input_filename from package.classname.java.
21960
21961         * jcf-io.c (find_class):  Don't look first in ".".
21962
21963 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21964
21965         * zextract.c (read_zip_archive): Now takes into account the
21966         extra_field field.
21967         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21968
21969 1997-09-20  Per Bothner  <bothner@cygnus.com>
21970
21971         * constants.c, java-tree.h (build_internal_class_name):  New function.
21972         (alloc_class_constant):  Re-implement using build_internal_class_name.
21973         * class.c (make_class_data):  Likewise.
21974         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
21975
21976 1997-09-17  Per Bothner  <bothner@cygnus.com>
21977
21978         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
21979         to NULL before pushing an exception handler target.
21980
21981         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
21982         (java_stack_swap, java_stack_dup):  Re-write to be safe from
21983         clobbering registers.
21984         (build_class_init):  New function.
21985
21986 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21987
21988         * typeck.c (build_java_array_type): Temporary use
21989         permanent_obstack to create the array 'length' field.
21990         * expr.c (lookup_label): Temporay use permanent_obstack to create
21991         label if not found.
21992         * class.c (push_super_field): Tempory use permanent_obstack.
21993
21994 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21995
21996         * typeck.c (type_for_mode): Now handles double_type_node and
21997         float_type_node.
21998         * verify.c (verify_jvm_instructions): The instruction following
21999         the wide bytecode is checked. OPCODE_ret added to the list of
22000         wide.
22001
22002 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22003
22004         * class.c (make_class): Temporary use permanent_obstack. Set the
22005         class CLASS_P field to 1.
22006         (push_class): Temporary use permanent_obstack.
22007         (set_super_info): Temporary use permanent_obstack.
22008         (add_method): Temporary use permanent_obstack, set
22009         METHOD_TRANSIENT().
22010         (add_field): Temporary use permanent_obstack. Sets
22011         FIELD_VOLATILE() and FIELD_TRANSIENT().
22012         (build_class_ref): Temporary use permanent_obstack if the class
22013         isn't compiled.
22014         (build_static_field_ref): Temporary use permanent_obstack when
22015         creating field's rtl.
22016         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22017         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22018         and fields. Function finalized, as far as flag handling.
22019         (push_class_static_dummy_field): Temporary use permanent_obstack.
22020         (emit_register_class): Force generation of class registration at
22021         -O3 or deeper.
22022         * decl.c (end_java_method): Call permanent_allocation() before
22023         returning.
22024         * expr.c (can_widen_reference_to): Added comment to interface
22025         handling, fixed typo.
22026         (lookup_field): Now uses CLASS_P() to correct FIXME
22027         (expand_invoke): Verification on public && !static &&
22028         !abstract moved into soft_lookupinterfacemethod (kaffe).
22029         Use Object class dtable if objectref is an array when expanding
22030         invokeinterface.
22031         (java_push_constant_from_pool): Temporary use permanent_obstack
22032         for CONSTANT_string
22033         * parse.c (get_ref_constant): Temporary use permanent_obstack to
22034         create constant references.
22035         (get_constant): Temporary use permanent_obstack to create constant.
22036         (load_class): Temporary use permanent_obstack to load class.
22037         (jcf_parse): Temporary use permanent_obstack to perform class
22038         layout.
22039         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22040         (build_java_signature): Temporary use permanent_obstack.
22041         * verify.c: (verify_jvm_instruction): removed unnecessary verification
22042         on ACC_SUPER flag.
22043         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22044         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22045         (CLASS_P): Defined
22046
22047 1997-09-11  Per Bothner  <bothner@cygnus.com>
22048
22049         * class.c (append_gpp_mangled_type):  Fix typo.
22050         (emit_register_class):  Use main_class to get class object, rather
22051         than looking for no-longer-existing static decl starting with _CL.
22052         * typeck.c (parse_signature_type):  Promote array element type
22053         if it is a RECORD_TYPE.
22054
22055 1997-09-10  Per Bothner  <bothner@cygnus.com>
22056
22057         * class.c (push_class_static_dummy_field):  New function.
22058         (mangle_static_field):  New. Do G++-style mangling of static fields.
22059         (layout_class):  Mandle static fields here, not in add_field.
22060         (build_class_ref):  The class object is now a dummy static field.
22061         * decl.c (find_local_variable):  Look for best, instead of first match.
22062         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22063         (build_java_athrow):  Don't check here if exception is Throwable.
22064         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22065         (TYPE_USED):  Removed.  No longer used ...
22066         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22067         * verify.c (push_pending_label):  New function.
22068         (push_pending_block):  Renamed to check_pending_block.
22069         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22070         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22071         re-checking possible handlers) after a store (less wasted work).
22072         Check for null handler (finally) before calling add_handler.
22073         Various changes to (finally?) correctly handle try/finally.
22074
22075 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22076
22077         * class.c: Include stdio.h.
22078
22079 1997-09-04  Per Bothner  <bothner@cygnus.com>
22080
22081         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22082         to make sure class is initialized before static/special invoke.
22083
22084         * verify.c (verify_jvm_instructions):  On a store instruction,
22085         call find_local_variable to force pre-allocation of decl and rtx.
22086         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22087
22088 1997-09-03  Per Bothner  <bothner@cygnus.com>
22089
22090         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22091         (make_field_value): Call build_java_signature when needed.
22092         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22093         * expr.c (build_java_athrow):  Don't push_value of exception.
22094         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22095         match specification of [fd]cmp[lg] for NaNs.
22096         (expand_byte_code):  Add support for exception handler ranges.
22097         * except.c:  Add skeleton for EH code-generation.
22098         * verify.c (merge_types):  Treat all promoted integral types as equal.
22099         * constants.c (build_constants_constructor):  To force creation of
22100         current_constant_pool_data_ref, call build_constant_data_ref.
22101
22102         * javaop.def (lload):  Fix typo.
22103         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22104
22105 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22106
22107         * parse.c: Don't include function.h.
22108
22109 1997-08-27  Per Bothner  <bothner@cygnus.com>
22110
22111         * except.[ch]:  New files.
22112         * Makefile.in (JAVA_OBJS):  Add except.o
22113         * expr.c:  Temporary warning about unimplemented exceptions.
22114         * verify.c:  Verify exception handlers.
22115
22116         * jcf-dump.c (disassemble_method):  Print exception table.
22117
22118 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22119
22120         * expr.c (verify_jvm_instructions): Started a thorough
22121         verification of invoke* bytecodes.
22122         (expand_byte_code): flush quick stack if PC is the target of a
22123         branch.  and undef RET (conflicting with config/i386/i386.h).
22124         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22125         used.
22126         (expand_invoke): Now handles invokeinterface and do more
22127         verification according to the bytecode.
22128         (lookup_field): Don't try to load the class if processing
22129         dtable_type.
22130         (can_widen_reference_to): Now handles interfaces.
22131         * decl.c (init_decl_processing): New global variable
22132         soft_lookupinterfacemethod_node, declared in java-tree.h.
22133         Call set_super_info on string_type_node.
22134         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22135         defined.
22136         * class.c (set_super_info): Fills the CLASS_* flags according to
22137         access_flags.
22138         (get_access_flags_from_decl): Handles all class flags.
22139
22140 1997-08-26  Per Bothner  <bothner@cygnus.com>
22141
22142         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22143         * parse.c (yyparse):  Check for abstract method, and missing code.
22144         * expr.c (expand_byte_code):  Change interface.
22145         * lang.c (put_decl_node):  Print promoted types prettier.
22146         * verify.c (verify_jvm_instruction):  Change interface.
22147         Partial support for scanning exception table.
22148         For load instructions, handle promoted integral types.
22149
22150 1997-08-21  Per Bothner  <bothner@cygnus.com>
22151
22152         * verify.c:  New file, with contents moved from expr.c.
22153         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22154         * typeck.c (is_array_type_p):  Moved here from expr.c.
22155         * java-tree.h:  Add some now-needed function declarations.
22156         * Makefile.in (JAVA_OBJS): Added verify.o.
22157
22158 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22159
22160         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22161         METHOD_ABSTRACT flag.
22162
22163         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22164         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22165         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22166
22167         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22168         variables.
22169         (start_java_method): Hook for SYNCHRONIZED methods.
22170
22171         * expr.c (build_java_jsr, build_java_ret): New functions
22172         (JSR,PRE): New macros
22173         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22174         (verify_jvm_instructions): tableswitch, lookupswitch,
22175         monitorenter, monitorexit, goto_w: verified.
22176         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22177         (build_java_monitor): New function.
22178         (MONITOR_OPERATION): Modified to call build_java_monitor()
22179         (verify_jvm_instructions): Started a thorough verification of
22180         invoke* bytecodes.
22181
22182 1997-08-19  Per Bothner  <bothner@cygnus.com>
22183
22184         Support verification of jsr/ret subroutines (used for try/finally).
22185         * decl.c (return_address_type_node):  New type node.
22186         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22187         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22188         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22189         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22190         TYPE_USED):  New macros for special types in type_map.
22191
22192         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22193         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22194         BCODE_JUMP_TARGET.
22195         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22196
22197         * expr.c (can_widen_reference_to):  New function.
22198         (pop_type):  Use it.
22199         (merge_type_state):  Support handling start of subroutine.
22200         (push_pending_block):  Return char* error message, instead of calling
22201         fatal on an error.  Also handle subroutines.
22202         (verify_jvm_instructions):  Handle errors from push_poending_block.
22203         Support jsr and ret instructions.
22204
22205 1997-08-19  Per Bothner  <bothner@cygnus.com>
22206
22207         * jcf-io.c (find_classfile):  Fix thinko.
22208         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22209
22210 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22211
22212         * Makefile.in (BISON): Remove.
22213
22214 1997-08-07  Per Bothner  <bothner@cygnus.com>
22215
22216         * Makefile.in:  Convert to autoconf.
22217         * config-lang.in (outputs):  Added java/Makefile.
22218
22219         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22220         Rename cc1java to jc1.
22221
22222         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22223         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22224
22225         * class.c (class_depth):  Do load_class if needed.
22226
22227         Mostly better verification.
22228         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22229         (init_decl_processing):  Change return type of soft_checkcast.
22230         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22231         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22232         lang_print_error):  New functions.
22233         (lang_init):  Set global hook print_error_function to lang_print_error.
22234         * expr.c:  In the type_map ptr_type_node is only used for null now.
22235         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22236         (merge_types):  Dererence pointer to record types before comparing.
22237         (decode_newarray_type, merge_types):  On error just return NULL.
22238         (build_java_binop):  Add preliminary implementation (with warning)
22239         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22240         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22241         (expand_compare, expand_java_goto, expand_java_call):  Don't
22242         push_pending_block, since that only makes sense when verifying.
22243         (merge_type_state):  Different return codes.
22244         (push_pending_block):  A block may need to be verified more than once.
22245         (expand_byte_code):  Warn about unused code at code generation time.
22246         (verify_jvm_instruction):  Changed logic, since code may need to be
22247         re-verified if type-state has changed.  Also, better error handling.
22248         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22249         Improve newarray, anewarray, ?aload, athrow,
22250         * java-tree.h (LABEL_CHANGED):  New macro.
22251
22252 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22253
22254         * decl.c (soft_athrow_node): New global variable initialized.
22255         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22256         * typeck.c (convert): Added support for REAL_TYPE.
22257         (convert_to_char): New function.
22258         (convert): Handle CHAR_TYPE.
22259         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22260         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22261         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22262         promoted type.
22263         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22264         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22265         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22266         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22267         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22268         to Use The Right Things.
22269         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22270         compatible with INT. BOOLEAN is made equivalent to BYTE.
22271         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22272         OPCODE_ifnonnull): Now supported.
22273         (build_java_athrow): New function.
22274
22275 1997-08-04  Per Bothner  <bothner@cygnus.com>
22276
22277         Rename method name <init> to match G++ (and fix mangling).
22278         * class.c (layout_class):  Replace method name of <init> by class name.
22279         (make_method_value):  Do inverse renaming of constructor from <init>.
22280         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22281         * typeck.c (lookup_java_constructor):  New function.
22282         * expr.c (expand_invoke):  If method_name is <init>, call
22283         lookup_java_constructor to find constructor.
22284
22285         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22286
22287 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22288
22289         * parse.c (get_class_constant): Modified to handle array "classes"
22290         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22291         wide type.
22292         (convert): Modified to handle real type.
22293         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22294         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22295         variables declared.
22296         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22297         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22298         global variables initialized.
22299         (find_local_variable): Handles the case of a pointer
22300         (end_java_method): Restore the use of one more scope
22301         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22302         build_java_array_length_access, expand_java_arrayload,
22303         expand_java_arraystore, expand_java_array_length,
22304         expand_java_multianewarray, expand_java_anewarray,
22305         build_java_check_indexed_type, is_array_type_p,
22306         build_java_throw_out_of_bound_exception): New functions.
22307         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22308         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22309         OPCODE_<t>aload): Implemented code for verification.
22310         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22311         ARRAY_NEW_MULTI): Macro defined.
22312         (CONVERT): Modified to invoke convert().
22313         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22314
22315 1997-07-31  Per Bothner  <bothner@cygnus.com>
22316
22317         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22318         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22319         (make_class_data):  Field name needs '/' as package prefix.
22320         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22321
22322 1997-07-25  Per Bothner  <bothner@cygnus.com>
22323
22324         Implement debug information for local variables.
22325         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22326         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22327         DECL_LOCAL_SLOT_CHAIN):  New macros.
22328         (struct lang_decl_var):  New type.
22329         * parse.c (give_name_to_locals):  Move to decl.c.
22330         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22331         (start_java_method):  Re-write parameter handling.
22332         (pending_local_decls):  New global variable.
22333         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22334         (find_local_variable):  Accept pc so we can skips decls not in range.
22335         (struct binding_level):  Add end_pc field.
22336         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22337         (various):  Change so current pc gets passed to find_local_variable.
22338
22339         * decl.c (init_decl_processing):  Re-arrange fields in
22340         class_type_node and and method_type_node to match kaffe 0.9.1.
22341         * class.c (make_method_value, make_class_data):  Update
22342         initializations to match.
22343
22344 1997-07-16  Per Bothner  <bothner@cygnus.com>
22345
22346         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22347         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22348         (push_super_field):  New function.
22349         (make_class_data):  Handle inheritance of class static initializer.
22350         (layout_class):  New name mangling.
22351         * constants.c (build_constant_data_ref):  Init type of data array
22352         to a one-element array.
22353         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22354         * decl.c:  Rename class_type, object_type etc to class_type_node,
22355         object_type_node etc.  Make former inherit from latter.
22356         * expr.c (expand_invoke):  Add cast of function address.
22357         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22358         * parse.c (yyparse):  Don't call layout_class here.
22359         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22360
22361 1997-06-14  Per Bothner  <bothner@cygnus.com>
22362
22363         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22364         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22365         (alloc_class_constant):  New.
22366         * expr.c (expand_invoke):  Make sure method's class is initialized.
22367         * class.c (interits_from_p, emit_register_class):  New functions.
22368         * parse.c (yyparse):  Call emit_register_class.
22369
22370 1997-06-09  Per Bothner  <bothner@cygnus.com>
22371
22372         * constants.c:  New file, to handle constant pool.
22373         * Makefile.in (JAVA_OBJS):  Add constants.o.
22374         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22375         (pushdecl_top_level):  New.
22376         * parse.c (layout_class):  Moved to class.c.
22377         * expr.c (java_push_constant_from_pool):  New function.
22378         * class.c (build_class_ref):  Make work fully
22379         (make_class_data):  Emit super-class, constant pool, interface vector.
22380
22381 1997-06-03  Per Bothner  <bothner@cygnus.com>
22382
22383         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
22384         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
22385         * class.c (class_depth):  New function.
22386         (lookup_named_class):  Replaced by new function lookup_class.
22387         * decl.c (object_type_node, string_type_node):  New.
22388         Remove various types that we no longer need.
22389         * expr.c (verify_jvm_instructions):  New separate verifier pass.
22390         (push_type, pop_type):  New functions for verifier.
22391         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
22392         (expand_byte_code):  Simplify, since we assume already verified.
22393         (expand_invoke):  Now mostly works.
22394         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22395         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
22396         * parse.c:  Wait to allocate class object until we know its name.
22397         (layout_class):  Calculate DECL_VINDEX for each virtual method.
22398         * typeck.c (get_array_type):  Rename to ...
22399         (build_java_array_type):  ... and provide working implementation.
22400         (build_java_signature):  New function - build Java signature of type.
22401         (set_java_signature):  New function - cache signature with type.
22402         (lookup_java_method):  New function.
22403
22404 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
22405
22406         * class.c (ident_subst):  Take extra SUFFIX parameter.
22407         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
22408         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
22409         (build_class_ref):  Actually implement.
22410         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
22411         * decl.c (builtin_function):  New.
22412         (init_decl_processing):  Update for current Kaffe.  Declare some
22413         builtin Kaffe functions.
22414         * expr.c (build_address_of):  New.
22415         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22416         Renamed (from expand_java_new etc), and added working implementations.
22417         (build_field_ref):  Now also handle static fields.
22418         (expand_invoke):  Implement invokestatic, and start implement rest.
22419         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
22420         * javaop.def:  Rename invokevirt -> invokevirtual.
22421         * lang.c (use_handles):  Removed.
22422         * parse.c:  Add support for ConstantValue attribute.
22423         Handle nested loading of a class.  (JPOOL_UTF):  New.
22424
22425 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
22426
22427         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
22428
22429 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
22430
22431         * Make-lang.in (java.install-man):  New empty rule.
22432         * typeck.c (set_local_type):  New function.
22433         * expr.c (STORE_INTERNAL):  Call find_local_variable,
22434         not find_stack_slot.  Call set_local_type.
22435
22436 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
22437
22438         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
22439         and building RECORD_TYPE CONSTRUCTORs.
22440         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22441
22442         * lang.c (use_handles):  Change the default to 0.
22443         * decl.c:  Define and build class_type, field_type, utf8const_type.
22444         * class.c (make_class_data, make_field_value,
22445         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22446         hashUtf8String, strLengthUtf8, mangled_classname:
22447         Functions to build reflective data structures.
22448         * parse.c (yyparse):  Call make_class_data.
22449
22450         * jcf-io.c (open_class, find_classfile):  New functions.
22451         * jcf-dump.c:  Support reading classfile from explicitly-named
22452         class file (without CLASSPATH searching).
22453
22454 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22455
22456         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
22457         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22458         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22459         (get_constant):  Now trivial for CONSTANT_Utf8.
22460
22461         * jcf.h:  Make NEW_CPOOL the default.
22462         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
22463
22464 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22465
22466         New directory.
22467
22468 \f
22469 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22470 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22471
22472 Copying and distribution of this file, with or without modification,
22473 are permitted in any medium without royalty provided the copyright
22474 notice and this notice are preserved.