OSDN Git Service

remove useless if-before-free tests
[pf3gnuchains/gcc-fork.git] / gcc / java / ChangeLog
1 2011-04-20  Jim Meyering  <meyering@redhat.com>
2
3         * jcf-parse.c (java_parse_file): Remove useless if-before-free.
4
5 2011-04-18  Jim Meyering  <meyering@redhat.com>
6
7         * jcf-parse.c: Fix typo in comment.
8
9 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
10
11         * decl.c (poplevel): Use BLOCK_CHAIN and block_chainon.
12
13 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
14
15         * java-tree.h (union lang_tree_node): Check for TS_COMMON before
16         calling TREE_CHAIN.
17
18 2011-04-11  Martin Jambor  <mjambor@suse.cz>
19
20         * decl.c (java_mark_decl_local): Call cgraph_get_node instead of
21         cgraph_node and handle returned NULL.
22
23 2011-03-25  Kai Tietz  <ktietz@redhat.com>
24
25         * jcf-parse.c (java_read_sourcefilenames): Use filename_cmp
26         instead of strcmp.
27         (set_source_filename): Likewise.
28         * win32-host.c (jcf_open_exact_case): Likewise.
29
30 2011-03-21  Kai Tietz  <ktietz@redhat.com>
31
32         PR target/12171
33         * lang.c (java_attribute_table): Adjust table.
34
35 2011-02-13  Joseph Myers  <joseph@codesourcery.com>
36
37         * jvspec.c (jvgenmain_spec): Remove %{a*}.
38
39 2011-01-21  Kai Tietz  <kai.tietz@onevision.com>
40
41         PR bootstrap/47215
42         * decl.c (java_init_decl_processing): Remove
43         va_list_type_node related type initializations.
44
45 2011-01-11  Kai Tietz  <kai.tietz@onevision.com>
46
47         PR bootstrap/47215
48         * decl.c (java_init_decl_processing): Initialize
49         long_integer_type_node.
50
51 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
52
53         PR bootstrap/47215
54         * decl.c (java_init_decl_processing): Initialize unsigned_type_node.
55
56 2011-01-07  Kai Tietz  <kai.tietz@onevision.com>
57
58         * decl.c (java_init_decl_processing): Setup va_list_type_node.
59
60 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
61
62         * jcf-dump.c (version): Update copyright notice dates.
63
64 2010-12-15  Dave Korn  <dave.korn.cygwin@gmail.com>
65
66         * decl.c (java_init_decl_processing): Initialise integer_three_node.
67         * lang.c (put_decl_node): Handle nested function decls.
68
69 2010-12-07  Joseph Myers  <joseph@codesourcery.com>
70
71         * jcf-parse.c: Don't include assert.h.
72         (java_parse_file): Use gcc_assert.
73
74 2010-12-03  Joseph Myers  <joseph@codesourcery.com>
75
76         * lang.opt (static-libgcj): New option.
77
78 2010-12-01  Joseph Myers  <joseph@codesourcery.com>
79
80         * jcf-parse.c: Don't include toplev.h.
81         * Make-lang.in (java/jcf-parse.o): Don't depend on toplev.h.
82
83 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
84
85         * boehm.c: Don't include toplev.h.
86         * Make-lang.in (java/boehm.o): Don't depend on toplev.h.
87
88 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
89
90         * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c,
91         verify-glue.c: Don't include toplev.h.
92         * Make-lang.in: Dependencies for above files changed to remove
93         toplev.h.
94
95 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
96
97         * boehm.c: Include "config.h" instead of <config.h>.
98         * builtins.c: Don't include <stdarg.h>.
99         * class.c: Don't include "stdio.h".
100         (O_BINARY): Don't define here.
101         * jcf-depend.c: Don't include <assert.h>.
102         (jcf_dependency_set_dep_file, jcf_dependency_init,
103         jcf_dependency_write): Use gcc_assert.
104         * jcf-io.c (O_BINARY): Don't define here.
105         * jcf-path.c: Don't include "tm.h".
106         (jcf_path_init): Use getenv instead of GET_ENVIRONMENT.
107         * resource.c: Don't include "stdio.h".
108         (O_BINARY): Don't define here.
109         * verify-impl.c: Don't include <stdio.h>.
110
111 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
112
113         * jcf-parse.c (java_parse_file): Take no arguments.
114         * java-tree.h (java_parse_file): Update prototype.
115
116 2010-11-09  Joern Rennecke  <amylaar@spamcop.net>
117             Andrew Haley  <aph@redhat.com>
118
119         PR java/46386
120         * config/pdp11/t-pdp11 (java/constants.o-warn): Remove.
121
122 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
123
124         * Make-lang.in (jvspec.o, java/lang.o): Use $(OPTS_H).
125         * lang.c (java_handle_option): Take location_t parameter.
126
127 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
128
129         * expr.c (expand_java_field_op): Use %' in diagnostic.
130         * jcf-parse.c (java_parse_file): Use %' in diagnostics.
131         * jvspec.c (lang_specific_driver): Use %' in diagnostic.
132         * lang.c (java_post_options): Use %' in diagnostics.
133
134 2010-11-06  Joern Rennecke  <amylaar@spamcop.net>
135
136         PR middle-end/46314
137         * class.c: Include target.h.
138         (make_local_function_alias):
139         Use targetm.asm_out.generate_internal_label.
140         * expr.c (lookup_label, generate_name): Likewise.
141
142 2010-11-03  Joern Rennecke  <joern.rennecke@embecosm.com>
143
144         PR bootstrap/44335
145         * jfc-parse.c (target.h): Include.
146         (handle_constant): Use targetm.words_big_endian and
147         targetm.float_words_big_endian.
148         (get_constant): Use targetm.float_words_big_endian.
149
150 2010-10-13  Richard Henderson  <rth@redhat.com>
151
152         * lang.c (java_eh_personality): Update call to
153         build_personality_function.
154
155 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
156
157         * Make-lang.in (java/lang.o): Use $(OPTIONS_H) instead of
158         options.h.
159
160 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
161
162         * decl.c (java_init_decl_processing): Use build_function_type_list
163         instead of build_function_type.
164         * jcf-parse.c (java_emit_static_constructor): Likewise.
165         * builtins.c (initialize_builtins): Likewise.
166
167 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
168
169         * lang.c (java_init_options_struct): New.  Split out from
170         java_init_options.
171         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
172
173 2010-10-04  Andi Kleen <ak@linux.intel.com>
174
175         * Make-lang.in (xgcj, jc1, jcf-dump, jvgenmain):
176         Add + to build rule.
177
178 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
179
180         * lang.opt: Don't use VarExists.
181
182 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
183
184         * java-tree.h (flag_filelist_file, flag_assert, flag_jni,
185         flag_force_classes_archive_check, flag_redundant, flag_newer,
186         flag_use_divide_subroutine, flag_use_atomic_builtins,
187         flag_use_boehm_gc, flag_hash_synchronization,
188         flag_check_references, flag_optimize_sci, flag_indirect_classes,
189         flag_indirect_dispatch, flag_store_check,
190         flag_reduced_reflection): Remove.
191         * jcf-dump.c (flag_newer): Remove.
192         * jcf.h (quiet_flag): Remove.
193         * parse.h (quiet_flag): Remove.
194
195 2010-09-28  Richard Henderson  <rth@redhat.com>
196
197         * lang.c: Include "target.h".
198         (java_eh_personality): Use targetm.except_unwind_info.
199         * Make-lang.in (lang.o): Update deps.
200
201 2010-09-27  Andrew Haley  <aph@redhat.com>
202
203         PR java/45773
204         * jvgenmain.c (main): Fix arg processing.
205
206 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
207
208         * jvspec.c (lang_specific_driver): Handle OPT__help instead of
209         OPT_fhelp.
210         * lang.opt (-CLASSPATH, -all-warnings, -bootclasspath, -classpath,
211         -dependencies, -encoding, -extdirs, -include-directory,
212         -include-directory=, -output-class-directory,
213         -output-class-directory=, -resource, -resource=,
214         -user-dependencies): New.
215
216 2010-09-16  Richard Guenther  <rguenther@suse.de>
217
218         * jcf-parse.c (current_file_list): Remove.
219         (java_parse_file): Use build_translation_unit_decl.  Adjust.
220
221 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
222
223         * lang.opt (d): New.
224
225 2010-09-03  H.J. Lu  <hongjiu.lu@intel.com>
226
227         PR java/45504
228         * jvgenmain.c (main): Check "-D XXX=YYY".
229
230 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
231
232         * jvspec.c (jvgenmain_spec): Don't handle -fnew-verifier.
233
234 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
235
236         * lang.opt (CLASSPATH, bootclasspath, classpath, encoding,
237         fCLASSPATH=): Mark as Java options and as aliases.
238         * jvspec.c (jvgenmain_spec): Don't handle -fCLASSPATH*.
239         (lang_specific_driver): Don't handle options marked as aliases.
240         * lang.c (java_handle_option): Don't handle OPT_fCLASSPATH_.
241
242 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
243
244         * Make-lang.in (jvspec.o): Update dependencies.
245         * jvspec.c: Include opts.h.
246         (PARAM_ARG): Remove.
247         (find_spec_file): Do not add leading -specs=.
248         (lang_specific_driver): Use cl_decoded_option structures.
249         * lang.opt (C, CLASSPATH, D, bootclasspath, classpath, encoding,
250         extdirs, fmain=, s-bc-abi): New options.
251
252 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
253
254         * class.c: Use FOR_EACH_VEC_ELT.
255         * expr.c: Likewise.
256         * jcf-parse.c: Likewise.
257         * resource.c: Likewise.
258
259 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
260
261         * lang.opt (MD_, MMD_, version): Mark RejectDriver.
262
263 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
264
265         * class.c (build_utf8_ref): Fix code formatting from previous commit.
266
267 2010-08-05  David Daney  <ddaney@caviumnetworks.com>
268
269         * class.c (build_utf8_ref): Make decl DECL_USER_ALIGN.
270
271 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
272
273         * lang.c (java_handle_option): Update prototype and return value
274         type.
275
276 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
277
278         * lang.c (java_option_lang_mask): New.
279         (java_init_options): Update prototype.
280         (LANG_HOOKS_OPTION_LANG_MASK): Define.
281
282 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
283
284         * java-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
285         * boehm.c: Likewise.
286         * class.c: Likewise.
287         * decl.c: Likewise.
288         * expr.c: Likewise.
289         * jcf-parse.c: Likewise.
290         * typeck.c: Likewise.
291         * verify-glue.c: Likewise.
292
293 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
294
295         * boehm.c: Include diagnostic-core.h in every file that includes
296         toplev.h.
297         * class.c: Likewise.
298         * constants.c: Likewise.
299         * decl.c: Likewise.
300         * except.c: Likewise.
301         * expr.c: Likewise.
302         * jcf-parse.c: Likewise.
303         * mangle.c: Likewise.
304         * mangle_name.c: Likewise.
305         * resource.c: Likewise.
306         * typeck.c: Likewise.
307         * verify-glue.c: Likewise.
308
309 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
310
311         PR bootstrap/44825
312         * class.c (make_class_data): Cast result of VEC_length calls to int.
313
314 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
315
316         * constants.c (build_constants_constructor): Use build_constructor
317         instead of build_constructor_from_list.
318         * class.c (make_method_value): Likewise.
319         (get_dispatch_table): Likewise.
320         (make_class_data): Likewise.
321         (emit_indirect_register_classes): Likewise.
322         (emit_symbol_table): Likewise.
323         (add_assertion_table_entry): Likewise.
324         (emit_assertion_table): Likewise.
325         (make_field_value): Use build_constructor_single instead of
326         build_constructor_from_list.
327
328 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
329
330         * java-tree.h (struct lang_type) [catch_classes]: Change type to a
331         VEC.
332         * except.c (prepare_eh_table_type): Call CONSTRUCTOR_APPEND_ELT
333         instead of tree_cons.
334         * class.c (make_class): Add dummy entry to TYPE_CATCH_CLASSES.
335         (emit_catch_table): Adjust for new type of TYPE_CATCH_CLASSES.
336
337 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
338
339         * lang.c: Do not include except.h
340         * except.c: Likewise.
341         (doing_eh): New, moved from except.c (in gcc/) but removed the
342         do_warning flag.
343         (maybe_start_try): Update doing_eh call.
344         * Make-lang.in: Update dependencies.
345
346 2010-06-23  Anatoly Sokolov  <aesok@post.ru>
347
348         * decl.c (java_init_decl_processing): Use double_int_to_tree instead
349         of build_int_cst_wide.
350         * boehm.c (set_bit): Remove.
351         (mark_reference_fields): Use double_int type for 'mask' argument.
352         Use double_int_setbit instead of set_bit.
353         (get_boehm_type_descriptor): Use double_int_setbit instead of
354         set_bit. Use double_int_to_tree instead of build_int_cst_wide.
355
356 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
357
358         * gcj.texi: Move to GFDL version 1.3.  Fix copyright years.
359
360 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
361
362         * jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.
363
364         * jcf-parse.c (java_parse_file): Likewise.
365         (process_zip_dir): Likewise.
366
367         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
368         (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
369
370         * expr.c (add_type_assertion): Likewise.
371
372         * decl.c (make_binding_level): Likewise.
373         (java_dup_lang_specific_decl): Likewise.
374
375         * constants.c (set_constant_entry): Likewise.
376         (cpool_for_class): Likewise.
377
378         * class.c (add_method_1): Likewise.
379         (java_treetreehash_new): Likewise.
380
381         * java-tree.h (struct lang_type): Add variable_size GTY option.
382         (struct lang_decl): Likewise.
383
384         * jch.h (struct cpool_entry): Likewise.
385
386         * java-tree.h (java_treetreehash_create): Remove parameter ggc.
387
388         * except.c (prepare_eh_table_type): Update
389         java_treetreehash_create call.
390
391         * class.c (add_method_1): Update java_treetreehash_create call.
392         (java_treetreehash_create): Remove parameter gc.  Use
393         htab_create_ggc.
394
395 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
396
397         * jvspec.c (lang_specific_driver): Use GCC-specific formats in
398         diagnostics.
399
400 2010-05-30  Steven Bosscher  <steven@gcc.gnu.org>
401
402         * except.c: Include tm.h.
403
404 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
405
406         * jvspec.c (lang_specific_driver): Use fatal_error instead of
407         fatal.  Use warning instead of error for warnings.
408
409 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
410
411         * expr.c (get_symbol_table_index): Add spaces in expression.
412
413 2010-05-28  Nathan Froyd  <froydnj@codesourcery.com>
414
415         * java-tree.h (method_entry): Declare.  Declare VECs containing it.
416         (struct lang_type): Change type of otable_methods, atable_methods, and
417         itable_methods to VECs.  Fix comment for atable_methods.
418         (emit_symbol_table): Take a VEC instead of a tree.
419         (get_symbol_table_index): Take a VEC * instead of a tree *.
420         * class.c (add_table_and_syms): Take a VEC instead of a tree.
421         (emit_symbol_table): Update for changed parameter type.
422         * expr.c (get_symbol_table_index): Likewise.
423
424 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
425
426         * buildings.c: Pretend to be a backend file by undefining
427         IN_GCC_FRONTEND (still need rtl.h here).
428
429 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
430
431         * java-tree.h (struct lang_decl_func): Change type of throws_list
432         field to a VEC.
433         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE): Adjust for changed type
434         of DECL_FUNCTION_THROWS.
435         * class.c (make_method_value): Likewise.
436
437 2010-05-26  Nathan Froyd  <froydnj@codesourcery.com>
438
439         * class.c (utf8_decl_list): Delete.
440         (build_utf8_ref): Remove references to it.
441         * java-tree.h (all_class_list): Delete.
442         (predef_filenames): Delete.
443         (enum java_tree_index) [JTI ALL_CLASS_LIST,JTI_PREDEF_FILENAMES]:
444         Delete.
445         * jcf-parse.c (parse_roots): Decrease size to 2.
446         (current_file_list): Convert to a VEC.
447         (all_class_list): Declare.
448         (jcf_parse): Adjust for new type of all_class_list.
449         (java_layout_seen_class_methods): Likewise.
450         (predefined_filenames): Declare.
451         (add_predefined_file): Use it.
452         (predefined_filename_p): Likewise.
453         (java_parse_file): Adjust for new type of current_file_list.                                                                                                                                                     *
454
455 2010-05-25  Jakub Jelinek  <jakub@redhat.com>
456
457         * lang.c (java_classify_record): Return RECORD_IS_INTERFACE
458         for interfaces.
459
460         PR debug/43260
461         * java-tree.h (pending_static_fields): New extern declaration.
462         (java_write_globals): New prototype.
463         * lang.c (LANG_HOOKS_WRITE_GLOBALS): Define.
464         * decl.c (java_mark_class_local): When clearing DECL_EXTERNAL
465         of a static field push it into pending_static_fields vector.
466         * class.c (pending_static_fields): New variable.
467         (add_field): If static field is not DECL_EXTERNAL, push it into
468         pending_static_fields vector.
469         (java_write_globals): New function.
470
471 2010-05-24  Nathan Froyd  <froydnj@codesourcery.com>
472
473         * expr.c (quick_stack): Change type to a VEC.  Update comment.
474         (tree_list_free_list): Delete.
475         (flush_quick_stack): Update for quick_stack type change.
476         (push_value): Likewise.
477         (pop_value): Likewise.
478
479 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
480
481         * java-gimplify.c: Do not include tm.h, toplev.h.
482         * typeck.c: Do not include tm.h.
483         * mangle_name.c: Do not include tm.h.
484         * jcf-dump.c: Do not include tm.h, ggc.h.
485         * class.c: Do not include rtl.h, tm_p.h, target.h, except.h, cgraph.h.
486         * decl.c: Do not include tm.h, rtl.h, function.h, expr.h, except.h,
487         and timevar.h.
488         * jcf-parse.c: Do not include tm.h and tm_p.h.
489         * resource.c: Do not include tm.h, rtl.h, flags.h, obstack.h,
490         target.h, and expr.h.
491         * except.c: Do not include tm.h, rtl.h, function.h.
492         * builtins.c: Do not include convert.h.  Explain why RTL headers
493         have to be included here.
494         * verify-glue.c: Do not include tm.h.
495         * jcf-depend.c: Do not include tm.h.
496         * jcf-reader.c: Include ggc.h.
497         * jcf-io.c: Do not include tm.h, toplev.h.
498         * expr.c: Do not include tm.h, rtl.h, expr.h, except.h, tm_p.h,
499         gimple.h.
500         * lang.c: Do not include rtl.h, expr.h.
501         * Make-lang.in: Update dependencies.
502
503 2010-05-23  Steven Bosscher  <steven@gcc.gnu.org>
504
505         * jcf-parse.c: Include bitmap.h.
506         * Make-lang.in: Update dependencies.
507
508 2010-05-20  Jakub Jelinek  <jakub@redhat.com>
509
510         PR debug/43521
511         * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
512         PARM_DECL.
513
514 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
515
516         * jcf-parse.c (get_constant): Use double_int_to_tree instead of
517         build_int_cst_wide_type.
518
519 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
520
521         * expr.c (pop_arguments): Fix use of undeclared variable.
522
523 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
524
525         * expr.c (expand_java_multianewarray): Use build_call_vec instead of
526         build_call_list.
527         (pop_arguments): Return a VEC instead of a tree.  Take a method type
528         rather than a list of argument types.
529         (rewrite_rule): Change signature. of rewrite_arglist member.
530         (rewrite_arglist_getcaller): Update signature.
531         (rewrite_arglist_getclass): Likewise.
532         (maybe_rewrite_invocation): Update for rewrite_arglist change.
533         (build_known_method_ref): Take a VEC instead of a tree.
534         (invoke_build_dtable): Likewise.
535         (expand_invoke): Update calls to pop_arguments.  Use build_call_vec
536         instead of build_call_list.
537         (build_jni_stub): Use build_call_vec instead of build_call_list.
538         * java-tree.h (maybe_rewrite_invocation): Update declaration.
539         (build_known_method_ref): Likewise.
540         (invoke_build_dtable): Likewise.
541
542 2010-05-14  Nathan Froyd  <froydnj@codesourcery.com>
543
544         PR 44103
545         * java-tree.h (START_RECORD_CONSTRUCTOR): Change first argument to a
546         vector.  Move call to build_constructor...
547         (FINISH_RECORD_CONSTRUCTOR): ...here.  Add necessary arguments.  Clear
548         TREE_CONSTANT on the constructor.
549         (PUSH_SUPER_VALUE): Change first argument to a vector.
550         (PUSH_FIELD_VALUE): Likewise.
551         * resource.c (compile_resource_data): Update calls to above macros.
552         * constants.c (build_constants_constructor): Likewise.
553         * class.c (build_utf8_ref): Likewise.
554         (make_field_value): Likewise.
555         (make_method_value): Likewise.
556         (add_table_and_syms): New function.
557         (make_class_data): Call it.  Update calls to above macros.
558         (build_symbol_table_entry): New function.
559         (build_symbol_entry): Call it.  Update calls to above macros.
560         (emit_symbol_table): Likewise.
561         (make_catch_class_record): Update calls to above macros.
562         (build_assertion_table_entry): New function.
563         (add_assertion_table_entry): Call it.
564         (emit_assertion_table): Likewise.
565
566 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
567
568         PR 40989
569         * lang.c (java_handle_option): Add argument kind.
570
571 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
572
573         * decl.c (java_init_decl_processing): Remove argument in call to
574         initialize_sizetypes
575
576 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
577
578         * exception.cc (_Jv_Throw): Avoid set but not used warning.
579         * include/java-assert.h (JvAssertMessage, JvAssert): Use argument in
580         sizeof to avoid set but not used warnings.
581
582 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
583
584         * lang.c (java_post_options): Constify variable "dot".
585
586         * jcf-parse.c (set_source_filename): Constify variable "dot".
587         (load_class): Constify variable "separator".
588         Use get_identifier_with_length.
589
590         * jvspec.c (lang_specific_driver): Constify two variables named "p".
591
592 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
593
594         * jcf-dump.c (version): Update copyright notice dates.
595
596 2009-11-28  Jakub Jelinek  <jakub@redhat.com>
597
598         * jvspec.c (lang_specific_driver): Remove unused
599         saw_verbose_flag variable.
600         * jcf-dump.c (main): Remove unused general_purpose_bits
601         variable.
602         * builtins.c (initialize_builtins): Remove unused float_ftype_float
603         variable.
604         * expr.c (java_stack_pop): Remove unused val variable.
605         (build_jni_stub): Remove unused res_type variable.
606         * verify-impl.c (check_field_constant): Remove unused len variable.
607
608 2009-10-20  Joel Dice <dicej@mailsnare.net>
609
610         PR java/28474
611         * mangle_name.c (append_unicode_mangled_name): Fix mangling
612         of names with multiple underscores and "U".
613         (unicode_mangling_length): Likewise.
614
615 2009-10-03  Simon Baldwin  <simonb@google.com>
616
617         * config-lang.in (lang_dirs): Remove zlib.
618
619 2009-09-28  Richard Henderson  <rth@redhat.com>
620
621         * builtins.c (initialize_builtins): Update call to
622         build_common_builtin_nodes.
623         * lang.c (LANG_HOOKS_EH_USE_CXA_END_CLEANUP): New.
624
625 2009-09-14  Richard Henderson  <rth@redhat.com>
626
627         * builtins.c (initialize_builtins): Update call to
628         build_common_builtin_nodes.
629         * decl.c (java_init_decl_processing): Don't call
630         default_init_unwind_resume_libfunc.
631         * except.c: Include tree-iterator.h.
632         (build_exception_object_var): New.
633         (build_exception_object_ref): Use it.
634         (expand_end_java_handler): Initialize it from __builtin_eh_pointer.
635         Attach all CATCH_EXPRs to a single TRY_CATCH_EXPR.
636         * java-tree.h (DECL_FUNCTION_EXC_OBJ): New.
637
638 2009-09-13  Richard Guenther  <rguenther@suse.de>
639         Rafael Avila de Espindola  <espindola@google.com>
640
641         * decl.c (do_nothing): Remove.
642         (java_init_decl_processing): Do not set lang_eh_runtime_type.
643         * Make-lang.in (lang.o): Add $(EXCEPT_H) dependency.
644         * lang.c (java_eh_personality): New.
645         (java_eh_personality_decl): Likewise.
646         (LANG_HOOKS_EH_PERSONALITY): Define.
647
648 2009-09-03  Diego Novillo  <dnovillo@google.com>
649
650         * lang.c (lang_hooks): Remove const qualifier.
651
652 2009-09-01  Jakub Jelinek  <jakub@redhat.com>
653
654         * boehm.c (mark_reference_fields): Compute % in HOST_WIDE_INT
655         type.
656
657 2009-09-01  Richard Guenther  <rguenther@suse.de>
658
659         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Remove.
660         * java-tree.h (java_mark_addressable): Likewise.
661         * typeck.c (java_mark_addressable): Likewise.
662
663 2009-08-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
664
665         * Make-lang.in (java.install-pdf): Install gcj.pdf in
666         $(pdfdir)/gcc, alongside the other manuals.
667
668 2009-08-12  Andrew Haley  <aph@redhat.com>
669
670         * builtins.c (compareAndSwapInt_builtin): Use
671         flag_use_atomic_builtins.
672         (compareAndSwapLong_builtin): Likewise.
673         (compareAndSwapObject_builtin): Likewise.
674         * jvspec.c: Add flag_use_atomic_builtins.
675         * gcj.texi: Likewise.
676         * java-tree.h: Likewise.
677         * lang.opt: Likewise.
678
679 2009-08-11  Dodji Seketeli  <dodji@redhat.com>
680
681         PR debug/40990
682         * lang.c (put_decl_node): Outputs different level of information
683         depending on the verbosity level.
684
685 2009-07-31  Andrew Haley  <aph@redhat.com>
686
687         PR java/40867
688         * decl.c (java_replace_references): Set EXPR_LOCATION on all
689         generated expressions.
690         (binding_level.loc): new field.
691         (clear_binding_level): Initialize loc.
692         (set_input_location): New function.
693         (pushlevel): Set new binding_level.loc.
694         (poplevel): Set EXPR_LOCATION on the new BIND_EXPR_BODY.
695         (start_java_method): Set DECL_SOURCE_LOCATION of this new method.
696         (java_add_stmt): Set the EXPR_LOCATION on all subtrees of new_stmt.
697
698 2009-07-17  Richard Guenther  <rguenther@suse.de>
699
700         PR c/40401
701         * java-gimplify.c (java_genericize): Do not gimplify here.
702         But replace all local references.
703         (java_gimplify_expr): Do not replace local references here.
704         (java_gimplify_modify_expr): Likewise.
705         * jcf-parse.c (java_parse_file): Do not finalize the CU or
706         optimize the cgraph here.
707         * decl.c (java_replace_reference): Make static.
708         (java_replace_references): New function.
709         (end_java_method): Clear base_decl_map.
710         * java-tree.h (java_replace_references): Declare.
711         (java_replace_reference): Remove.
712
713 2009-07-14  Taras Glek  <tglek@mozilla.com>
714             Rafael Espindola  <espindola@google.com>
715
716         * Make-lang.in (java.install-plugin): New target for
717         installing plugin headers.
718
719 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
720
721         * class.c: Replace %J by an explicit location. Update all calls.
722         
723 2009-07-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
724
725         * jcf-parse.c: Replace %H by an explicit location. Update all calls.
726
727 2009-06-29  Andrew Haley  <aph@redhat.com>
728
729         PR java/40590
730         * java-tree.h (cxx_keyword_p): New declaration.
731         * mangle_name.c (utf8_cmp): Move here from mangle.c.
732         (cxx_keywords): Likewise.
733         (cxx_keyword_p): Likewise.
734         (MANGLE_CXX_KEYWORDS): New macro.
735         (append_gpp_mangled_name): Use MANGLE_CXX_KEYWORDS.
736         (append_gpp_mangled_name): Likewise.
737         * mangle.c: Move code to mangle_name.c. 
738         (mangle_member_name): Don't call cxx_keyword_p.
739
740 2009-06-12  Aldy Hernandez  <aldyh@redhat.com>
741
742         * java-gimplify.c (java_gimplify_block): New argument to
743         build_empty_stmt.
744         * expr.c (force_evaluation_order): Same.
745         * typeck.c: Add location to build_decl or PUSH_FIELD calls.
746         * class.c: Same.
747         * decl.c: Same.
748         * jcf-parse.c: Same.
749         * constants.c: Same.
750         * resource.c: Same.
751         * except.c: Same.
752         * builtins.c: Same.
753         * expr.c: Same.
754         * java-tree.h (PUSH_FIELD): Add location field.
755         
756 2009-06-09  Ian Lance Taylor  <iant@google.com>
757
758         * verify.h: Remove extern "C".
759
760 2009-06-07  Ian Lance Taylor  <iant@google.com>
761
762         * jcf-parse.c (handle_constant): Change local variable 'kind' to
763         unsigned int.
764
765 2009-06-01  Ian Lance Taylor  <iant@google.com>
766
767         * jcf-io.c (find_class): Use CONST_CAST.
768
769 2009-05-27  Ian Lance Taylor  <iant@google.com>
770
771         * Make-lang.in ($(XGCJ)$(exeext)): Change $(COMPILER) to
772         $(LINKER).
773         (jc1$(exeext), jcf-dump$(exeext), jvgenmain$(exeext)): Likewise.
774
775 2009-05-26  Ian Lance Taylor  <iant@google.com>
776
777         * Make-lang.in (jvspec.o): Use $(COMPILER).
778         ($(XGCJ)$(exeext), jc1$(exeext), jcf-dump$(exeext)): Likewise.
779         (jvgenmain$(exeext), java/jcf-io.o, java/jcf-path.o): Likewise.
780
781 2009-05-12  Alexandre Oliva  <aoliva@redhat.com>
782
783         * Make-lang.in (GCJ): Renamed to...
784         (XGCJ): ... this.
785
786 2009-04-27  Ian Lance Taylor  <iant@google.com>
787
788         * builtins.c (java_builtins): Add casts to enum type.
789         * verify-impl.c (check_class_constant): Add cast to enum type.
790         (check_constant, check_wide_constant): Likewise.
791
792 2009-04-27  Richard Guenther  <rguenther@suse.de>
793
794         PR java/38374
795         * constants.c (build_constants_constructor): Retain the old
796         pointer type as valid TYPE_POINTER_TO after patching the
797         type of the constant pool decl.
798
799 2009-04-24  Ian Lance Taylor  <iant@google.com>
800
801         * jcf-parse.c (handle_constant): Add cast to enum type.
802
803 2009-04-21  Taras Glek <tglek@mozilla.com>
804
805         * builtins.c: Update GTY annotations to new syntax
806         * decl.c: Likewise
807         * java-tree.h: Likewise
808         * jcf.h: Likewise
809         * lang.c: Likewise
810
811 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
812
813         * ChangeLog, ChangeLog.ptr, ChangeLog.tree-ssa: Add copyright and
814         license notices.
815
816 2009-04-18  Ian Lance Taylor  <iant@google.com>
817
818         * verify-impl.c (verify_instructions_0): Add cast to enum type.
819
820 2009-04-09  Paolo Bonzini  <bonzini@gnu.org>
821
822         * builtins.c (compareAndSwapLong_builtin,
823         compareAndSwapInt_builtin, compareAndSwapObject_builtin,
824         VMSupportsCS8_builtin): Do not look at sync_compare_and_swap_cc.
825
826 2009-03-31  Richard Guenther  <rguenther@suse.de>
827
828         * java-gimplify.c (java_gimplify_expr): Do not manually gimplify
829         the first operand of binary and comaprison expressions.
830
831 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
832
833         PR rtl-optimization/323
834         * lang.c (java_post_options): Set flag_excess_precision_cmdline.
835         Give an error for -fexcess-precision=standard for processors where
836         the option is significant.
837
838 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
839
840         * lang.opt: Unify help text for -Wdeprecated.
841
842 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
843
844         * jcf-dump.c (version): Update copyright notice dates.
845
846 2009-01-16  Richard Guenther  <rguenther@suse.de>
847
848         PR tree-optimization/38835
849         PR middle-end/36227
850         * builtins.c (build_addr_sum): Use POINTER_PLUS_EXPR.
851
852 2008-12-05  Sebastian Pop  <sebastian.pop@amd.com>
853
854         PR bootstrap/38262
855         * Make-lang.in (jc1): Add BACKENDLIBS, remove GMPLIBS.
856
857 2008-11-04  Andrew Haley  <aph@redhat.com>
858
859         PR java/37068
860         * jcf-parse.c (java_emit_static_constructor): Don't call
861         cgraph_build_static_cdtor.  Rewrite.
862
863 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
864
865         * Make-lang.in (check-java-subtargets): New target.
866
867 2008-10-16  David Edelsohn  <edelsohn@gnu.org>
868
869         PR target/35483
870         * Make-lang.in (class.o): Depend on $(TM_P_H).
871         (expr.o): Same.
872         * class.c: Include tm_p.h.
873         * expr.c: Include tm_p.h.
874
875 2008-10-14  Andrew Haley  <aph@redhat.com>
876
877         * constants.c (build_constant_data_ref): Make sure we only build
878         one copy of the decl for the constant pool.
879
880 2008-09-22  Andrew Haley  <aph@redhat.com>
881
882         * expr.c (rules): Add new rule for
883         gnu.java.lang.VMCPStringBuilder.toString.
884         (rewrite_rule.new_classname): New field.
885         (maybe_rewrite_invocation): Use new_classname field instead of
886         DECL_CONTEXT (*method_p).
887         Allow rewrite_arglist to be NULL.
888
889 2008-09-17  Andrew Pinski  <andrew_pinski@playstation.sony.com>
890
891         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): Don't define.
892         (java_get_callee_fndecl): Kill.
893
894 2008-09-17  Jan Hubicka  <jh@suse.cz>
895
896         PR c++/18071
897         * class.c (add_method_1): Do not initialize DECL_INLINE.
898         (make_local_function_alias): Likewise.
899         * expr.c (rewrite_arglist_getcaller): Set DECL_UNINLINABLE.
900         * lang.c (java_decl_ok_for_sibcall): Use DECL_UNINLINABLE.
901
902 2008-09-09  Richard Guenther  <rguenther@suse.de>
903
904         * decl.c (build_result_decl): Remove no longer applicable
905         promotion.
906
907 2008-09-05  David Daney  <ddaney@avtrex.com>
908
909         * gcj.texi (-freduced-reflection): Clarify option's restrictions.
910
911 2008-08-21  David Daney  <ddaney@avtrex.com>
912
913         * class.c (make_class_data): Don't add field_index when
914         flag_reduced_reflection set.
915
916 2008-08-12  Ulrich Weigand  <uweigand@de.ibm.com>
917
918         * typeck.c (convert): Do not check for TARGET_FLOAT_FORMAT.
919
920 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
921
922         PR 28875
923         * lang.c (java_handle_option): Replace set_Wunused with
924         warn_unused.
925
926 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
927
928         * gcj.texi: Update copyright years.  Do not list GPL as
929         Invariant Section.
930
931 2008-07-29  Jakub Jelinek  <jakub@redhat.com>
932
933         * class.c (build_utf8_ref): Set DECL_SIZE and DECL_SIZE_UNIT
934         from ctype's sizes.
935
936         * class.c (build_utf8_ref): Pad initializer string to utf8const_type's
937         alignment.
938
939 2008-07-29  Jan Hubicka  <jh@suse.cz>
940
941         * lang.c (java_post_options): Remove handling of flag_no_inline.
942
943 2008-07-28  Richard Guenther  <rguenther@suse.de>
944
945         Merge from gimple-tuples-branch.
946
947         2008-07-18  Richard Guenther  <rguenther@suse.de>
948
949         * expr.c: Include tree-iterator.h.
950         * Make-lang.in (expr.o): Add tree-iterator.h dependency.
951
952         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
953
954         * java-gimplify.c: Include gimple.h instead of tree-gimple.h.
955         * expr.c: Same.
956
957         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
958
959         * java-gimplify.c (java_gimplify_expr): Same.
960         (java_gimplify_modify_expr): Same.
961         * java-tree.h: Rename GENERIC_NEXT to TREE_CHAIN.
962
963         2008-05-02  Diego Novillo  <dnovillo@google.com>
964
965         * expr.c (build_java_throw_out_of_bounds_exception): Fix
966         mixed declarations and code.
967
968         2008-05-02  Doug Kwan  <dougkwan@google.com>
969         
970         * expr.c (build_java_throw_out_of_bounds_exception ): Wrap call to
971         _Jv_ThrowBadArrayIndex with a COMPOUND_EXPR to return 0.
972
973         2008-02-19  Diego Novillo  <dnovillo@google.com>
974
975         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
976
977         * java-gimplify.c (java_gimplify_self_mod_expr): Change
978         gimple_seq arguments to gimple_seq *.  Update all users.
979
980         2007-11-26  Aldy Hernandez  <aldyh@redhat.com>
981
982         * java-gimplify.c (java_gimplify_expr): Make pre_p and post_p
983         sequences.
984         (java_gimplify_self_mod_expr): Same.                                    
985         * java-tree.h (java_gimplify_expr): Make pre_p and post_p               
986         sequences.
987
988 2008-07-24  Jan Hubicka  <jh@suse.cz>
989
990         * java/decl.c: Include cgraph.h
991         (end_java_method): Remove non-unit-at-a-time code.
992         (java_mark_decl_local): Likewise; sanity check that we don't touch
993         finalized nodes.
994
995 2008-07-15  Jan Hubicka  <jh@suse.cz>
996
997         * lang.c (java_init_options): Enable unit-at-a-time by default.
998
999 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1000
1001         * Make-lang.in (jvspec.o): Fix dependencies.
1002
1003 2008-07-06  Tom Tromey  <tromey@redhat.com>
1004
1005         * Make-lang.in (java/parse.o-warn): Remove.
1006         (java/jcf-io.o-warn): Remove.
1007
1008 2008-07-05  Tom Tromey  <tromey@redhat.com>
1009
1010         * jcf-io.c: Don't include fnmatch.h.  Don't use JCF_USE_SCANDIR.
1011         (compare_path): Remove.
1012         (java_or_class_file): Likewise.
1013         (memoized_dirlist_entry): Likewise.
1014         (memoized_dirlist_hash): Likewise.
1015         (memoized_dirlist_lookup_eq): Likewise.
1016         (memoized_dirlists): Likewise.
1017         (caching_stat): Likewise.
1018         (find_class): Use stat.
1019         * jcf.h (JCF_USE_SCANDIR): Remove.
1020
1021 2008-06-30  Joshua Sumali  <jsumali@redhat.com>
1022
1023         * Make-lang.in (JAVA_MANFILES): Add doc/aot-compile.1 and
1024         doc/rebuild-gcj-db.1
1025         (java.uninstall): Likewise.
1026         (java.maintainer-clean): Likewise.
1027         (aot-compile.pod): New rule.
1028         (rebuild-gcj-db.pod): New rule.
1029         (java.install-man): Install doc/aot-compile.1 and doc/rebuild-gcj-db.1
1030         * gcj.texi: Add new sections for aot-compile and rebuild-gcj-db.
1031
1032 2008-06-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1033
1034         * Make-lang.in (java/jcf-io.o-warn): New.
1035
1036 2008-06-24  Tom Tromey  <tromey@redhat.com>
1037
1038         * jcf-path.c (jcf_path_init): Don't name variable 'try'.
1039         * expr.c (add_type_assertion): Rename argument.
1040         (build_java_arrayaccess): Don't name variable 'throw'.
1041         (ARRAY_NEW_MULTI): Don't name variable 'class'.
1042         * jcf-io.c (find_class): Don't name variable 'class'.
1043         * mangle.c (compression_table_add): Don't name variable 'new'.
1044         * constants.c (cpool_for_class): Rename argument.
1045         (alloc_constant_fieldref): Likewise.
1046         * jcf-parse.c (handle_innerclass_attribute): Don't name variable
1047         'class'.
1048         (read_class): Likewise.
1049         (parse_zip_file_entries): Likewise.
1050         (process_zip_dir): Likewise.
1051         * decl.c (java_mark_class_local): Rename argument.
1052         * class.c (GEN_TABLE): Use type_name, not typename.
1053         (gen_indirect_dispatch_tables): Likewise.
1054         (add_field): Rename argument.
1055         (is_compiled_class): Likewise.
1056         (safe_layout_class): Likewise.
1057         (emit_assertion_table): Likewise.
1058         * typeck.c (has_method): Rename argument.
1059
1060 2008-06-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1061
1062         * class.c (ident_subst, mangled_classname, unmangle_classname,
1063         gen_indirect_dispatch_tables, add_method_1,
1064         build_fieldref_cache_entry, make_local_function_alias,
1065         layout_class, java_treetreehash_find, java_treetreehash_new,
1066         split_qualified_name): Fix for -Wc++-compat.
1067         * constants.c (set_constant_entry, cpool_for_class): Likewise.
1068         * decl.c (make_binding_level, java_dup_lang_specific_decl,
1069         start_java_method): Likewise.
1070         * except.c (prepare_eh_table_type): Likewise.
1071         * expr.c (type_assertion_hash, note_instructions): Likewise.
1072         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC,
1073         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.
1074         * jcf-io.c (jcf_filbuf_from_stdio, opendir_in_zip, find_class):
1075         Likewise.
1076         * jcf-parse.c (reverse, java_read_sourcefilenames,
1077         annotation_grow, rewrite_reflection_indexes, java_parse_file,
1078         process_zip_dir): Likewise.
1079         * jcf-path.c (add_entry, add_path, jcf_path_init,
1080         jcf_path_extdirs_arg): Likewise.
1081         * jcf-reader.c (jcf_parse_constant_pool): Likewise.
1082         * jvgenmain.c (do_mangle_classname): Likewise.
1083         * lang.c (put_decl_string): Likewise.
1084         * verify-impl.c (make_state_copy, make_state, add_new_state):
1085         Likewise.
1086
1087 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1088
1089         * gcj.texi: Expand TABs, remove whitespace from blank lines.
1090
1091 2008-06-14  Tom Tromey  <tromey@redhat.com>
1092
1093         PR java/36247:
1094         * class.c (build_class_ref): Initialize this_classdollar when
1095         needed.
1096
1097 2008-05-23  Andrew Haley  <aph@redhat.com>
1098
1099         * jcf-parse.c (give_name_to_class): Call find_sourcefile to find full
1100         pathname of source file.
1101
1102 2008-05-12  Aaron W. LaFramboise  <aaronavay62@aaronwl.com>
1103
1104         * jcf-dump.c (print_constant): Use
1105         HOST_LONG_LONG_FORMAT.
1106
1107 2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>
1108
1109         * decl.c (java_init_decl_processing): Change DECL_IS_PURE to
1110         DECL_PURE_P.
1111
1112 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
1113
1114         * class.c (build_utf8_ref): Don't set TREE_INVARIANT.
1115         (build_classdollar_field): Don't set TREE_INVARIANT.
1116         (get_dispatch_table): Don't set TREE_INVARIANT.
1117         (make_class_data): Don't set TREE_INVARIANT.
1118         (build_symbol_entry): Don't set TREE_INVARIANT.
1119         (emit_symbol_table): Don't set TREE_INVARIANT.
1120         * constants.c (build_constant_data_ref): Don't set TREE_INVARIANT.
1121         (build_ref_from_constant_pool): Don't set TREE_INVARIANT.
1122         * resource.c (compile_resource_data): Don't set TREE_INVARIANT.
1123         * expr.c (cache_cpool_data_ref): Don't set TREE_INVARIANT.
1124
1125 2008-04-03  Tom Tromey  <tromey@redhat.com>
1126
1127         * Make-lang.in (java_OBJS): New variable.
1128
1129 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
1130
1131         * java-tree.h (insert_block): Kill.
1132         * decl.c (insert_block): Kill.
1133                 
1134 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
1135
1136         * gcj.texi: Include gpl_v3.texi instead of gpl.texi
1137         * Make-lang.in (TEXI_JAVA_FILES): Include gpl_v3.texi instead of
1138         gpl.texi.
1139
1140 2008-03-27  Tom Tromey  <tromey@redhat.com>
1141
1142         * Make-lang.in: Revert automatic dependency patch.
1143
1144 2008-03-25  Tom Tromey  <tromey@redhat.com>
1145
1146         * Make-lang.in: Removed most explicit .o targets.
1147         (java/jvspec.o): Reduce to variable setting.  Moved to java/.
1148         ($(GCJ)$(exeext)): Update.
1149         (JAVA_OBJS): New variable.
1150         (JCFDUMP_OBJS): Reformat.
1151         (java_OBJS): New variable.
1152         (java/jvspec.o-warn): Update.
1153         (java/parse.o-warn): Remove.
1154         (JAVA_TREE_H): Remove.
1155         (java/jcf-io.o): Reduce to variable setting.
1156         (ALL_CPPFLAGS): Likewise.
1157
1158 2008-03-12  Paolo Bonzini  <bonzini@gnu.org>
1159
1160         * mangle.c (java_mangle_decl): Remove dead check.
1161
1162 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
1163
1164         * jcf-parse.c (java_parse_file): Assert binding levels are
1165         left in order.
1166         * lang.c (LANG_HOOKS_CLEAR_BINDING_STACK, java_clear_binding_stack):
1167         Delete.
1168
1169 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
1170
1171         * jcf-dump.c (version): Update copyright notice dates.
1172
1173 2008-02-29  Tom Tromey  <tromey@redhat.com>
1174
1175         * expr.c (expand_byte_code): Set DECL_FUNCTION_LAST_LINE on
1176         method.
1177         * java-tree.h (struct lang_decl_func): Remove obsolete comment.
1178
1179 2008-02-26  Tom Tromey  <tromey@redhat.com>
1180
1181         * lang.c (java_post_options): Remove conditional.
1182         * expr.c (expand_byte_code): Remove old location code.
1183         * jcf-parse.c (set_source_filename): Remove old location code.
1184         (give_name_to_class): Likewise.
1185         (jcf_parse): Likewise.
1186         (duplicate_class_warning): Likewise.
1187         (parse_class_file): Likewise.
1188         (java_parse_file): Likewise.
1189         * decl.c (finish_method): Remove old location code.
1190         * class.c (push_class): Remove old location code.
1191
1192 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1193
1194         PR other/35107
1195         * Make-lang.in (jc1): Add $(GMPLIBS).
1196
1197 2008-01-23  David Daney  <ddaney@avtrex.com>
1198
1199         * class.c (hide)  Rename to...
1200         (java_hide_decl) ... this throughout, and make public.
1201         * resource.c (Jr_count): Remove.
1202         (compile_resource_data): Call java_mangle_resource_name to generate
1203         decl name.  Make resource decl public and hidden.
1204         * mangle.c (java_mangle_resource_name): New function.
1205         * java-tree.h (java_hide_decl, java_mangle_resource_name): Declare
1206         functions.
1207
1208 2008-01-04  Andrew Haley  <aph@redhat.com>
1209
1210         PR java/17779
1211         * jcf-parse.c (parse_zip_file_entries): Move decl to compile on
1212         C90.
1213
1214 2008-01-03  Andrew Haley  <aph@redhat.com>
1215
1216         PR java/17779
1217         * jcf-parse.c (parse_zip_file_entries): Unset TYPE_ALIAS_SET if
1218         we're about to re-layout the type.
1219
1220 2007-12-20  Alexandre Oliva  <aoliva@redhat.com>
1221
1222         * lang.c (java_classify_record): Don't return
1223         RECORD_IS_INTERFACE for now.
1224
1225 2007-12-18  Andrew Haley  <aph@redhat.com>
1226
1227         PR java/27643
1228         * jcf-parse.c (java_parse_file): Remove call to
1229         java_mark_class_local.
1230         (parse_class_file): Reinstate call to java_mark_class_local here.
1231         * decl.c (java_mark_cni_decl_local): If the ASSEMBLER_NAME is
1232         already set, call java_mangle_decl() and make_decl_rtl() to
1233         rewrite its name as a hidden alias.
1234
1235 2007-12-15  Alexandre Oliva  <aoliva@redhat.com>
1236
1237         PR debug/7081
1238         * lang.c (java_classify_record): New.
1239         (LANG_HOOKS_CLASSIFY_RECORD): Override.
1240
1241 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
1242
1243         PR 34081/C++
1244         * decl.c (finish_method): Pass 'false' for the new
1245         allocate_struct_function parameter.
1246
1247 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1248
1249         * expr.c (build_jni_stub): Use the computed jni func type for
1250         variable meth.
1251
1252 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1253
1254         * class.c (JAVA_TREEHASHHASH_H): Use TYPE_UID.
1255
1256 2007-11-26  Alexandre Oliva  <aoliva@redhat.com>
1257
1258         * expr.c (type_assertion_hash): Hash type uids rather than
1259         tree pointers.
1260
1261 2007-11-17  David Daney  <ddaney@avtrex.com>
1262             Andrew Haley  <aph@redhat.com>
1263
1264         * constants.c (build_constants_constructor):  Use POINTER_SIZE
1265         insead of BITS_PER_WORD in big-endian work around.
1266
1267 2007-11-07  Tom Tromey  <tromey@redhat.com>
1268
1269         PR java/34019:
1270         * gcj.texi (Input Options): Add missing noun.
1271
1272 2007-11-02  Tom Tromey  <tromey@redhat.com>
1273
1274         PR java/33765:
1275         * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
1276         * zipfile.h (ZIPEMPTYMAGIC): New define.
1277
1278 2007-11-01  Tom Tromey  <tromey@redhat.com>
1279
1280         * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h.
1281         (java/jcf-parse.o): Depend on jcf-reader.c, zipfile.h, and jcf.h.
1282         (java/jcf-io.o): Depend on zipfile.h.
1283
1284 2007-10-17  Richard Guenther  <rguenther@suse.de>
1285
1286         * Make-lang.in (java/builtins.o): Add $(OPTABS_H) and $(EXPR_H)
1287         dependencies.
1288
1289 2007-10-03  Andrew Haley  <aph@redhat.com>
1290
1291         PR java/33639
1292         * class.c (mangled_classname): Detect and replace illegal
1293         characters in assembly language symbols.
1294         (gen_indirect_dispatch_tables): Call mangled_classname() on
1295         the type.
1296
1297 2007-09-27  Jakub Jelinek  <jakub@redhat.com>
1298
1299         * lang.c (java_print_error_function): Add third argument.
1300
1301 2007-09-15  Tom Tromey  <tromey@redhat.com>
1302
1303         * java-tree.h (struct lang_decl_func) <function_decl_body>:
1304         Remove.
1305         <init_final>: Likewise.
1306         * lang.c (java_dump_tree): Update.
1307         * java-tree.h (DECL_FUNCTION_BODY): Remove.
1308
1309 2007-09-11  Jan Hubicka <jh@suse.cz>
1310
1311         * decl.c (java_expand_body): Kill.
1312         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1313
1314 2007-09-06  Tom Tromey  <tromey@redhat.com>
1315
1316         * jcf-parse.c (parse_class_file): Re-enter the current file.
1317
1318 2007-09-07  Roman Zippel  <zippel@linux-m68k.org>
1319
1320         * boehm.c (mark_reference_fields): Move misaligned pointer check
1321         after JREFERENCE_TYPE_P test
1322
1323 2007-09-06  Roman Zippel  <zippel@linux-m68k.org>
1324
1325         * boehm.c (mark_reference_fields): Don't use bitmap as gc_descr
1326         if pointer is misaligned.
1327
1328 2007-09-06  Tom Tromey  <tromey@redhat.com>
1329
1330         * lang.c (java_post_options): Update.
1331         * jcf-parse.c (set_source_filename): Update.
1332         (give_name_to_class): Update.
1333         (jcf_parse): Update.
1334         (duplicate_class_warning): Update.
1335         (parse_class_file): Update.
1336         (java_parse_file): Update.
1337         * expr.c (expand_byte_code): Update.
1338
1339 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1340
1341         * decl.c (finish_method): Use set_cfun.
1342
1343 2007-09-04  Andrew Haley  <aph@redhat.com>
1344
1345         * decl.c (java_init_decl_processing): Call "__cxa_end_cleanup"
1346         when using the ARM EABI.
1347
1348 2007-09-03  Daniel Jacobowitz  <dan@codesourcery.com>
1349
1350         * Make-lang.in (jvspec.o): Remove SHLIB_MULTILIB.
1351
1352 2007-09-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1353
1354         * jcf-parse.c (read_class, java_parse_file): Supply a TYPE for
1355         CONST_CAST.
1356         * jcf.h (JCF_FINISH): Likewise.
1357
1358 2007-08-28  Tom Tromey  <tromey@redhat.com>
1359
1360         * Make-lang.in (java.tags): Don't tag '*.y' files.
1361
1362 2007-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1363
1364         * lang.c (java_decl_ok_for_sibcall): Likewise.
1365
1366 2007-08-21  Paul Brook  <paul@codesourcery.com>
1367             Nathan Sidwell  <nathan@codesourcery.com>
1368             Mark Mitchell  <mark@codesourcery.com>
1369             Joseph Myers  <joseph@codesourcery.com>
1370
1371         * jcf-dump.c (version): Use pkgversion_string.  Update copyright
1372         date.
1373
1374 2007-08-20  Richard Guenther  <rguenther@suse.de>
1375
1376         * lang.c (java_tree_inlining_walk_subtrees): Remove.
1377         (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES): Remove.
1378
1379 2007-08-17  Tom Tromey  <tromey@redhat.com>
1380
1381         * typeck.c (find_method_in_interfaces): Update.
1382         * jcf-parse.c (load_class): Update.
1383         * java-gimplify.c (java_gimplify_component_ref): Removed.
1384         (java_gimplify_modify_expr): Update.  Removed pre_p and post_p
1385         arguments.
1386         (java_gimplify_expr): Update.
1387         * decl.c (java_init_decl_processing): Update.
1388         * class.c (set_constant_value): Update.
1389         (make_class_data): Update.
1390         (finish_class): Update.
1391         (build_static_field_ref): Update.
1392         (is_compiled_class): Update.
1393         (maybe_layout_super_class): Update.
1394         (layout_class): Update.
1395         (layout_class_method): Update.
1396         * java-tree.h (CAN_COMPLETE_NORMALLY): Removed.
1397         (lang_decl_var) <am, final_iud, cif>: Removed fields.
1398         (lang_decl_func) <init_calls_this>: Removed field.
1399         (lang_type) <dot_class, verify_method>: Removed fields.
1400         (FIELD_NESTED_ACCESS): Removed.
1401         (FIELD_NESTED_ACCESS_P): Removed.
1402         (DECL_FIELD_FINAL_IUD): Removed.
1403         (DECL_LOCAL_FINAL_IUD): Removed
1404         (LOCAL_FINAL_P): Removed.
1405         (FINAL_VARIABLE_P): Removed.
1406         (CLASS_FINAL_VARIABLE_P): Removed.
1407         (DECL_BIT_INDEX): Removed.
1408         (DECL_INIT_CALLS_THIS): Removed.
1409         (FIELD_LOCAL_ALIAS): Removed.
1410         (FIELD_LOCAL_ALIAS_USED): Removed.
1411         (FIELD_THISN): Removed.
1412         (DECL_FUNCTION_INIT_TEST_CLASS): Removed.
1413         (LOCAL_CLASS_INITIALIZATION_FLAG): Removed.
1414         (LOCAL_CLASS_INITIALIZATION_FLAG_P): Removed.
1415         (TYPE_DOT_CLASS): Removed.
1416         (TYPE_VERIFY_METHOD): Removed.
1417         (ID_CLASSDOLLAR_P): Removed.
1418         (enum java_tree_index) <JTI_CLASSDOLLAR_IDENTIFIER_NODE>:
1419         Removed.
1420         (classdollar_identifier_node): Removed.
1421         (TYPE_UNKNOWN): Removed.
1422         (CLASS_FROM_SOURCE_P): Removed.
1423         * expr.c (build_jni_stub): Update.
1424         (force_evaluation_order): Update.
1425         (build_java_empty_stmt): Update.
1426         (build_class_init): Update.
1427         (java_stack_swap): Update.
1428         (build_jni_stub): Update.
1429
1430 2007-08-17  Tom Tromey  <tromey@redhat.com>
1431
1432         * java-tree.h (LABEL_TYPE_STATE): Removed.
1433         (load_type_state): Removed.
1434         (LABEL_PC): Removed.
1435         (LABEL_VERIFIED): Removed.
1436         (type_states): Declare.
1437         * expr.c (type_states): New global.
1438         (load_type_state): Now static.  Use type_states.  Changed
1439         argument.
1440         (lookup_label): Don't set LABEL_PC.
1441         (expand_byte_code): Don't use LABEL_VERIFIED.
1442         (note_instructions): Initialize type_states.
1443         * verify-glue.c (vfy_note_stack_depth): Rewrote.
1444         (vfy_note_stack_type): Use type_states.
1445         (vfy_note_local_type): Likewise.
1446
1447 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1448
1449         * jcf-parse.c (read_class, java_parse_file): Use CONST_CAST.
1450         * jcf.h (JCF_FINISH): Likewise.
1451
1452 2007-07-31  Nick Clifton  <nickc@redhat.com>
1453
1454         * java-gimplify.c: Change copyright header to refer to version 3
1455         of the GNU General Public License and to point readers at the
1456         COPYING3 file and the FSF's license web page.
1457         * typeck.c, lang-specs.h, mangle_name.c, jcf-dump.c, class.c,
1458         decl.c, config-lang.in, jcf-parse.c, constants.c, Make-lang.in,
1459         resource.c, except.c, builtins.c, jvspec.c, java-tree.def,
1460         javaop.def, jcf-path.c, verify-glue.c, jcf-depend.c, lang.opt,
1461         jcf-reader.c, mangle.c, zextract.c, jcf-io.c, jcf.h, zipfile.h,
1462         verify.h, java-except.h, win32-host.c, expr.c, jvgenmain.c,
1463         parse.h, lang.c, java-tree.h, javaop.h, boehm.c: Likewise.
1464
1465 2007-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1466
1467         * jcf-io.c (find_class): Fix -Wcast-qual warnings.
1468
1469 2007-07-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1470
1471         * lang.c (java_get_callee_fndecl): Constify.
1472
1473 2007-07-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1474
1475         * mangle.c (set_type_package_list): Constify.
1476         * verify-glue.c (vfy_make_string): Delete.
1477         * verify.h (vfy_make_string): Likewise.
1478
1479 2007-07-26  Tom Tromey  <tromey@redhat.com>
1480
1481         * java-tree.h (push_labeled_block, pop_labeled_block): Remove.
1482         (LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY,
1483         EXIT_BLOCK_LABELED_BLOCK): Likewise.
1484         * lang.c (java_tree_inlining_walk_subtrees): Update.
1485         (java_dump_tree): Likewise.
1486         * java-tree.def (LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR, TRY_EXPR):
1487         Remove.
1488         * decl.c (push_labeled_block, pop_labeled_block): Remove.
1489         * java-gimplify.c (java_gimplify_labeled_block_expr,
1490         java_gimplify_exit_block_expr, java_gimplify_try_expr): Remove.
1491         (java_gimplify_expr): Update.
1492
1493 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1494
1495         * class.c (java_treetreehash_hash, java_treetreehash_compare):
1496         Constify. 
1497         * expr.c (type_assertion_eq): Likewise.
1498         * jcf-io.c (compare_path): Likewise.
1499         * jcf-parse.c (cmpstringp): Likewise.
1500         * verify-impl.c (get_one_type, compute_argument_types,
1501         compute_return_type): Likewise. 
1502
1503 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1504
1505         PR target/32462
1506         PR libgcj/32465
1507         * class.c (hide): Wrap in HAVE_GAS_HIDDEN.
1508
1509 2007-07-12  Richard Guenther  <rguenther@suse.de>
1510
1511         * expr.c (expand_java_return): RETURN_EXPR has void type.
1512         (build_jni_stub): Likewise.  Use a comparison against zero
1513         for null-pointer test in COND_EXPR.
1514         (build_field_ref): Build POINTER_PLUS_EXPR with correct
1515         type.  Convert result instead.
1516         (build_invokevirtual): Likewise.
1517
1518 2007-07-09  Geoffrey Keating  <geoffk@apple.com>
1519
1520         PR 32617
1521         * lang.c (java_init): Remove setting of force_align_functions_log.
1522         * class.c (add_method_1): Set DECL_ALIGN of non-static method
1523         to cope with ptrmemfunc_vbit_in_pfn.
1524
1525 2007-07-03  David Daney  <ddaney@avtrex.com>
1526
1527         * java/Make-lang.in (doc/gcj.info): Add $(gcc_docdir) to 
1528         include path.
1529         (doc/gcj.dvi): Same.
1530         (doc/gcj.pdf): Same.
1531         (java/index.html): Same.
1532
1533 2007-06-15 Andrew Pinski  <andrew_pinski@playstation.sony.com>
1534
1535         * class.c (make_class_data): Build the index in sizetype.
1536         Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
1537         adding to a pointer type.
1538         (build_symbol_entry): Likewise.
1539         * expr.c (build_java_arrayaccess): Likewise.
1540         (build_field_ref): Likewise.
1541         (build_known_method_ref): Likewise.
1542         (build_invokevirtual): Likewise.
1543         * except.c (build_exception_object_ref): Do a
1544         NEGATIVE and then a POINTER_PLUS_EXPR instead
1545         of a MINUS_EXPR.
1546
1547 2007-06-11  Rafael Ávila de Espíndola  <espindola@google.com>
1548
1549         * typeck.c (java_signed_type): Remove.
1550         * lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1551         * java-tree.h (java_signed_type): Remove.
1552
1553 2007-05-18  Geoffrey Keating  <geoffk@apple.com>
1554
1555         * jcf-dump.c (HANDLE_MAGIC): Use 'unsigned long' for %lx.
1556         (print_constant): Likewise.
1557
1558 2007-05-14  Rafael Ávila de Espíndola  <espindola@google.com>
1559
1560         * expr.c (build_java_binop): Use unsigned_type_for instead of
1561         java_unsigned_type.
1562         * java-tree.h (java_unsigned_type): Remove.
1563         * lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1564         * typeck.c (java_unsigned_type): Remove.
1565
1566 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1567
1568         * java-tree.h (lang_tree_node): Use GENERIC_NEXT
1569         instead of checking GIMPLE_STMT_P in chain_next.
1570
1571 2007-04-06  Colin Walters  <walters@redhat.com>
1572
1573         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
1574         * jcf-io.c (open_class): Copy 'filename'.
1575
1576 2007-04-03  Andrew Haley  <aph@redhat.com>
1577
1578         * jvgenmain.c (main): Change main to use class$, not class$$.
1579         (do_mangle_classname): Likewise.
1580         * class.c (hide): New function.
1581         (add_field): Hide everything that shouldn't be visible outside a
1582         DSO.
1583         (build_static_class_ref): Likewise.
1584         (build_classdollar_field): Likewise.
1585         (make_class_data): Likewise.
1586         (layout_class_method): Likewise.
1587         * expr.c (special_method_p): New function.
1588
1589         * class.c (push_class): Don't bogusly guess the source filename.
1590         * jcf-parse.c (give_name_to_class): Don't set input_location from
1591         DECL_ARTIFICIAL decls.
1592
1593 2007-03-30  Rafael Ávila de Espíndola  <espindola@google.com>
1594
1595         * typeck.c (java_signed_or_unsigned_type): Removed.
1596         (java_signed_type): use get_signed_or_unsigned_type instead of
1597         java_signed_or_unsigned_type.
1598         (java_unsigned_type): Ditto.
1599         * lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Removed.
1600         * java-tree.h (java_signed_or_unsigned_type): Removed.
1601
1602 2007-03-26  Tom Tromey  <tromey@redhat.com>
1603
1604         * Make-lang.in (JAVA_MANFILES): Removed grmiregistry.1.
1605         (java.maintainer-clean): Likewise.
1606         (java.install-man): Likewise.
1607         (.INTERMEDIATE): Removed grmiregistry.pod.
1608         (grmiregistry.pod): Removed.
1609         * gcj.texi (Invoking gcjh): Removed.
1610         (Invoking gjnih): Likewise.
1611         (Invoking grmiregistry): Likewise.
1612         (direntry): Updated.
1613         (Top): Likewise.
1614         (which-gcj): Removed.
1615
1616 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
1617
1618         * Make-lang.in: Add install-pdf target as copied from
1619         automake v1.10 rules.
1620
1621 2007-02-27  Brooks Moses  <brooks.moses@codesourcery.com>
1622
1623         * gcj.texi: Standardize title page.
1624
1625 2007-02-18  Kazu Hirata  <kazu@codesourcery.com>
1626
1627         * class.c: Fix a comment typo.
1628
1629 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
1630             Brooks Moses  <brooks.moses@codesourcery.com>
1631             Lee Millward  <lee.millward@codesourcery.com>
1632
1633         * java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
1634         of build3.
1635         (BUILD_MONITOR_EXIT): Likewise.
1636
1637         * java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
1638         (java_gimplify_modify_expr): Likewise.
1639
1640         * class.c (cache_this_class_ref): Use build_call_expr.
1641         (build_static_field_ref): Likewise.
1642         (emit_indirect_register_classes): Likewise.
1643         (emit_register_classes): Likewise.
1644
1645         * resource.c (write_resource_constructor): Use build_call_expr.
1646
1647         * builtins.c (builtin_creator_function): Change interpretation of
1648         the second parameter to be the whole CALL_EXPR instead of the arglist.
1649         (max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
1650         (min_builtin): Likewise.
1651         (abs_builtin): Likewise.
1652         (java_build_function_call_expr): Likewise.
1653         (convert_real): Likewise.
1654         (UNMARSHAL3): Likewise.
1655         (UNMARSHAL4): Likewise.
1656         (UNMARSHAL5): Likewise.
1657         (build_arglist_for_builtin): Delete.  Fix callers to use
1658         build_call_expr instead.
1659         (putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
1660         accessors.
1661         (compareAndSwapInt_builtin): Likewise.
1662         (compareAndSwapLong_builtin): Likewise.
1663         (compareAndSwapObject_builtin): Likewise.
1664         (putVolatile_builtin): Likewise.
1665         (getVolatile_builtin): Likewise.
1666         (VMSupportsCS8_builtin): Likewise.
1667         (check_for_builtin): Pass entire CALL_EXPR to builtin expander
1668         instead of arglist.
1669
1670         * expr.c (build_java_athrow): Use build_call_nary instead of build3.
1671         (build_java_throw_out_of_bounds_exception): Likewise.
1672         (java_check_reference): Likewise.
1673         (build_java_arraystore_check): Likewise.
1674         (build_newarray): Likewise.
1675         (build_anewarray): Likewise.
1676         (expand_java_multinewarray): Use build_call_list instead of build3.
1677         (build_java_monitor): Use build_call_nary instead of build3.
1678         (java_create_object): Likewise.
1679         (expand_java_NEW): Likewise.
1680         (build_instanceof): Likewise.
1681         (expand_java_CHECKCAST): Likewise.
1682         (build_java_soft_divmod): Likewise.
1683         (build_java_binop): Likewise.
1684         (build_field_ref): Likewise.
1685         (build_class_init): Likewise.
1686         (rewrite_arglist_getcaller): Use build_call_expr.
1687         (build_invokeinterface):  Use build_call_nary instead of build3.
1688         (expand_invoke): Use build_call_list instead of build3.
1689         (build_jni_stub): Use build_call_nary, build_call_list, or
1690         build_call_expr instead of build3.
1691         (expand_java_field_op): Use build_call_expr instead of build3.
1692         (force_evaluation_order): Use new CALL_EXPR accessors.
1693
1694         * lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
1695
1696 2007-02-15  David Daney  <ddaney@avtrex.com>
1697
1698         * Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1.
1699         (java.maintainer-clean):Add gc-analyze.1.
1700         (.INTERMEDIATE): Add gc-analyze.pod.
1701         (gc-analyze.pod): New rule.
1702         (java.install-man): Install gc-analyze.1
1703         * gcj.texi: Add new section for the gc-analyze program.
1704
1705 2007-02-07  Andrew Haley  <aph@redhat.com>
1706
1707         * class.c (uncache_this_class_ref): New.
1708         * expr.c (build_jni_stub): Initialize the class.
1709         (expand_byte_code): Call uncache_this_class_ref after generating
1710         code.
1711
1712 2007-02-06  Tom Tromey  <tromey@redhat.com>
1713
1714         PR java/30714:
1715         * jvspec.c (lang_specific_driver): Check for the '-' in '-I'.
1716
1717 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
1718
1719         * java-tree.h, javaop.def, jcf-parse.c: Fix comment typos.
1720
1721 2007-02-02  Andrew Haley  <aph@redhat.com>
1722
1723         * expr.c (expand_byte_code): Call cache_this_class_ref() and
1724         cache_cpool_data_ref().
1725         Set TYPE_CPOOL_DATA_REF.
1726         (cache_cpool_data_ref): New function.
1727         * constants.c (build_ref_from_constant_pool): Remove special-case
1728         code for flag_indirect_classes.
1729         (build_constant_data_ref): Move special-case code for
1730         flag_indirect_classes here from build_ref_from_constant_pool.
1731         * decl.c (finish_method): Move class initialization from here to
1732         cache_this_class_ref.
1733         * class.c (cache_this_class_ref): New function.
1734         (build_class_ref): Use this_classdollar for the ouput class.
1735
1736 2007-02-02  David Daney  <ddaney@avtrex.com>
1737
1738         * class.c (is_compiled_class): Move check to avoid reloading
1739         current class.
1740         (layout_class_method): Don't calculate DECL_EXTERNAL if it is
1741         already set.
1742
1743 2007-02-01  Andrew Haley  <aph@redhat.com>
1744
1745         PR java/30641
1746         * jcf-parse.c (jcf_parse): Clear the field_offsets bitmap.
1747
1748 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
1749
1750         * class.c, jcf-parse.c: Fix comment typos.
1751
1752 2007-01-30  Tom Tromey  <tromey@redhat.com>
1753
1754         * gcj.texi (Strings): Fix documentation for JvNewString.
1755
1756 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1757
1758         * gcj.texi (Invoking gcjh, Invoking gjnih, Arrays): Fix some
1759         typos.
1760
1761 2007-01-30  Ben Elliston  <bje@au.ibm.com>
1762
1763         * jvspec.c (lang_specific_driver): Remove unused classpath_args.
1764
1765 2007-01-29  Tom Tromey  <tromey@redhat.com>
1766
1767         PR java/30607:
1768         * jvspec.c (lang_specific_driver): Handle separate -I argument.
1769         * lang.opt (-I): Add 'Separate'.
1770
1771 2007-01-29  Andrew Haley  <aph@redhat.com>
1772
1773         * class.c (add_method_1): Mark fndecl as external unless we are
1774         compiling it into this object file.
1775
1776 2007-01-24  Andrew Haley  <aph@redhat.com>
1777
1778         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): current_class is a
1779         type node, not a decl, so use TYPE_SYNTHETIC not CLASS_SYNTHETIC.
1780
1781 2007-01-22  Andrew Haley  <aph@redhat.com>
1782
1783         * builtins.c (VMSupportsCS8_builtin): New function.
1784
1785 2007-01-23  Andrew Pinski  <pinskia@gmail.com>
1786
1787         PR java/30454
1788         * jcf-io.c (opendir_in_zip): Close the file
1789         and free zipf before returning after an error.
1790
1791 2007-01-16  Tom Tromey  <tromey@redhat.com>
1792
1793         * java-tree.def: Added copyright header.
1794
1795 2007-01-15  Tom Tromey  <tromey@redhat.com>
1796
1797         * lang.c (dump_compound_expr) <EXPR_WITH_FILE_LOCATION>: Removed
1798         case.
1799         * java-gimplify.c (java_gimplify_expr) <EXPR_WITH_FILE_LOCATION>:
1800         Removed case.
1801         * java-tree.h (EXPR_WFL_EMIT_LINE_NOTE): Removed.
1802         (EXPR_WFL_NODE): Likewise.
1803         (EXPR_WFL_LINECOL): Likewise.
1804         (EXPR_WFL_FILENAME): Likewise.
1805         (EXPR_WFL_LINENO): Likewise.
1806         (build_expr_wfl, expr_add_location): Don't declare.
1807         (build_unknown_wfl): Removed.
1808         (EXPR_WFL_FILENAME_NODE): Removed.
1809         (EXPR_WFL_COLNO): Removed.
1810         (EXPR_WFL_SET_LINECOL): Removed.
1811         (DECL_FUNCTION_WFL): Removed.
1812         (DECL_FIELD_FINAL_WFL): Removed.
1813         (struct lang_decl_func) <wfl>: Removed field.
1814         <called_constructor>: Likewise.
1815         <inner_access>: Likewise.
1816         (struct lang_decl_var) <wfl>: Removed field.
1817         (DECL_CONSTRUCTOR_CALLS): Removed.
1818         (DECL_FUNCTION_ACCESS_DECL): Likewise.
1819         (DECL_FUNCTION_INNER_ACCESS): Likewise.
1820         (DECL_SPECIFIC_COUNT): Likewise.
1821         * java-tree.def (EXPR_WITH_FILE_LOCATION): Removed.
1822         * expr.c (build_expr_wfl): Removed.
1823         (expr_add_location): Likewise.
1824
1825 2007-01-12  Tom Tromey  <tromey@redhat.com>
1826
1827         * jcf-dump.c (main): Updated call to find_class.
1828         * lang.c (java_init): Removed dead code.
1829         * jcf-parse.c (read_class): Don't use java_source field.  Removed
1830         dead code.
1831         (parse_zip_file_entries): Don't use java_source field.
1832         (process_zip_dir): Likewise.
1833         (jcf_parse): Removed dead code.
1834         (java_parse_file): Likewise.
1835         (read_class): Updated call to find_class.
1836         * jcf-io.c (find_class): Don't use java_source field.  Removed
1837         'source_ok' argument, .java logic.
1838         * jcf.h (JCF) <java_source>: Removed field.
1839         (JCF_ZERO): Updated.    (find_class): Updated.
1840         * decl.c: Removed dead code.
1841         * class.c: Removed dead code.
1842
1843 2007-01-11  Tom Tromey  <tromey@redhat.com>
1844
1845         * typeck.c (convert): Don't use flag_emit_class_files.
1846         * lang.c (java_post_options): Don't use flag_emit_class_files.
1847         (java_handle_option): Don't use flag_extraneous_semicolon or
1848         flag_redundant.
1849         * jcf-parse.c (HANDLE_CONSTANTVALUE): Don't use
1850         flag_emit_class_files.
1851         (load_class): Likewise.
1852         * java-tree.h (flag_emit_class_files): Don't declare.
1853         (STATIC_CLASS_INIT_OPT_P): Don't use flag_emit_class_files.
1854         (flag_extraneous_semicolon): Don't declare.
1855         (flag_not_overriding): Likewise.
1856         (flag_static_local_jdk1_1): Likewise.
1857         (flag_redundant): Likewise.
1858         * expr.c (build_newarray): Don't use flag_emit_class_files.
1859         * class.c (DEFAULT_ENABLE_ASSERT): Don't use
1860         flag_emit_class_files.
1861         (build_class_ref): Likewise.
1862         * builtins.c (check_for_builtin): Don't use
1863         flag_emit_class_files.
1864
1865 2007-01-10  Tom Tromey  <tromey@redhat.com>
1866
1867         * lang.c (java_can_use_bit_fields_p): Removed.
1868         (LANG_HOOKS_CAN_USE_BIT_FIELDS_P): Removed.
1869
1870 2007-01-09  Andrew Haley  <aph@redhat.com>
1871
1872         * expr.c (build_java_arrayaccess): Rewrite to generate array
1873         access in canonical form.
1874         (expand_java_arraystore): Use build_fold_addr_expr() on address of
1875         array access.
1876
1877 2007-01-03  Andrew Haley  <aph@redhat.com>
1878
1879         PR java/28754
1880         * expr.c (expand_java_field_op): If we're initializing a field's
1881         declaring interface we should not also initialize the class
1882         context in which it was referenced.
1883
1884 2007-01-02  Tom Tromey  <tromey@redhat.com>
1885
1886         * java-tree.h (compiling_from_source, current_encoding,
1887         JTI_FINIT_IDENTIFIER_NODE, JTI_INSTINIT_IDENTIFIER_NODE,
1888         JTI_LENGTH_IDENTIFIER_NODE, JTI_SUPER_IDENTIFIER_NODE,
1889         JTI_CONTINUE_IDENTIFIER_NODE, JTI_ACCESS0_IDENTIFIER_NODE,
1890         JTI_WFL_OPERATOR): Removed
1891         (finit_identifier_node, instinit_identifier_node,
1892         length_identifier_node, super_identifier_node,
1893         continue_identifier_node, access0_identifier_node, wfl_operator):
1894         Removed.
1895         (cyclic_inheritance_report,
1896         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND,
1897         DECL_FUNCTION_NAP, DECL_FUNCTION_SYNTHETIC_CTOR,
1898         DECL_FIXED_CONSTRUCTOR_P): Removed.
1899         (struct lang_decl_func) <smic, nap, synthetic_ctor, fixed_ctor>:
1900         Removed.
1901         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST, TYPE_II_STMT_LIST,
1902         TYPE_IMPORT_LIST, TYPE_IMPORT_DEMAND_LIST): Removed.
1903         (struct lang_type) <finit_stmt_list, clinit_stmt_list, ii_block,
1904         import_list, import_demand_list>: Removed.
1905         (java_layout_seen_class_methods, init_jcf_parse, init_src_parse,
1906         cxx_keyword_p): Removed.
1907         (DECL_FINIT_P, DECL_INSTINIT_P, ID_FINIT_P, ID_INSTINIT_P,
1908         TYPE_UNUSED, TYPE_UNDERFLOW, TYPE_UNEXPECTED,
1909         CLASS_ACCESS0_GENERATED_P, CLASS_HAS_FINIT_P,
1910         IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
1911         IS_AN_IMPORT_ON_DEMAND_P, COMPOUND_ASSIGN_P, SWITCH_HAS_DEFAULT,
1912         PRIMARY_P, MODIFY_EXPR_FROM_INITIALIZATION_P,
1913         CLASS_METHOD_CHECKED_P, FOR_LOOP_P, ANONYMOUS_CLASS_P,
1914         LOCAL_CLASS_P, ARG_FINAL_P, SUPPRESS_UNREACHABLE_ERROR,
1915         RESOLVE_PACKAGE_NAME_P, RESOLVE_TYPE_NAME_P, IS_BREAK_STMT_P,
1916         IS_CRAFTED_STRING_BUFFER_P, IS_INIT_CHECKED, CALL_USING_SUPER,
1917         NESTED_FIELD_ACCESS_IDENTIFIER_P, TOPLEVEL_CLASS_DECL_P,
1918         PURE_INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
1919         CALL_CONSTRUCTOR_P, CALL_EXPLICIT_CONSTRUCTOR_P,
1920         CALL_THIS_CONSTRUCTOR_P, CALL_SUPER_CONSTRUCTOR_P,
1921         FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, BLOCK_IS_IMPLICIT,
1922         BLOCK_EMPTY_P, IS_UNCHECKED_EXCEPTION_P, java_error_count,
1923         java_parse_abort_on_error, extract_field_decl): Removed.
1924         (finput): Declare.
1925         * lang.c: (compiling_from_source, current_encoding): Removed.
1926         (java_handle_option): Ignore -fencoding.
1927         * parse.h: Don't include lex.h.
1928         (java_error_count, int_fits_type_p, stabilize_reference, RULE,
1929         RECOVERED, DRECOVERED, RECOVER, DRECOVER, YYERROR_NOW,
1930         YYNOT_TWICE, CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
1931         INTERFACE_MODIFIERS, INTERFACE_INNER_MODIFIERS,
1932         INTERFACE_METHOD_MODIFIERS, INTERFACE_FIELD_MODIFIERS,
1933         MODIFIER_WFL, THIS_MODIFIER_ONLY, parse_error_context,
1934         ABSTRACT_CHECK, JCONSTRUCTOR_CHECK, exit_java_complete_class,
1935         CLASS_OR_INTERFACE, GET_REAL_TYPE, GET_TYPE_NAME,
1936         OBSOLETE_MODIFIER_WARNING, OBSOLETE_MODIFIER_WARNING2,
1937         BUILD_PTR_FROM_NAME, INCOMPLETE_TYPE_P,
1938         JAVA_MAYBE_GENERATE_DEBUG_INFO, JBSC_TYPE_P, JSTRING_P,
1939         JNULLP_TYPE_P, JDECL_P, TYPE_INTERFACE_P, TYPE_CLASS_P,
1940         IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS,
1941         MANGLE_OUTER_LOCAL_VARIABLE_NAME,
1942         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID,
1943         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING,
1944         SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
1945         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP,
1946         AIPL_FUNCTION_CREATION, AIPL_FUNCTION_DECLARATION,
1947         AIPL_FUNCTION_CTOR_INVOCATION, AIPL_FUNCTION_FINIT_INVOCATION,
1948         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
1949         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED,
1950         LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
1951         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
1952         LOOP_EXPR_BODY_BODY_EXPR, PUSH_LABELED_BLOCK, POP_LABELED_BLOCK,
1953         PUSH_LOOP, POP_LOOP, PUSH_EXCEPTIONS, POP_EXCEPTIONS,
1954         IN_TRY_BLOCK_P, EXCEPTIONS_P, ANONYMOUS_ARRAY_BASE_TYPE,
1955         ANONYMOUS_ARRAY_DIMS_SIG, ANONYMOUS_ARRAY_INITIALIZER,
1956         INVOKE_STATIC, INVOKE_NONVIRTUAL, INVOKE_SUPER, INVOKE_INTERFACE,
1957         INVOKE_VIRTUAL, jdep_code, struct _jdep, JDEP_DECL, JDEP_DECL_WFL,
1958         JDEP_KIND, JDEP_WFL, JDEP_MISC, JDEP_ENCLOSING, JDEP_CLASS,
1959         JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN, JDEP_TO_RESOLVE,
1960         JDEP_RESOLVED_DECL, JDEP_RESOLVED, JDEP_RESOLVED_P, struct
1961         jdeplist_s, jdeplists, CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN,
1962         JDEP_INSERT, SET_TYPE_FOR_RESOLUTION, WFL_STRIP_BRACKET,
1963         STRING_STRIP_BRACKETS, PROMOTE_RECORD_IF_COMPLETE,
1964         BLOCK_CHAIN_DECL, GET_CURRENT_BLOCK, EXPR_WFL_GET_LINECOL,
1965         EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION, QUAL_DECL_TYPE,
1966         GET_SKIP_TYPE, COMPLETE_CHECK_OP, COMPLETE_CHECK_OP_0,
1967         COMPLETE_CHECK_OP_1, COMPLETE_CHECK_OP_2, BUILD_APPEND,
1968         BUILD_STRING_BUFFER, BUILD_THROW, SET_WFL_OPERATOR,
1969         PATCH_METHOD_RETURN_ERROR, CHECK_METHODS, CLEAR_DEPRECATED,
1970         CHECK_DEPRECATED_NO_RESET, CHECK_DEPRECATED, REGISTER_IMPORT,
1971         CURRENT_OSB, struct parser_ctxt, GET_CPC_LIST, CPC_INNER_P,
1972         GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE, GET_CPC_DECL_NODE,
1973         GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
1974         GET_ENCLOSING_CPC_CONTEXT, INNER_ENCLOSING_SCOPE_CHECK, PUSH_CPC,
1975         PUSH_ERROR, POP_CPC, DEBUG_CPC, CPC_INITIALIZER_LIST,
1976         CPC_STATIC_INITIALIZER_LIST, CPC_INSTANCE_INITIALIZER_LIST,
1977         CPC_INITIALIZER_STMT, CPC_STATIC_INITIALIZER_STMT,
1978         CPC_INSTANCE_INITIALIZER_STMT, SET_CPC_INITIALIZER_STMT,
1979         SET_CPC_STATIC_INITIALIZER_STMT,
1980         SET_CPC_INSTANCE_INITIALIZER_STMT, JAVA_NOT_RADIX10_FLAG,
1981         java_complete_class, java_check_circular_reference,
1982         java_fix_constructors, java_layout_classes, java_reorder_fields,
1983         java_method_add_stmt, java_get_line_col, reset_report,
1984         java_init_lex, yyparse, java_parse, yyerror, java_expand_classes,
1985         java_finish_classes, ctxp, ctxp_for_generation,
1986         ctxp_for_generation_last): Removed.
1987         * expr.c (force_evaluation_order): Don't mention NEW_CLASS_EXPR.
1988         * mangle.c (utf8_cmp): New function.
1989         (cxx_keywords): New global.
1990         (cxx_keyword_p): New function.
1991         * jvspec.c (JAVA_START_CHAR): Removed obsolete comment.
1992         * java-tree.def (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR,
1993         NEW_ANONYMOUS_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
1994         CASE_EXPR, DEFAULT_EXPR, JAVA_CATCH_EXPR, SYNCHRONIZED_EXPR,
1995         THROW_EXPR, CONDITIONAL_EXPR, INSTANCEOF_EXPR, NEW_ARRAY_INIT,
1996         CLASS_LITERAL, JAVA_EXC_OBJ_EXPR): Removed.
1997         * Make-lang.in (java.srcextra): Do nothing.
1998         (parse.c, keyword.h, gt-java-parse.h): Removed targets.
1999         (JAVA_OBJS): Don't mention deleted files.
2000         (java.mostlyclean): Likewise.
2001         (java.clean): Likewise.
2002         (JAVA_LEX_C): Removed.
2003         (buffer.o, check-init.o, parse.o): Remove unused targets.
2004         (typeck.o): Updated.
2005         * jcf-parse.c (read_class): Comment out unused code.
2006         (java_layout_seen_class_methods): New function.
2007         (parse_source_file_1, parse_source_file_2, parse_source_file_3):
2008         Removed.
2009         (java_parse_file): Comment out unused code.  Don't use 'ctxp'.
2010         (init_jcf_parse): Removed.
2011         * config-lang.in (gtfiles): Remove deleted files.
2012         * decl.c (java_init_decl_processing): Don't initialize
2013         finit_identifier_node, instinit_identifier_node,
2014         length_identifier_node, super_identifier_node,
2015         continue_identifier_node, access0_identifier_node.  Don't call
2016         init_jcf_parse.
2017         * class.c (cyclic_inheritance_report): New global.
2018         (add_method_1): Don't use
2019         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND.
2020         (maybe_layout_super_class): Comment out code.
2021         (safe_layout_class): New function.
2022         * java-gimplify.c (java_gimplify_expr): Removed CASE_EXPR,
2023         DEFAULT_EXPR, NEW_ARRAY_INIT, JAVA_CATCH_EXPR, JAVA_EXC_OBJ_EXPR,
2024         UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_ANONYMOUS_ARRAY_EXPR,
2025         NEW_CLASS_EXPR, SYNCHRONIZED_EXPR, CONDITIONAL_EXPR,
2026         INSTANCEOF_EXPR, CLASS_LITERAL, THIS_EXPR.
2027         (java_gimplify_case_expr): Removed.
2028         (java_gimplify_default_expr): Likewise.
2029         (java_gimplify_new_array_init): Likewise.
2030         * parse.y: Removed.
2031         * keyword.gperf, keyword.h: Removed.
2032         * chartables.h: Removed.
2033         * check-init.c: Removed.
2034         * buffer.c, buffer.h: Removed.
2035         * convert.h: Removed.
2036         * gen-table.pl: Removed.
2037         * lex.c, lex.h: Removed.
2038
2039 2007-01-02  Andrew Haley  <aph@redhat.com>
2040
2041         * expr.c (expand_java_arraystore): Make sure we perform a bounds
2042         check at runtime before we perform a type check.
2043
2044 2006-12-19  Andrew Haley  <aph@redhat.com>
2045
2046         * decl.c: Bump minor BC ABI version.
2047
2048 2006-12-13  Gary Benson  <gbenson@redhat.com>
2049
2050         * jcf-depend.c (jcf_dependency_add_file): Mark filename unused.
2051
2052 2006-12-12  Tom Tromey  <tromey@redhat.com>
2053
2054         * lang-specs.h: Pass -M options to jc1.
2055         * jcf-depend.c (jcf_dependency_add_file): Don't emit
2056         dependencies.
2057
2058 2006-12-07  Mohan Embar  <gnustuff@thisiscool.com>
2059
2060         * jcf-path.c (jcf_path_compute): Use platform PATH_SEPARATOR.
2061
2062 2006-12-06  Mohan Embar  <gnustuff@thisiscool.com>
2063
2064         * lang-specs.h: Pass '%U'-based options as separate arguments.
2065
2066 2006-12-05  Tom Tromey  <tromey@redhat.com>
2067
2068         PR java/29495:
2069         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Mark fields and
2070         classes as well.
2071         * class.c (add_field): Handle ACC_SYNTHETIC.
2072         (add_method_1): Likewise.  Handle bridge and varargs.
2073         (get_access_flags_from_decl): Handle synthetic, bridge, varargs,
2074         annotation.
2075         (set_class_decl_access_flags): Handle synthetic and annotation.
2076         * java-tree.h (METHOD_BRIDGE): New macro.
2077         (METHOD_VARARGS): Likewise.
2078         (TYPE_SYNTHETIC): Likewise.
2079         (TYPE_ANNOTATION): Likewise.
2080         (lang_type): New fields 'synthetic' and 'annotation'.
2081         (lang_decl_func): New fields 'varargs' and 'bridge'.
2082
2083 2006-12-04  Andrew Haley  <aph@redhat.com>
2084
2085         * jcf-parse.c (rewrite_reflection_indexes): Don't do anything if
2086         there's no map.
2087
2088 2006-11-29  Gary Benson  <gbenson@redhat.com>
2089
2090         * expr.c (rewrite_arglist_getcaller): Reorder.
2091
2092 2006-11-29  Andrew Haley  <aph@redhat.com>
2093
2094         * expr.c (rewrite_arglist_getcaller): Remove DECL_INLINE.
2095         * lang.c (java_decl_ok_for_sibcall): Check for DECL_INLINE.
2096
2097 2006-11-23  Andrew Haley  <aph@redhat.com>
2098
2099         * expr.c (rewrite_arglist_getcaller): New.
2100         (rewrite_arglist_getclass): Fix indentation.
2101         (rules): Add gnu.classpath.VMStackWalker.getCallingClass() and 
2102         gnu.classpath.VMStackWalker.getCallingClassLoader().
2103         * builtins.c (initialize_builtins): Remove duplicate def'n of
2104         __sync_synchronize.
2105         Add __builtin_return_address.
2106
2107 2006-11-22  Andrew Haley  <aph@redhat.com>
2108
2109         * jcf-reader.c (get_attribute): Mark attr_type unused.
2110
2111         * builtins.c (compareAndSwapObject_builtin): Fix declaration.
2112
2113 2007-01-08  Richard Guenther  <rguenther@suse.de>
2114
2115         * lex.c (do_java_lex): Use build_int_cst_wide_type.
2116         * jcf-parse.c (get_constant): Likewise.
2117
2118 2006-11-12  Jan Hubicka  <jh@suse.cz>
2119
2120         * resource.c (compile_resource_data): Update for new varpool names.
2121         * java/class.c (build_utf8_ref): Likewise.
2122
2123 2006-11-12  David Daney  <ddaney@avtrex.com>
2124
2125         PR java/29805
2126         * typeck.c (build_java_array_type): Increase buffer sizes.
2127
2128 2006-11-11  Richard Guenther  <rguenther@suse.de>
2129
2130         * check-init.c (check_init): Remove handling of FIX_CEIL_EXPR,
2131         FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
2132
2133 2006-11-06  Andrew Haley  <aph@redhat.com>
2134
2135         * java-tree.h (CONSTANT_LazyFlag): New.
2136         * constants.c (build_constants_constructor): Mask CONSTANT_LazyFlag.
2137         * jcf-parse.c (handle_innerclass_attribute): Write attribute to
2138         reflection_data.
2139         (handle_constant): Return 0 for dummy cpool entries.
2140         Handle constants of kind Class.
2141         Handle constants of kind NameAndType.
2142         (handle_enclosingmethod_attribute): New.
2143         (handle_signature_attribute): New.
2144         (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New.
2145         (HANDLE_SIGNATURE_ATTRIBUTE): New.
2146         (handle_constant): Use unmangle_classname()rather than calling
2147         identifier_subst() directly.
2148
2149 2006-11-02  Andrew Haley  <aph@redhat.com>
2150
2151         * java-tree.h (FIELD_ENUM): New.
2152         (lang_decl_var.field_enum): New.
2153         (lang_type.enum_class): New.
2154         (CLASS_ENUM): New.
2155         * class.c (set_class_decl_access_flags): Handle enum types.
2156         (add_field): Handle enum fields.
2157         (get_access_flags_from_decl): Likewise.
2158
2159         * class.c (make_class_data): Put reflection_data into rodata.
2160
2161 2006-11-01  Andrew Haley  <aph@redhat.com>
2162
2163         * jcf-parse.c (field_offsets, bit_obstack): New variables.
2164         (jcf_parse): Write end marker to annotation_data.
2165         (java_parse_file): Create field_offsets bitmap.  Destroy it.
2166         (annotation_grow, annotation_rewrite_byte) 
2167         (annotation_rewrite_short, annotation_rewrite_int) 
2168         (annotation_read_short, annotation_write_byte) 
2169         (annotation_write_short, annotation_write_int) 
2170         (handle_long_constant, handle_constant, handle_element_value) 
2171         (handle_annotation, handle_annotations) 
2172         (handle_annotation_attribute, rewrite_reflection_indexes) 
2173         (handle_member_annotations, handle_parameter_annotations) 
2174         (handle_default_annotation): New functions.
2175         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE) 
2176         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE) 
2177         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2178         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE) 
2179         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): New definitions.
2180         * java-tree.h (enum jv_attr_type, enum jv_attr_kind): New. 
2181         (TYPE_REFLECTION_DATA): New.
2182         (TYPE_REFLECTION_DATASIZE): New.
2183         * jcf.h (enum cpool_tag): Convert a bunch of #define constants to
2184         an enum.
2185         * jcf-reader.c (get_attribute): Pass field/method index and
2186         attribute type to get_attribute().
2187         * constants.c (find_class_or_string_constant): Make nonstatic.
2188         (cpool_for_class): Likewise.
2189         (build_constants_constructor): Separate string and scalar types.
2190         * class.c (make_class_data): Generate field_indexes permutation.
2191         Pass it to rewrite_reflection_indexes().
2192         (make_class_data): Generate constructor for reflection_data field.
2193
2194 2006-10-20  Tom Tromey  <tromey@redhat.com>
2195
2196         * gcj.texi (Top): Don't mention jv-scan.
2197         (Invoking gcj): Likewise.
2198         (Invoking gcjh): Likewise.
2199         (Invoking gjnih): Likewise.
2200         (Invoking gij): Likewise.
2201         (Invoking gcj-dbtool): Likewise.
2202         (Invoking jv-scan): Removed.
2203         * parse-scan.y: Removed.
2204         * jv-scan.c: Removed.
2205         * config-lang.in (stagestuff): Don't mention jv-scan.
2206         * Make-lang.in (java): Removed jv-scan.
2207         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2208         (JVSCAN_OBJS): Removed.
2209         (jv-scan$(exeext)): Likewise.
2210         (JAVA_MANFILES): Removed jv-scan.1.
2211         (java.uninstall): Don't mention jv-scan.
2212         (java.mostlyclean): Likewise.
2213         (java.maintainer-clean): Likewise.
2214         (.INTERMEDIATE): Likewise.
2215         (java/jv-scan.o): Removed.
2216         (jv-scan.pod): Likewise.
2217         (java.srcextra): Don't mention parse-scan.c.
2218         (java.mostlyclean): Likewise.
2219         (java/parse-scan.c): Removed.
2220         (java/parse-scan.o-warn): Removed.
2221         (java/parse-scan.o): Removed.
2222
2223 2006-10-20  Tom Tromey  <tromey@redhat.com>
2224
2225         * lang.c (java_handle_option): Don't use
2226         jcf_write_base_directory.
2227         * jcf.h (jcf_write_base_directory): Removed.
2228         * parse.y (java_expand_classes): Don't call write_classfile.
2229         * config-lang.in (gtfiles): Removed jcf-write.c.
2230         * Make-lang.in (JAVA_OBJS): Removed jcf-write.o.
2231         (java/jcf-write.o): Removed.
2232         * jcf-parse.c (parse_class_file): Don't call write_classfile.
2233         * java-tree.h (write_classfile): Removed declaration.
2234         * jcf-write.c: Removed.
2235
2236 2006-10-20  Tom Tromey  <tromey@redhat.com>
2237
2238         * Make-lang.in (java): Removed gjnih, gcjh.
2239         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
2240         (GCJH_OBJS): Removed.
2241         (GJNIH_OBJS): Likewise.
2242         (gjnih$(exeext)): Likewise.
2243         (gcjh$(exeext)): Likewise.
2244         (JAVA_MANFILES): Removed gcjh.1, gjnih.1.
2245         (java.install-common): Don't special case gcjh.
2246         (java.uninstall): Don't mention gcjh, gjnih.
2247         (java.mostlyclean): Likewise.
2248         (java.maintainer-clean): Likewise.
2249         (.INTERMEDIATE): Likewise.
2250         (gcjh.pod): Removed.
2251         (gjnih.pod): Likewise.
2252         (GCJH_TARGET_INSTALL_NAME): Removed.
2253         (java/gjavah-jni.o): Removed.
2254         (java/gjavah.o): Likewise.
2255         * config-lang.in (stagestuff): Removed gjnih, gcjh.
2256         * gjavah.c: Removed.
2257
2258 2006-10-17  Tom Tromey  <tromey@redhat.com>
2259
2260         * jcf-dump.c (print_element_value): Expect a utf8 constant in the
2261         "string" case.
2262
2263 2006-10-17  Tom Tromey  <tromey@redhat.com>
2264
2265         * jvgenmain.c (main): Handle -findirect-dispatch.
2266         * jvspec.c (jvgenmain_spec): Pass -findirect-dispatch to
2267         jvgenmain.
2268
2269 2006-10-06  Andrew Haley  <aph@redhat.com>
2270
2271         * builtins.c (compareAndSwapInt_builtin): Check that we really do
2272         have a compare_and_swap builtin.
2273         (compareAndSwapLong_builtin): Likewise.
2274         (compareAndSwapObject_builtin): Likewise.
2275
2276 2006-10-04  Andrew Haley  <aph@redhat.com>
2277
2278         * builtins.c (java_builtins): Add compareAndSwapInt,
2279         compareAndSwapLong, compareAndSwapObject, putOrderedInt,
2280         putOrderedLong, putOrderedObject, putIntVolatile, putLongVolatile,
2281         putObjectVolatile, getObjectVolatile, getIntVolatile,
2282         getLongVolatile, getLong.
2283         (UNMARSHAL3): New macro.
2284         (UNMARSHAL4): Likewise.
2285         (UNMARSHAL5): Likewise.
2286         (build_arglist_for_builtin): New function.
2287         (build_addr_sum, build_check_this): New functions.
2288         (putObject_builtin. compareAndSwapInt_builtin,
2289         compareAndSwapLong_builtin, compareAndSwapObject_builtin,
2290         putVolatile_builtin, getVolatile_builtin): New builtins.
2291
2292 2006-06-08  Andrew Haley  <aph@redhat.com>
2293  
2294         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2295         get_symbol_table_index().
2296         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2297         private method.
2298         (build_known_method_ref): New arg: special.  Pass it to
2299         get_symbol_table_index.
2300         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2301         the method list.
2302         (build_invokevirtual): New arg: special.  Pass it to
2303         get_symbol_table_index.
2304         (expand_invoke): New variable: special.
2305         Pass it to maybe_rewrite_invocation().
2306         Pass it to build_known_method_ref().
2307         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2308         build the symbol table conbstructor.
2309         (emit_symbol_table): Extract SPECIAL from the method list and pass
2310         it to build_symbol_entry().
2311         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2312         special accordingly.
2313  
2314 2006-09-08  Andrew Haley  <aph@redhat.com>
2315
2316         * class.c (layout_class_method): Use build_java_signature, not
2317         build_java_argument_signature.  Use lookup_java_method, not
2318         lookup_argument_method.
2319
2320 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2321             Bryce McKinlay  <bryce@mckinlay.net.nz>
2322
2323         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2324
2325 2006-07-18  Tom Tromey  <tromey@redhat.com>
2326
2327         * lang.opt: Added missing -W options.
2328
2329 2006-07-12  Tom Tromey  <tromey@redhat.com>
2330
2331         PR java/28329:
2332         * lang-specs.h: Pass '%U'-based options as separate arguments.
2333         Use -faux-classpath.
2334         * lang.c (java_handle_option): Handle OPT_faux_classpath.
2335         * lang.opt (faux-classpath): New option.
2336
2337 2006-07-07  Tom Tromey  <tromey@redhat.com>
2338
2339         * class.c (make_class_data): Set value for reflection_data field.
2340         * decl.c (java_init_decl_processing): Add reflection_data field.
2341
2342 2006-07-07  Tom Tromey  <tromey@redhat.com>
2343
2344         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): Declare locals
2345         earlier.
2346         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2347
2348 2006-07-07  Andrew Haley  <aph@redhat.com>
2349
2350         * jcf-parse.c (set_source_filename): Don't check for
2351         CLASS_FROM_CURRENTLY_COMPILED_P.
2352         Remove // comments.
2353
2354 2006-07-07  Andrew Haley  <aph@redhat.com>
2355
2356         * java-tree.h (java_read_sourcefilenames): Declare.
2357         * lang.c (java_handle_option): Call java_read_sourcefilenames().
2358         * lang.opt (fsource-filename): New opt.
2359         * lang-specs.h: Add -fsource-filename.
2360         * jcf-parse.c (num_files, filenames): New variables.
2361         (reverse, cmpstringp, java_read_sourcefilenames,
2362         find_sourcefile): New.
2363         (set_source_filename): Call find_sourcefile to find the real name
2364         of a source file.
2365
2366 2006-06-27  Tom Tromey  <tromey@redhat.com>
2367
2368         * jcf-reader.c (get_attribute): Handle EnclosingMethod,
2369         Signature, LocalVariableTypeTable, annotation attributes.
2370         * jcf-dump.c (HANDLE_ENCLOSINGMETHOD_ATTRIBUTE): New macro.
2371         (HANDLE_SIGNATURE_ATTRIBUTE): Likewise.
2372         (HANDLE_START_FIELD): Mention 'descriptor', not 'signature'.
2373         (HANDLE_METHOD): Likewise.
2374         (HANDLE_LOCALVARIABLETYPETABLE_ATTRIBUTE): New macro.
2375         (print_annotation): New function.
2376         (print_element_value): Likewise.
2377         (indent): Likewise.
2378         (HANDLE_RUNTIMEVISIBLEANNOTATIONS_ATTRIBUTE): New macro.
2379         (HANDLE_RUNTIMEINVISIBLEANNOTATIONS_ATTRIBUTE): Likewise.
2380         (print_parameter_annotations): New function.
2381         (HANDLE_RUNTIMEVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE): New macro.
2382         (HANDLE_RUNTIMEINVISIBLEPARAMETERANNOTATIONS_ATTRIBUTE):
2383         Likewise.
2384         (HANDLE_ANNOTATIONDEFAULT_ATTRIBUTE): Likewise.
2385         (print_annotations): New function.
2386
2387 2006-06-23  Tom Tromey  <tromey@redhat.com>
2388
2389         * lang-specs.h: Default -fsource and -ftarget to 1.5.  If
2390         emitting class files, always use 1.5.
2391         * gcj.texi (Input Options): Document -fsource.
2392         (Code Generation): Document -ftarget.
2393
2394 2006-06-21  Tom Tromey  <tromey@redhat.com>
2395
2396         PR java/28089:
2397         * expr.c (expand_java_field_op): Initialize field's declaring
2398         class.
2399
2400 2006-06-20  Tom Tromey  <tromey@redhat.com>
2401
2402         * expr.c (push_value): Always flush quick stack.
2403
2404 2006-06-19  Tom Tromey  <tromey@redhat.com>
2405
2406         * expr.c (push_value): Also flush quick stack if value is a
2407         component_ref.
2408
2409 2006-06-19  Tom Tromey  <tromey@redhat.com>
2410
2411         * expr.c (push_value): Flush quick stack if value has side
2412         effects.
2413
2414 2006-06-13  Tom Tromey  <tromey@redhat.com>
2415
2416         * class.c (is_compiled_class): Explicitly check for current
2417         class.
2418
2419 2006-06-09  Tom Tromey  <tromey@redhat.com>
2420
2421         * gjavah.c (decompile_method): Don't decompile a static field
2422         accessor method.
2423
2424 2006-06-06  Tom Tromey  <tromey@redhat.com>
2425
2426         * lang-specs.h <jc1>: Add .jar file to command line if
2427         -fsaw-java-file.  Also, remove -ffilelist-file in this case.
2428
2429 2006-06-05  Tom Tromey  <tromey@redhat.com>
2430
2431         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2432         synthetic, enum, annotation.
2433         * jcf.h (ACC_BRIDGE): New macro.
2434         (ACC_VARARGS): Likewise.
2435         (ACC_SYNTHETIC): Likewise.
2436         (ACC_ENUM): Likewise.
2437         (ACC_ANNOTATION): Likewise.
2438
2439 2006-06-04  Tom Tromey  <tromey@redhat.com>
2440
2441         * lang.opt (-fsaw-java-file, -fsource, -ftarget): New options.
2442         * jvspec.c (jvgenmain_spec): Remove -fsaw-java-file, -fsource,
2443         and -ftarget.
2444         (lang_specific_driver): Removed dead code.  Add -fsaw-java-file
2445         when needed.  Handle classpath-setting.
2446         * Make-lang.in ($(GCJ)$(exeext)): Link in jcf-path.o.
2447         * lang-specs.h: Rewrote.
2448
2449 2006-06-04  Tom Tromey  <tromey@redhat.com>
2450
2451         * jcf-io.c (find_class): Set source_ok to 0.
2452         * jcf-parse.c (jcf_parse): Disable gnu.gcj.gcj-compiled warning.
2453         (parse_class_file): Don't call java_mark_class_local.
2454         (java_parse_file): Skip .java files.  Call java_mark_class_local
2455         before lowering any code.
2456         (parse_zip_file_entries): Don't call duplicate_class_warning
2457         here.
2458         (process_zip_dir): ... call it here.
2459         * class.c (add_field): Don't mark field external if it is being
2460         compiled into this object.
2461         (make_class_data): Handle situation where class_dtable_decl is
2462         created before Class is compiled.
2463         (is_compiled_class): Don't assume files in zip are compiled into
2464         this object.
2465         (layout_class_method): Don't mark method external if it is being
2466         compiled into this object.
2467
2468 2006-06-04  Tom Tromey  <tromey@redhat.com>
2469
2470         * jcf-path.c (jcf_path_compute): New function.
2471         * jcf.h (jcf_path_compute): Declare.
2472
2473 2006-10-23 Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2474
2475         * decl.c: Include langhooks.h.
2476         (builtin_function): Remove.
2477         (java_init_decl_processing): Replace calls to builtin_function
2478         with add_builtin_function.
2479         * Make-lang.in (jc1$(exeext)): Depend on and link with attribs.o.
2480         (java/decl.o): Depend on langhooks.h.
2481         * java-tree.h (builtin_function): Remove.
2482
2483 2006-10-10  Brooks Moses  <bmoses@stanford.edu>
2484
2485         * Make-lang.in: Added "java.pdf", "gcj.pdf" target support.
2486
2487 2006-09-12  Tom Tromey  <tromey@redhat.com>
2488
2489         * expr.c (push_value): Always flush quick stack.
2490
2491 2006-09-12  Tom Tromey  <tromey@redhat.com>
2492
2493         PR java/29013:
2494         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Always note
2495         the push of the called method's return result.
2496
2497 2006-09-12  Tom Tromey  <tromey@redhat.com>
2498
2499         * jvspec.c (lang_specific_driver): Read spec file even if
2500         -fsyntax-only.
2501
2502 2006-09-12  Tom Tromey  <tromey@redhat.com>
2503
2504         PR java/28754:
2505         * expr.c (expand_java_field_op): Initialize field's declaring
2506         interface if necessary.
2507
2508 2006-09-12  Tom Tromey  <tromey@redhat.com>
2509
2510         PR java/28892:
2511         * expr.c (expand_java_field_op): No error for assignments not in
2512         class initializer or constructor.
2513
2514 2006-08-22  Andrew Haley  <aph@redhat.com>
2515
2516         * decl.c (java_add_stmt): Give the statement list a type.
2517
2518 2006-08-16  Jakub Jelinek  <jakub@redhat.com>
2519             Bryce McKinlay  <bryce@mckinlay.net.nz>
2520
2521         * jvspec.c (lang_specific_driver): Add -s-bc-abi when needed.
2522
2523 2006-08-10  Simon Martin  <simartin@users.sourceforge.net>
2524
2525         PR java/8923
2526         * parse.y (build_incdec): Emit an error instead of an ICE if '++'
2527         or '--' is used with a constant operand.
2528         (java_complete_lhs): When processing a '++' or '--' expression,
2529         don't call java_complete_tree but java_complete_lhs, so that a
2530         static final variable operand is never replaced by its value. This
2531         avoids an ICE later on.
2532         (patch_unaryop): Fixed typo in comment.
2533
2534 2006-07-28  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
2535
2536         * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
2537
2538 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2539
2540         * builtins.c (check_for_builtin): If a builtin could result in a
2541         direct call being generated, don't use it if flag_indirect_dispatch
2542         is set.
2543
2544 2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>
2545
2546         * gcj.texi (Invocation): Corrections for Invocation API example.
2547
2548 2006-07-04  Andrew Haley  <aph@redhat.com>
2549
2550         * class.c (build_fieldref_cache_entry): Set DECL_IGNORED_P on the
2551         entry.
2552
2553 2006-06-21  Andrew Haley  <aph@redhat.com>
2554
2555         * java-tree.h (update_aliases): Remove
2556         * expr.c (expand_iinc): Remove call to update_aliases().
2557         (STORE_INTERNAL): Likewise.
2558         * decl.c (update_aliases, initialize_local_variable) 
2559         (maybe_pushlevels): Set DECL_VALUE_EXPR for debugging decls.
2560
2561 2006-06-19  Andrew Haley  <aph@redhat.com>
2562
2563         PR java/1305
2564         PR java/27908
2565         * expr.c (java_modify_addr_for_volatile): New function.
2566         (expand_java_field_op): Handle volatile fields.
2567         * java-gimplify.c (java_gimplify_component_ref): Call
2568         java_modify_addr_for_volatile to give the field_ref the correct
2569         volatile type.
2570         (java_gimplify_modify_expr): Likewise.
2571         * java-tree.h (java_modify_addr_for_volatile): New decl.
2572
2573 2006-06-17  Karl Berry  <karl@gnu.org>
2574
2575         * gcj.texi (@dircategory): Use "Software development" instead
2576         of "Programming", following the Free Software Directory.
2577
2578 2006-06-16  Andrew Haley  <aph@redhat.com>
2579
2580         * class.c (make_class_data): When using flag_indirect_classes,
2581         don't initialize the vtable of Class instances.
2582
2583 2006-06-09  Andrew Haley  <aph@redhat.com>
2584
2585         PR java/1305
2586         PR java/27908
2587         * builtins.c (initialize_builtins): Add __sync_synchronize().
2588         * class.c (add_field): Mark volatile fields.
2589         * java-gimplify.c (java_gimplify_expr): Call new functions to
2590         handle self-modifying exprs and COMPONENT_REFs.
2591         (java_gimplify_component_ref): New.
2592         (java_gimplify_modify_expr): Add handling for volatiles.
2593
2594 2006-06-08  Tom Tromey  <tromey@redhat.com>
2595
2596         * gcj.texi (libgcj Runtime Properties): Document
2597         gnu.gcj.user.realname.
2598
2599 2006-06-08  Andrew Haley  <aph@redhat.com>
2600
2601         * expr.c (build_field_ref): Pass NULL_TREE as SPECIAL arg to
2602         get_symbol_table_index().
2603         (maybe_rewrite_invocation): Set SPECIAL if we need to access a
2604         private method.
2605         (build_known_method_ref): New arg: special.  Pass it to
2606         get_symbol_table_index.
2607         (get_symbol_table_index): Put SPECIAL in the TREE_PURPOSE field of
2608         the method list.
2609         (build_invokevirtual): New arg: special.  Pass it to
2610         get_symbol_table_index.
2611         (expand_invoke): New variable: special.
2612         Pass it to maybe_rewrite_invocation().
2613         Pass it to build_known_method_ref().
2614         * class.c (build_symbol_entry): Add new arg: special.  Use it to
2615         build the symbol table conbstructor.
2616         (emit_symbol_table): Extract SPECIAL from the method list and pass
2617         it to build_symbol_entry().
2618         * parse.y (patch_invoke): Call maybe_rewrite_invocation() and set
2619         special accordingly.
2620
2621 2006-06-06  David Daney  <ddaney@avtrex.com>
2622
2623         * gcj.texi (libgcj Runtime Properties): Document
2624         gnu.gcj.runtime.NameFinder.show_raw and
2625         gnu.gcj.runtime.NameFinder.remove_unknown.
2626
2627 2006-06-06  Tom Tromey  <tromey@redhat.com>
2628
2629         * jcf-dump.c (print_access_flags): Handle varargs, bridge,
2630         synthetic, enum, annotation.
2631         * jcf.h (ACC_BRIDGE): New macro.
2632         (ACC_VARARGS): Likewise.
2633         (ACC_SYNTHETIC): Likewise.
2634         (ACC_ENUM): Likewise.
2635         (ACC_ANNOTATION): Likewise.
2636
2637 2006-06-06  Mike Stump  <mrs@apple.com>
2638
2639         * Make-lang.in: Rename to htmldir to build_htmldir to avoid
2640         installing during build.
2641
2642 2006-05-31  Thomas Fitzsimmons  <fitzsim@redhat.com>
2643
2644         * gcj.texi (Extensions): Document the new gcj-dbtool-based
2645         classname-to-library resolution mechanism.
2646         Declare the old gnu.gcj.runtime.VMClassLoader.library_control
2647         mechanism deprecated.
2648         (libgcj Runtime Properties): Document
2649         gnu.gcj.runtime.VMClassLoader.library_control's new default.
2650
2651 2006-05-29  Jakub Jelinek  <jakub@redhat.com>
2652
2653         * javaop.h (int16, int32, int64): Define to exactly 16 (resp. 32, 64)
2654         bit wide type.
2655         (jword): Define to uint64 on 64-bit arches.
2656         * jcf-dump.c (print_constant): Cast JPOOL_UINT to long.
2657
2658 2006-05-28  Kazu Hirata  <kazu@codesourcery.com>
2659
2660         * class.c, except.c, expr.c, java-gimplify.c: Fix comment
2661         typos.
2662
2663 2006-05-26  Tom Tromey  <tromey@redhat.com>
2664
2665         * expr.c (java_push_constant_from_pool): Handle 'ldc class'.
2666         * verify-glue.c (vfy_class_type): New function.
2667         * verify-impl.c (check_constant): Allow 'ldc class'.
2668         * verify.h (vfy_class_type): Declare.
2669
2670 2006-05-25  Andrew Haley  <aph@redhat.com>
2671
2672         PR java/27756
2673         * decl.c (maybe_pushlevels): When variable ranges are non-nested
2674         update all lifetimes, not just the first one.
2675
2676 2006-05-24  Tom Tromey  <tromey@redhat.com>
2677
2678         * java-tree.h: Fixed flag documentation.
2679
2680 2006-05-24  Tom Tromey  <tromey@redhat.com>
2681
2682         PR libgcj/27729:
2683         * jcf.h (ACC_INVISIBLE): Changed value.
2684
2685 2006-05-24  Andrew Haley  <aph@redhat.com>
2686
2687         PR java/27754
2688         * decl.c (java_add_stmt): Use a STATEMENT_LIST rather than a
2689         COMPOUND_EXPR.
2690
2691 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2692
2693         * lang.opt (femit-class-file): Remove VarExists.
2694
2695 2006-05-16  Tom Tromey  <tromey@redhat.com>
2696
2697         * verify-impl.c (verify_instructions_0) <op_return>: Special case
2698         for Object.<init>.
2699
2700 2006-05-16  H.J. Lu  <hongjiu.lu@intel.com>
2701
2702         PR driver/26885
2703         * Make-lang.in ($(GCJ)$(exeext)): Replace gcc.o with
2704         $(GCC_OBJS).
2705
2706 2006-05-14  H.J. Lu  <hongjiu.lu@intel.com>
2707
2708         * Make-lang.in (java/decl.o): Add dependency on $(TARGET_H).
2709         (java/expr.o): Replace target.h with $(TARGET_H).
2710         (java/parse.o): Likewise.
2711
2712 2006-05-10  Andrew Haley  <aph@redhat.com>
2713
2714         * class.c (emit_indirect_register_classes): Fix comment.
2715
2716 2006-05-04  Tom Tromey  <tromey@redhat.com>
2717
2718         * java-tree.h (uses_jv_markobj_p): Declare.
2719         * class.c (uses_jv_markobj_p): Removed.
2720         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): New define.
2721         (get_boehm_type_descriptor): Use it.
2722         (uses_jv_markobj_p): Moved from class.c.  Return bool.
2723
2724 2006-05-04  Tom Tromey  <tromey@redhat.com>
2725
2726         * java-tree.def (THIS_EXPR): Now a tcc_expression.
2727
2728 2006-05-04  Andrew Haley  <aph@redhat.com>
2729
2730         * class.c (make_field_value): Always build_address_of fdecl if
2731         there is an initializer.
2732
2733 2006-05-03  Andrew Haley  <aph@redhat.com>
2734
2735         PR libgcj/27352
2736         * expr.c (maybe_rewrite_invocation): New function.
2737         (rewrite_arglist_getclass): Likewise.
2738         (rules): New.
2739         (expand_invoke): Call maybe_rewrite_invocation.
2740         * parse.y (patch_invoke): Likewise.
2741         * java-tree.h: (maybe_rewrite_invocation): New function.
2742
2743 2006-04-21  Andrew Haley  <aph@redhat.com>
2744
2745         * lang.c (java_init): Handle flag_indirect_classes.
2746         * jvgenmain.c: Use "class$$" instead of "class$".
2747         * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
2748         DECLs.
2749         (mangle_class_field): Special case "class$$" as well as "class$".
2750         * constants.c (build_ref_from_constant_pool): If
2751         flag_indirect_classes, generate a ref into the heap.
2752         * decl.c (constants_field_decl_node,
2753         constants_data_field_decl_node): New.
2754         * class.c (build_static_class_ref): New.
2755         (build_classdollar_field): Factor out from build_class_ref().
2756         (make_field_value): Handle static fields in heap.
2757         (make_class_data): Make sure we get a static ref to class.
2758         Make class initializer const if flag_indirect_classes.
2759         (register_class): Build a class_ref for initialization if
2760         flag_indirect_classes.
2761         (emit_indirect_register_classes): New.
2762
2763 2006-04-08  Kazu Hirata  <kazu@codesourcery.com>
2764
2765         * expr.c, gjavah.c: Fix comment typos.
2766
2767 2006-04-03  Andrew Haley  <aph@redhat.com>
2768
2769         PR java/26858
2770         * expr.c (build_field_ref): Don't check the field offset if
2771         flag_syntax_only.
2772
2773 2006-03-30  Andrew Haley  <aph@redhat.com>
2774
2775         PR java/26858
2776         * lang.c (java_attribute_table): New.
2777         (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2778         * expr.c (build_field_ref): Add a null pointer check for all
2779         fields of offset > 4k.  Don't do so for accesses via the this
2780         pointer, which we know can never be null.
2781         * class.c (build_java_method_type): Mark arg 1 of all nonstatic
2782         methods nonnull.
2783
2784 2006-03-30  Carlos O'Donell  <carlos@codesourcery.com>
2785
2786         * Make-lang.in: Rename docdir to gcc_docdir.
2787
2788 2006-03-30  Tom Tromey  <tromey@redhat.com>
2789
2790         PR java/26042:
2791         * parse.y (java_reorder_fields): Reset superclass field's size as
2792         well.
2793
2794 2006-03-28  Tom Tromey  <tromey@redhat.com>
2795
2796         PR java/26390:
2797         * parse.y (find_most_specific_methods_list): Added 'class'
2798         argument.
2799         (lookup_method_invoke): Updated.
2800
2801 2006-03-15  Tom Tromey  <tromey@redhat.com>
2802
2803         * jcf-write.c (generate_bytecode_insns): Use qualifying type for
2804         non-static method calls.
2805
2806 2006-03-15  David Daney  <ddaney@avtrex.com>
2807
2808         * java-tree.h : Moved comment for TYPE_DOT_CLASS adjacent to its
2809         declaration.
2810
2811 2006-03-15  David Daney  <ddaney@avtrex.com>
2812
2813         * lang.opt (-freduced-reflection): New option.
2814         * lang.c (java_post_options): Generate an error if
2815         -freduced-reflection used with -fjni or -findirect-dispatch.
2816         * java-tree.h (flag_reduced_reflection): Declare new variable.
2817         * boehm.c (get_boehm_type_descriptor): Indicate all pointers
2818         if bitmap overflows and flag_reduced_reflection set.
2819         * class.c (uses_jv_markobj_p): New function.
2820         (make_class_data): Moved generation of vtable to before
2821         reflection data, generate less reflection data if
2822         flag_reduced_reflection set.
2823         * gcj.texi: Document -freduced-reflection.
2824
2825 2006-03-15  Tom Tromey  <tromey@redhat.com>
2826
2827         PR java/26638:
2828         * class.c (get_interface_method_index): Don't put <clinit> into
2829         interface table.
2830
2831 2006-03-15  Tom Tromey  <tromey@redhat.com>
2832
2833         * parse.y (analyze_clinit_body): Ignore empty statements.
2834
2835 2006-03-08  David Daney  <ddaney@avtrex.com>
2836
2837         * gcj.texi: Document -static-libgcj option.
2838
2839 2006-02-20  Andrew Haley  <aph@redhat.com>
2840
2841         * jcf-parse.c (parse_class_file): Set input_location from
2842         current_class.
2843
2844 2006-02-15  Andrew Haley  <aph@redhat.com>
2845
2846         * class.c (GEN_TABLE): Don't pushdecl *_SYMS_DECL here.
2847         (make_class_data): pushdecl_top_level TYPE_OTABLE_SYMS_DECL,
2848         TYPE_ATABLE_SYMS_DECL, TYPE_ITABLE_SYMS_DECL here.
2849
2850 2006-02-09  Andrew Haley  <aph@redhat.com>
2851
2852         PR java/26192
2853         * expr.c (expand_invoke): Allow methods in arrays to be resolved
2854         in their superclass.
2855
2856         * typeck.c (build_java_array_type): Generate TYPE_STUB_DECLs for
2857         array types.
2858         
2859 2006-02-08  Tom Tromey  <tromey@redhat.com>
2860
2861         PR java/22578:
2862         * check-init.c (check_init): Handle VIEW_CONVERT_EXPR.
2863         * builtins.c (convert_real): New function.
2864         (java_builtins): Handle Float.intBitsToFloat,
2865         Float.floatToRawIntBits, Double.longBitsToDouble,
2866         Double.doubleToRawLongBits.
2867
2868 2006-02-07  Andrew Haley  <aph@redhat.com>
2869
2870         * expr.c (expand_invoke): (BC mode.)  If we find a method in a
2871         class other than the one in which we expected to find it, ignore
2872         the result.
2873
2874         PR java/25535
2875         * constants.c (build_constants_constructor): move initializer into
2876         first halfword on a 64-bit big-endian machine.
2877
2878 2006-02-04  Tom Tromey  <tromey@redhat.com>
2879
2880         PR java/25676:
2881         * builtins.c (max_builtin): Skip floating point 'max'.
2882         (min_builtin): Skip floating point 'min'.
2883         (check_for_builtin): Never return NULL_TREE.
2884
2885 2006-02-04  Tom Tromey  <tromey@redhat.com>
2886
2887         PR java/26097:
2888         * expr.c (push_type): Avoid side effect in gcc_assert.
2889
2890 2006-02-04  Roger Sayle  <roger@eyesopen.com>
2891
2892         * decl.c (java_init_decl_processing): Create char_type_node as a
2893         regular INTEGER_TYPE node.
2894         (push_promoted_type): Preserve TYPE_STRING_FLAG on types.
2895         * typeck.c (convert): No longer check for CHAR_TYPEs but instead
2896         test for char_type_node and promoted_char_type_node as special
2897         instances of INTEGER_TYPE tree codes.
2898         (promote_type,build_java_signature): Likewise.
2899         * jcf-write.c (adjust_typed_op): Likewise.
2900         * mangle.c (mangle_type): Likewise.
2901         * parse.y (do_unary_numeric_promotion): No longer handle CHAR_TYPE.
2902         * parse.h (JINTEGRAL_TYPE_P): Likewise.
2903
2904 2006-02-04  Andreas Tobler  <a.tobler@schweiz.ch>
2905
2906         * expr.c (java_stack_swap): Revert gcc_assert patch.
2907
2908 2006-02-03  Ben Elliston  <bje@au.ibm.com>
2909
2910         * java-gimplify.c: Use gcc_assert and gcc_unreachable throughout.
2911         * typeck.c: Likewise.
2912         * verify-impl.c: Likewise.
2913         * class.c: Likewise.
2914         * decl.c: Likewise.
2915         * jcf-parse.c: Likewise.
2916         * constants.c: Likewise.
2917         * check-init.c: Likewise.
2918         * jcf-write.c: Likewise.
2919         * verify-glue.c: Likewise.
2920         * mangle.c: Likewise.
2921         * expr.c: Likewise.
2922         * lang.c: Likewise.
2923         * boehm.c: Likewise.
2924
2925 2006-02-01  Jan Hubicka  <jh@suse.cz>
2926
2927         * decl.c (end_java_method): Kill hack disabling unit-at-a-time.
2928         * lang.c (java_init_options): Set no_unit_at_a_time_default.
2929
2930 2006-01-30  Andrew Haley  <aph@redhat.com>
2931
2932         PR java/21428
2933         * parse.y: (source_start_java_method): Mark DECL_ARTIFICIAL("this").
2934
2935 2006-01-21  Joseph S. Myers  <joseph@codesourcery.com>
2936
2937         * jv-scan.c (version), jcf-dump.c (version), gjavah.c (version):
2938         Update copyright notice dates.
2939
2940 2006-01-16  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2941
2942         * jvspec.c (lang_specific_spec_functions): Remove.
2943
2944 2006-01-06  Tom Tromey  <tromey@redhat.com>
2945
2946         * gcj.texi (Arrays): Added more documentation for
2947         JvNewObjectArray.
2948         (Primitive types): Correct information about primitive classes.
2949         (Reference types): New node.
2950         (Index): New node.
2951
2952 2005-12-16  Alexandre Oliva  <aoliva@redhat.com>
2953
2954         * jcf-parse.c (set_source_filename): Set the decl source location
2955         even when returning early.
2956
2957 2005-12-15  Tom Tromey  <tromey@redhat.com>
2958             Andrew Haley  <aph@redhat.com>
2959
2960         PR java/25429
2961         * parse.y (resolve_expression_name): Don't generate accessor
2962         methods for constant fields.
2963
2964 2005-12-13  Andrew Haley  <aph@redhat.com>
2965
2966         PR java/25366
2967         PR java/25368
2968         * class.c (maybe_layout_super_class): Update current_class before
2969         calling do_resolve_class.
2970
2971 2005-12-12  H.J. Lu  <hongjiu.lu@intel.com>
2972
2973         PR java/25330
2974         * jcf-write.c (write_classfile): Use PID in temporary class
2975         file. Save/restore errno when reporting error.
2976
2977 2005-12-10  Terry Laurenzo  <tlaurenzo@gmail.com>
2978
2979         PR java/9861
2980         * mangle.c (mangle_method_decl): Mangle Java methods by prepending 'J'
2981         to bare_function_type and including the return type
2982         * builtins.c (initialize_builtins) : Change builtin mangled name
2983         constants to conform to new mangling scheme
2984
2985 2005-12-08  Andrew Haley  <aph@redhat.com>
2986
2987         PR libgcj/25265
2988         * java-tree.h (enum java_tree_index): Add JTI_SOFT_NOSUCHFIELD_NODE.
2989         (soft_abstractmethod_node): New.
2990         * expr.c (build_field_ref): Add in-line check for missing field.
2991         * decl.c (java_init_decl_processing): Add soft_nosuchfield_node.
2992
2993 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2994
2995         * Make-lang.in (java.all.build, java.install-normal): Remove.
2996
2997 2005-12-07  Rafael Ávila de Espíndola  <rafael.espindola@gmail.com>
2998
2999         * Make-lang.in: Remove all dependencies on s-gtype, except for
3000         gt-java-parse.h.
3001
3002 2005-12-07  Richard Sandiford  <richard@codesourcery.com>
3003
3004         * class.c (build_utf8_ref, emit_register_classes): Use
3005         switch_to_section and get_section.
3006
3007 2005-12-06  Tom Tromey  <tromey@redhat.com>
3008
3009         PR java/25283:
3010         * parse.y (patch_new_array_init): Revert previous patch.
3011         (lookup_method_invoke): Use size-less array type when creating an
3012         anonymous constructor.
3013
3014 2005-12-05  Tom Tromey  <tromey@redhat.com>
3015
3016         * parse.y (patch_new_array_init): Don't set length on array.
3017
3018 2005-12-02  Richard Guenther  <rguenther@suse.de>
3019
3020         * java-gimplify.c (java_gimplify_labeled_block_expr): Use
3021         buildN instead of build.
3022         * class.c (finish_class): Likewise.
3023         * expr.c (java_create_object): Likewise.
3024
3025 2005-11-28  Tom Tromey  <tromey@redhat.com>
3026
3027         PR java/18278:
3028         * expr.c (build_jni_stub): Unwrap the return value.
3029         * java-tree.h (soft_unwrapjni_node): New define.
3030         (enum java_tree_index): Added JTI_SOFT_UNWRAPJNI_NODE.
3031         * decl.c (java_init_decl_processing): Initialize
3032         soft_unwrapjni_node.
3033
3034 2005-11-24  Bryce McKinlay  <mckinlay@redhat.com>
3035
3036         * gcj.texi (gij options): Add -Xss documentation.
3037
3038 2005-11-08  Wil Mahan  <wmahan@gmail.com>
3039
3040         PR java/23617
3041         * zextract.c (read_zip_archive): Fix out of memory error when
3042         reading jar files with zip-style comments.
3043
3044 2005-11-07   Terry Laurenzo   <tlaurenzo@gmail.com>
3045
3046         * gjavah.c (HANDLE_CODE_ATTRIBUTE): Only define for ELF Object
3047         formats.
3048         * gjavah.c (decompile_method): Add ATTRIBUTE_UNUSED
3049
3050 2005-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3051             Wil Mahan <wmahan@gmail.com>
3052
3053         PR java/23620
3054         * class.c (make_class): Create empty binfo here.
3055         (set_super_info): Only create binfo if we have superclasses.
3056
3057 2005-10-03  Ranjit Mathew  <rmathew@gcc.gnu.org>
3058
3059         PR java/24127
3060         * parse.y (method_header): Make the result of the rule a NULL_TREE
3061         when a parsing error occurs.
3062
3063 2005-09-29  Tom Tromey  <tromey@redhat.com>
3064
3065         PR java/24120:
3066         * jcf-io.c (memoized_dirlist_hash): New function.
3067         (caching_stat): Use it.
3068
3069 2005-09-21  Ranjit Mathew  <rmathew@gcc.gnu.org>
3070
3071         PR java/21418
3072         * class.c (inherits_from_p): Try to lay out super class
3073         if it is not already laid out.
3074         (maybe_layout_super_class): Handle the case where SUPER_CLASS
3075         is a NULL_TREE.
3076
3077 2005-09-18  James A. Morrison  <phython@gcc.gnu.org>
3078
3079         * builtins.c (max_builtin, min_builtin, abs_builtin,
3080         java_build_function_call_expr): Use fold_buildN.
3081         * class.c (layout_class_method): Likewise.
3082         * expr.c (java_truthvalue_conversion, build_java_jsr,
3083         build_java_arrayaccess, expand_java_arrayload, expand_iinc,
3084         build_java_binop, build_field_ref, expand_compare,
3085         build_known_method_ref, build_invokevirtual,
3086         process_jvm_instruction): Likewise.
3087         * parse.y (patch_binop, patch_exit_expr): Likewise.
3088         * typeck.c (convert_ieee_real_to_integer): Likewise.
3089         (convert): Don't call fold after convert_ieee_real_to_integer.
3090
3091 2005-09-14  Bryce McKinlay  <mckinlay@redhat.com>
3092
3093         PR java/23891
3094         * parse.y (maybe_create_class_interface_decl): Set TYPE_PACKAGE for
3095         the newly created type. Set import lists here, not in create_class.
3096         (jdep_resolve_class): Set current_class.
3097         (do_resolve_class): Use current_class's TYPE_PACKAGE to determine 
3098         the current package context, not ctxp->package.
3099         (cicp_cache): Removed.
3100         (class_in_current_package): Simplify implementation using TYPE_PACKAGE.
3101         * jcf-parse.c (give_name_to_class): Set TYPE_PACKAGE.
3102         * java-tree.h (TYPE_PACKAGE): New macro.
3103         (struct lang_type): New member 'package'.
3104
3105 2005-09-09  Andrew Haley  <aph@redhat.com>
3106
3107         PR libgcj/23182 
3108         * expr.c (pop_type_0): If the expected type is object or ptr
3109         (i.e. void*), return the type of the object we just popped from
3110         the stack.
3111
3112 2005-09-06  Andrew Pinski  <pinskia@physics.uc.edu>
3113
3114         * java-gimplify.c (java_gimplify_block): NULL out the old BLOCK's
3115         BLOCK_EXPR_BODY before returning the new BIND_EXPR.
3116
3117 2005-09-06  Kazu Hirata  <kazu@codesourcery.com>
3118
3119         * check-init.c, decl.c, expr.c, gcj.texi, java-tree.h,
3120         jcf-parse.c, jcf.h, parse.h, parse.y, typeck.c: Fix comment
3121         typos.  Follow spelling conventions.
3122
3123 2005-09-05  Ranjit Mathew  <rmathew@hotmail.com>
3124
3125         PR java/23431
3126         * typeck.c (lookup_do): Look up interfaces for the original class,
3127         not the base class.
3128         * parse.y (java_check_regular_methods): Fix diagnostic message for
3129         more restrictive overriding of a method from an interface.
3130
3131 2005-08-16  Tom Tromey  <tromey@redhat.com>
3132
3133         * class.c (make_class_data): Always emit JV_STATE_PRELOADING for
3134         class' initial state.
3135
3136 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3137
3138         PR java/22113
3139         * lex.c (do_java_lex): Define MAX_TOKEN_LEN. Avoid overflowing
3140         `literal_token' for large numeric input tokens.
3141
3142 2005-08-16  Ranjit Mathew  <rmathew@hotmail.com>
3143
3144         PR java/19870
3145         * parse.y (nested_field_access_p): Rename to nested_member_access_p
3146         and expand to handle method accesses across nested classes.
3147         (build_outer_method_access_method): Rename to
3148         build_nested_method_access_method.  Minor adjustments to comments.
3149         (resolve_expression_name): Use the newly-renamed
3150         nested_member_access_p method.
3151         (resolve_qualified_expression_name): Likewise.
3152         (patch_method_invocation): Also consider static methods for access
3153         method generation.  Minor adjustments to comments.
3154         (maybe_use_access_method): Use the more general
3155         nested_memeber_access_p to determine access across nested class
3156         boundaries.  Allow THIS_ARG to be NULL (for static methods).
3157
3158 2005-08-15  Tom Tromey  <tromey@redhat.com>
3159
3160         PR java/23300.
3161         * expr.c (build_field_ref): Don't generate otable reference when
3162         DECL_FIELD_OFFSET is 0.
3163         * class.c (maybe_layout_super_class): Pass outer class to
3164         do_resolve_class.
3165
3166 2005-08-15  Tom Tromey  <tromey@redhat.com>
3167
3168         * java-tree.h (LABEL_IN_SUBR): Removed.
3169         (LABEL_IN_SUBR): Likewise.
3170         (LABEL_IS_SUBR_START): Likewise.
3171         (LABEL_SUBR_START): Likewise.
3172         (LABEL_SUBR_CONTEXT): Likewise.
3173         (LABEL_CHANGED): Likewise.
3174         (LABEL_RETURN_LABEL): Likewise.
3175         (LABEL_RETURN_TYPE_STATE): Likewise.
3176         (LABEL_RETURN_LABELS): Likewise.
3177         (RETURN_MAP_ADJUSTED): Likewise.
3178         (LABEL_PENDING_CHAIN): Likewise.
3179
3180 2005-08-15  Tom Tromey  <tromey@redhat.com>
3181
3182         * Make-lang.in (JAVA_OBJS): Removed verify.o
3183         (java/verify.o): Removed.
3184         * verify.c: Removed.
3185         * lang.c (flag_new_verifier): Removed.
3186         (java_post_options): Updated.
3187         * java-tree.h (flag_new_verifier): Removed.
3188         (verify_jvm_instructions): Removed.
3189         * expr.c (pop_type_0): Assume flag_new_verifier is true.
3190         (build_java_check_indexed_type): Likewise.
3191         (expand_java_arraystore): Likewise.
3192         (expand_java_arrayload): Likewise.
3193         (pop_arguments): Likewise.
3194         (expand_byte_code): Likewise.
3195         (process_jvm_instruction): Likewise.
3196
3197 2005-08-10  Andrew Haley  <aph@redhat.com>
3198
3199         * java-gimplify.c (java_gimplify_modify_expr): Fix any pointer
3200         type mismatches to make legal GIMPLE.
3201
3202 2005-08-10  Robin Green <greenrd@greenrd.org>
3203
3204         PR java/23230:
3205         * parse.y (maybe_use_access_method): Generalize check from
3206         java.lang.Object to any superclass of current_class
3207
3208 2005-08-08  Nathan Sidwell  <nathan@codesourcery.com>
3209
3210         * class.c (build_class_ref): Wrap the primary class type in a
3211         NOP_EXPR.
3212         * parse.y (java_complete_lhs) <COMPONENT_REF case>: Extract the
3213         primary class type from the NOP_EXPR in which it was placed.
3214
3215 2005-07-28  Diego Novillo  <dnovillo@redhat.com>
3216
3217         * expr.c (expand_load_internal): Fix missing parens in
3218         predicate.
3219
3220 2005-07-28  Andrew Haley  <aph@redhat.com>
3221
3222         * expr.c (expand_load_internal): Convert to destination type.
3223
3224 2005-07-22  Manfred Hollstein  <mh@suse.com>
3225
3226         * verify-impl.c (check_class_constant): Fix uninitialised warnings.
3227         (check_constant): Likewise.
3228         (check_wide_constant): Likewise.
3229
3230 2005-07-20  Giovanni Bajo  <giovannibajo@libero.it>
3231
3232         Make CONSTRUCTOR use VEC to store initializers.
3233         * check-init.c (check_init): Update to cope with VEC in
3234         CONSTRUCTOR_ELTS.
3235         * class.c (make_field_value, make_method_value, get_dispatch_table,
3236         make_class_data, emit_symbol_table, emit_catch_table,
3237         emit_assertion_table): Use build_constructor_from_list instead of
3238         build_constructor.
3239         * constants.c (build_constants_constructor): Likewise.
3240         * java-gimplify.c (java_gimplify_new_array_init): Update to cope with
3241         VEC in CONSTRUCTOR_ELTS.
3242         * java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
3243         PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
3244         of a TREE_LIST.
3245         * jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
3246         CONSTRUCTOR_ELTS.
3247         * parse.y (build_new_array_init): Use build_constructor_from_list
3248         instead of build_constructor.
3249         (patch_new_array_init): Update to cope with VEC in
3250         CONSTRUCTOR_ELTS.
3251         (array_constructor_check_entry): Likewise.
3252
3253 2005-07-12  Tom Tromey  <tromey@redhat.com>
3254
3255         * jvspec.c (lang_specific_driver): Put filelist_filename first on
3256         command line.
3257
3258 2005-07-12  Tom Tromey  <tromey@redhat.com>
3259
3260         PR java/19674:
3261         * parse-scan.y (interface_member_declaration): Added
3262         empty_statement.
3263
3264 2005-07-08  Daniel Berlin  <dberlin@dberlin.org>
3265         
3266         * java-tree.h (LABEL_RETURN_LABELS): Use decl_non_common.
3267         (LABEL_PENDING_CHAIN): Ditto.
3268         (LABEL_PC): Ditto.
3269         (DECL_BIT_INDEX): Ditto.        
3270
3271 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3272
3273         PR java/18119
3274         * parse.y (inner_class_accessible): New function. Logic moved from
3275         check_inner_class_access.
3276         (check_inner_class_access): Use inner_class_accessible.
3277         (resolve_inner_class): Simplify arguments. Create circularity hash
3278         here. Keep looking for classes if we found one that was inaccessible. 
3279         Return the inaccessible class only if there is no other match.
3280         (do_resolve_class): Update for new resolve_inner_class arguments.
3281         Don't create circularity_hash here.
3282
3283 2005-07-07  Bryce McKinlay  <mckinlay@redhat.com>
3284
3285         PR java/21045
3286         * parse.y (add_exception_to_throws): New function.
3287         (purge_unchecked_exceptions): Removed.
3288         (get_constructor_super): Renamed from verify_constructor_super. Now
3289         returns the super constructor after verification.
3290         (java_complete_expand_method): Don't use purge_unchecked_exceptions
3291         or save/restore the exception list.
3292         (check_thrown_exceptions): Add uncaught exceptions in anonymous
3293         class initializers and constructors to the throws clause of the method. 
3294
3295 2005-07-05  Bryce McKinlay  <mckinlay@redhat.com>
3296
3297         PR java/19674
3298         * parse.y (interface_member_declaration): Allow empty statements in
3299         interface declarations.
3300
3301 2005-07-05  Paolo Bonzini  <bonzini@gnu.org>
3302
3303         * Makefile.in (parse.o): Adjust dependencies.
3304         * parse.y: Include tree-dump.h.
3305
3306 2005-07-02  Joseph S. Myers  <joseph@codesourcery.com>
3307
3308         * class.c, decl.c, expr.c: Use '+' flag instead of %J.  Use 'q'
3309         flag for quoting.
3310
3311 2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
3312
3313         * parse.y (issue_warning_error_from_context): Call
3314         pp_output_formatted_text to be able to get the buffer.
3315
3316 2005-06-30  Andrew Pinski  <pinskia@physics.uc.edu>
3317
3318         * parse.y (issue_warning_error_from_context): Update for the
3319         renaming of pp_format_text to pp_format.
3320
3321 2005-06-28  Paul Brook  <paul@codesourcery.com>
3322
3323         * decl.c (java_init_decl_processing): Call
3324         default_init_unwind_resume_libfunc.
3325
3326 2005-06-27  Tom Tromey  <tromey@redhat.com>
3327
3328         PR java/21540, PR java/13788:
3329         * parse.y (java_complete_lhs) <CASE_EXPR>: Use
3330         fold_constant_for_init.
3331         (patch_binop): Added 'folding' argument.  Updated all callers.
3332         (patch_unaryop) <NOP_EXPR>: New case.
3333         (fold_constant_for_init) <NOP_EXPR>: Likewise.
3334         (fold_constant_for_init) <COND_EXPR>: Fix sense of test.
3335
3336 2005-06-25  Jan Hubicka  <jh@suse.cz>
3337
3338         * builtins.c (define_builtin): Accept new flags parameter.
3339         (initialize_builtins): Mark the builtins const and nothrow accordingly.
3340
3341 2005-06-25  Kelley Cook  <kcook@gcc.gnu.org>
3342
3343         * all files: Update FSF address in copyright headers.
3344
3345 2005-06-24  Tom Tromey  <tromey@redhat.com>
3346
3347         * verify-impl.c (verify_instructions_0): Correctly handle
3348         situation where PC falls off end.
3349
3350 2005-06-23  Bryce McKinlay  <mckinlay@redhat.com>
3351
3352         PR java/20697
3353         * parse.y (find_most_specific_methods_list): Remove special case for
3354         inner classes.
3355
3356 2005-06-15  Tom Tromey  <tromey@redhat.com>
3357
3358         PR libgcj/21906:
3359         * class.c (make_method_value): Use soft_abstractmethod_node for
3360         abstract method.
3361         * java-tree.h (soft_abstractmethod_node): New define.
3362         (JTI_SOFT_ABSTRACTMETHOD_NODE): New enum constant.
3363         * decl.c (java_init_decl_processing): Initialize
3364         soft_abstractmethod_node.
3365
3366 2005-06-13  Geoffrey Keating  <geoffk@apple.com>
3367
3368         * Make-lang.in (rule for installing gcj.1): Depends on installdirs.
3369
3370 2005-06-13  Per Bothner  <per@bothner.com>
3371
3372         * expr.c (int highest_label_pc_this_method,
3373         start_label_pc_this_method): New globals.
3374         (lookup_label): Add start_label_pc_this_method to pc for label, and
3375         update highest_label_pc_this_method.  This prevents conflicts between
3376         labels from different methods.
3377         * java-tree.h: Declare new globals.
3378         * jcf-parse.c (parse_class_file): If needed bump
3379         start_label_pc_this_method and reset highest_label_pc_this_method.
3380
3381 2005-06-13  Tom Tromey  <tromey@redhat.com>
3382
3383         PR java/21844:
3384         * parse.y (nested_field_access_p): Handle case where outer field
3385         is inherited by enclosing class.
3386
3387 2005-06-12  Per Bothner  <per@bothner.com>
3388
3389         * class.c (inherits_from_p): Do load_class if needed.
3390
3391 2005-06-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3392
3393         * gjavah.c (error): Add ATTRIBUTE_PRINTF_1.
3394         * java-tree.h (parse_error_context): Move...
3395         * parse.h (parse_error_context): ... here, add ATTRIBUTE_GCC_DIAG.
3396         * parse.y (parse_warning_context): Add ATTRIBUTE_GCC_DIAG.
3397         * verify-impl.c (debug_print): Add ATTRIBUTE_PRINTF_1.
3398
3399 2005-06-08  Roger Sayle  <roger@eyesopen.com>
3400
3401         * typeck.c (convert): Only clear TREE_OVERFLOW on INTEGER_CST nodes.
3402
3403 2005-06-06  Jakub Jelinek  <jakub@redhat.com>
3404
3405         * jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
3406         msgid for argument name.
3407         * gjavah.c (error): Likewise.
3408         * java-tree.h (parse_error_context): Likewise.
3409         * parse.y (parse_error_context, parse_warning_context,
3410         issue_warning_error_from_context): Likewise.
3411
3412 2005-06-01  Tom Tromey  <tromey@redhat.com>
3413
3414         PR java/21722:
3415         * class.c (build_static_field_ref): Don't fold constant fields if
3416         current class is from a .class file and we're using indirect
3417         dispatch.
3418
3419 2005-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3420
3421         * java/verify-glue.c: Don't include errors.h and include toplev.h.
3422         * java/Make-lang.in: Updates dependencies.
3423
3424 2005-05-26  Ranjit Mathew  <rmathew@hotmail.com>
3425
3426         PR java/19870.
3427         * java-tree.h (OUTER_FIELD_ACCESS_IDENTIFIER_P): Rename to
3428         NESTED_FIELD_ACCESS_IDENTIFIER_P.
3429         (FIELD_INNER_ACCESS): Rename to FIELD_NESTED_ACCESS.
3430         (FIELD_INNER_ACCESS_P): Rename to FIELD_NESTED_ACCESS_P.
3431         * jcf-write.c (generate_classfile): Use
3432         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3433         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3434         * parse.y (build_outer_field_access): Rename to
3435         build_nested_field_access. Support static fields and outer-to-inner
3436         class accesses.
3437         (outer_field_access_p): Rename to nested_field_access_p. Support
3438         static fields and generalise to outer-to-inner class and sibling
3439         inner class accesses.
3440         (outer_field_expanded_access_p): Rename to
3441         nested_field_expanded_access_p and support static fields.
3442         (outer_field_access_fix): Rename to nested_field_access_fix and
3443         support static fields.
3444         (build_outer_field_access_expr): Rename to
3445         build_nested_field_access_expr and support static fields.
3446         (build_outer_field_access_methods): Rename to
3447         build_nested_field_access_methods and support static fields. For
3448         static fields, generate accessors without class instance parameters.
3449         (build_outer_field_access_method): Rename to
3450         build_nested_field_access_method and support static fields.
3451         (build_outer_method_access_method): Use
3452         NESTED_FIELD_ACCESS_IDENTIFIER_P instead of
3453         OUTER_FIELD_ACCESS_IDENTIFIER_P.
3454         (resolve_expression_name): Consider static field accesses across
3455         nested classes.
3456         (resolve_qualified_expression_name): Likewise.
3457         (java_complete_lhs): Use nested_field_access_fix instead of
3458         outer_field_access_fix.
3459         (patch_unary_op): Rename outer_field_flag to nested_field_flag.
3460         Use nested_field_expanded_access_p instead of
3461         outer_field_expanded_access_p. Use nested_field_access_fix instead
3462         of outer_field_access_fix.
3463         (check_thrown_exceptions): Use NESTED_FIELD_ACCESS_IDENTIFIER_P
3464         instead of OUTER_FIELD_ACCESS_IDENTIFIER_P.
3465
3466 2005-05-26  Bryce McKinlay  <mckinlay@redhat.com>
3467
3468         * decl.c (GCJ_BINARYCOMPAT_ADDITION, 
3469         GCJ_BOOTSTRAP_LOADER_ADDITION): Removed.
3470         (FLAG_BINARYCOMPAT_ABI, FLAG_BOOTSTRAP_LOADER,
3471         MINOR_BINARYCOMPAT_ABI_VERSION): New.
3472         (GCJ_CURRENT_BC_ABI_VERSION): Use new method to calculate version ID.
3473         (parse_version): Calculate version ID using new method. Use bit-flags
3474         for flag_indirect_dispatch and flag_bootstrap_classes.
3475
3476 2005-05-25  Richard Henderson  <rth@redhat.com>
3477
3478         PR libgcj/21692
3479         * Make-lang.in (java/mangle.o): Depend on LANGHOOKS_DEF_H.
3480         * class.c (build_class_ref): Set DECL_CLASS_FIELD_P and
3481         DECL_CONTEXT; avoid pushdecl_top_level.
3482         (build_dtable_decl): Set DECL_VTABLE_P and DECL_CONTEXT.
3483         (layout_class): Don't SET_DECL_ASSEMBLER_NAME.
3484         (layout_class_method): Likewise.
3485         * decl.c (java_mark_cni_decl_local): New.
3486         (java_mark_class_local): Use it.
3487         * java-tree.h (DECL_LOCAL_CNI_METHOD_P): New.
3488         (DECL_CLASS_FIELD_P, DECL_VTABLE_P): New.
3489         (struct lang_decl_func): Add local_cni;
3490         (struct lang_decl_var): Add class_field, vtable.
3491         (java_mangle_decl): Declare.
3492         * lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): New.
3493         * mangle.c: Remove dup obstack.h; include langhooks-def.h.
3494         (mangle_obstack_1): New.
3495         (java_mangle_decl): Remove obstack argument.  Call mangle_class_field,
3496         mangle_vtable, and mangle_local_cni_method_decl.  Fall back to
3497         lhd_set_decl_assembler_name for things that don't need mangling.
3498         (mangle_class_field): Rename from java_mangle_class_field, make
3499         static, don't call init_mangling or finish_mangling.
3500         (mangle_vtable): Similarly.
3501         (mangle_local_cni_method_decl): New.
3502         (init_mangling): Remove obstack argument.  Use &mangle_obstack_1,
3503         gcc_assert, and MANGLE_RAW_STRING.
3504         (finish_mangling): Use gcc_assert, remove if 0 debugging code.
3505
3506 2005-05-25  DJ Delorie  <dj@redhat.com>
3507
3508         * class.c (set_constant_value): Move warning control from if() to
3509         warning(OPT_*).
3510
3511 2005-05-24  Richard Henderson  <rth@redhat.com>
3512
3513         * builtins.c (define_builtin): Don't call make_decl_rtl.
3514         * constants.c (build_constant_data_ref): Likewise.
3515         * class.c (build_utf8_ref): Likewise.
3516         (build_fieldref_cache_entry, build_static_field_ref): Likewise.
3517         (get_dispatch_table, layout_class_method): Likewise.
3518         (build_class_ref): Likewise. Don't set DECL_SIZE or DECL_SIZE_UNIT
3519         by hand.
3520         (make_local_function_alias): Don't SET_DECL_ASSEMBLER_NAME.
3521         (make_method_value): Use METHOD_ABSTRACT instead of DECL_RTL_SET_P
3522         to determine if we need a non-zero address.
3523         * decl.c (builtin_function): Don't call make_decl_rtl.
3524         (give_name_to_locals): Don't SET_DECL_ASSEMBLER_NAME.
3525         * expr.c (build_known_method_ref): Don't call make_decl_rtl.
3526         * resource.c (compile_resource_data): Likewise.
3527         * parse.y (resolve_field_access): Re-word comment to avoid
3528         building DECL_RTL.
3529
3530 2005-05-24  Richard Henderson  <rth@redhat.com>
3531
3532         * class.c (registered_class): Take it out of class_roots; turn into
3533         a vec of trees.
3534         (register_class): Make static.  Don't duplicate decl node.  Use
3535         VEC_safe_push.
3536         (emit_register_classes): Use VEC_iterate.  Use output_constant
3537         instead of assemble_integer.  Don't call mark_decl_referenced
3538         directly.
3539         * java-tree.h (register_class): Remove decl.
3540
3541 2005-05-19  Paolo Bonzini  <bonzini@gnu.org>
3542
3543         PR java/17845
3544
3545         * parse.y (register_package, package_list): Remove.
3546         (package_declaration): Do not call register_package.
3547         (do_resolve_class): Do not use package_list.
3548
3549 2005-05-15  Gerald Pfeifer  <gerald@pfeifer.com>
3550
3551         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Remove
3552         unused variable.
3553
3554 2005-05-15  Tom Tromey  <tromey@redhat.com>
3555
3556         PR java/21519:
3557         * jcf-write.c (generate_bytecode_insns) <SAVE_EXPR>: Don't call
3558         NOTE_PUSH.
3559
3560 2005-05-12  Aaron Luchko <aluchko@redhat.com>
3561
3562         * gcj.texi: Add '-verify', '-noverify', and '-verifyremote'.
3563
3564 2005-05-11  Tom Tromey  <tromey@redhat.com>
3565
3566         * gcj.texi (Code Generation): Document -fbootstrap-classes.
3567         * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
3568         (parse_version): Use it.
3569         * lang.opt (-fbootstrap-classes): New option.
3570
3571 2005-05-10  Paolo Bonzini  <bonzini@gnu.org>
3572
3573         PR java/21436
3574         * class.c (maybe_layout_super_class): Look for imports in this_class.
3575         * parse.h (ctxp_for_generation_last): New.
3576         (do_resolve_class): Add a parameter.
3577         * parse.y (ctxp_for_generation_last): New.
3578         (java_pop_parser_context): Add at end of list.
3579         (find_in_imports, find_in_imports_on_demand): Look in ctxp
3580         if the TYPE_IMPORT_LIST or respectively the TYPE_IMPORT_DEMAND_LIST of
3581         the given type are NULL.
3582         (do_resolve_class): Look into the imports of the new second parameter.
3583         Adjust recursive calls.
3584         (resolve_class, resolve_inner_class, find_as_inner_class): Adjust
3585         calls to do_resolve_class.
3586         (create_class): Set the TYPE_IMPORT_LIST and TYPE_IMPORT_DEMAND_LIST.
3587         (java_complete_class): Do not do that here.
3588
3589 2005-05-03  Thomas Fitzsimmons  <fitzsim@redhat.com>
3590
3591         PR java/20309
3592         * Make-lang.in (java): Add gjnih.
3593         (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): Likewise.
3594         (GJNIH_OBJS): New variable.
3595         (gjnih$(exeext)): New target.
3596         (JAVA_MANFILES): Add gjnih.1.
3597         (java.uninstall): Add gjnih.1.
3598         (java.mostlyclean): Add gjnih.
3599         (java.maintainer-clean): Add gjnih.1.
3600         (java/gjavah-jni.o): New target.
3601         (.INTERMEDIATE): Add gjnih.pod.
3602         (gjnih.pod): New target.
3603         * config-lang.in (stagestuff): Add gjnih.
3604         * gcj.texi (Top): Add gjnih node.
3605         (Invoking gcjh): Add descriptions of -force, -old, -trace, -J and
3606         -bootclasspath options.
3607         (Invoking gjnih): New node.
3608         * gjavah.c Initialize flag_jni to 1 if JNI_DEFAULT is defined.
3609         (TOOLNAME): New macro.
3610         (error): Replace hard-coded gcjh with TOOLNAME.
3611         (process_file): Likewise.
3612         (usage): Likewise.
3613         (version): Likewise.
3614         (help): Likewise.  Add help output for -force, -old, -trace and -J
3615         options.
3616         (OPT_FORCE, OPT_OLD, OPT_TRACE): New macros.
3617         (options): Add force, old, trace and J fields.
3618         (main): Handle -force, -old, -trace and -J options.
3619
3620 2005-05-03  Tom Tromey  <tromey@redhat.com>
3621
3622         PR java/21245:
3623         * gjavah.c (main): Unlink output file on error.
3624
3625 2005-05-03  Kazu Hirata  <kazu@cs.umass.edu>
3626
3627         * constants.c, jvgenmain.c, lang.opt, resource.c: Update
3628         copyright.
3629
3630 2005-04-29  Tom Tromey  <tromey@redhat.com>
3631
3632         * expr.c (build_jni_stub): Updated for change to build_block.
3633
3634 2005-04-29  Andrew Pinski  <pinskia@gcc.gnu.org>
3635
3636         * expr.c (force_evaluation_order): Declare 'saved' earlier.
3637
3638 2005-04-28  Andrew Haley  <aph@redhat.com>
3639
3640         PR java/19285
3641         * java-tree.h (soft_resolvepoolentry_node): New.
3642         (alloc_constant_fieldref): Declare.
3643         * expr.c (expand_java_field_op): Don't call class_init for
3644         accesses to static fields with indirect dispatch.
3645         * builtins.c (initialize_builtins): Add "__builtin_expect".
3646         * decl.c (soft_resolvepoolentry_node): New variable.
3647         (java_init_decl_processing): Create a decl for
3648         "_Jv_ResolvePoolEntry".
3649         * class.c (build_fieldref_cache_entry): New function.
3650         (build_static_field_ref): Rewrite for indirect dispatch.
3651         * constants.c (find_name_and_type_constant_tree): New function.
3652         (alloc_constant_fieldref): Likewise.
3653         (build_constants_constructor): Handle CONSTANT_Fieldref and
3654         CONSTANT_NameAndType.
3655
3656         PR java/21115
3657         * expr.c (force_evaluation_order): Convert outgoing args smaller
3658         than integer.
3659
3660 2005-04-27  Bryce McKinlay  <mckinlay@redhat.com>
3661
3662         * gcj.texi (libgcj Runtime Properties): Remove obsolete
3663         gnu.gcj.runtime.NameFinder.* system properties. Update documentation 
3664         for gnu.gcj.runtime.NameFinder.use_addr2line and gnu.gcj.progname.
3665
3666 2005-04-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3667
3668         * gjavah.c, jcf-dump.c, jv-scan.c, jvgenmain.c: Replace calls
3669         to `unlock_stream' with `unlock_std_streams'.
3670
3671 2005-04-25  Jakub Jelinek  <jakub@redhat.com>
3672
3673         * Make-lang.in (java/decl.o, java/resource.o): Depend on $(EXPR_H)
3674         instead of just expr.h.
3675
3676 2005-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3677
3678         * gjavah.c (main): Unlock the stdio streams.
3679         * jcf-dump.c (main): Likewise.
3680         * jv-scan.c (main): Likewise.
3681         * jvgenmain.c (main): Likewise.
3682
3683 2005-04-23  DJ Delorie  <dj@redhat.com>
3684
3685         * class.c, decl.c, expr.c, jcf-io.c, jcf-parse.c, jv-scan.c,
3686         parse.y: Adjust warning() callers.
3687
3688 2005-04-21  Bryce McKinlay  <mckinlay@redhat.com>
3689
3690         * gcj.texi (Object fields): Change "Integer" to "Int" in example
3691         contructor.
3692
3693 2005-04-20  Bryce McKinlay  <mckinlay@redhat.com>
3694
3695         * gcj.texi: Fix typos and bogus example.
3696
3697 2005-04-19  Kazu Hirata  <kazu@cs.umass.edu>
3698
3699         * except.c: Fix a comment typo.
3700
3701 2005-04-19  Julian Brown  <julian@codesourcery.com>
3702
3703         * decl.c (finish_method): Revert patch from 2005-04-13 for breaking
3704         indirect dispatch with PIC.
3705
3706 2005-04-18  Andrew Haley  <aph@redhat.com>
3707
3708         * java-except.h (struct eh_range.handler): Remove unused field.
3709         (handle_nested_ranges): Remove function declaration.
3710         (sanity_check_exception_range): Add function declaration.       
3711         * verify.c (verify_jvm_instructions): Remove call to
3712         handle_nested_ranges.
3713         * verify-glue.c (verify_jvm_instructions_new): Call
3714         sanity_check_exception_range.
3715         * except.c (link_handler, eh_range_freelist, link_handler,
3716         handle_nested_ranges): Remove.
3717         (add_handler): Rewrite.
3718         (sanity_check_exception_range): New function.
3719         (print_ranges): New function.
3720
3721 2005-04-13  Julian Brown  <julian@codesourcery.com>
3722
3723         * decl.c (finish_method): Give methods once-only linkage.
3724
3725 2005-04-11  Richard Sandiford  <rsandifo@redhat.com>
3726
3727         * lang.opt: Refer to the GCC internals documentation instead of c.opt.
3728
3729 2005-04-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3730
3731         * java-tree.h: Don't use PARAMS().
3732
3733 2005-04-07  Per Bothner  <per@bothner.com>
3734
3735         * class.c (push_class): By default, suppress debug output.
3736         (finish_class): Enable debug output for classes we're emitting.
3737
3738 2005-04-07  Andrew Haley  <aph@redhat.com>
3739
3740         * gcj.texi: Correct gcj-dbtool instructions.
3741
3742 2005-04-04  Kazu Hirata  <kazu@cs.umass.edu>
3743
3744         * gcj.texi: Fix a typo.
3745         * lang.c: Fix a comment typo.
3746
3747 2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>
3748
3749         * gcj.texi (Invoking gij): Add descriptions of new -X options.
3750         Mention recognized-and-ignored compatibility options.
3751         (Memory allocation): Add descriptions of JvMalloc, JvRealloc and
3752         JvFree.
3753         (About CNI): Add Memory allocation section.
3754
3755 2005-04-01  Tom Tromey  <tromey@redhat.com>
3756
3757         * decl.c (java_init_decl_processing): Fix types of
3758         _Jv_MonitorEnter, _Jv_MonitorExit, _Jv_AllocObject,
3759         _Jv_AllocObjectNoFinalizer, _Jv_Throw, _Jv_NewPrimArray,
3760         _Jv_JNI_PopSystemFrame, _Jv_divI, _Jv_remI, _Jv_divJ, _Jv_remJ.
3761
3762 2005-03-31  Jan Hubicka  <jh@suse.cz>
3763
3764         * Make-lang.in (class.o, decl.o): Depend on cgraph.h.
3765         * class.c: Include cgraph.h
3766         (make_local_functoin_alias): Mark aslias as needed.
3767         * resource.c: Include cgraph.h
3768         (compile_resource_data): Go via cgraph interface.
3769
3770 2005-03-30  Ian Lance Taylor  <ian@airs.com>
3771
3772         * parse.y (maybe_yank_clinit): Don't crash if bbody is NULL.
3773
3774 2005-03-30  Tom Tromey  <tromey@redhat.com>
3775
3776         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): Handle cases where
3777         inner_class_info_index==0 or outer_class_info_index==0.
3778
3779 2005-03-29  Tom Tromey  <tromey@redhat.com>
3780
3781         * gcj.texi (libgcj Runtime Properties): Document
3782         gnu.gcj.runtime.endorsed.dirs.
3783
3784 2005-03-24  Anthony Green  <green@redhat.com>
3785
3786         * gcj.texi (Invoking gcj-dbtool): Document new LIBDIR option to
3787         'gcj-dbtool -p'.
3788
3789 2005-03-23  Tom Tromey  <tromey@redhat.com>
3790
3791         * decl.c (GCJ_CURRENT_BC_ABI_VERSION): New define.
3792         (parse_version): Use it.
3793
3794 2005-03-23  Joseph S. Myers  <joseph@codesourcery.com>
3795
3796         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
3797
3798 2005-03-18  Andrew Haley  <aph@redhat.com>
3799
3800         PR java/20522
3801         * decl.c (update_aliases): Don't update variables that are about
3802         to die.
3803         (maybe_poplevels): Add comment.
3804
3805 2005-03-17  Bryce McKinlay  <mckinlay@redhat.com>
3806
3807         PR java/20502
3808         * jcf-parse.c (duplicate_class_warning): New function.
3809         (java_parse_file): Call duplicate_class_warning if 
3810         CLASS_FROM_CURRENTLY_COMPILED_P is already set.
3811         (parse_zip_file_entries): Likewise. Also set
3812         CLASS_FROM_CURRENTLY_COMPILED_P.
3813
3814 2005-03-16  Andrew Haley  <aph@redhat.com>
3815
3816         * expr.c (expand_java_arrayload): Don't generate a
3817         NullPointerException based on the type of the node.
3818         (build_java_array_length_access): Likewise.
3819
3820 2005-03-15  Zack Weinberg  <zack@codesourcery.com>
3821
3822         * Make-lang.in (TEXI_JAVA_FILES): Add gcc-vers.texi.
3823
3824 2005-03-11  Tom Tromey  <tromey@redhat.com>
3825
3826         * gcj.texi (Invoking gcj-dbtool): Document 'gcj-dbtool -p'.
3827         (libgcj Runtime Properties): Document the default .db.
3828
3829 2005-03-10  Ranjit Mathew  <rmathew@hotmail.com>
3830
3831         PR java/20312
3832         * parse.y (checks_throws_clauses): Check exceptions list even when
3833         the base class does not come from a source file being compiled.
3834         (java_complete_lhs): Remove unused variable 'wfl'.
3835
3836 2005-03-09  Ranjit Mathew  <rmathew@hotmail.com>
3837
3838         PR java/20338
3839         * decl.c (finish_method): Emit _Jv_InitClass for private static
3840         methods inside inner classes as well.
3841
3842 2005-03-08  Julian Brown  <julian@codesourcery.com>
3843         * Revert patch from 2005-03-08 for causing bootstrap failure on
3844         ppc-darwin.
3845
3846 2005-03-08  Julian Brown  <julian@codesourcery.com>
3847
3848         * decl.c (finish_method): Give methods once-only linkage.
3849
3850 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3851
3852         * lang.c (flag_new_verifier): Enable by default, regardless of ABI.
3853
3854 2005-03-07  Bryce McKinlay  <mckinlay@redhat.com>
3855
3856         * verify-glue.c (vfy_is_assignable_from): Perform static check using
3857         can_widen_reference_to if the C++ ABI is in use.
3858         (vfy_get_interface_count, vfy_get_interface): Remove unused functions.
3859         * verify-impl.c (debug_print, make_utf8_const, init_type, copy_type,
3860         type_isresolved, init_state, set_pc, state_get_pc,
3861         _Jv_BytecodeVerifier): Clean up unused and disabled functions.
3862         (verify_fail): Report the current PC from the verifier context.
3863         (free_state): Remove #if 0 block to enable this function.
3864         (free_verifier_context): Call free_state on state_list iterator
3865         values before freeing them.
3866         * expr.c (pop_type_0): Pop correct type for error message when stack
3867         contains a multi-word type.
3868
3869 2005-03-07  Ranjit Mathew  <rmathew@hotmail.com>
3870
3871         * expr.c (build_java_array_length_access): Remove !flag_new_verifier
3872         for known NULL array length access.
3873
3874 2005-03-07  Tom Tromey  <tromey@redhat.com>
3875
3876         * gcj.texi (Invoking gcj-dbtool): Document '-f'.
3877
3878 2005-03-06  Kazu Hirata  <kazu@cs.umass.edu>
3879
3880         * jcf-dump.c, jcf-io.c, jcf-reader.c, lang.c, parse.h,
3881         typeck.c: Update copyright.
3882
3883 2005-03-06  Ranjit Mathew  <rmathew@hotmail.com>
3884
3885         Remove xref code.
3886         * xref.c, xref.h: Remove file.
3887         * Make-lang.in (java/xref.o): Remove.
3888         * java-tree.h (flag_emit_xref, do_not_fold): Remove declaration.
3889         * lang.c (flag_emit_xref): Remove definition.
3890         * parse.h (DECL_END_SOURCE_LINE, DECL_INHERITED_SOURCE_LINE): Remove.
3891         * typeck.c (convert): Remove use of do_not_fold.
3892         * parse.y (do_not_fold): Remove definition.
3893         (parser grammar): Remove xref code.
3894         (maybe_create_class_interface_decl, create_class): Likewise.
3895         (register_fields, method_header, finish_method_declaration): Likewise.
3896         (declare_local_variables, source_end_java_method): Likewise.
3897         (java_complete_expand_classes): Do not set do_not_fold.
3898         (java_complete_expand_method): Remove xref code.
3899         (java_expand_classes, resolve_field_access, patch_invoke): Likewise.
3900         (java_complete_tree, java_complete_lhs, patch_assignment): Likewise.
3901         (patch_binop, build_string_concatenation, patch_array_ref): Likewise.
3902         (patch_synchronized_statement, patch_throw_statement): Likewise.
3903         (maybe_build_class_init_for_field): Likewise.
3904
3905 2005-03-05  Kazu Hirata  <kazu@cs.umass.edu>
3906
3907         * expr.c (build_expr_wfl, expr_add_location): Use TYPE_P
3908         instead of IS_NON_TYPE_CODE_CLASS.
3909
3910 2005-03-04  Andrew Haley  <aph@redhat.com>
3911
3912         PR java/18362
3913         * class.c (set_method_index): Don't set method_index if it is
3914         NULL_TREE.
3915         (layout_class_method): Don't complain about "non-static method foo
3916         overrides static method" in the case of indirect dispatch.
3917
3918 2005-03-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3919
3920         * jcf-io.c (caching_stat): Use __extension__ to avoid pedantic
3921         warning.
3922         * Make-lang.in: Don't elide warnings in jcf-io.c.
3923
3924 2005-03-01  Per Bothner  <per@bothner.com>
3925
3926         PR java/8608
3927         * check-init.c (wfl): Remove static.
3928         (final_assign_error, check_init): Replace calls to parse_error_context
3929         by plain error.
3930         (check_init): Save, set, and restore input_location for each exp.
3931
3932 2005-03-01  Per Bothner  <per@bothner.com>
3933
3934         * jcf-reader.c (get_attribute): Handle SourceDebugExtension (JSR 45)
3935         if HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE is defined.
3936         * jcf-dump.c (HANDLE_SOURCEDEBUGEXTENSION_ATTRIBUTE): Print contents.
3937
3938 2005-03-01  Per Bothner  <per@bothner.com>
3939
3940         * java-tree.h (IDENTIFIER_HANDLECLASS_VALUE): Remove ancient macro.
3941
3942 2005-02-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
3943
3944         PR libgcj/16923
3945         * gcj.texi (Invocation): Add descriptions of JvVMInitArgs and
3946         JvVMOption.
3947
3948 2005-02-22  Tom Tromey  <tromey@redhat.com>
3949
3950         PR java/20056:
3951         * verify-impl.c (EITHER): New define.
3952         (types_compatible): Handle it.
3953         (check_field_constant): Use it.
3954
3955 2005-02-18  Tom Tromey  <tromey@redhat.com>
3956
3957         PR java/20056:
3958         * verify-impl.c (types_equal): Fixed test.
3959
3960         PR java/20056:
3961         * verify-glue.c (vfy_class_has_field): New function.
3962         * verify.h (vfy_class_has_field): Declare.
3963         * verify-impl.c (check_field_constant): Added 'putfield'
3964         argument.
3965         (verify_instructions_0): Updated.
3966         (types_equal): New function.
3967
3968 2005-02-14  Tom Tromey  <tromey@redhat.com>
3969
3970         PR java/19921:
3971         * jcf-write.c (generate_bytecode_insns) <CALL_EXPR>: Note the
3972         stack effect of multianewarray.
3973
3974 2005-02-14  Andrew Haley  <aph@redhat.com>
3975
3976         PR java/19907
3977         * expr.c (expand_byte_code): Call promote_arguments().
3978         (promote_arguments): New function.
3979         * decl.c (check_local_unnamed_variable): Remove special case for
3980         new verifier.
3981         (find_local_variable): Promote all boolean types to int
3982         when searching for local variable decls.
3983
3984 2005-02-12  Kazu Hirata  <kazu@cs.umass.edu>
3985
3986         * builtins.c, java-except.h, jcf-parse.c, jv-scan.c, lex.c,
3987         parse-scan.y: Update copyright.
3988
3989 2005-02-11  Per Bothner  <per@bothner.com>
3990
3991         PR java/15543
3992         * parse-scan.y (input_location): Remove variable.
3993         (main_input_filename): New - replaces input_filename, which isn't
3994         settable if USE_MAPPED_LOCATION.
3995         * lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
3996         so we don't reference input_location or wfl_operator in that case.
3997         * jv-scan.c (expand_location): Remove - no longer used.
3998         (main): Set main_input_filename rather than input_filename.
3999
4000 2005-02-09  Richard Henderson  <rth@redhat.com>
4001
4002         * builtins.c (initialize_builtins): Call build_common_builtin_nodes.
4003         * decl.c (java_init_decl_processing): Initialize const_ptr_type_node.
4004
4005 2005-02-08  Marcin Dalecki  <martin@dalecki.de>
4006
4007         * expr.c (add_type_assertion): Use the proper enumeration type,
4008         since this is what htab_find_slot() is expecting.
4009
4010 2005-02-06  Joseph S. Myers  <joseph@codesourcery.com>
4011
4012         * gcj.texi: Update copyright dates.
4013
4014 2005-02-02  Tom Tromey  <tromey@redhat.com>
4015
4016         * gcj.texi (libgcj Runtime Properties): Default library_control
4017         to 'cache'.
4018
4019 2005-02-02  Ranjit Mathew  <rmathew@hotmail.com>
4020
4021         PR java/15543
4022         * parse-scan.y (formal_parameter): Use $2 (type) instead of $$
4023         (modifiers) when square brackets are present in a declaration for
4024         a final paramter.
4025         * jv-scan.c (main): Set input_filename and input_line.
4026
4027 2005-02-01  Tom Tromey  <tromey@redhat.com>
4028
4029         PR java/19742:
4030         * gjavah.c (get_field_name): Don't override name for JNI header.
4031
4032 2005-02-01  Roger Sayle  <roger@eyesopen.com>
4033
4034         * jcf-write.c (generate_bytecode_insns): Implement RSHIFT_EXPR
4035         of unsigned types using iushr and lushr JVM bytecodes.
4036
4037 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4038
4039         PR java/19738
4040         * gjavah.c (jni_print_float): Do not emit floating-point
4041         initialiser for a static final field.
4042         (jni_print_double): Likewise.
4043
4044 2005-02-01  Mark Mitchell  <mark@codesourcery.com>
4045
4046         Revert:
4047         2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4048         * gjavah.c (print_field_info): Mark static data members of
4049         floating-point type with "__extension__".
4050
4051 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
4052
4053         * gjavah.c (print_field_info): Mark static data members of
4054         floating-point type with "__extension__".
4055
4056 2005-02-01  Ranjit Mathew  <rmathew@hotmail.com>
4057
4058         PR java/9157
4059         * parse.y (build_string_concatenation): Remove redundant if.
4060         (patch_conditional_expr): Attempt to patch_string() the condition
4061         of a ?: as well, in addition to its other operands.
4062
4063 2005-01-25  Tom Tromey  <tromey@redhat.com>
4064
4065         * Make-lang.in (java/java-tree-inline.o): Removed.
4066
4067 2005-01-25  Ranjit Mathew  <rmathew@hotmail.com>
4068
4069         PR java/19070
4070         * parse.y (patch_binop): Allow comparisons against NULL only
4071         if the other operand is of a reference type.
4072
4073 2005-01-24  Tom Tromey  <tromey@redhat.com>
4074
4075         * java-tree.h (gcj_abi_version): Declare.
4076         * class.c (make_class_data): Push gcj_abi_version into "next"
4077         field.  Renamed field.
4078         * decl.c (gcj_abi_version): New global.
4079         (parse_version): New function.
4080         (java_init_decl_processing): Call it.  Renamed 'next' field.
4081         Include version.h.
4082         (GCJ_BINARYCOMPAT_ADDITION): New define.
4083
4084 2005-01-24  Roger Sayle  <roger@eyesopen.com>
4085
4086         PR java/19295
4087         * jcf-write.c (generate_bytecode_insns): Conversions between
4088         integer types of the same precision shouldn't generate widening
4089         or narrowing conversion bytecodes.
4090
4091 2005-01-22  Kazu Hirata  <kazu@cs.umass.edu>
4092
4093         * java-except.h, java-tree.h: Remove unused prototypes.
4094
4095 2005-01-20  Andrew Pinski  <pinskia@gcc.gnu.org>
4096
4097         PR java/18091:
4098         * jcf-write.c (perform_relocations): Don't call memcpy if source
4099         and destination are the same.
4100
4101 2005-01-17  Tom Tromey  <tromey@redhat.com>
4102
4103         * verify-impl.c (get_short): Sign extend.
4104         (get_int): Likewise.
4105
4106 2005-01-12  Ranjit Mathew  <rmathew@hotmail.com>
4107
4108         * expr.c (build_jni_stub): Replace mistaken use of TYPE_SIZE_UNIT
4109         with TYPE_SIZE.
4110
4111 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4112
4113         * verify.c: Revert to the version before the BC-ABI merge.
4114
4115 2005-01-10  Ranjit Mathew  <rmathew@hotmail.com>
4116
4117         PR java/19277
4118         * check-init.c (check_init): Take care of references that do not
4119         have an explicit final variable declaration (e.g. array length
4120         access) for pre/post in/de-crement operators.
4121
4122 2005-01-08  Mark Wielaard  <mark@klomp.org>
4123
4124         * parse.y (process_imports): Allocate (and free) original_name only
4125         when not already defined.
4126         * jcf-parse.c (read_class): Free results of find_class() and
4127         lrealpath().
4128         (java_parse_file): Keep pointer to head of file_list and free when
4129         done. Free result of lrealpath().
4130
4131 2005-01-05  Tom Tromey  <tromey@redhat.com>
4132
4133         * gcj.texi (Standard Properties): java.ext.dirs is now used.
4134
4135 2004-12-20  Andrew Haley  <aph@redhat.com>
4136
4137         * typeck.c: Use fold_convert for ints and booleans.
4138
4139 2004-12-17  Andrew Haley  <aph@redhat.com>
4140
4141         PR java/18931
4142         * typeck.c (convert): Use a CONVERT_EXPR when converting to
4143         BOOLEAN_TYPE or CHAR_TYPE.
4144         (convert_to_boolean, convert_to_char) : Remove.
4145         * convert.h (convert_to_boolean, convert_to_char) : Remove.
4146         * expr.c (expand_load_internal): Do type conversion if type is not
4147         as required.
4148
4149 2004-12-13  Danny Smith  <dannysmith@users.sourceforge.net>
4150
4151         PR target/18459
4152         * class.c (emit_register_classes): Use TARGET_USE_JCR_SECTION.
4153         Update comment.
4154
4155 2004-12-07  Andrew Haley  <aph@redhat.com>
4156
4157         PR java/18811:
4158         * jcf-parse.c (load_class): Remove sanity test for missing inner
4159         class file.
4160
4161 2004-12-06  Tom Tromey  <tromey@redhat.com>
4162
4163         * Make-lang.in (JAVA_MANFILES): Added gcj-dbtool.
4164         (java.uninstall): Likewise.
4165         (java.maintainer-clean): Likewise.
4166         (.INTERMEDIATE): Likewise.
4167         (java.install-man): Likewise.
4168         (gcj-dbtool.pod): New target.
4169         * gcj.texi (Code Generation): Document -findirect-dispatch.
4170         (libgcj Runtime Properties): Document
4171         gnu.gcj.precompiled.db.path.
4172         (Top): Link to "Invoking gcj-dbtool".
4173
4174 2004-12-06  Tom Tromey  <tromey@redhat.com>
4175
4176         PR java/14853:
4177         * java-tree.h (extract_field_decl): Declare.
4178         * parse.y (extract_field_decl): Renamed from
4179         strip_out_static_field_access_decl.  No longer static.
4180         * check-init.c (get_variable_decl): Unwrap COMPOUND_EXPRs.
4181
4182 2004-12-03  Tom Tromey  <tromey@redhat.com>
4183
4184         * lang.c (flag_new_verifier): Define.
4185         (java_post_options): Set flag_new_verifier if indirect dispatch
4186         is being used.
4187         * lang.opt (fnew-verifier): Removed.
4188
4189 2004-12-03  Tom Tromey  <tromey@redhat.com>
4190
4191         PR bootstrap/14614:
4192         * Make-lang.in (java.install-common): Only install transformed
4193         gcjh if gcj-cross exists.
4194
4195 2004-12-03  Andrew Haley  <aph@redhat.com>
4196
4197         PR java/18812
4198         * except.c (link_handler): Patch 'outer' field of siblings of the
4199         range we're demoting.
4200
4201 2004-12-03  Andrew Haley  <aph@redhat.com>
4202
4203         PR java/18697
4204         * class.c (layout_class_method): Don't fail to override a method
4205         simply because it has DECL_ARTIFICIAL set.
4206
4207 2004-12-02  Tom Tromey  <tromey@redhat.com>
4208
4209         PR java/16675:
4210         * parse.y (craft_constructor): Special case null_pointer_node.
4211
4212 2004-12-02  Tom Tromey  <tromey@redhat.com>
4213
4214         PR java/18741:
4215         * java-gimplify.c (java_gimplify_expr): Don't call
4216         SET_EXPR_LOCATION unless wrapped tree is an expression.
4217
4218 2004-11-27  Per Bothner  <per@bothner.com>
4219
4220         * jcf-parse.c (set_source_filename):  Improvement to Andrew's fix:
4221         Fix fencepost error in 'i', which got executed one too many times.
4222         Also, fold memcpy into explicit loop, as originally intended.
4223         Also, free temporary 'buf' which otherwise leaks.
4224
4225 2004-11-27  Per Bothner  <per@bothner.com>
4226
4227         * expr.c (build_expr_wfl): Only declare last_file and last_filenode
4228         local static variables if not USE_MAPPED_LOCATION.
4229
4230 2004-11-27  Kazu Hirata  <kazu@cs.umass.edu>
4231
4232         * class.c, decl.c, expr.c: Fix comment typos.
4233
4234 2004-11-26  Andrew Pinski  <pinskia@physics.uc.edu>
4235
4236         PR java/18305
4237         * decl.c (end_java_method): Call
4238         attach_init_test_initialization_flags on all the init_decls.
4239         * parse.y (attach_init_test_initialization_flags): Move to ...
4240         * expr.c (attach_init_test_initialization_flags): here and
4241         support BIND_EXPR also.
4242         * java-tree.h (attach_init_test_initialization_flags): Prototype.
4243         * jcf-parse.c (parse_class_file): Don't disable class init
4244         optimization.
4245
4246 2004-11-25  Joseph S. Myers  <joseph@codesourcery.com>
4247
4248         * gjavah.c, jcf-dump.c, jv-scan.c, jvspec.c: Avoid ` as left quote
4249         in diagnostics.
4250
4251 2004-11-24  Richard Henderson  <rth@redhat.com>
4252
4253         * verify-glue.c (vfy_init_name, vfy_clinit_name, vfy_object_type,
4254         vfy_string_type, vfy_throwable_type): Use ANSI declaration form.
4255
4256 2004-11-24  Tom Tromey  <tromey@redhat.com>
4257
4258         * verify.c (defer_merging): Don't use C++-style comment.
4259         * verify.h (java_opcode): Added java_opcode_end.
4260         * class.c (build_class_ref): Remove C++ comment and old FIXME.
4261
4262         * verify-impl.c (vfy_push_type): Removed bogus "return".
4263         (initialize_stack): Use vfy_alloc and vfy_free.
4264         (verify_instructions_0): Likewise.
4265
4266         * Merged gcj-abi-2-dev-branch to trunk.
4267
4268 2004-11-24  Andrew Haley  <aph@redhat.com>
4269
4270         * jcf-parse.c (parse_class_file): Set file_start_location.
4271
4272 2004-11-10  Tom Tromey  <tromey@redhat.com>
4273
4274         * class.c (make_field_value): Don't call build_static_field_ref.
4275         (build_static_field_ref): Don't emit direct references when using
4276         indirect dispatch.
4277
4278         * gcj.texi (Invoking gij): Document -verbose.  Put -verbose and
4279         -verbose:class into man page synopsis.
4280
4281 2004-11-09  Tom Tromey  <tromey@redhat.com>
4282
4283         * expr.c (build_java_arraystore_check): Still generate check if
4284         element type is itself an array.
4285
4286 2004-11-08  Tom Tromey  <tromey@redhat.com>
4287
4288         * java-tree.h (soft_check_assignment_node): Removed.
4289         (enum java_tree_index): Removed JTI_SOFT_CHECK_ASSIGNMENT_NODE.
4290         * decl.c (java_init_decl_processing): Don't initialize
4291         soft_check_assignment_node.
4292
4293 2004-11-05  Tom Tromey  <tromey@redhat.com>
4294
4295         * class.c (layout_class_methods): Don't add Miranda methods when
4296         using indirect dispatch.
4297
4298 2004-11-05  Bryce McKinlay  <mckinlay@redhat.com>
4299
4300         * class.c (make_class_data): Call emit_assertion_table to set the
4301         'assertion_table' field.
4302         (build_signature_for_libgcj): Move here from expr.c.
4303         (add_assertion_table_entry): New function. Callback for assertion
4304         hashtable traversal.
4305         (emit_assertion_table): New. Take class argument, and generate
4306         assertion table DECL based on the TYPE_ASSERTIONS hashtable.
4307         * decl.c (init_decl_processing): Define assertion_entry_type record.
4308         Push 'assertion_table' class field instead of 'verify'.
4309         * expr.c (type_assertion_eq): Compare 'assertion_code' field.
4310         (type_assertion_hash): Include 'assertion_code' in hash.
4311         (add_type_assertion): Rewritten. Take class and assertion_code
4312         arguments. Add assertions to the TYPE_ASSERTIONS hashtable.
4313         (can_widen_reference_to): Use new add_type_assertion() arguments.
4314         * java-tree.h (java_tree_index): Add JTI_ASSERTION_ENTRY_TYPE,
4315         JTI_ASSERTION_TABLE_TYPE. Remove JTI_VERIFY_IDENTIFIER_NODE.
4316         (verify_identifier_node): Removed.
4317         (assertion_entry_type, assertion_table_type): New.
4318         (ASSERTION_TYPES_COMPATIBLE, ASSERTION_IS_INSTANTIABLE): New. Type
4319         assertion code definitions.
4320         (struct type_assertion): Add assertion_code. Rename 'source_type' and
4321         'target_type' to 'op1' and 'op2'.
4322         (add_type_assertion): Declare.
4323         (lang_printable_name_wls): Remove unused definition.
4324         * verify-glue.c: (vfy_is_assignable_from): New. Call add_type_assertion
4325         to emit runtime assertion.
4326         (vfy_note_stack_type): Clean up non-C90 declarations.
4327         (vfy_note_local_type): Likewise.
4328         * verify.h (vfy_is_assignable_from): Declare.
4329         * verify-impl.c (is_assignable_from_slow): Remove unused function.
4330         (ref_compatible): Rename arguments. Call vfy_is_assignable_from()
4331         instead of is_assignable_from_slow().
4332         (types_compatible): Reinstate ref_compatible() call.
4333
4334 2004-11-04  Tom Tromey  <tromey@redhat.com>
4335
4336         * class.c (build_static_field_ref): Reverted previous patch.
4337
4338         * class.c (build_static_field_ref): Don't emit direct references
4339         when using indirect dispatch.
4340
4341 2004-11-03  Tom Tromey  <tromey@redhat.com>
4342
4343         * expr.c (expand_java_arrayload): Set lhs_type_node.
4344         (expand_java_arraystore): Set rhs_type_node.
4345
4346 2004-11-02  Tom Tromey  <tromey@redhat.com>
4347
4348         * jcf-parse.c (compute_class_name): Use filename length from zip
4349         directory, not strlen.
4350
4351         * expr.c (expand_invoke): Mark new interface methods as abstract.
4352
4353 2004-11-01  Tom Tromey  <tromey@redhat.com>
4354
4355         * verify-impl.c (push_jump): Removed check for uninitialized
4356         objects.
4357         (push_exception_jump): Likewise.
4358         (handle_ret_insn): Likewise.
4359         (handle_jsr_insn): Likewise.
4360         (state_check_no_uninitialized_objects): Removed.
4361
4362         * decl.c (check_local_unnamed_variable): Recognize
4363         promoted-to-int parameters when using the new verifier.
4364         * expr.c (expand_java_arraystore): Explicitly request array type
4365         when using new verifier.
4366         (expand_java_arrayload): Likewise.
4367         (invoke_build_dtable): Don't pass object_type_node as
4368         expression argument to build_java_indirect_ref.
4369         (build_java_check_indexed_type): Do nothing.
4370         (build_java_arraystore_check): Handle case where array doesn't
4371         have array type.
4372         (build_java_array_length_access): Likewise.
4373         (expand_invoke): Handle case where interface overrides a method
4374         from Object.
4375         (pop_type_0): Always succeed for reference types.
4376         (process_jvm_instruction): Don't pop a value in a dead
4377         exception handler.
4378         (pop_arguments): Convert arguments to correct types.
4379
4380 2004-10-29  Andrew Haley  <aph@redhat.com>
4381
4382         * jcf-parse.c (give_name_to_class): Remove line that was
4383         incorrectly merged.
4384
4385 2004-10-29  Andrew Haley  <aph@redhat.com>
4386
4387         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4388
4389 2004-10-20  Andrew Haley  <aph@redhat.com>
4390
4391         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4392
4393 2004-10-26  Tom Tromey  <tromey@redhat.com>
4394
4395         * verify.h (vfy_notify_verified): Removed.
4396         * verify-glue.c (vfy_notify_verified): Removed.
4397
4398 2004-10-26  Tom Tromey  <tromey@redhat.com>
4399
4400         * verify-impl.c (debug_print_state): Declare `i' before code.
4401         (merge_types): Modify `t' when it is null_type.
4402
4403 2004-10-26  Tom Tromey  <tromey@redhat.com>
4404
4405         * verify-impl.c (type_print): Renamed from print.  Now static and
4406         takes an argument.
4407         (debug_print_state): Use type_print.
4408
4409 2004-10-25  Tom Tromey  <tromey@redhat.com>
4410
4411         * expr.c (build_invokeinterface): Compute correct offset for
4412         index into interface methods.
4413
4414 2004-10-20  Tom Tromey  <tromey@redhat.com>
4415
4416         * java-tree.h (verify_jvm_instructions_new): Declare.
4417
4418         * jvspec.c (jvgenmain_spec): Remove -fnew-verifier from cc1
4419         command line.
4420
4421         * verify-impl.c (verify_instructions): Correctly handle wide
4422         types on the stack.
4423         * verify-glue.c (vfy_get_class_name): Use DECL_NAME.
4424         (vfy_get_component_type): Strip pointer types.
4425         (vfy_find_class): Use get_type_from_signature.  Strip pointer
4426         types.
4427         Include java-except.h.
4428
4429 2004-10-20  Bryce McKinlay  <mckinlay@redhat.com>
4430
4431         * verify-impl.c (type_array_elementpop_raw, vfy_pop_type_t,
4432         vfy_push_type_t, set_variable, add_new_state, merge_into,
4433         handle_jsr_insn, branch_prepass, check_class_constant,
4434         check_wide_constant, get_one_type, compute_static_types,
4435         verify_instructions_0): Clean up C99 declarations after statements.
4436
4437 2004-10-20  Tom Tromey  <tromey@redhat.com>
4438
4439         * verify-impl.c (merge_refs): Compare reference against iterator,
4440         not ref2.
4441
4442         * verify-glue.c (vfy_tag): Mask off resolved flag.
4443
4444 2004-10-19  Tom Tromey  <tromey@redhat.com>
4445
4446         * verify-impl.c (verify_instructions): Call vfy_note_local_type.
4447         (init_state_with_stack): Initialize `this_type' in state.
4448         (verify_method): Use debug_print.
4449         * verify-glue.c (vfy_is_primitive): Removed debugging print.
4450         (vfy_note_stack_depth): Reverted last patch.
4451         (vfy_note_stack_type): Note pointer to Object, not Object.
4452         (vfy_note_local_type): Likewise.
4453
4454         * verify.h (vfy_note_instruction_seen): Declare.
4455         * verify-glue.c (verify_jvm_instructions_new): Set
4456         BCODE_EXCEPTION_TARGET on target instruction.
4457         (vfy_note_instruction_seen): New function.
4458         * verify-impl.c (FLAG_INSN_SEEN): New define.
4459         (verify_instructions_0): Set flag on instruction.  Save state for
4460         PC=0 later.
4461         (verify_instructions): Call vfy_note_instruction_seen.
4462
4463         * verify-glue.c (vfy_note_stack_depth): Fix off-by-one error.
4464         (verify_jvm_instructions_new): Call method_init_exceptions,
4465         add_handler, and handle_nested_ranges.
4466         * verify-impl.c (verify_method): Return 1 on success.
4467         (verify_instructions_0): Save the state at PC=0.
4468
4469         * verify-impl.c (init_type_from_class): Set is_resolved and
4470         ref_next on new ref_intersection.
4471         (init_type_from_string): Likewise.
4472
4473 2004-10-15  Bryce McKinlay  <mckinlay@redhat.com>
4474
4475         * expr.c (expand_bytecode): Use verify_jvm_instructions_new
4476         if flag_new_verifier is set.
4477         * java-tree.h (flag_new_verifier): Declare.
4478         * lang.opt (fnew-verifier): New option.
4479         * verify-impl.c: Work around namespace pollution by undef'ing
4480         'current_class'.
4481         (struct verifier_context): Make 'bytecode' const.
4482         (verify_fail_pc): Pass -1 PC argument to vfy_fail.
4483         (types_compatible): For the BC-ABI, always consider reference types
4484         compatible.
4485         (check_class_constant): Use vfr->current_class.
4486         (check_constant): Likewise.
4487         (check_wide_constant): Likewise.
4488         (check_field_constant): Check for 'L' at start of type name.
4489         (get_one_type): Return pointer instead of type. Set type result in
4490         caller via passed type pointer.
4491         (compute_argument_types): Update to use new get_one_type arguments.
4492         (compute_return_type): Likewise.
4493         (make_verifier_context): New. Allocate and initialize 'vfr'.
4494         (free_verifier_context): New. Free 'vfr' and its contents.
4495         (verify_method): Remove ATTRIBUTE_UNUSED. Call make_verifier_context
4496         and free_verifier_context.
4497
4498 2004-10-15  Tom Tromey  <tromey@redhat.com>
4499
4500         * verify-glue.c (vfy_note_local_type): Mark argument as unused.
4501         * verify.h (vfy_fail): Fixed formatting.
4502
4503         * verify-impl.c (vfr): Fixed comment formatting.
4504         (collapse_type): New function.
4505         (verify_instructions): Notify compiler about type map.
4506         * verify.h (vfy_note_stack_depth): Updated.
4507         (vfy_note_stack_type): Likewise.
4508         (vfy_note_local_type): Likewise.
4509         (vfy_unsuitable_type, vfy_return_address_type, vfy_null_type):
4510         Declare.
4511         * verify-glue.c (vfy_note_stack_depth): Correctly size type
4512         state.  Added `method' argument.
4513         (vfy_note_stack_type): Renamed from vfy_note_type.  Added `method'
4514         argument.
4515         (vfy_note_local_type): New function.
4516         (vfy_unsuitable_type): Likewise.
4517         (vfy_return_address_type): Likewise.
4518         (vfy_null_type): Likewise.
4519
4520         * verify.h (VFY_IN_GCC): Removed.
4521         (VFY_WANT_TYPEMAP): Removed.
4522         * verify-impl.c (verify_instructions_0): Removed useless "\".
4523         (struct state) <next>: Uncomment.
4524
4525 2004-10-13  Bryce McKinlay  <mckinlay@redhat.com>
4526
4527         * verify-impl.c: Formatting fixes. Reformat C++-style comments to
4528         C-style.
4529
4530 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4531
4532         * Make-lang.in (verify.o): Re-enabled this target.
4533         * verify-glue.c (vfy_get_interface_count): Add ATTRIBUTE_UNUSED.
4534         (vfy_get_interface): Likewise.
4535         (verify_jvm_instructions_new): Renamed from verify_jvm_instructions.
4536         * verify.h (verify_jvm_instructions_new): Declare.
4537         * verify-impl.c (free_state): Temporarily comment out unused
4538         function.
4539
4540 2004-10-06  Tom Tromey  <tromey@redhat.com>
4541
4542         * java-tree.h (JV_STATE_READ): New enum value.
4543
4544 2004-10-06  Bryce McKinlay  <mckinlay@redhat.com>
4545
4546         * verify.h: New file.
4547
4548 2004-10-05  Bryce McKinlay  <mckinlay@redhat.com>
4549
4550         * verify-impl.c, verify-glue.c, verify.h: New files.
4551         * Make-lang.in: Add rules for verify-impl.o and verify-glue.o.
4552
4553 2004-09-24  Andrew Haley  <aph@redhat.com>
4554
4555         * decl.c (check_local_unnamed_variable): Always use the PARM_DECL
4556         for a slot if it's of pointer type.
4557
4558 2004-09-14  Tom Tromey  <tromey@redhat.com>
4559
4560         * class.c (make_class_data): Correctly initialize "state" field.
4561         Initialize "engine" field.
4562         * decl.c (java_init_decl_processing): Add "engine" field.
4563
4564 2004-09-10  Andrew Haley  <aph@redhat.com>
4565
4566         PR java/12760
4567         * expr.c (build_invokeinterface): Use fast method for interface
4568         dispatch.
4569         * java-tree.h (enum java_tree_index): Add JTI_ITABLE_TYPE,
4570         JTI_ITABLE_PTR_TYPE.
4571         (struct lang_type): Add  itable_methods, itable_decl, itable_syms_decl.
4572         (emit_symbol_table): Add new arg, element_size.
4573         * decl.c (java_init_decl_processing): Initialize Class.itable.
4574         * class.c (GEN_TABLE): New macro.
4575         (gen_indirect_dispatch_tables): Use it.  Add itable.
4576         (make_class_data): Add new arg for emit_symbol_table().
4577         Emit itable.
4578         (add_miranda_methods): Make sure search_class has been parsed.
4579         (emit_symbol_table): Add new arg, element_size.
4580
4581 2004-09-06  Andrew Haley  <aph@redhat.com>
4582
4583         * verify.c (merge_types): Return Object for all merges of
4584         interfaces.
4585         * expr.c (add_type_assertion): Don't generate assertions when
4586         source type is array of Object.
4587
4588 2004-09-03  Andrew Haley  <aph@redhat.com>
4589
4590         * class.c (finish_class): Nullify TYPE_VERIFY_METHOD.
4591
4592         * lang.c (java_post_options): Force flag_verify_invocations if
4593         we're not using indirect dispatch.
4594
4595         * expr.c (pop_type_0): Move test for interfaces before call to
4596         can_widen_reference_to().
4597         (build_signature_for_libgcj): Remove generation of canonical array
4598         type.
4599         (add_type_assertion): Canonicalize both arrays.
4600         Don't assert that type X can be assigned to Object.
4601         Don't assert that type X an be assigned to type X.
4602         Don't assert that Object can be assigned to type X.
4603         (can_widen_reference_to): Warn whenever we generate an assertion.
4604         (process_jvm_instruction): Use throwable_type_node for the type of
4605         an exception class.
4606
4607 2004-09-01  Andrew Haley  <aph@redhat.com>
4608
4609         * decl.c (java_init_decl_processing): Change
4610         verify_identifier_node to "__verify".
4611         * expr.c (add_type_assertion): Use verify_identifier_node for name.
4612         * java-tree.h (verify_identifier_node): Change to "__verify".
4613
4614         * expr.c (build_signature_for_libgcj): New function.
4615         (add_type_assertion): Use it to construct signatures for
4616         source_type and target_type.
4617
4618 2004-08-27  Andrew Haley  <aph@redhat.com>
4619
4620         * java-tree.h (enum java_tree_index): Add JTI_VERIFY_IDENTIFIER_NODE.
4621         (verify_identifier_node): New.
4622         (TYPE_VERIFY_METHOD): New.
4623         (struct type_assertion): New type.
4624         * expr.c (type_assertion_eq): New function.
4625         (type_assertion_hash): New function.
4626         (add_type_assertion): New function.
4627         (can_widen_reference_to): Call add_type_assertion().
4628         * decl.c (java_init_decl_processing): Add verify_identifier_node.
4629         * class.c (make_class_data): Initialize TYPE_VERIFY_METHOD (type).
4630         (finish_class): Output TYPE_VERIFY_METHOD (type).
4631
4632         * decl.c (end_java_method): Nullify unused fields.
4633
4634 2004-08-17  Andrew Haley  <aph@redhat.com>
4635
4636         * verify.c (defer_merging): Quieten.
4637         * jcf-parse.c (load_class): Only try to open a class file if it's
4638         java.lang.Object or if it's part of the current compilation.
4639         Check that the class we just tried to load is the class we just
4640         loaded.  Quieten.
4641         (java_parse_file): Set flag_verify_invocations off if we're
4642         compiling from .class.
4643         (parse_zip_file_entries): Abort if we try to read a dummy class.
4644         * expr.c (can_widen_reference_to): Quieten.
4645         (build_invokevirtual): Abort if we try to invokevirtual an
4646         interface.
4647         (expand_invoke): Don't build a non-interface call to an interface.
4648         (build_instanceof): Don't do premature optimization if
4649         flag_verify_invocations is not set.
4650         * class.c (set_super_info): Disable code that inherits TYPE_DUMMY
4651         from superclass.
4652         (build_static_field_ref): Add correct type conversion for
4653         field_address.
4654         (add_miranda_methods): Disable generation of Miranda methods for
4655         dummy classes.
4656         (layout_class_method): Don't complain about non-static method
4657         overrides static method with dummy classes.
4658
4659 2004-08-13  Tom Tromey  <tromey@redhat.com>
4660
4661         * class.c (build_static_field_ref): Re-enable atable lookups for
4662         static fields.
4663
4664         * parse.y (strip_out_static_field_access_decl): Indentation fix.
4665
4666 2004-08-11  Tom Tromey  <tromey@redhat.com>
4667
4668         * gcj.texi (libgcj Runtime Properties): Document new properties.
4669
4670 2004-08-06  Andrew Haley  <aph@redhat.com>
4671
4672         * jcf-parse.c (load_class): Check that we really have loaded the
4673         class we're looking for.
4674
4675 2004-07-19  Andrew Haley  <aph@redhat.com>
4676
4677         * verify.c (verify_jvm_instructions): Comment change only.
4678
4679         * typeck.c (build_java_array_type): Add size field to array name.
4680
4681         * java-tree.h (LOCAL_SLOT_P): New.
4682         (update_aliases): Add PC argument.
4683         (pushdecl_function_level): New function.
4684
4685         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
4686         MODIFY_EXPR, and SAVE_EXPR.
4687         (java_gimplify_modify_expr): New function.
4688
4689         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
4690         (expand_iinc): Pass PC to update_aliases().
4691         (STORE_INTERNAL): Likewise.
4692         (process_jvm_instruction): Likewise.
4693
4694         * decl.c (base_decl_map): New variable.
4695         (uniq): New variable.
4696         (update_aliases): Rewrite with more thorough checking.
4697         (debug_variable_p): New function.
4698         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
4699         (check_local_named_variable): Delete whole function.
4700         (initialize_local_variable): New function.
4701         (check_local_unnamed_variable): Add checks and comments.
4702         (find_local_variable): Rewrite.
4703         (java_replace_reference): New function.
4704         (function_binding_level): New variable.
4705         (pushdecl_function_level): New function.
4706         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
4707         (maybe_pushlevels): Call pushdecl() on each of the new decls.
4708         (start_java_method): Reset uniq.  Create base_decl_map.  Set
4709         function_binding_level.
4710         (end_java_method): Null unused fields to save memory.
4711
4712 2004-06-29  Andrew Haley  <aph@redhat.com>
4713
4714         * except.c (expand_start_java_handler): Push a new binding level.
4715         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
4716         register_exception_range() to register where we'll do it.
4717         (expand_end_java_handler): Remove old bogus code.  Replace with
4718         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
4719         the top of the expression we're curently building.
4720         (maybe_end_try): Delete.
4721         * decl.c (binding_level.exception_range): New field.
4722         (clear_binding_level): Add field exception_range.  Reformat.
4723         (poplevel): Call expand_end_java_handler().
4724         (poplevel): Call java_add_stmt only if functionbody is false.
4725         (maybe_poplevels): Don't call maybe_end_try() from here.
4726         (end_java_method): Clear no longer used trees in function decl.
4727         (register_exception_range): New function.
4728         * java-tree.h (register_exception_range, struct eh_range): Declare.
4729
4730 2004-06-22  Andrew Haley  <aph@redhat.com>
4731
4732         * class.c (gen_indirect_dispatch_tables): Set the DECL_OWNER of
4733         the otable.
4734         * check-init.c (get_variable_decl): Teach check-init about
4735         FIELD_DECLs addressed via the otable.
4736         * jcf-parse.c (load_class): Check CLASS_LOADED_P, not
4737         CLASS_PARSED_P.
4738
4739 2004-05-28  Andrew Haley  <aph@redhat.com>
4740
4741         * jcf-parse.c (load_class): Don't try to read a class that we've
4742         already read.
4743
4744         * expr.c (build_invokeinterface): Use the old-fashioned way of
4745         doing indirect dispatch: look up interfaces by name.
4746         * java-tree.h (enum java_tree_index): Add
4747         JTI_SOFT_LOOKUPINTERFACEMETHODBYNAME_NODE
4748         * decl.c (java_init_decl_processing): Add
4749         soft_lookupinterfacemethodbyname_node.
4750
4751         * gjavah.c (print_method_info): Final methods have vtable entries,
4752         so gjavah needs to output them.
4753         * class.c (layout_class_method): Generate vtable entries for final
4754         methods.
4755         * parse.y (invocation_mode): Use INVOKE_VIRTUAL for indirect
4756         dispatch, even if a method is final.
4757
4758 2004-05-25  Andrew Haley  <aph@redhat.com>
4759
4760         * class.c (build_symbol_entry): Convert the names of constructors
4761         to init_identifier_node when generating an entry for the indirect
4762         dispatch table.
4763
4764         * expr.c (build_known_method_ref): Generate indirect calls for
4765         all methods marked DECL_EXTERNAL or TREE_PUBLIC.
4766
4767 2004-05-24  Andrew Haley  <aph@redhat.com>
4768
4769         * expr.c (build_known_method_ref): Make sure ARRAY_REF access to
4770         atable element is of the right type.
4771
4772         * class.c (build_static_field_ref): Cast pointer to correct type
4773         for field.
4774
4775 2004-04-20  Bryce McKinlay  <mckinlay@redhat.com>
4776
4777         * Merged with HEAD as of 20040514. Diff against
4778         gcj-abi-2-merge-20040514.
4779
4780 2004-04-16  Andrew Haley  <aph@redhat.com>
4781
4782         * verify.c (check_pending_block): Disable subroutine checks.
4783         (defer_merging): New function.
4784         (merge_types): If types are dummy, use defer_merging to combine them.
4785         (verify_jvm_instructions): If invocation is invokeinterface and
4786         target is dummy, assume target really is an interface.
4787
4788         * parse.y (patch_invoke): Break out call to java_create_object.
4789
4790         * lang.c (flag_verify_invocations): New.
4791
4792         * jcf-parse.c (load_class): If we've already failed to load a
4793         class, don't try again.
4794         (load_class): If we can't find a .class file, don't fail, but emit
4795         a warning.
4796         (parse_class_file): Don't act on dummy methods.
4797
4798         * java-tree.h (flag_verify_invocations): New.
4799         (TYPE_DUMMY): New.
4800         (lang_type.dummy_class): New field.
4801         (java_create_object): New function.
4802         (METHOD_DUMMY): New.
4803
4804         * expr.c (build_field_ref): Widen field offset.
4805         (pop_type_0): If the type in stack_type_map is a TREE_LIST, check
4806         that each of its elements is compatible with the one we're
4807         popping.
4808         (pop_type_0): Issue a warning to say that we need to generate a
4809         runtime check.
4810         (java_create_object): New function.
4811         (build_field_ref): Only generate hard refs if we're not using
4812         indirect dispatch.
4813         (expand_java_field_op): If we're using !verify_invocations and we
4814         see a missing field, generate a decl for it.
4815
4816         (expand_invoke): If a class doesn't have the method we seek and
4817         we're using !flag_verify_invocations, generate a decl for the
4818         method now.
4819
4820         (build_known_method_ref): Always use indirect dispatch via the
4821         atable for static methods.
4822
4823         (expand_java_NEW): Break out object creation into new function,
4824         java_create_object.
4825
4826         (can_widen_reference_to): Issue a warning to say that we need to
4827         generate a runtime check.
4828
4829         * class.c (set_super_info): Inherit TYPE_DUMMY from sureclass.
4830         (make_method_value): Also use index for interfaces.
4831         (make_class_data): Skip dummy field for inherited data.
4832         Don't build method array for dummy methods.
4833         Set size_in_byte to -1 when using inirect dispatch
4834         Don't build a hard class ref if we don't have a hard ref to our
4835         superclass, or if we're using inirect dispatch.
4836         Null out dispatch tables.
4837
4838         (layout_class_method): Don't complain about non-static method
4839         overrides static method is method is artificial.
4840
4841         (build_static_field_ref): Disable atable references to static
4842         fields for the time being.
4843
4844         (layout_class_methods): Check for CLASS_INTERFACE as
4845         well as CLASS_ABSTRACT.
4846
4847 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4848
4849         * class.c (make_class_data): Don't check flag_inline_functions.
4850         * lang.c (flag_really_inline): Remove unused flag.
4851         (java_handle_option): Don't set it here.  Remove special handling
4852         of flag_inline_functions for Java.
4853         (java_init): Don't set flag_inline_trees here.  Already done...
4854         (java_post_options): ...here.  Don't clear flag_inline_functions.
4855
4856 2004-11-24  Steven Bosscher  <stevenb@suse.de>
4857
4858         * java-gimplify.c (java_gimplify_labeled_block_expr): New function.
4859         (java_gimplify_exit_block_expr): New function.
4860         (java_gimplify_expr): Use them to gimplify EXIT_BLOCK_EXPR and
4861         LABELED_BLOCK_EXPR.
4862         * java-tree.def (LABELED_BLOCK_EXPR): Moved from tree.def.
4863         (EXIT_BLOCK_EXPR): Likewise.
4864         * java-tree.h (LABELED_BLOCK_LABEL): Moved from tree.h.
4865         (LABELED_BLOCK_BODY): Likewise.
4866         (EXIT_BLOCK_LABELED_BLOCK): Likewise.
4867         * jcf-write.c (generate_bytecode_insns): Don't handle the unused
4868         EXIT_BLOCK_RETURN operand.  Use EXIT_BLOCK_LABELED_BLOCK instead of
4869         TREE_OPERAND.
4870         * lang.c (java_tree_inlining_walk_subtrees): Handle EXIT_BLOCK_EXPR.
4871         (java_dump_tree): Use LABELED_BLOCK_LABEL, LABELED_BLOCK_BODY, and
4872         EXIT_BLOCK_LABELED_BLOCK instead of TREE_OPERAND.  Don't handle the
4873         second operand of EXIT_BLOCK_EXPR.
4874         * parse.y (find_expr_with_wfl): Use LABELED_BLOCK_BODY instead of
4875         TREE_OPERAND.
4876         (build_bc_statement): Use build1 to build EXIT_BLOCK_EXPR nodes.
4877
4878 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4879
4880         * xref.h (xref_flag_value): Remove.
4881         (xref_set_data, xref_get_data): Likewise.
4882         (xref_set_current_fp): Likewise.
4883         (XREF_NONE): Likewise.
4884         (XREF_GET_DATA): Likewise.
4885         * xref.c (xref_flag_value): Remove.
4886         (xref_set_data, xref_get_data): Likewise.
4887         (xref_set_current_fp): Likewise.
4888
4889 2004-11-23  Ben Elliston  <bje@au.ibm.com>
4890
4891         * gjavah.c (output_directory): Make static.
4892         (temp_directory): Likewise.
4893
4894 2004-11-15  Tom Tromey  <tromey@redhat.com>
4895
4896         * decl.c (instn_ptr_type_node): Removed.
4897         (lineNumbers_ptr_type_node): Removed.
4898         (jint_type): Removed.
4899         (jint_ptr_type): Removed.
4900
4901 2004-11-09  Andrew Pinski  <pinskia@physics.uc.edu>
4902
4903         PR java/15576
4904         * check-init.c (check_init): Ignore DECL_EXPR.
4905         * expr.c (always_initialize_class_p): Reenable.
4906         (build_class_init): Use a variable to store the decl.  Also use
4907         boolean_false_node instead of integer_zero_node.
4908         * parse.y (attach_init_test_initialization_flags): Add a decl_expr
4909         to the block.
4910
4911 2004-11-08  Tom Tromey  <tromey@redhat.com>
4912
4913         PR java/16843:
4914         * gjavah.c (HANDLE_END_FIELD): Call print_field_info when
4915         generating a JNI header.
4916         (print_field_info): Handle JNI headers.
4917         (jni_print_float): Likewise.
4918         (jni_print_double): Likewise.
4919
4920 2004-11-08  Andrew Pinski  <pinskia@physics.uc.edu>
4921
4922         * decl.c (end_java_method): Remove duplicated code.
4923
4924 2004-11-06  Zack Weinberg  <zack@codesourcery.com>
4925             Gerald Pfeifer  <gerald@pfeifer.com>
4926
4927         * lex.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
4928         as well.
4929
4930 2004-11-02  Bryce McKinlay  <mckinlay@redhat.com>
4931
4932         PR java/17265
4933         * class.c: Reinstate 2004-08-18 patch.
4934         (make_local_function_alias): Don't create an alias for extern (native)
4935         functions.
4936
4937 2004-10-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4938
4939         PR java/17265
4940         * class.c (make_local_function_alias): Revert 2004-08-18 change.
4941         (make_method_value): Likewise.
4942
4943 2004-10-21  Andrew Haley  <aph@redhat.com>
4944
4945         PR java/18091:
4946         * jcf-parse.c (set_source_filename): Add code to build new sfname.
4947
4948 2004-10-20  Andrew Haley  <aph@redhat.com>
4949
4950         * decl.c (end_java_method): Don't expand if flag_syntax_only.
4951         Remove duplicated code block.
4952
4953 2004-10-18  Steven Bosscher  <stevenb@suse.de>
4954
4955         * Make-lang.in (java/parse.o-warn, java/parse-scan.o-warn):
4956         New rules to work around old Bison warnings.
4957
4958 2004-10-17  Steven Bosscher  <stevenb@suse.de>
4959
4960         * class.c (ident_subst): Always alloca buffer.
4961         * java-opcodes.h (LAST_AND_UNUSED_JAVA_OPCODE): Add this dummy
4962         opcode after including javaop.def.
4963         * jcf-dump.c (CHECK_PC_IN_RANGE): Return 0 from the arm of the
4964         conditional expression that exits, to avoid warnings.
4965         * verify.c (CHECK_PC_IN_RANGE): Mark the __GNUC__ definition as
4966         a user of an extension.
4967         * win32-host.c: Move check down to have non-empty file when
4968         WIN32 is not defined.
4969
4970         * Make-lang.in (java-warn): Add STRICT_WARN.
4971         (java/jcf-io.o-warn): Don't have Werror for this file.
4972         * jcf-io.c (caching_stat): Add FIXME for non-POSIX scandir use.
4973
4974 2004-10-16  Hans-Peter Nilsson  <hp@bitrange.com>
4975
4976         * expr.c (expr_add_location): Move declaration to before all
4977         statements.
4978         * parse.y (java_expand_classes): Ditto.
4979         * lex.c (java_peek_unicode): Ditto.
4980
4981 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4982
4983         * check-init.c: Use %<, %> and %q for quoting in diagnostics,
4984         if possible, else convert `foo' to 'foo'.
4985         * class.c: Likewise.
4986         * decl.c: Likewise.
4987         * expr.c: Likewise.
4988         * jcf-io.c: Likewise.
4989         * jcf-parse.c: Likewise.
4990         * lang.c: Likewise.
4991         * lex.c: Likewise.
4992         * parse.h: Likewise.
4993
4994 2004-10-16  Ranjit Mathew  <rmathew@hotmail.com>
4995
4996         * parse.y (parse_warning_context): Remove ATTRIBUTE_PRINTF_2 and
4997         rename parameter 'msg' to 'msgid' in function declaration.
4998         (issue_warning_error_from_context): Likewise.
4999         (yyerror): Rename parameter 'msg' to 'msgid'.
5000         (all over): Use new quoting style for diagnostics.
5001
5002 2004-10-15  Kazu Hirata  <kazu@cs.umass.edu>
5003
5004         * boehm.c, builtins.c, java-except.h, jcf-io.c, jcf-path.c,
5005         jcf.h, lang-specs.h, lex.c, lex.h, resource.c, win32-host.c:
5006         Update copyright.
5007
5008 2004-10-14  Matt Austern  <austern@apple.com>
5009
5010         * lang.c (java_tree_inlining_walk_subtrees): Last arg is struct
5011         pointer_set_t* now.
5012
5013 2004-10-13  Tom Tromey  <tromey@redhat.com>
5014
5015         PR java/15578:
5016         * lang.opt (--extdirs): Document.
5017         * jvspec.c (lang_specific_driver): Recognize -encoding and
5018         -extdirs.
5019
5020 2004-10-06  Ulrich Weigand  <uweigand@de.ibm.com>
5021
5022         * parse.y (issue_warning_error_from_context): Use va_list *
5023         instead of va_list parameter.
5024         (parse_error_context): Update call.
5025         (parse_warning_context): Likewise.
5026
5027 2004-10-05  Zack Weinberg  <zack@codesourcery.com>
5028
5029         * parse.y, parse-scan.y: Add list of diagnostic messages to
5030         insulate translation template from version of yacc/bison used
5031         to compile the grammar.
5032
5033 2004-10-05  Ranjit Mathew  <rmathew@hotmail.com>
5034
5035         Prepare for %q, %< and %> in diagnostic message strings.
5036         * java-tree.h (parse_error_context): remove ATTRIBUTE_PRINTF_2.
5037         Name second parameter 'msgid'.
5038         * parse.y: Additionally include pretty-print.h and diagnostic.h.
5039         (issue_warning_error_from_context): Use pretty-printer functions
5040         instead of vsprintf for constructing formatted messages. Rename
5041         parameter 'msg' to 'msgid'.
5042         (parse_error_context): Rename parameter 'msg' to 'msgid'.
5043         (parse_warning_context): Likewise.
5044
5045 2004-10-05  Andrew Haley  <aph@redhat.com>
5046
5047         PR java/17779
5048         * jcf-parse.c (parse_zip_file_entries): If a class has a
5049         superclass and a TYPE_SIZE of zero, lay it out.
5050
5051 2004-09-30  Andrew Haley  <aph@redhat.com>
5052
5053         PR java/17733
5054         * jcf-parse.c (compute_class_name): Rewrite.
5055
5056 2004-10-01  Jan Hubicka  <jh@suse.cz>
5057
5058         * java.c (java_expand_body): Update call of tree_rest_of_compilation.
5059
5060 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5061
5062         * lex.c: Fix a comment typo.
5063
5064 2004-10-01  Kazu Hirata  <kazu@cs.umass.edu>
5065
5066         * java-tree.h: Fix a comment typo.
5067
5068 2004-09-30  Per Bothner  <per@bothner.com>
5069
5070         Simplify lexer.  Implement --enable-mapped-location support.
5071         * jcf-parse.c (parse_class_file):  Use linemap_line_start.
5072         (parse_source_file_1): Pass filename as extra parameter, so we can call
5073         linemap_add and set input_location here, rather than in both callers.
5074         (read_class): Pass copied filename to parse_source_file_1.
5075         Don't initialize wfl_operator - only needed for source compilation.
5076         (read_class, jcf_parse):  Call linemap_add with LC_LEAVE.
5077         * lex.h:  Remove a bunch of debugging macros.
5078         * lex.h (struct_java_line, struct java_error):  Remove types.
5079         (JAVA_COLUMN_DELTA):  Remove - use java_lexer.next_colums instead.
5080         (struct java_lc_s):  Remove prev_col field.
5081         (struct java_lexer):  New fields next_unicode, next_columns, and
5082         avail_unicode.  New position field, and maybe token_start field.
5083         Don't need hit_eof field - use next_unicode == -1 instead.
5084         (JAVA_INTEGERAL_RANGE_ERROR):  Rename to JAVA_RANGE_ERROR.
5085         (JAVA_RANGE_ERROR, JAVA_FLOAT_ANGE_ERROR):  Update accordingly.
5086         * parse.h:  Various changes for USE_MAPPED_LOCATION.
5087         (EXPR_WFL_EMIT_LINE_NOTE): XXX
5088         (BUILD_EXPR_WFL, EXPR_WFL_ADD_COL): Remove no-longer-used macros.
5089         (struct parser_ctxt):  New file_start_location field.
5090         Remove p_line, c_line fields since we no longer save lines.
5091         Remove elc, lineno, and current_jcf fields - no longer used.
5092         * parse.y:  Updates for USE_MAPPED_LOCATION and new lexer.
5093         Don't use EXPR_WFL_ADD_COL since that isn't trivial with
5094         source_location and is probably not needed anymore anyway.
5095         Use new expr_add_Location function.
5096         (SET_EXPR_LOCATION_FROM_TOKEN):  New convenience macro.
5097         (java_pop_parser_context):  Minor cleanup.
5098         (java_parser_context_save_global, java_parser_context_restore_global,
5099         java_pop_parser_context):  Save/restore input_location as a unit.
5100         (issue_warning_error_from_context):  If USE_MAPPED_LOCATION take
5101         a source_location instead of a wfl context node.
5102         (check_class_interface_creation):  input_filename is not addressable.
5103         (create_artificial_method):  Calling java_parser_context_save_global
5104         and java_parser_context_restore_global is overkill.  Instead,
5105         temporarily set input_location from class decl.
5106         (java_layout_seen_class_methods): Set input_location from method decl.
5107         (fix_constructors): Make more robust if no EXPR_WITH_FILE_LOCATION.
5108         (finish_loop_body):  Likewise.
5109         * lex.c: Updates for USE_MAPPED_LOCATION.  Use build_unknwon_wfl.
5110         (java_sprint_unicode):  Take a character, not index in line.
5111         (java_sneak_uncode):  Replaced by java_peek_unicode.
5112         (java_unget_unicode):  No longer used.
5113         (java_allocate_new_line. java_store_unicode):  Removed, since we
5114         no longer remember "lines".
5115         (java_new_lexer):  Update for new data structures.
5116         (java_read_char):  Move unget_value checking to java_read_unicode.
5117         (java_get_unicode, java_peek_unicode, java_next_unicode): New more
5118         efficient functions that are used directly when lexing.
5119         (java_read_unicode_collapsing_terminators):  No longer needed.
5120         (java_parse_end_comment, java_parse_escape_sequence, do_java_lex):
5121         Re-organize to use java_peek_unicode to avoid java_unget_unicode.
5122         (java_parse_escape_sequence):  Rewrite to be simpler / more efficient.
5123         (do_java_lex):  Lots of movings around to avoid java_unget_unicode,
5124         combine switch branches, and test for common token kinds earlier.
5125         (java_lex_error):  Rewrite.
5126         * jv-scan.c (expand_location): New function, copied from tree.c.
5127         (main): Set ctxp->filename instead of setting input_filename directly.
5128
5129 2004-09-30  Per Bothner  <per@bothner.com>
5130
5131         More cleanup for --enable-mapped-location.
5132         * class.c (push_class):  If USE_MAPPED_LOCATION don't set
5133         input_location here.  Instead do it in give_name_to_class.
5134         (build_class_ref):  Set DECL_ARTIFICIAL, for the sake of dwarf2out.
5135         * expr.c (expand_byte_code): Call linemap_line_start.
5136         * expr.c (build_expr_wfl):  If USE_MAPPED_LOCATION, change final
5137         parameters to a source_location.  Don't need EXPR_WFL_FILENAME_NODE.
5138         (expr_add_location):  New function, if USE_MAPPED_LOCATION.
5139         * class.c (maybe_layout_super_class):  Adjust build_expr_wfl call
5140         to USE_MAPPED_LOCATION case.
5141
5142         * java-tree.h (JAVA_FILE_P, ZIP_FILE_P):  Remove unused macros.
5143         * jcf-parse.c (java_parse_file): Don't set input_filename.
5144         Use IS_A_COMMAND_LINE_FILENAME_P to check for duplicate filenames.
5145         Create a list of TRANSLATION_UNIT_DECL.
5146         (current_file_list):  Is now a TRANSLATION_UNIT_DECL chain.  The
5147         reason is so we can set a DECL_SOURCE_LOCATION for each file.
5148         (java_parse_file):  Don't set unused ZIP_FILE_P, JAVA_FILE_P..
5149         Create line-map LC_ENTER/LC_LEAVE entries for archive itself.
5150         (file_start_location):  New static.
5151         (set_source_filename):  Avoid extra access to input_filename macro.
5152         Concatenate new name with class's package prefix.
5153         (set_source_filename, give_name_to_class): Update.
5154         (give_name_to_class):  Set class's "line 0" input_location here.
5155         (parse_class_file):  Set input_location as a unit.
5156
5157         * jcf-parse.c (load_class): Sanity test if missing inner class file.
5158
5159 2004-09-29  Per Bothner  <per@bothner.com>
5160
5161         * java-tree.h:  Redefine some macros and add some declaration
5162         to handle the USE_MAPPED_LOCATION case.
5163         * parse.h (EXPR_WFL_QUALIFICATION):  Use operand 1, not 2.
5164         * java-tree.h (EXPR_WFL_FILENAME_NODE):  Use operand 2, not 1.
5165         * java-tree.def (EXPR_WITH_FILE_LOCATION): Only need two operands in
5166         USE_MAPPED_LOCATION case, since EXPR_WFL_FILENAME_NODE is gone.
5167
5168         * check-init.c (check_init): Handle USE_MAPPED_LOCATION case.
5169         * decl.c (finish_method, java_add_stmt): Likewise.
5170         * java-gimplify.c (java-gimplify.c):  Likewise.
5171         * jcf-write.c (generate_bytecode_insns):  Likewise.
5172         * lang.c (java_post_options): Likewise - call linemap_add.
5173
5174 2004-09-29  Andrew Haley  <aph@redhat.com>
5175
5176         PR java/17007
5177         * parse.y (patch_binop): Don't mess with the TREE_SIDE_EFFECTS of the
5178         result of TRUNC_MOD_EXPR.
5179         (patch_unaryop): Likewise for CONVERT_EXPR, which may throw.
5180         * decl.c (java_init_decl_processing): Mark
5181         soft_lookupinterfacemethod_node and soft_instanceof_node pure.
5182
5183 2004-09-28  Tom Tromey  <tromey@redhat.com>
5184
5185         PR java/15710:
5186         * class.c (add_miranda_methods): Load superinterface if not
5187         already loaded.
5188
5189 2004-09-28  Andrew Haley  <aph@redhat.com>
5190
5191         PR java/17586
5192         * jcf-parse.c (load_class): Don't try to read a class that we've
5193         already read.
5194
5195 2004-09-28  Andrew Haley  <aph@redhat.com>
5196
5197         * jcf-parse.c (load_class): Back out previous broken patch.
5198
5199 2004-09-28  Andrew Haley  <aph@redhat.com>
5200
5201         PR java/17586
5202         * jcf-parse.c (load_class): Don't try to read a class that we've
5203         already read.
5204         Check that we really did read the right class.
5205
5206 2004-09-25  Tom Tromey  <tromey@redhat.com>
5207
5208         PR java/17500:
5209         * parse.y (create_artificial_method): Use add_method_1.
5210
5211 2004-09-25  Kazu Hirata  <kazu@cs.umass.edu>
5212
5213         * expr.c, jcf-dump.c, parse-scan.y, parse.y: Fix
5214         comment typos.
5215         * gcj.texi: Fix typos.
5216
5217 2004-09-24  Tom Tromey  <tromey@redhat.com>
5218
5219         PR java/15656:
5220         * parse.y (class_instance_creation_expression): Set `$$' to NULL
5221         in error parts of rule.
5222         (unary_expression): Don't call error_if_numeric_overflow when $1
5223         is NULL.
5224
5225 2004-09-24  Tom Tromey  <tromey@redhat.com>
5226
5227         PR java/16789:
5228         * parse.y (resolve_qualified_expression_name): Set
5229         CAN_COMPLETE_NORMALLY on first call when chaining static calls.
5230         * expr.c (force_evaluation_order): Check for empty argument list
5231         after stripping COMPOUND_EXPR.
5232
5233 2004-09-23  Andrew Haley  <aph@redhat.com>
5234
5235         PR java/16927:
5236         * parse.y (java_complete_lhs): Call patch_string() on Operand 1 of
5237         COND_EXPRs.
5238
5239 2004-09-23  Tom Tromey  <tromey@redhat.com>
5240
5241         PR java/17329:
5242         * java-gimplify.c (java_gimplify_expr) <SAVE_EXPR>: Ignore case
5243         where operand is null.
5244
5245 2004-09-23  Tom Tromey  <tromey@redhat.com>
5246
5247         PR java/17380:
5248         * parse.y (not_accessible_p): Allow access to protected members
5249         even when class is not static.
5250
5251 2004-09-22  Kelley Cook  <kcook@gcc.gnu.org>
5252
5253         * Make-lang.in: Revert the gcc-none.o change.
5254
5255 2004-09-22  Nathan Sidwell  <nathan@codesourcery.com>
5256
5257         * parse.y (patch_anonymous_class): VEC_space returns true if there
5258         is space.
5259
5260 2004-09-21  Matt Austern  <austern@apple.com>
5261
5262         Fix bootstrap.
5263         * gjavah.c (free_method_name_list): Fix function definition so
5264         it's a proper C prototype.
5265
5266 2004-09-21  Tom Tromey  <tromey@redhat.com>
5267
5268         PR java/17575:
5269         * gjavah.c (free_method_name_list): New method.
5270         (main): Call it.
5271
5272 2004-09-17  Jeffrey D. Oldham  <oldham@codesourcery.com>
5273             Zack Weinberg  <zack@codesourcery.com>
5274
5275         * java-tree.def: Use tree_code_class enumeration constants
5276         instead of code letters.
5277         * java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
5278         new tree-class enumeration constants.
5279
5280 2004-09-13  Tom Tromey  <tromey@redhat.com>
5281
5282         PR java/17216:
5283         * class.c (layout_class_method): Put synthetic methods into the
5284         vtable.
5285
5286 2004-09-11  Andrew Pinski  <apinski@apple.com>
5287
5288         * Make-lang.in (java/ggc-none.c): Change dependency
5289         for ggc.h into $(GGC_H).
5290
5291 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5292
5293         * Make-lang.in (java/win32-host.o): Add dependency on
5294         coretypes.h.
5295         * win32-host.c: Add includes for coretypes.h, jcf.h
5296
5297 2004-09-11  Mohan Embar  <gnustuff@thisiscool.com>
5298
5299         * Make-lang.in (GCJH_OBJS): Change dependency from
5300         ggc-none.o to java/ggc-none.o
5301         (JCFDUMP_OBJS): Likewise.
5302         (java/ggc-none.o): New target.
5303
5304 2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
5305
5306         * boehm.c (get_boehm_type_descriptor):  Adjust build_int_cst calls.
5307         * class.c (build_utf8_ref, build_static_field_ref,
5308         make_field_value, make_method_value, get_dispatch_table,
5309         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5310         * constants.c (get_tag_node, build_ref_from_constant_pool,
5311         build_constants_constructor): Likewise.
5312         * decl.c (java_init_decl_processing): Likewise.
5313         * expr.c (build_java_array_length_access, build_newarray,
5314         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5315         build_java_binop, build_field_ref, expand_java_add_case,
5316         expand_java_call, build_known_method_ref, build_invokevirtual,
5317         build_invokeinterface, build_jni_stub): Likewise.
5318         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5319         * jcf-parse.c (get_constant): Likewise.
5320         * lex.c (do_java_lex): Likewise.
5321         * parse.y (patch_binop, patch_unaryop, patch_cast,
5322         build_newarray_node, patch_newarray): Likewise.
5323         * resource.c (compile_resource_data): Likewise.
5324         * typeck.c (build_prim_array_type): Likewise.
5325
5326 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
5327
5328         * decl.c (java_init_decl_processing): Adjust
5329         initialize_sizetypes call.
5330
5331 2004-08-23  Nathan Sidwell  <nathan@codesourcery.com>
5332
5333         * jv-scan.c (fancy_abort): Add.
5334
5335 2004-08-20  Nathan Sidwell  <nathan@codesourcery.com>
5336
5337         * expr.c (build_java_arrayaccess): Use convert to change
5338         len's type.
5339
5340 2004-08-19  Bryce McKinlay  <mckinlay@redhat.com>
5341
5342         * class.c (make_local_function_alias): Allocate extra space for 'L'
5343         in name buffer. Reported by Thomas Neumann.
5344
5345 2004-08-19  Nathan Sidwell  <nathan@codesourcery.com>
5346
5347         * parse.h (JAVA_RADIX10_FLAG): Rename to ...
5348         (JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
5349         * lex.c (do_java_lex): Adjust.
5350         (error_if_numeric_overflow): Likewise.
5351
5352 2004-08-18  Andrew Pinski  <apinski@apple.com>
5353
5354         * class.c (make_local_function_alias): Only make a new decl if we
5355         support alias attribute on all decls.
5356
5357 2004-08-18  Bryce McKinlay  <mckinlay@redhat.com>
5358
5359         * class.c (make_local_function_alias): New function. Create local
5360         alias for public method DECL.
5361         (make_method_value): Use make_local_function_alias.
5362         * parse.y (craft_constructor): Don't special-case anonymous classes.
5363         Always set ctor_name to init_identifier_node.
5364         (lookup_method_invoke): Call layout_class_method when creating
5365         anonymous class constructor.
5366
5367 2004-08-18  Richard Henderson  <rth@redhat.com>
5368
5369         * java-gimplify.c (java_gimplify_expr): Move '2' handling into
5370         default case.  Treat '<' similarly.  Update for
5371         is_gimple_formal_tmp_var name change.
5372
5373 2004-08-17  Andrew Haley  <aph@redhat.com>
5374
5375         * lang.c (lang_printable_name): Obey verbose flag.
5376         * parse.y (constructor_circularity_msg): Set VERBOSE arg for
5377         lang_printable_name().
5378         (verify_constructor_circularity, get_printable_method_name,
5379         check_abstract_method_definitions, java_check_regular_methods,
5380         java_check_abstract_methods, check_inner_class_access,
5381         fix_constructors, patch_method_invocation, patch_return):
5382         Likewise.
5383         * expr.c (pop_type_0): Likewise.
5384
5385         * java-tree.h (lang_printable_name_wls): Delete.
5386
5387 2004-08-16  Tom Tromey  <tromey@redhat.com>
5388
5389         PR java/8473:
5390         * parse.y (primary): Changed for initialized and uninitialized
5391         array creations.
5392         (array_access): Handle array_creation_initialized.
5393         (array_creation_expression): Split into
5394         array_creation_initialized and array_creation_uninitialized.
5395
5396 2004-08-16  Andrew Haley  <aph@redhat.com>
5397
5398         * jcf-write.c (find_constant_index): Canonicalize NaNs when
5399         generating bytecode.
5400
5401 2004-08-16  Elliot Lee <sopwith@redhat.com>
5402
5403         PR java/9677
5404         * jcf-parse.c (java_parse_file): Handle filenames with embedded
5405         spaces, and quoted filelists.
5406
5407 2004-08-15  Nathan Sidwell  <nathan@codesourcery.com>
5408
5409         * boehm.c (get_boehm_type_descriptor): Use build_int_cst.
5410         * class.c (build_utf8_ref, build_static_field_ref,
5411         make_field_value, make_method_value, get_dispatch_table,
5412         make_class_data, emit_symbol_table, emit_catch_table): Likewise.
5413         * constants.c (get_tag_node,  build_ref_from_constant_pool,
5414         build_constants_constructor): Likewise.
5415         * decl.c (java_init_decl_processing): Likewise.
5416         * expr.c (build_java_array_length_access, build_newarray,
5417         expand_java_multianewarray, expand_java_pushc, expand_iinc,
5418         build_java_binop, build_field_ref, expand_java_add_case,
5419         expand_java_call, build_known_method_ref, build_invokevirtual,
5420         build_invokeinterface, build_jni_stub): Likewise.
5421         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5422         * jcf-parse.c (get_constant): Likewise.
5423         * lex.c (do_java_lex): Likewise.
5424         * parse.y (patch_binop, patch_unaryop, patch_cast,
5425         build_null_of_type, patch_newarray): Likewise.
5426         * resource.c (compile_resource_data): Likewise.
5427         * typeck.c (build_prim_array_type): Likewise.
5428
5429 2004-08-10  Bryce McKinlay  <mckinlay@redhat.com>
5430
5431         * java-gimplify.c (java_gimplify_new_array_init): Use create_tmp_var.
5432         Don't create BLOCK here or call java_gimplify_block.
5433
5434 2004-08-09  H.J. Lu  <hongjiu.lu@intel.com>
5435
5436         * java-tree.h (flag_deprecated): Removed.
5437         * lang.opt (Wdeprecated): Use existing Var(warn_deprecated).
5438         * parse.y (check_deprecation): Check warn_deprecated instead of
5439         flag_deprecated.
5440
5441 2004-08-06  Kelley Cook  <kcook@gcc.gnu.org>
5442
5443         * lang.c (flag_emit_class_files, flag_filelist_file, flag_redundant,
5444         flag_use_divide_subroutine, flag_use_boehm_gc, flag_store_check,
5445         flag_hash_synchronization, flag_assert, flag_jni, flag_newer,
5446         flag_check_references, flag_extraneous_semicolon, flag_deprecated,
5447         flag_force_classes_archive_check, flag_optimize_sci,
5448         flag_indirect_dispatch): Remove explicit declarations.
5449         * lang.opt: Add implicit declare/define/assign.  Remove obsolete
5450         final comment.
5451
5452 2004-08-05  Michael Chastain  <mec.gnu@mindspring.com>
5453
5454         PR bootstrap/14893
5455         * Make-lang.in (java.install-man): Install from either build
5456         tree or source tree, whichever has the file first.
5457
5458 2004-08-05  Nathan Sidwell  <nathan@codesourcery.com>
5459
5460         * jcf-parse.c (get_constant): Adjust force_fit_type call.
5461         * lex.h (SET_LVAL_NODE_TYPE): Remove.
5462         * lex.c (java_perform_atof): Use SET_LVAL_NODE directly.
5463         (do_java_lex): Likewise. Adjust force_fit_type call.
5464
5465 2004-08-04  Roger Sayle  <roger@eyesopen.com>
5466             Andrew Haley  <aph@redhat.com>
5467
5468         * typeck.c (convert_ieee_real_to_integer): Call fold on the range
5469         checking trees as they're being built.
5470         (convert): Call convert_ieee_real_to_integer if we're
5471         converting a constant, even if we're writing a class file.
5472
5473 2004-08-02  Bryce McKinlay  <mckinlay@redhat.com>
5474
5475         PR java/16701
5476         * parse.y (fold_constant_for_init): Call resolve_field_access with
5477         correct current_class context.
5478
5479 2004-08-01  Roger Sayle  <roger@eyesopen.com>
5480
5481         * decl.c (update_aliases, initialize_local_variable): Replace calls
5482         to build with calls to buildN.
5483         * java-gimplify.c (java_gimplify_modify_expr): Likewise.
5484         * java-tree.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Likewise.
5485         * parse.h (BUILD_THROW): Likewise.
5486         * parse.y (switch_expression, synchronized_statement,
5487         catch_clause_parameter, array_creation_expression,
5488         conditional_expression, make_qualified_name,
5489         resolve_qualified_expression_name, patch_method_invocation,
5490         patch_invoke, build_method_invocation, build_new_invocation,
5491         build_assignment, patch_assignment, build_binop, patch_binop,
5492         build_string_concatenation, build_incdec, patch_unaryop,
5493         patch_cast, build_array_ref, build_newarray_node, patch_newarray,
5494         patch_return, build_if_else_statement, build_labeled_block,
5495         build_new_loop, build_loop_body, build_bc_statement,
5496         build_assertion, encapsulate_with_try_catch, build_try_statement,
5497         build_try_finally_statement, patch_synchronized_statement,
5498         emit_test_initialization): Likewise, replace build with buildN.
5499
5500 2004-07-28  Eric Christopher  <echristo@redhat.com>
5501
5502         * lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
5503         (java_unsafe_for_reeval): Ditto.
5504
5505 2004-07-26    <hp@bitrange.com>
5506
5507         * parse.y (build_super_invocation): Adjust declaration order to
5508         avoid declaration after statement.
5509
5510 2004-07-25  Bernardo Innocenti  <bernie@develer.com>
5511
5512         * decl.c: Rename all identifiers named `class' to `cl'.
5513
5514 2004-07-25  Richard Henderson  <rth@redhat.com>
5515
5516         * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
5517
5518 2004-07-23  Mike Stump  <mrs@apple.com>
5519
5520         * boehm.c (set_bit): Improve type safety wrt unsignedness.
5521         * gjavah.c (throwable_p, decode_signature_piece,
5522         print_full_cxx_name, print_include, add_namelet, add_class_decl,
5523         process_file): Likewise.
5524         * jcf-dump.c (main): Likewise.
5525         * jcf-io.c (read_zip_member): Likewise.
5526         * jcf-parse.c (HANDLE_CONSTANT_Utf8, get_constant,
5527         give_name_to_class, get_class_constant): Likewise.
5528         * jcf-write.c (find_constant_wide, push_long_const,
5529         generate_classfile): Likewise.
5530         * lex.c (java_new_lexer, java_read_char, cxx_keyword_p): Likewise.
5531         * parse.y (read_import_dir): Likewise.
5532         * typeck.c (parse_signature_type): Likewise.
5533         * verify.c (verify_jvm_instructions): Likewise.
5534         * zextract.c (find_zip_file_start, read_zip_archive): Likewise.
5535
5536 2004-07-23  Thomas Fitzsimmons  <fitzsim@redhat.com>
5537
5538         * Make-lang.in: Replace rmic and rmiregistry references with
5539         grmic and grmiregistry.
5540         * gcj.texi: Likewise.
5541
5542 2004-07-20  Andrew Haley  <aph@redhat.com>
5543
5544         PR java/16431.
5545         * verify.c (verify_jvm_instructions): Comment change only.
5546
5547         * typeck.c (build_java_array_type): Add size field to array name.
5548
5549         * java-tree.h (LOCAL_SLOT_P): New.
5550         (update_aliases): Add PC argument.
5551         (pushdecl_function_level): New function.
5552
5553         * java-gimplify.c (java_gimplify_expr): Handle VAR_DECL,
5554         MODIFY_EXPR, and SAVE_EXPR.
5555         (java_gimplify_modify_expr): New function.
5556
5557         * expr.c (push_type_0): Call find_stack_slot() to create temporary.
5558         (expand_iinc): Pass PC to update_aliases().
5559         (STORE_INTERNAL): Likewise.
5560         (process_jvm_instruction): Likewise.
5561
5562         * decl.c (base_decl_map): New variable.
5563         (uniq): New variable.
5564         (update_aliases): Rewrite with more thorough checking.
5565         (debug_variable_p): New function.
5566         (push_jvm_slot): Don't initialize local variable.  Don't pushdecl.
5567         (check_local_named_variable): Delete whole function.
5568         (initialize_local_variable): New function.
5569         (check_local_unnamed_variable): Add checks and comments.
5570         (find_local_variable): Rewrite.
5571         (java_replace_reference): New function.
5572         (function_binding_level): New variable.
5573         (pushdecl_function_level): New function.
5574         (maybe_pushlevels): Set DECL_LOCAL_END_PC.
5575         (maybe_pushlevels): Call pushdecl() on each of the new decls.
5576         (start_java_method): Reset uniq.  Create base_decl_map.  Set
5577         function_binding_level.
5578         (end_java_method): Null unused fields to save memory.
5579
5580 2004-07-20  Nathan Sidwell  <nathan@codesourcery.com>
5581
5582         * class.c (add_interface_do): Remove.
5583         (set_super_info, interface_of_p, maybe_add_interface,
5584         add_interface, make_class_data, layout_class,
5585         add_miranda_methods): Adjust BINFO accessors and addition.
5586         * expr.c (can_widen_reference_to, lookup_field): Adjust BINFO
5587         accessors.
5588         * jcf-write.c (generate_classfile): Likewise.
5589         * parse.y (patch_anonymous_class, check_inner_circular_reference,
5590         check_circular_reference, java_complete_class,
5591         check_abstract_method_definitions,
5592         java_check_abstract_method_definitions,
5593         check_interface_throws_clauses, java_check_abstract_methods,
5594         lookup_java_interface_method2,
5595         find_applicable_accessible_methods_list): Adjust BINFO accessors
5596         and addition.
5597         * typeck.c (find_method_in_interfaces): Adjust BINFO accessors.
5598
5599 2004-07-18  Roger Sayle  <roger@eyesopen.com>
5600
5601         * builtins.c (max_builtin, min_builtin,
5602         java_build_function_call_expr): Replace calls to build with buildN.
5603         * class.c (build_class_ref, build_static_field_ref,
5604         get_dispatch_table, make_class_data, layout_class_method): Likewise.
5605         * constants.c (build_ref_from_constant_pool): Likewise.
5606         * decl.c (update_aliases, push_jvm_slot, poplevel, finish_method,
5607         add_stmt_to_compound): Likewise.
5608         * except.c (build_exception_object_ref, expand_end_java_handler):
5609         Likewise.
5610         * java-gimplify.c (java_gimplify_case_expr,
5611         java_gimplify_default_expr, java_gimplify_block,
5612         java_gimplify_new_array_init, java_gimplify_try_expr): Likewise.
5613         * jcf-write.c (generate_bytecode_insns): Likewise.
5614         * typeck.c (convert_ieee_real_to_integer): Likewise.
5615
5616 2004-07-17  Joseph S. Myers  <jsm@polyomino.org.uk>
5617
5618         * java-tree.h (builtin_function): Declare.
5619
5620 2004-07-16  Steven Bosscher  <stevenb@suse.de>
5621
5622         * parse.y (java_complete_expand_methods, java_expand_classes): Don't
5623         abuse restore_line_number_status.
5624
5625 2004-07-15  Frank Ch. Eigler  <fche@redhat.com>
5626
5627         g++/15861
5628         * jcf-parse.c (java_emit_static_constructor): Specify default
5629         priority.
5630
5631 2004-07-13  Per Bothner  <per@bothner.com>
5632
5633         * java-tree.h (all_class_filename):  Remove useless macro.
5634         (enum java_tree_index):  Remove JTI_ALL_CLASS_FILENAME constant.
5635         (BUILD_FILENAME_IDENTIFIER_NODE):  Remove useless macro.
5636         * parse.y (java_parser_context_restore_global):  Replace
5637         BUILD_FILENAME_IDENTIFIER_NODE by plain get_identifier.
5638         * jcf-parse.c (read_class, java_parse_file):  Likewise.
5639
5640 2004-07-12  Bryce McKinlay  <mckinlay@redhat.com>
5641
5642         PR java/16474
5643         gjavah.c (print_field_info): Emit constant only if field is static.
5644
5645 2004-07-11  Roger Sayle  <roger@eyesopen.com>
5646
5647         * expr.c (java_truthvalue_conversion, flush_quick_stack,
5648         java_stack_swap, java_stack_dup, build_java_athrow, build_java_jsr,
5649         build_java_ret, build_java_throw_out_of_bounds_exception,
5650         build_java_array_length_access, java_check_reference,
5651         build_java_arrayaccess, build_java_arraystore_check, build_newarray,
5652         build_anewarray, expand_java_multianewarray, expand_java_arraystore,
5653         expand_java_arrayload, build_java_monitor, expand_java_return,
5654         expand_load_internal, expand_java_NEW, build_get_class,
5655         build_instanceof, expand_java_CHECKCAST, expand_iinc,
5656         build_java_soft_divmod, build_java_binop, build_field_ref,
5657         expand_compare, expand_java_goto, expand_java_switch,
5658         expand_java_add_case, build_class_init, build_known_method_ref,
5659         invoke_build_dtable, build_invokevirtual, build_invokeinterface,
5660         expand_invoke, build_jni_stub, expand_java_field_op,
5661         java_expand_expr, expand_byte_code, STORE_INTERNAL,
5662         force_evaluation_order, emit_init_test_initialization): Convert
5663         calls to "build" into calls to the prefered "buildN" functions.
5664
5665 2004-07-11  Joseph S. Myers  <jsm@polyomino.org.uk>
5666
5667         * java-tree.h (set_block): Remove.
5668         * lang.c (java_clear_binding_stack): New.
5669         (LANG_HOOKS_CLEAR_BINDING_STACK): Define.
5670         * decl.c (struct binding_level): Remove this_block.
5671         (clear_binding_level): Likewise.
5672         (poplevel): Don't handle this_block.
5673         (set_block): Remove.
5674
5675 2004-07-10  Bryce McKinlay  <mckinlay@redhat.com>
5676
5677         * class.c (common_enclosing_context_p): Remove statement with no
5678         side-effects.
5679
5680 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5681
5682         PR java/8618
5683         * parse.y (create_anonymous_class): Remove 'location' argument. Use
5684         the WFL from TYPE_NAME to get line number for the decl. Fix comment.
5685         (craft_constructor): Inherit access flags for implicit constructor
5686         from the enclosing class.
5687         (create_class): Fix comment typo.
5688         (resolve_qualified_expression_name): Pass type of qualifier to
5689         not_accessible_p, not the type in which target field was found.
5690         (not_accessible_p): Handle inner classes. Expand protected
5691         qualifier-subtype check to enclosing instances, but don't apply this
5692         check to static members. Allow protected access to inner classes
5693         of a subtype. Allow private access within common enclosing context.
5694         (build_super_invocation): Get WFL line number info from current
5695         class decl.
5696         (build_incomplete_class_ref): Update for new create_anonymous_class
5697         signature.
5698         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Use
5699         common_enclosing_instance_p.
5700         * class.c (common_enclosing_context_p): New. Determine if types
5701         share a common enclosing context, even across static contexts.
5702         (common_enclosing_instance_p): Renamed from
5703         common_enclosing_context_p. Determines if types share a common
5704         non-static enclosing instance.
5705         * java-tree.h (common_enclosing_instance_p): Declare.
5706         * jcf-write.c (get_method_access_flags): New. Surpress private flag
5707         for inner class constructors.
5708         (generate_classfile): Use get_method_access_flags.
5709
5710 2004-07-09  Bryce McKinlay  <mckinlay@redhat.com>
5711
5712         * class.c (interface_of_p): Check for null TYPE_BINFO.
5713
5714 2004-07-09  Nathan Sidwell  <nathan@codesourcery.com>
5715
5716         * class.c (make_class): Do not create binfo here.
5717         (set_super_info): Create it here.
5718         * java-tree.h (CLASS_HAS_SUPER): Cope with lack of a binfo.
5719
5720 2004-07-08  Richard Henderson  <rth@redhat.com>
5721
5722         * expr.c (case_identity, get_primitive_array_vtable,
5723         java_expand_expr, emit_init_test_initialization): Remove.
5724         * java-tree.h (java_expand_expr): Remove.
5725         * lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.
5726
5727 2004-07-07  Per Bothner  <per@bothner.com>
5728
5729         * class.c (build_static_field_ref):  Add a NOP_EXPR; otherwise we
5730         get internal error due to mismatched types.
5731
5732         * gcj.texi (Invoking gij):  Document new -verbose:class flag.
5733
5734         * gcj.texi (Linking):   New node.  Document -lgij usage.
5735
5736 2004-07-07  Nathan Sidwell  <nathan@codesourcery.com>
5737
5738         * java-tree.h (CLASSTYPE_SPUER): Adjust BINFO macros.
5739         (TYPE_NVIRTUALS, TYPE_VTABLE): Likewise.
5740         * java/class.c (set_super_info, class_depth, interface_of_p,
5741         maybe_add_interface, add_interface, make_class_data,
5742         layout_class, add_miranda_methods): Adjust BINFO macros.
5743         * expr.c (can_widen_reference_to, lookup_field): Likewise.
5744         * jcf-write.c (generate_classfile): Likewise.
5745         * parse.y (patch_anonymous_class,
5746         check_inner_circular_reference, check_circular_reference,
5747         java_complete_class, check_abstract_method_definitions,
5748         java_check_abstract_method_definitions,
5749         check_interface_throws_clauses, java_check_abstract_methods,
5750         lookup_java_interface_method2,
5751         find_applicable_accessible_methods_list): Likewise.
5752         * typeck.c (find_method_in_interface): Likewise.
5753         * verify.c (merge_types): Likewise.
5754
5755 2004-07-06  Nathan Sidwell  <nathan@codesourcery.com>
5756
5757         * java-tree.h (CLASS_HAS_SUPER_FLAG): Use BINFO_FLAG_1.
5758         * class.c (add_interface_do): Use BINFO_VIRTUAL_P.
5759
5760 2004-07-05  Nathan Sidwell  <nathan@codesourcery.com>
5761
5762         * class.c (make_class): Use make_tree_binfo.
5763         (set_super_info, add_interface_do): Likewise.
5764         * java-tree.h (CLASS_HAS_SUPER_FLAG): Expect a BINFO.
5765
5766 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5767
5768         * verify.c: Correct array element access formatting thinko.
5769
5770 2004-07-04  Ranjit Mathew  <rmathew@hotmail.com>
5771
5772         * verify.c: Insert a short blurb at the start referring to the JVMS.
5773         (merge_type_state): Remove redundant nested if statement.
5774         (verify_jvm_instructions): Ensure current_subr is initialised to
5775         NULL_TREE.
5776         Minor formatting fixes all over the place.
5777
5778 2004-07-02  Richard Henderson  <rth@redhat.com>
5779
5780         * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.
5781
5782 2004-07-01  Richard Henderson  <rth@redhat.com>
5783
5784         * class.c (registerClass_libfunc): Remove.
5785         (init_class_processing): Don't set it.
5786         (emit_register_classes): Take list_p parameter.  Fill it in
5787         with _Jv_RegisterClass calls.
5788         * decl.c (java_init_decl_processing): Don't call
5789         init_resource_processing.
5790         * jcf-parse.c (java_emit_static_constructor): New.
5791         (java_parse_file): Call it.
5792         * resource.c (registerResource_libfunc): Remove.
5793         (init_resource_processing): Remove.
5794         (write_resource_constructor): Take list_p parameter.  Fill it in
5795         with _Jv_RegisterResource calls.
5796         * java-tree.h: Update prototypes.
5797
5798 2004-06-29  Bryce McKinlay  <mckinlay@redhat.com>
5799
5800         PR java/1262
5801         * class.c (layout_class_method): Do not override package-private
5802         method if its in a different package.
5803         (split_qualified_name): Move here from parse.y. Rename from
5804         breakdown_qualified. Add comment.
5805         (in_same_package): Move here from parse.y. Add comment.
5806         * java-tree.h (break_down_qualified, in_same_package): Declare.
5807         (in_same_package): Likewise.
5808         * parse.y (breakdown_qualified, in_same_package): Moved to class.c.
5809         Callers updated.
5810
5811 2004-06-29  Andrew Haley  <aph@redhat.com>
5812
5813         * except.c (expand_start_java_handler): Push a new binding level.
5814         Don't build a TRY_CATCH_EXPR now, we'll do it later.  Call
5815         register_exception_range() to register where we'll do it.
5816         (expand_end_java_handler): Remove old bogus code.  Replace with
5817         new logic that simply builds TRY_CATCH_EXPRs and inserts them at
5818         the top of the expression we're curently building.
5819         (maybe_end_try): Delete.
5820         * decl.c (binding_level.exception_range): New field.
5821         (clear_binding_level): Add field exception_range.  Reformat.
5822         (poplevel): Call expand_end_java_handler().
5823         (poplevel): Call java_add_stmt only if functionbody is false.
5824         (maybe_poplevels): Don't call maybe_end_try() from here.
5825         (end_java_method): Clear no longer used trees in function decl.
5826         (register_exception_range): New function.
5827         * java-tree.h (register_exception_range, struct eh_range): Declare.
5828
5829 2004-06-28  Bryce McKinlay  <mckinlay@redhat.com>
5830
5831         * jcf-write.c (get_classfile_modifiers): Formatting fixes.
5832
5833 2004-06-27  Ranjit Mathew  <rmathew@hotmail.com>
5834
5835         Formatting fixes.
5836         * expr.c (class_has_finalize_method): Fix method name indentation.
5837         (expand_java_call): Remove K&R style parameter declaration.
5838         (expand_invoke): Fix statement indentation.
5839         (expand_java_field_op): Likewise.
5840         * parse-scan.y: Fix typo.
5841         (reset_report): Fix method name indentation.
5842         * parse.y (unresolved_type_p, build_expr_block): Remove extra blank
5843         line. Fix typos.
5844         * verify.c (verify_jvm_instructions): Document parameters, insert
5845         page break.
5846         * lang.c (lang_init_source): Fix method name indentation.
5847         * class.c (common_enclosing_context_p): Likewise.
5848         (emit_symbol_table): Fix parameter list indentation.
5849         * decl.c (add_stmt_to_compound, java_add_stmt): Remove K&R style
5850         parameter declaration.
5851         * constants.c: Fix copyright notice indentation.
5852         * typeck.c (find_method_in_superclasses): Fix parameter list
5853         indentation.
5854         (find_method_in_interfaces): Likewise.
5855         * zextract.c (makelong): Fix method name indentation.
5856
5857 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5858
5859         PR java/15715.
5860         * parse.y (create_interface): Set correct access modifiers for
5861         interfaces.
5862         * jcf-write.c (get_classfile_modifiers): New function.
5863         (generate_classfile): Use get_classfile_modifiers, not
5864         get_access_flags.
5865
5866 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5867
5868         * parse.y (register_incomplete_type): Set JDEP_ENCLOSING for "super"
5869         dependency to current parser context, not NULL_TREE, for top-level
5870         classes.
5871         (jdep_resolve_class): Enable member access check for all inner
5872         class dependencies.
5873
5874 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5875
5876         * parse.y (qualify_and_find): Pass type decl, not identifier, to
5877         load_class.
5878
5879 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5880
5881         PR java/15734
5882         * expr.c (expand_java_field_op): Ensure that target class for static
5883         field access has been loaded.
5884
5885 2004-06-26  Bryce McKinlay  <mckinlay@redhat.com>
5886             Ranjit Mathew  <rmathew@hotmail.com>
5887
5888         PR java/1207, java/16178
5889         * jcf-parse.c (load_class): Return immediately if passed a type decl
5890         where CLASS_FROM_SOURCE_P is set. Remove FIXME.
5891         * parse.y (do_resolve_class): Remove checks for CLASS_FROM_SOURCE_P
5892         before calling load_class.
5893         (qualify_and_find): Likewise.
5894         (find_in_imports_on_demand): Likewise.
5895         (find_applicable_accessible_methods_list): Likewise.
5896
5897 2004-06-24  Bryce McKinlay  <mckinlay@redhat.com>
5898
5899         * parse.y (java_layout_seen_class_methods): Don't call load_class
5900         on class defined by source parser.
5901
5902 2004-06-23  Bryce McKinlay  <mckinlay@redhat.com>
5903
5904         * parse.y (set_nested_class_simple_name_value): Removed.
5905         (java_complete_expand_class): Remove calls to
5906         set_nested_class_simple_name_value.
5907
5908 2004-06-22  Andrew Haley  <aph@redhat.com>
5909             Ranjit Mathew  <rmathew@hotmail.com>
5910
5911         Fixes PR java/16113.
5912         * decl.c (force_poplevels): Remove call to expand_end_bindings.
5913
5914 2004-06-22  Ranjit Mathew  <rmathew@hotmail.com>
5915
5916         * parse.y (create_class): Correct diagnostic message about
5917         java.lang.Object extending anything else.
5918
5919 2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5920
5921         * class.c (build_class_ref): Add new operand for COMPONENT_REF.
5922         (build_static_field_ref): Likewise and add new operands for ARRAY_REF.
5923         * constants.c (build_ref_from_constant_pool): Likewise.
5924         * expr.c (build_java_array_length_access): Likewise.
5925         (build_get_class, build_field_ref, build_known_method_ref): Likewise.
5926         (invoke_build_dtable, build_invokevirtual): Likewise.
5927         (build_invokeinterface, java_expand_expr): Likewise.
5928         (emit_init_test_initialization): Likewise.
5929         * java-gimplify.c (java_gimplify_new_array_init): Likewise.
5930         * parse.y (make_qualifed_name, build_array_ref): Likewise.
5931
5932 2004-06-21  Andrew Haley  <aph@redhat.com>
5933
5934         * java-gimplify.c (java_gimplify_block): set TREE_USED on the new
5935         block.
5936
5937 2004-06-21  Joseph S. Myers  <jsm@polyomino.org.uk>
5938
5939         * jcf.h (struct JCF): Change java_source, right_zip and finished
5940         to unsigned int.
5941         * lex.h (struct java_lexer): Change hit_eof, read_anything,
5942         byte_swap and use_fallback to unsigned int.
5943         * parse.h (struct _jdep): Change flag0 to unsigned int.
5944
5945 2004-06-17  Ranjit Mathew  <rmathew@hotmail.com>
5946
5947         Fixes PR java/13948
5948         * parse.y (java_layout_seen_class_methods): Ensure class is loaded
5949         before trying to lay out its methods.
5950         * jcf-parse.c (read_class): Track parsed files using canonical paths
5951         obtained via lrealpath from libiberty.
5952         (java_parse_file): Likewise.
5953         (parse_source_file_1): Rename formal parameter to reflect its
5954         modified purpose. Minor formatting fix.
5955
5956 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
5957
5958         * class.c (emit_register_classes): Make the function uninlinable,
5959         do not set current_function_cannot_inline.
5960         * resource.c (write_resource_constructor): Do not reset
5961         flag_inline_functions around rest_of_compilation.
5962
5963 2004-06-08  Andrew Pinski  <pinskia@physics.uc.edu>
5964
5965         PR java/15769
5966         * expr.c (java_truthvalue_conversion): Handle
5967         UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
5968         ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
5969         i.e. return the expression.
5970
5971 2004-06-03 Mark G. Adams  <mark.g.adams@sympatico.ca>
5972
5973         * gjavah.c: Include version.h
5974
5975 2004-05-31  Bryce McKinlay  <mckinlay@redhat.com>
5976
5977         * jcf-write.c (generate_bytecode_conditional): Correct handling
5978         of unordered conditionals. Add comment.
5979
5980 2004-05-29  Ranjit Mathew  <rmathew@hotmail.com>
5981             Per Bothner  <per@bothner.com>
5982
5983         * java-tree.h (DECL_LOCAL_FINAL_IUD): New macro to test if a
5984         local variable was initialised upon declaration.
5985         * parse.y (declare_local_variables): Set DECL_LOCAL_FINAL_IUD if
5986         variable was final and initialised upon declaration.
5987         * check-init.c (check_final_reassigned): Give error only if a blank
5988         final is not definitely unassigned or if an initialised final is
5989         reassigned.
5990         (check_bool_init): Respect JLS2 16.1.7 requirements for boolean
5991         assignment expressions. Remove case MODIFY_EXPR, label do_default.
5992         (check_init): Perform initialised-variable-removing-optimisation
5993         only on non-final local variables.
5994
5995 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
5996
5997         * jcf-write.c (generate_bytecode_conditional): Handle binops
5998         UNLT_EXPR, UNLE_EXPR, UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR,
5999         and LTGT_EXPR.
6000         (generate_bytecode_insns): Likewise.
6001
6002 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6003
6004         * check-init.c (check_init): Handle binops UNLT_EXPR, UNLE_EXPR,
6005         UNGT_EXPR, UNGE_EXPR, UNEQ_EXPR, and LTGT_EXPR.
6006
6007 2004-05-28  Bryce McKinlay  <mckinlay@redhat.com>
6008
6009         * gcj.texi (Object allocation): Remove _Jv_AllocBytes.
6010         (Mixing with C++): Document JvAllocBytes and RawDataManaged.
6011
6012 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6013
6014         * decl.c (struct binding_level): Add GTY marker. Compile
6015         binding_depth unconditionally.
6016         (current_binding_level, free_binding_level, global_binding_level):
6017         Likewise.
6018         (clear_binding_level): Unconditionally set binding_depth.
6019         (make_binding_level): Use ggc_alloc_cleared, not xmalloc.
6020
6021 2004-05-26  Bryce McKinlay  <mckinlay@redhat.com>
6022
6023         * lex.c (java_new_lexer): Set 'encoding'.
6024         (java_read_char): Improve error message for unrecognized characters.
6025         * lex.h (struct java_lexer): New field 'encoding'.
6026
6027 2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
6028
6029         * Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
6030
6031 2004-05-21  Mark Wielaard  <mark@klomp.org>
6032
6033         * gjavah.c (print_stub_or_jni): Mark functions only JNIEXPORT, not
6034         extern.
6035
6036 2004-05-19  Paolo Bonzini  <bonzini@gnu.org>
6037
6038         * typeck.c: Remove non-printable character 160.
6039
6040 2004-05-17  Ranjit Mathew  <rmathew@hotmail.com>
6041
6042         * check-init.c: Correct minor typos.
6043
6044 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6045
6046         * Make-lang.in, expr.c, java-gimplify.c: Rename
6047         tree-simple.[ch] to tree-gimple.[ch].
6048
6049 2004-05-14  Ranjit Mathew  <rmathew@hotmail.com>
6050
6051         * java-gimplify.c (java_gimplify_expr): Correct minor typos.
6052
6053 2004-05-13  Diego Novillo  <dnovillo@redhat.com>
6054
6055         Merge from tree-ssa-20020619-branch.  See
6056         ChangeLog.tree-ssa for details.
6057
6058         * Make-lang.in, builtins.c, check-init.c, class.c,
6059         constants.c, decl.c, except.c, expr.c, java-except.h,
6060         java-tree.def, java-tree.h, jcf-parse.c, jcf-write.c,
6061         lang.c, lang.opt, parse.y, resource.c: Merged.
6062         * java-gimplify.c: New file.
6063
6064 2004-05-10  Andrew Haley  <aph@redhat.com>
6065
6066         * parse.y (create_class): Set TYPE_VFIELD.
6067         * decl.c (java_init_decl_processing): Likewise.
6068
6069         * expr.c (build_invokevirtual): Remove DECL_VINDEX offset adjustment.
6070         * class.c (make_method_value): Replace DECL_VINDEX with call to
6071         get_method_index().
6072         (get_dispatch_vector): Likewise.
6073         (layout_class_method): Likewise.
6074         Replace set of DECL_VINDEX with call to set_method_index().
6075         (set_method_index): New function.
6076         (get_method_index): New function.
6077         * java-tree.h (set_method_index): New function decl.
6078         (get_method_index): New function decl.
6079
6080 2004-05-10  Andrew Pinski  <pinskia@physics.uc.edu>
6081
6082         * parse.y (check_pkg_class_access): Add new argument
6083         and use it when cl is NULL to call lookup_cl on it.
6084         (parser_check_super_interface): Do not call lookup_cl.
6085         Pass this_decl to check_pkg_class_access and NULL
6086         instead of lookup_cl.
6087         (parser_check_super): Update for change in
6088         check_pkg_class_access.
6089         (do_resolve_class): Likewise.
6090         (process_imports): Likewise.
6091         (find_in_imports_on_demand): Likewise.
6092         (resolve_qualified_expression_name): Likewise.
6093
6094 2004-05-06  Ranjit Mathew  <rmathew@hotmail.com>
6095
6096         Fixes PR java/9685, PR java/15073
6097         * parse.y (accessibility_string): New method.
6098         (not_accessible_field_error): Use accessibility_string()
6099         instead of java_accstring_lookup().
6100         (resolve_qualified_expression_name): Check with
6101         check_pkg_class_access() before allowing access using
6102         qualified names.
6103         Fix comment typo.
6104         Use check_pkg_class_access() instead of not_accessible_p()
6105         for unqualified types.
6106         (not_accessible_p): Use DECL_CONTEXT (member) instead of
6107         REFERENCE for package-private access checking.
6108         (patch_method_invocation): Use accessibility_string() instead
6109         of java_accstring_lookup().
6110
6111 2004-04-30  Ranjit Mathew  <rmathew@hotmail.com>
6112
6113         Fixes PR java/15133
6114         * gjavah.c (struct method_name): Add member is_native.
6115         (overloaded_jni_method_exists_p): Match candidate method only if
6116         it is native.
6117         (print_method_info): Initialise is_native flag from the method's
6118         access flags.
6119
6120 2004-04-30  Roger Sayle  <roger@eyesopen.com>
6121
6122         * builtins.c (java_builtins): Add acos, asin, ceil and floor.
6123         (initialize_builtins): Likewise, define acos, asin, ceil and floor.
6124
6125 2004-04-22  Roger Sayle  <roger@eyesopen.com>
6126
6127         * resource.c (write_resource_constructor): Guard call to possibly
6128         NULL targetm.asm_out.constructor with targetm.have_ctors_dtors.
6129
6130 2004-04-19  Bryce McKinlay  <mckinlay@redhat.com>
6131
6132         * class.c (make_class_data): Add new field aux_info.
6133         * decl.c (java_init_decl_processing): Push type and decl for
6134         `aux_info'.
6135
6136 2004-04-15  Bryce McKinlay  <mckinlay@redhat.com>
6137
6138         * expr.c (expand_java_NEW): Don't use size argument for
6139         _Jv_AllocObject calls.
6140         * parse.y (patch_invoke): Likewise.
6141
6142 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6143
6144         * expr.c (build_invokeinterface): Remove unused variables to
6145         fix warnings.
6146
6147 2004-04-12  Bryce McKinlay  <mckinlay@redhat.com>
6148
6149         * class.c (get_interface_method_index): New function. Return dispatch
6150         index for interface method.
6151         (make_method_value): For interface methods, set index field to
6152         iface dispatch index, not DECL_VINDEX.
6153         * expr.c (build_invokeinterface): Use get_interface_method_index.
6154
6155 2004-03-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6156
6157         * jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
6158
6159 2004-03-31  Andrew Haley  <aph@redhat.com>
6160
6161         PR java/14104
6162         * jcf-io.c (opendir_in_zip): Tidy up error handling.
6163
6164 2004-03-30  Zack Weinberg  <zack@codesourcery.com>
6165
6166         * builtins.c, expr.c, jcf.h, parse.h: Use new shorter
6167         form of GTY markers.
6168
6169 2004-03-25  Marcus Meissner  <meissner@suse.de>
6170
6171         PR java/14689:
6172         * jcf-path.c (jcf_path_extdirs_arg): Add missing closedir.
6173
6174 2004-03-23  Tom Tromey  <tromey@redhat.com>
6175
6176         PR java/14315:
6177         * jcf-write.c (make_class_file_name): Don't report if mkdir
6178         failed with EEXIST.
6179
6180 2004-03-23  Tom Tromey  <tromey@redhat.com>
6181
6182         * gcj.texi (Extensions): Document GCJ_PROPERTIES.
6183
6184 2004-03-20  Kazu Hirata  <kazu@cs.umass.edu>
6185
6186         * class.c, gjavah.c, lang.c: Fix comment typos.
6187         * gcj.texi: Fix typos.
6188
6189 2004-03-19  Per Bothner  <per@bothner.com>
6190
6191         * gcj.texi (Code Generation):  Document new flags and assert defaults.
6192
6193         * class.c (assume_compiled_node_struct):  Rename type to
6194         class_flag_node_struct, as it is now also used for enable_assertions.
6195         Rename assume_compiled_node typedef.  Rename excludep field to value.
6196         (find_assume_compiled_node):  Rename function to find_class_flag_node.
6197         Minor optimization - avoid needless strlen.
6198         (add_assume_compiled):  Some tweaking and optimization.
6199         Rename and generalize to add_class_flag takem an extra parameter.
6200         (add_assume_compled):  New just calls add_class_flag.
6201         (add_enable_assert, enable_assertions):  New functions.
6202         (enable_assert_tree):  New static.
6203         * java-tree.h (add_enable_assert, enable_assertions): New declarations.
6204         * lang.opt (fenable-assertions, fenable-assertions=,
6205         fdisable-assertions, fdisable-assertions=):  New options.
6206         * lang.c (java_handle_option):  Handle new options.
6207         * parse.y (build_incomplete_class_ref):  Handle class$ in an inner
6208         class in an interface - create helper class nested in outer interface.
6209         (build_assertion):  Short-circuit if enable_assertions is false.
6210
6211 2004-03-18  Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6212
6213         * java-tree.h: Changes throughout to add checking to macros
6214         and numerous whitespace changes.
6215         (VAR_OR_FIELD_CHECK): New macro.
6216         * jcf-write.c (get_access_flags): Use FIELD_PUBLIC, METHOD_PUBLIC,
6217         FIELD_FINAL, and METHOD_FINAL instead of CLASS_PUBLIC and CLASS_FINAL.
6218
6219 2004-03-16  Per Bothner  <per@bothner.com>
6220
6221         * jcf-jump.c (options):  New --print-constants option.
6222         * gcj.texi (Invoking jcf-dump):  Document --print-constants.
6223
6224         * jcf-dump.c (flag_print_constant_pool):  Default to off.
6225         (print_constant_terse_with_index):  New helper function.
6226         (various places):  Check flag_print_constant_pool where missing.
6227         (main):  If verbose set flag_print_constant_pool.
6228         (HANDLE_INNERCLASSES_ATTRIBUTE):  Null inner class name is anonymous.
6229
6230 2004-03-15  Andrew Haley  <aph@redhat.com>
6231
6232         PR java/14581
6233         * parse.y (java_complete_lhs): Check that final variable has an
6234         initializer.
6235
6236 2004-03-12  Andrew Haley  <aph@redhat.com>
6237
6238         PR java/14551
6239         * typeck.c (convert): Clear TREE_OVERFLOW after an integer
6240         conversion.
6241
6242 2004-02-29  Roger Sayle  <roger@eyesopen.com>
6243
6244         * jcf-parse.c (java_parse_file): Handle the case that input_filename
6245         is NULL.
6246
6247 2004-02-27  Per Bothner  <per@bothner.com>
6248
6249         * parse.y (build_assertion):  Re-do 02-25 change following Jeff Sturm
6250         suggestion:  Use build_incomplete_class_ref.
6251         This fixes PR java/13508, java/11714.
6252
6253 2004-02-27  Kazu Hirata  <kazu@cs.umass.edu>
6254
6255         * java/parse.h: Update copyright.
6256
6257 2004-02-26  Andrew Haley  <aph@redhat.com>
6258
6259         PR java/14231:
6260         * parse.y (check_interface_throws_clauses): Check for
6261         !METHOD_INVISIBLE (iface_method).
6262         * class.c (layout_class_methods): Check for CLASS_INTERFACE as
6263         well as CLASS_ABSTRACT.
6264
6265 2004-02-25  Per Bothner  <per@bothner.com>
6266
6267         * parse.y (build_assertion):  If we're in an inner class, create the
6268         class$ helper routine in the outer class.
6269
6270 2004-02-19  Richard Henderson  <rth@redhat.com>
6271
6272         * parse.y (switch_label): Use make_node for DEFAULT_EXPR.
6273
6274 2004-02-16  Geoffrey Keating  <geoffk@apple.com>
6275
6276         * Make-lang.in (java.install-man): Add extra dependencies.
6277
6278 2004-02-13  Geoffrey Keating  <geoffk@apple.com>
6279
6280         * Make-lang.in: Install man pages under the same names
6281         (possibly transformed) as the program they document.
6282
6283 2004-02-10  Joseph S. Myers  <jsm@polyomino.org.uk>
6284
6285         * gjavah.c: Include "intl.h".
6286         (error): New function.
6287         (main): Call gcc_init_libintl.
6288         (get_field_name, throwable_p, print_c_decl, print_full_cxx_name,
6289         print_stub_or_jni, process_file, main): Use error rather than
6290         fprintf.
6291         (print_method_info, usage, help, version, main): Mark strings for
6292         translation with _.  Avoid splitting up sentences.  Send
6293         information messages to stdout.
6294         * jcf-dump.c: Include "intl.h".
6295         (main): Call gcc_init_libintl.
6296         (process_class, usage, help, version, main, CHECK_PC_IN_RANGE):
6297         Mark error, usage and version messages for translation with _.
6298         Avoid splitting up sentences.
6299         * jv-scan.c: Include "intl.h".
6300         (fatal_error, warning): Change parameter s to msgid.  Translate
6301         messages.
6302         (main): Call gcc_init_libintl.
6303         (usage, help, version): Mark error, usage and version messages for
6304         translation with _.  Avoid splitting up sentences.
6305         * jvgenmain.c: Include "intl.h".
6306         (main): Call gcc_init_libintl.
6307         (usage, main): Mark error messages for translation with _.
6308         * Make-lang.in (GCJH_OBJS, JVSCAN_OBJS, JCFDUMP_OBJS,
6309         JVGENMAIN_OBJS): Add intl.o.
6310         (java/jcf-dump.o, java/gjavah.o, java/jv-scan.o,
6311         java/jvgenmain.o): Update dependencies.
6312
6313 2004-02-08  Per Bothner  <per@bothner.com>
6314
6315         * parse.y (resolve_qualified_expression_name):  In case of inaccessible
6316         class don't use not_accessible_field_error, which can get confused.
6317
6318 2004-02-05  Kelley Cook  <kcook@gcc.gnu.org>
6319
6320         Make-lang.in (po-generated):  Delete.
6321
6322 2004-02-05  Kazu Hirata  <kazu@cs.umass.edu>
6323
6324         * Make-lang.in (java/decl.o, java/expr.o, java/parse.o):
6325         Depend on target.h.
6326         * decl.c: Include target.h.
6327         (start_java_method): Replace PROMOTE_PROTOTYPES with
6328         targetm.calls.promote_prototypes.
6329         * expr.c: Include target.h.
6330         (pop_arguments): Replace PROMOTE_PROTOTYPES with
6331         targetm.calls.promote_prototypes.
6332         * parse.y: Include target.h.
6333         (start_complete_expand_method): Replace PROMOTE_PROTOTYPES
6334         with targetm.calls.promote_prototypes.
6335
6336 2004-02-04  Kazu Hirata  <kazu@cs.umass.edu>
6337
6338         * typeck.c: Update copyright.
6339
6340 2004-02-02  Tom Tromey  <tromey@redhat.com>
6341
6342         * decl.c (java_init_decl_processing): Remove duplicate
6343         gnu/gcj/RawData.
6344
6345 2004-01-30  Kelley Cook  <kcook@gcc.gnu.org>
6346
6347         * Make-lang.in (doc/gcj.dvi): Use $(abs_docdir).
6348
6349 2004-01-28  Andrew Pinski  <pinskia@physics.uc.edu>
6350
6351         * expr.c (build_field_ref): Move variable
6352         definition up.
6353
6354 2004-01-28  Andrew Haley  <aph@redhat.com>
6355
6356         * expr.c (build_field_ref): Widen field offset.
6357
6358 2004-01-27  Andrew Haley  <aph@redhat.com>
6359
6360         java/13273
6361         * parse.y (check_interface_throws_clauses): Make sure class_decl
6362         has been loaded.
6363
6364 2004-01-22  Jeff Sturm  <jsturm@one-point.com>
6365
6366         PR java/13733
6367         * parse.y (patch_assignment): Don't modify lhs_type for
6368         reference assignments.
6369
6370 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6371
6372         * Make-lang.in: Replace $(docdir) with doc.
6373         (java.info, java.srcinfo, java.man, java.srcman): New rules.
6374         (java.install-man): Revamp rule.
6375
6376 2004-01-20  Kelley Cook  <kcook@gcc.gnu.org>
6377
6378         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_TARGET_INSTALL_NAME,
6379         GCJH_TARGET_INSTALL_NAME): Define via a immediate $(shell)
6380         instead of deferred backquote.
6381
6382 2004-01-16  Andrew Pinski  <pinskia@physics.uc.edu>
6383
6384         * typeck.c (find_method_in_interfaces): Move variable
6385         definition up.
6386
6387 2004-01-16  Andrew Haley  <aph@redhat.com>
6388
6389         PR java/13273:
6390         * typeck.c (shallow_find_method): New.
6391         (find_method_in_superclasses): New.
6392         (find_method_in_interfaces): New.
6393         (lookup_do): Rewrite.
6394         * java-tree.h (SEARCH_ONLY_INTERFACE): Delete.
6395
6396         * jcf-parse.c (read_class): Save and restore output_class.
6397         * decl.c (java_expand_body): Set output_class from fndecl.
6398
6399 2004-01-15  Michael Chastain  <mec.gnu@mindspring.com>
6400
6401         * class.c (gen_indirect_dispatch_tables): Fix string length
6402         calculations.
6403
6404 2004-01-15  Kelley Cook  <kcook@gcc.gnu.org>
6405
6406         * Make-lang.in (parse.c, parse-scan.c): Always build in doc directory.
6407         (java.srcextra): Copy above back to source directory if requested.
6408         (po-generated): Delete reference to $(parsedir).
6409         (java/parse.o, java/parse-scan.o): Delete reference to $(parsedir).
6410         Use implicit rule.
6411
6412 2004-01-14  Jan Hubicka  <jh@suse.cz>
6413
6414         * lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
6415         estimation.
6416
6417 2004-01-09  Mark Mitchell  <mark@codesourcery.com>
6418
6419         * java-tree.h (java_expand_expr): Change prototype.
6420         * expr.c (java_expand_expr): Add alt_rtl parameter.
6421
6422 2004-01-09  Andrew Haley  <aph@redhat.com>
6423
6424         PR java/12755:
6425         * parse.y (java_fix_constructors):  Set output_class.
6426         (java_reorder_fields): Likewise.
6427         (java_layout_classes): Likewise.
6428         (java_expand_classes): Generate indirect dispatch tables.
6429         (java_expand_classes): Set output_class.
6430         (java_finish_classes): Likewise.
6431         * lang.c (java_init): Turn on always_initialize_class_p if we're
6432         using indirect dis[atch.
6433         (java_decl_ok_for_sibcall): Use output_class, not current_class.
6434         (java_get_callee_fndecl): Use class local atable.
6435         * jcf-parse.c
6436         (always_initialize_class_p): Decl moved to java-tree.h.
6437         (HANDLE_CLASS_INFO): Set output_class.
6438         (read_class): Likewise.
6439         (parse_class_file): Call gen_indirect_dispatch_tables.
6440         (parse_zip_file_entries): Set output_class.
6441         (java_parse_file): Set output_class.  Don't emit symbol tables.
6442         * java-tree.h (output_class): New.
6443         Remove global declarations for otable, atable, and ctable.
6444         (always_initialize_class_p): moved here from decl.c.
6445         (DECL_OWNER): New.
6446         (TYPE_ATABLE_METHODS, TYPE_ATABLE_SYMS_DECL, TYPE_ATABLE_DECL,
6447         TYPE_OTABLE_METHODS, TYPE_OTABLE_SYMS_DECL, TYPE_OTABLE_DECL,
6448         TYPE_CTABLE_DECL, TYPE_CATCH_CLASSES): New.
6449         (struct lang_type): Add otable_methods, otable_decl,
6450         otable_syms_decl, atable_methods, atable_decl, atable_syms_decl,
6451         ctable_decl, catch_classes, type_to_runtime_map.
6452         * expr.c (build_field_ref): Make otable, atable, and ctable class
6453         local rather than global.
6454         (build_known_method_ref): Likewise.
6455         (build_invokeinterface): Likewise.
6456         (java_expand_expr): Pass runtime type (rather than actual type) to
6457         expand_start_catch.
6458         * except.c (prepare_eh_table_type): Create TYPE_TO_RUNTIME_MAP for
6459         this class.  Look up each class in that map to delete duplicates.
6460         (expand_end_java_handler): Pass runtime type (rather than actual
6461         type) to expand_start_catch.
6462         * decl.c: (always_initialize_class_p): Decl moved to java-tree.h.
6463         (do_nothing): New.
6464         (java_init_decl_processing): Rearrange things.  Remove global
6465         declarations of otable, atable, and ctable.
6466         (java_init_decl_processing): Make lang_eh_runtime_type do_nothing.
6467         (java_expand_body): Set output_class.
6468         * constants.c (build_constant_data_ref): Use output_class, not
6469         current_class.
6470         (alloc_name_constant): Likewise.
6471         * class.c (gen_indirect_dispatch_tables): New.
6472         (build_class_ref): Generate hard reference to superclass, even if
6473         using indirect dispatch.
6474         (build_static_field_ref): Use class local atable.
6475         (make_class_data): Generate hard reference to superclass, even if
6476         using indirect dispatch.
6477         Generate symbolic references to interfaces when using indirect
6478         dispatch.
6479         (make_class_data): Emit otable, atable, and ctable.
6480         Make otable, atable, and ctable class local rather than global.
6481         (emit_catch_table): Make otable, atable, and ctable class local
6482         rather than global.
6483
6484 2003-12-25  Andrew Pinski  <pinskia@physics.uc.edu>
6485
6486         * parse.y (catch_clause_parameter): Fix typo.
6487
6488         PR java/13404
6489         * parse.y: (catch_clause_parameter): Return early if $3, aka
6490         formal_parameter, is null.
6491
6492 2003-12-20  Kazu Hirata  <kazu@cs.umass.edu>
6493
6494         * class.c: Remove uses of "register" specifier in
6495         declarations of arguments and local variables.
6496         * decl.c: Likewise.
6497         * expr.c: Likewise.
6498         * gjavah.c: Likewise.
6499         * jcf-dump.c: Likewise.
6500         * jcf-io.c: Likewise.
6501         * jcf-parse.c: Likewise.
6502         * jcf-write.c: Likewise.
6503         * keyword.h: Likewise.
6504         * parse.y: Likewise.
6505         * typeck.c: Likewise.
6506         * verify.c: Likewise.
6507
6508 2003-12-06  Kelley Cook  <kcook@gcc.gnu.org>
6509
6510         * Make-lang.in (GCJ_CROSS_NAME): Delete.
6511         (java.install_common, java.install-man): Adjust for above.
6512         (java.uninstall): Likewise.
6513
6514 2003-12-03  Michael Koch  <konqueror@gmx.de>
6515
6516         * class.c (make_class_data):
6517         Push field value to 'hack_signers' instead of 'signers'.
6518         * decl.c (java_init_decl_processing):
6519         Push field 'hack_signers' instead of 'signers'.
6520
6521 2003-12-03  Zack Weinberg  <zack@codesourcery.com>
6522
6523         * lex.h: Check both HAVE_ICONV and HAVE_ICONV_H before
6524         including iconv.h.
6525
6526 2003-12-03  Ralph Loader  <rcl@ihug.co.nz>
6527
6528         PR java/12374:
6529         * parse.y (qualify_ambiguous_name): Remove lots of broken
6530         field access processing - there's no need to do that here,
6531         because we have resolve_field_access.  Remove
6532         RESOLVE_EXPRESSION_NAME_P as it isn't used anywhere else.
6533         * java-tree.h: Remove RESOLVE_EXPRESSION_NAME_P as it isn't
6534         used.
6535
6536 2003-12-01  Jeff Sturm  <jsturm@one-point.com>
6537
6538         Fix PR java/13237
6539         * parse.y (java_complete_lhs): Save location prior to patching
6540         CALL_EXPR.
6541
6542 2003-11-25  Mohan Embar  <gnustuff@thisiscool.com>
6543
6544         PR java/12548
6545         * resource.c (write_resource_constructor): Append
6546         "_resource" to constructor identifier name.
6547
6548 2003-11-25  Jeff Sturm  <jsturm@one-point.com>
6549
6550         Fix PR java/13183.
6551         * constants.c (cpool_for_class): New function.
6552         (outgoing_cpool): Remove global variable.
6553         (alloc_name_constant): Use cpool_for_class.
6554         (build_constants_constructor): Likewise.
6555         * decl.c (java_expand_body): Set current_class.
6556         * java-tree.h (outgoing_cpool) Remove declaration.
6557         (init_outgoing_cpool): Likewise.
6558         * jcf-parse.c (init_outgoing_cpool): Remove function.
6559         (parse_class_file): Don't call init_outgoing_cpool.
6560         * parse.y (java_complete_expand_methods): Don't call
6561         init_outgoing_cpool.  Don't save outgoing_cpool.
6562         (java_expand_classes): Don't restore outgoing_cpool.
6563         (java_finish_classes): Likewise.
6564
6565 2003-11-24  Mohan Embar  <gnustuff@thisiscool.com>
6566
6567         * Make-lang.in: (java.install-common) Add
6568         symlink for $(target_noncanonical)-gcjh for
6569         native builds.
6570
6571 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6572
6573         * Make-lang.in (java.extraclean): Delete.
6574
6575 2003-11-20  Joseph S. Myers  <jsm@polyomino.org.uk>
6576
6577         * Make-lang.in (check-java): Add.
6578
6579 2003-11-19  Jeff Sturm  <jsturm@one-point.com>
6580
6581         Fix PR java/13024.
6582         * except.c (prepare_eh_table_type): Allocate variable-sized
6583         buffer `buf' with alloca.
6584
6585 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6586
6587         Fix PR java/12857.
6588
6589         decl.c (java_init_decl_processing): Don't initialize
6590         class_not_found_type_node, no_class_def_found_type_node.
6591
6592         java-tree.h (JTI_CLASS_NOT_FOUND_TYPE_NODE,
6593         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE): Remove from java_tree_index.
6594         (class_not_found_type_node, no_class_def_found_type_node):
6595         Don't define.
6596
6597         parse.y (build_dot_class_method_invocation): Add this_class
6598         argument.  Qualify method invocations to a different class.
6599         (create_new_parser_context): Initialize saved_data_ctx to 0.
6600         (java_parser_context_save_global): Initialize saved_data_ctx to 1.
6601         (build_dot_class_method): Don't load classes.  Register
6602         incomplete types.
6603         (build_incomplete_class_ref): Special cases for interfaces
6604         and inner classes.  Move build_dot_class_method call to here...
6605         (patch_incomplete_class_ref): ...from here.  Pass current_class
6606         to build_dot_class_method_invocation.
6607         (build_assertion): Pass class_type to
6608         build_dot_class_method_invocation.
6609         (encapsulate_with_try_catch): Handle EXPR_WITH_FILE_LOCATION node.
6610
6611 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
6612
6613         Fix PR java/12739.
6614         * java-tree.h (BLOCK_EMPTY_P): Define.
6615         * parse.y (java_complete_lhs): Check for empty blocks
6616         in TRY_FINALLY_EXPR case.
6617
6618 2003-11-17  Andrew Haley  <aph@redhat.com>
6619
6620         * java-tree.h (LOCAL_VAR_OUT_OF_SCOPE_P): New.
6621         (struct lang_decl_var:freed): New variable.
6622         * decl.c (poplevel): Mark local vars that have gone out of scope.
6623         (push_jvm_slot): Don't use the RTL of a var that has gone out of
6624         scope.
6625
6626 2003-11-16  Jason Merrill  <jason@redhat.com>
6627
6628         * Make-lang.in (java.tags): Create TAGS.sub files in each directory
6629         and TAGS files that include them for each front end.
6630
6631 2003-11-15  Tom Tromey  <tromey@redhat.com>
6632
6633         * gjavah.c (print_stub_or_jni): Pass `env' to FatalError.
6634
6635 2003-11-12  Jason Merrill  <jason@redhat.com>
6636
6637         PR optimization/12547
6638         * lang.c (java_tree_inlining_walk_subtrees): Just walk
6639         BLOCK_EXPR_BODY directly.
6640
6641 2003-11-12  Andrew Haley  <aph@redhat.com>
6642
6643         PR java/11045
6644         * parse.y (fold_constant_for_init): Check that we really do have a
6645         constant.
6646
6647         PR java/11533
6648         * lang.c (merge_init_test_initialization): Clear DECL_INITIAL for
6649         init_test_decls being inlined.
6650
6651         PR java/12890:
6652         * parse.y (do_resolve_class): Check return value from
6653         breakdown_qualified().
6654
6655 2003-11-11  Tom Tromey  <tromey@redhat.com>
6656
6657         PR java/12915:
6658         * parse.y (merge_string_cste): Handle case where we have a
6659         pointer that happens to be zero, not null_pointer_node.
6660
6661 2003-11-10  Tom Tromey  <tromey@redhat.com>
6662
6663         * jcf-parse.c (classify_zip_file): Correctly compare
6664         filename_length against length of manifest file's name.
6665
6666 2003-11-08  Tom Tromey  <tromey@redhat.com>
6667
6668         PR java/12894:
6669         * jcf-parse.c (classify_zip_file): Only skip MANIFEST.MF file.
6670
6671 2003-11-06  Andrew Haley  <aph@redhat.com>
6672
6673         * expr.c (java_stack_swap): Make sure destination stack slots are
6674         of the correct type.
6675
6676 2003-11-03  Kelley Cook  <kcook@gcc.gnu.org>
6677
6678         * Make-lang.in (dvi): Move targets to $(docobjdir).
6679         (gcj.dvi): Simplify rule and adjust target.
6680         (gcj.info): Simplify rule.
6681         (gcj.pod): New intermediate rule.
6682         (gcjh.pod): Likewise.
6683         (jv-scan.pod): Likewise.
6684         (jcf-dump.pod): Likewise.
6685         (gij.pod): Likewise.
6686         (jv-convert.pod): Likewise.
6687         (rmic.pod): Likewise.
6688         (rmiregistry.pod): Likewise.
6689         (gcj.1): Delete.
6690         (gcjh.1): Delete.
6691         (jv-scan.1): Delete.
6692         (jcf-dump.1): Delete.
6693         (gij.1): Delete.
6694         (jv-convert.1): Delete.
6695         (rmic.1): Delete.
6696         (rmiregistry.1): Delete.
6697
6698 2003-11-02  Jeff Sturm  <jsturm@one-point.com>
6699
6700         Fixes PR java/12866.
6701         * parse.y (resolve_qualified_expression_name): Move test
6702         for outer field access methods from here...
6703         (check_thrown_exceptions) ...to here.
6704
6705 2003-11-01  Kelley Cook  <kcook@gcc.gnu.org>
6706
6707         * .cvsignore: Delete.
6708
6709 2003-10-28  Frank Ch. Eigler  <fche@redhat.com>
6710
6711         * verify.c (verify_jvm_instructions): Don't warn about legal
6712         eh binding regions generated for example by jdk 1.4.1.
6713
6714 2003-10-24  David S. Miller  <davem@redhat.com>
6715
6716         * jcf-parse.c (jcf_parse): Fix args to fatal_error().
6717
6718 2003-10-22  Andrew Haley  <aph@redhat.com>
6719
6720         * lang.c (LANG_HOOKS_GET_CALLEE_FNDECL): New.
6721         (java_get_callee_fndecl): New.
6722
6723         * jcf-parse.c (java_parse_file): Call emit_catch_table().
6724
6725         * java-tree.h (ctable_decl): New.
6726         (catch_classes):  New.
6727         (java_tree_index): Add JTI_CTABLE_DECL, JTI_CATCH_CLASSES.
6728
6729         * decl.c (java_init_decl_processing): Add catch_class_type.
6730         Add ctable_decl.
6731         Add catch_classes field.
6732
6733         * class.c (build_indirect_class_ref): Break out from
6734         build_class_ref.
6735         (make_field_value): Check flag_indirect_dispatch.
6736         (make_class_data): Ditto.
6737         Tidy uses of PUSH_FIELD_VALUE.
6738         Add field catch_classes.
6739         (make_catch_class_record): New.
6740
6741         * java-tree.h (PUSH_FIELD_VALUE): Tidy.
6742
6743 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6744
6745         * jcf-write.c: Follow spelling conventions.
6746         * parse.y: Likewise.
6747
6748 2003-10-22  Kazu Hirata  <kazu@cs.umass.edu>
6749
6750         * ChangeLog: Fix typos.
6751         * expr.c: Fix comment typos.
6752         * jcf-write.c: Likewise.
6753         * lang.c: Likewise.
6754         * lex.c: Likewise.
6755         * mangle.c: Likewise.
6756         * parse-scan.y: Likewise.
6757         * parse.y: Likewise.
6758
6759 2003-10-22  Tom Tromey  <tromey@redhat.com>
6760
6761         * expr.c (expand_byte_code): Only warn about dead bytecode when
6762         extra_warnings is set.
6763
6764 2003-10-22  Bryce McKinlay  <bryce@mckinlay.net.nz>
6765
6766         Fix for PR java/12586.
6767         * mangle.c (find_compression_record_match): Don't iterate through
6768         package namespace elements unless they all match compression_table
6769         entries.
6770
6771 2003-10-20  Kelley Cook  <kcook@gcc.gnu.org>
6772
6773         * Make-lang.in (info): Honor $(parsedir) and $(docobjdir).
6774         (generate-manpages): Likewise.
6775         (java.maintainer-clean): Likewise.
6776         (gcj.info): Likewise.
6777         (gcj.1): Likewise.
6778         (gcjh.1): Likewise.
6779         (jv-scan.1): Likewise.
6780         (jcf-dump.1): Likewise.
6781         (gij.1): Likewise.
6782         (jv-convert.1): Likewise.
6783         (rmic.1): Likewise.
6784         (rmiregistry.1): Likewise.
6785         (java.install-man): Likewise.
6786         (parse-scan.o): Move and define complete compile line.
6787         (parse.o): Likewise.
6788         (jcf-tree-inline.o): Move.
6789
6790 2003-10-20  Mark Mitchell  <mark@codesourcery.com>
6791
6792         * Make-lang.in (info): Update dependencies.
6793         (java.install-info): Remove.
6794         ($(srcdir)/java/gcj.info): Replace with ...
6795         ($(docobjdir)/gcj.info): ... this.
6796
6797 2003-10-14  Nathanael Nerode  <neroden@gcc.gnu.org>
6798
6799         * Make-lang.in: Replace uses of $(target_alias) with
6800         $(target_noncanonical).
6801
6802 2003-10-09  Tom Tromey  <tromey@redhat.com>
6803
6804         * decl.c (java_init_decl_processing): Declare signers field.
6805         * class.c (make_class_data): Set signers field.
6806
6807 2003-10-09  Jason Merrill  <jason@redhat.com>
6808
6809         * parse.y (patch_assignment): Use make_node to create a BLOCK.
6810         * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
6811         POINTER_TYPE.
6812
6813 2003-10-06  Mark Mitchell  <mark@codesourcery.com>
6814
6815         * Make-lang.in (java.info): Replace with ...
6816         (info): ... this.
6817         (java.dvi): Replace with ...
6818         (dvi): ... this.
6819         (java.generated-manpages): Replace with ...
6820
6821 2003-10-03  Kelley Cook  <kelleycook@wideopenwest.com>
6822
6823         * builtins.c, jcf.h, jvspec.c: Remove PARAMS macros.
6824
6825 2003-10-01  Andrew Haley  <aph@redhat.com>
6826
6827         * jcf-parse.c (java_parse_file): Write otable and atable.
6828         * java-tree.h (atable_methods): New.
6829         (atable_decl): New.
6830         (atable_syms_decl): New.
6831         (enum java_tree_index): Add JTI_ATABLE_METHODS, JTI_ATABLE_DECL,
6832         JTI_ATABLE_SYMS_DECL.  Rename JTI_METHOD_SYMBOL* to JTI_SYMBOL*.
6833         (symbol_*type): Rename method_symbol* to symbol*type.
6834         (emit_offset_symbol_table): Delete.
6835         (emit_symbol_table): New.
6836         (get_symbol_table_index): New.
6837         (atable_type): New.
6838         * expr.c (build_field_ref): Handle flag_indirect_dispatch.
6839         (build_known_method_ref): Likewise.
6840         (get_symbol_table_index): Rename from get_offset_table_index.
6841         Parameterize to allow re-use by differing types of symbol table.
6842         (build_invokevirtual): Pass table to get_offset_table_index.
6843         * decl.c (java_init_decl_processing): Push types and decls for
6844         atable and atable_syyms.
6845         * class.c (build_static_field_ref): Handle flag_indirect_dispatch.
6846         (make_class_data): Add new fields atable and atable_syms.
6847         (emit_symbol_table): Rename from emit_offset_symbol_table.
6848         Parameterize to allow re-use by different types of symbol table.
6849         (build_symbol_entry): Renamed from build_method_symbols_entry.
6850
6851 2003-09-30  Roger Sayle  <roger@eyesopen.com>
6852
6853         * jcf-write.c (generate_bytecode_insns): Implement evaluate-once
6854         semantics for SAVE_EXPR, by caching the result in a temporary.
6855
6856 2003-09-28  Richard Henderson  <rth@redhat.com>
6857
6858         * check-init.c (check_init): Save and restore input_location
6859         instead of file and line separately.
6860         * decl.c (java_expand_body): Likewise.
6861         * jcf-write.c (generate_bytecode_insns): Likewise.
6862         * parse.y (safe_layout_class): Likewise.
6863         * jcf-parse.c (read_class, parse_class_file): Likewise.
6864         (java_parse_file): Use %H for warning locator.
6865
6866 2003-09-28  Roger Sayle  <roger@eyesopen.com>
6867
6868         * expr.c (java_check_reference): Use the semantics of COND_EXPRs
6869         with void-type branches instead of using a COMPOUND_EXPR.
6870
6871 2003-09-28  Jeff Sturm  <jsturm@one-point.com>
6872
6873         * decl.c (java_optimize_inline, dump_function): Remove.
6874         * java-tree.h (java_optimize_inline): Remove declaration.
6875         * jcf-parse.c (java_parse_file): Assume flag_unit_at_a_time is set.
6876         * parse.y (source_end_java_method, java_expand_classes):
6877         Likewise.  Remove dead code.
6878
6879 2003-09-27  Roger Sayle  <roger@eyesopen.com>
6880
6881         * lang.c (java_init_options): Set flag_evaluation_order.
6882         * expr.c (force_evaluation_order): Don't attempt to force
6883         evaluation order of binary operations using save_expr.
6884         * parse.y (java_complete_lhs): No longer need to call
6885         force_evaluation_order when constructing binary operators.
6886
6887 2003-09-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
6888             Bryce McKinlay  <bryce@mckinlay.net.nz>
6889
6890         PR java/1333:
6891         * parse.y (not_accessible_field_error): New function.
6892         (resolve_expression_name): Check field access permissions.
6893         (resolve_qualified_expression_name): Use
6894         not_accessible_field_error.
6895         (resolve_qualified_expression_name): Likewise.
6896
6897 2003-09-24  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6898
6899         * class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
6900
6901 2003-09-23  Roger Sayle  <roger@eyesopen.com>
6902
6903         * jcf-write.c (generate_bytecode_insns): Optimize binary operations
6904         with equal operands without side-effects.
6905
6906 2003-09-22  Jeff Sturm  <jsturm@one-point.com>
6907
6908         * decl.c (java_init_decl_processing): Don't emit otable decls
6909         if flag_indirect_dispatch is not set.
6910
6911 2003-09-21  Richard Henderson  <rth@redhat.com>
6912
6913         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6914         resource.c: Revert.
6915
6916 2003-09-21  Richard Henderson  <rth@redhat.com>
6917
6918         * class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
6919         resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.
6920
6921 2003-09-20  Richard Henderson  <rth@redhat.com>
6922
6923         * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
6924
6925 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6926
6927         * expr.c (java_truthvalue_conversion): Remove FFS_EXPR case.
6928         * check-init.c (check_init): Likewise.
6929
6930 2003-09-18  Roger Sayle  <roger@eyesopen.com>
6931
6932         * jcf-write.c (generate_bytecode_insns): Add support for fconst_2.
6933
6934 2003-09-16  Andrew Haley  <aph@redhat.com>
6935
6936         * jcf-write.c (generate_bytecode_insns): Add MIN_EXPR and MAX_EXPR.
6937
6938 2003-09-17  Ranjit Mathew  <rmathew@hotmail.com>
6939
6940         Fixes PR java/9577
6941         * mangle.c (find_compression_record_match): Skip
6942         over a "6JArray" (the array template mangled string)
6943         IDENTIFIER_NODE.
6944         (mangle_array_type): Correct minor typo.
6945         (atms): Move definition to the beginning.
6946
6947 2003-09-16  Bryce McKinlay  <bryce@mckinlay.net.nz>
6948
6949         * class.c (add_miranda_methods): Ensure super-interfaces are laid
6950         out. Fix for PR java/12254.
6951
6952 2003-09-11  Richard Henderson  <rth@redhat.com>
6953
6954         * parse.y (source_end_java_method): Update for new
6955         cgraph_finalize_function argument.
6956
6957 2003-09-09  Richard Henderson  <rth@redhat.com>
6958
6959         * parse.y (source_end_java_method): Update call to
6960         cgraph_finalize_function.
6961
6962 2003-09-03  Jeff Sturm  <jsturm@one-point.com>
6963
6964         * decl.c (java_expand_body): New function.
6965         * expr.c (build_class_init): Set DECL_IGNORED_P.
6966         * java-tree.h (start_complete_expand_method,
6967         java_expand_body): Declare.
6968         * jcf-parse.c (cgraph.h): Include.
6969         (java_parse_file): Handle flag_unit_at_a_time.
6970         * lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING,
6971         LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Define.
6972         (java_estimate_num_insns): Use walk_tree_without_duplicates.
6973         (java_start_inlining): New function.
6974         * parse.h (java_finish_classes): Declare.
6975         * parse.y: Include cgraph.h.
6976         (block): Don't special-case empty block production.
6977         (craft_constructor): Set DECL_INLINE.
6978         (source_end_java_method): Handle flag_unit_at_a_time.
6979         Replace inline code with call to java_expand_body.
6980         (start_complete_expand_method): Remove static modifier.
6981         (java_expand_method_bodies): Patch function tree for
6982         class initialization and/or synchronization as needed.
6983         Don't begin RTL expansion yet.
6984         (java_expand_classes): Check flag_unit_at_a_time before
6985         calling finish_class.
6986         (java_finish_classes): New function.
6987         (java_complete_lhs): Ensure COMPOUND_EXPR has non-NULL type.
6988         (patch_assignment): Set DECL_CONTEXT on temporary variable.
6989         (emit_test_initialization): Set DECL_IGNORED_P.
6990
6991 2003-09-03  Roger Sayle  <roger@eyesopen.com>
6992
6993         * builtins.c (enum builtin_type): Delete unused enumeration.
6994         * Make-lang.in (java/builtins.o): Remove built-types.def dependency.
6995
6996 2003-08-28  Tom Tromey  <tromey@redhat.com>
6997
6998         * gcj.texi (Extensions): Document gcjlib URLs.
6999
7000 2003-08-20  Tom Tromey  <tromey@redhat.com>
7001
7002         * gcj.texi (Extensions): Added xref.
7003         (libgcj Runtime Properties): Document
7004         gnu.gcj.runtime.VMClassLoader.library_control.
7005
7006 2003-08-20  Andrew Haley  <aph@redhat.com>
7007
7008         * except.c (prepare_eh_table_type): Use new encoding for exception
7009         handlers when using -fno-assume-compiled.
7010
7011 2003-08-13  Tom Tromey  <tromey@redhat.com>
7012
7013         * gcj.texi (Invoking gij): Document -X and -?.
7014
7015 2003-08-13  Mohan Embar  <gnustuff@thisiscool.com>
7016
7017         * Make-lang.in: Added missing win32-host.o to JAVA_OBJS,
7018         GCJH_OBJS, JCFDUMP_OBJS
7019         * win32-host.c: Removed the unnecessary and broken dependency
7020         on jcf.h
7021
7022 2003-08-11  Tom Tromey  <tromey@redhat.com>
7023
7024         * parse.y (java_check_regular_methods): Typo fixes.  Call
7025         check_interface_throws_clauses.  Use
7026         check_concrete_throws_clauses.
7027         (check_interface_throws_clauses): New function.
7028         (check_concrete_throws_clauses): New function.
7029         (hack_is_accessible_p): New function.
7030         (find_most_specific_methods_list): Added FIXME.
7031         * typeck.c (lookup_do): Use `flags' argument to decide what to
7032         do.  Reimplemented.
7033         (lookup_argument_method_generic): New function.
7034         (lookup_argument_method2): Removed.
7035         * jcf.h (ACC_INVISIBLE): New define.
7036         * jcf-write.c (generate_classfile): Skip invisible methods.
7037         * class.c (add_miranda_methods): New function.
7038         (layout_class_methods): Use it.
7039         (get_access_flags_from_decl): Use ACC_INVISIBLE.
7040         * java-tree.h (METHOD_INVISIBLE): New define.
7041         (lang_decl_func) [invisible]: New field.
7042         (lookup_argument_method_generic): Declare.
7043         (SEARCH_INTERFACE): New define.
7044         (SEARCH_SUPER): Likewise.
7045         (SEARCH_ONLY_INTERFACE): Likewise.
7046         (SEARCH_VISIBLE): Likewise.
7047         (lookup_argument_method2): Removed declaration.
7048
7049 2003-08-05  Tom Tromey  <tromey@redhat.com>
7050
7051         Fix for PR java/11600:
7052         * parse.y (java_complete_lhs): See whether we're calling a method
7053         on an array.
7054         (check_thrown_exceptions): Added `is_array_call' argument;
7055         fixed `clone' checking; updated all callers.
7056
7057 2003-08-05  Steven Bosscher  <steven@gcc.gnu.org>
7058
7059         * java-tree.h (DECL_ESTIMATED_INSNS): Remove (moved to tree.h).
7060
7061 2003-08-03  Tom Tromey  <tromey@redhat.com>
7062
7063         * java-tree.h (METHOD_TRANSIENT): Removed.
7064         * decl.c (pushdecl): Removed some dead code.
7065         * class.c (get_access_flags_from_decl): Can't have transient
7066         method.
7067         (add_method_1): Can't have a transient method.
7068
7069 2003-07-28  Andreas Jaeger  <aj@suse.de>
7070
7071         * jvspec.c: Convert to ISO C90 prototypes.
7072
7073 2003-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7074
7075         * decl.c (force_poplevels): Fix warning call.
7076
7077 2003-07-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
7078
7079         * expr.c (expand_java_field_op): Don't use xxx_with_decl
7080         (expand_java_field_op): Likewise.
7081         * class.c (layout_class_method): Likewise
7082         (emit_register_classes): Likewise.
7083         * decl.c (pushdecl): Likewise.
7084         (poplevel): Likewise.
7085         (force_poplevels): Likewise.
7086         (give_name_to_locals): Likewise.
7087         * check-init.c (check_for_initialization): Likewise.
7088
7089 2003-07-24  Jason Merrill  <jason@redhat.com>
7090
7091         * java-tree.h: Move boolean_type_node et al to the back end.
7092
7093 2003-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7094
7095         * class.c java-tree.h jcf-write.c jvspec.c: Remove unnecessary
7096         casts.
7097
7098 2003-07-19  Neil Booth  <neil@daikokuya.co.uk>
7099
7100         * lang.opt: Don't show -MD_ and -MDD_.
7101
7102 2003-07-18  Neil Booth  <neil@daikokuya.co.uk>
7103
7104         * lang-options.h: Remove.
7105         * lang.opt: Add help text.
7106
7107 2003-07-15  Kazu Hirata  <kazu@cs.umass.edu>
7108
7109         * expr.c: Remove the last argument to expand_assignment().
7110
7111 2003-07-09  Jan Hubicka  <jh@suse.cz>
7112
7113         * java-tree.h (DECL_NUM_STMTS): Rename to...
7114         (DECL_ESTIMATED_INSNS): ... this.
7115         * lang.c (java_estimate_num_insns, java_estimate_num_insns_1):
7116         New static functions.
7117         (LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS): Define.
7118         * parser.y (add_stmt_to_compound): Do not account statements.
7119
7120 2003-07-08  Mark Wielaard  <mark@klomp.org>
7121
7122         * gcj.texi: CNI now expands to Compiled Native Interface.
7123
7124 2003-07-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7125
7126         * Make-lang.in (java/gcj.dvi): Use PWD_COMMAND.
7127
7128 2003-07-07  Nathan Sidwell  <nathan@codesourcery.com>
7129
7130         * expr.c (expand_byte_code): Adjist emit_line_note call.
7131
7132 2003-07-06  Neil Booth  <neil@daikokuya.co.uk>
7133
7134         * lang.c (java_handle_option): Don't handle filenames.
7135
7136 2003-07-02  Zack Weinberg  <zack@codesourcery.com>
7137
7138         * jcf-path.c: Don't default-define PATH_SEPARATOR nor
7139         DIR_SEPARATOR.
7140         Use FILENAME_CMP.
7141         * jcf-write.c: Don't default-define DIR_SEPARATOR.
7142         * jcf.h: Delete COMPARE_FILENAMES definition.
7143
7144 2003-07-02  Neil Booth  <neil@daikokuya.co.uk>
7145
7146         * lang.c (java_init_options): Update prototype.
7147
7148 2003-07-01  Nathan Sidwell  <nathan@codesourcery.com>
7149
7150         * decl.c (poplevel): Adjust define_label call.
7151
7152 2003-06-27  Zack Weinberg  <zack@codesourcery.com>
7153
7154         * gjavah.c (flag_jni): Make non-static.
7155         * parse-scan.y (ctxp): Make non-static.
7156
7157         * class.c (build_method_symbols_entry)
7158         * expr.c (get_offset_table_index)
7159         * jcf-parse.c (jcf_parse):
7160         Mark the definition static, matching the forward declaration.
7161
7162 2003-06-26  Neil Booth  <neil@daikokuya.co.uk>
7163
7164         * lang.c (java_handle_option): Don't check for missing arguments.
7165
7166 2003-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7167
7168         * class.c (push_class): Use a location_t to save place.
7169         (emit_register_classes): Set input_location. Adjust
7170         expand_function_end call.
7171         * resource.c (write_resource_constructor): Likewise.
7172         * decl.c (end_java_method): Adjust expand_function_end call.
7173         * parse.y (source_end_java_method): Likewise.
7174
7175 2003-06-17  Robert Abeles  <rabeles@archaelogic.com>
7176
7177         * lang.c (java_handle_option): Likewise.
7178
7179 2003-06-16  Neil Booth  <neil@daikokuya.co.uk>
7180
7181         * lang.c (java_handle_option): Special-casing of optional
7182         joined arguments no longer needed.
7183         * lang.opt: Update switches that take optional argument.
7184
7185 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7186
7187         * lang.opt: Declare Java.
7188         * lang.c (java_init_options): Update.
7189
7190 2003-06-15  Neil Booth  <neil@daikokuya.co.uk>
7191
7192         * lang.c (version_flag): Rename to v_flag to avoid clash w/ toplev.h.
7193
7194 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7195
7196         * lang-specs.h: Rewrite -MD and -MMD to append an underscore.
7197         * lang.c (java_handle_option): -MD and -MMD have an underscore.
7198         * lang.opt: -MD and -MMD have an underscore.
7199
7200 2003-06-14  Nathan Sidwell  <nathan@codesourcery.com>
7201
7202         * class.c (emit_register_classes): Adjust init_function_start
7203         call.
7204         * decl.c (complete_start_java_method): Likewise.
7205         * resource.c (write_resource_constructor): Likewise.
7206
7207 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
7208
7209         * Make-lang.in: Update to use options.c and options.h.
7210         * lang.c: Include options.h not j-options.h.
7211         (java_handle_option): Abort on unrecognized option.
7212         (java_init_options): Request Java switches.
7213
7214 2003-06-11  Neil Booth  <neil@daikokuya.co.uk>
7215
7216         * Make-lang.in: Handle mostlyclean.
7217
7218 2003-06-11  Tom Tromey  <tromey@redhat.com>
7219
7220         * lang.c (java_handle_option): Update dependency_tracking for
7221         OPT_MF case.
7222
7223         * lang.c (java_handle_option): OPT_fbootclasspath_ can take an
7224         empty argument.
7225
7226 2003-06-10  Andrew Haley  <aph@redhat.com>
7227
7228         * resource.c (write_resource_constructor): Use expand_expr to
7229         generate the address of the label attached to a resource.
7230         * Make-lang.in (java/resource.o): Add expr.h
7231
7232 2003-06-10  Andrew Haley  <aph@redhat.com>
7233
7234         * lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
7235         (java_decl_ok_for_sibcall): New.
7236
7237 2003-06-09  Neil Booth  <neil@daikokuya.co.uk>
7238
7239         * Make-lang.in (JAVA_OBJS, java/lang.o): Update.
7240         (java/j-options.c, java/j-options.h): New.
7241         * java-tree.h (resource_name, compile_resource_file,
7242         compile_resource_data): Constify.
7243         * jcf-write.c (jcf_write_base_directory): Similarly.
7244         * jcf.h (jcf_write_base_directory): Similarly.
7245         * lang.c: Include j-options.h.
7246         (cl_options_count, cl_options, string_option, java_decode_option,
7247         lang_f_options, lang_W_options, LANG_HOOKS_DECODE_OPTION,
7248         process_option_with_no): Remove.
7249         (resource_name): Constify.
7250         (LANG_HOOKS_HANDLE_OPTION): Override.
7251         (java_handle_option): New.
7252         (java_init): Don't call jcf_path_init.
7253         (java_init_options): Call jcf_path_init.
7254         * lang.opt: New.
7255         * resource.c (compile_resource_data, compile_resource_file): Constify.
7256
7257 2003-06-09  Nathan Sidwell  <nathan@codesourcery.com>
7258
7259         * java-tree.h (DECL_FUNCTION_LAST_LINE): New.
7260         (struct lang_decl_func): Add last_line field.
7261         * parse.h (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
7262         DECL_SOURCE_LINE_LAST): Remove.
7263         * parse.y (missing_return_error, finish_method_declaration,
7264         lookup_cl, start_artificial_method_body, source_end_java_method,
7265         start_complete_expand_method): Adjust.
7266
7267 2003-06-08  Tom Tromey  <tromey@redhat.com>
7268
7269         * jvspec.c (jvgenmain_spec): Added `*' after fassume-compiled and
7270         fno-assume-compiled.
7271
7272 2003-06-08  Roger Sayle  <roger@eyesopen.com>
7273
7274         * builtins.c (define_builtin_type, builtin_types): Delete.
7275         (define_builtin): Rewritten to take just the built-in code,
7276         the function's name, type and fallback library function name.
7277         All built-ins used by Java are implicit and BUILT_IN_NORMAL.
7278         (initialize_builtins): Overhaul to define the GCC builtins
7279         used by gcj manually, providing the Java run-time's
7280         implementations as the fallback library function.
7281
7282 2003-06-08  Anthony Green  <green@redhat.com>
7283
7284         * parse.y (patch_cast): Fix conversions from floating-point to
7285         integral types.
7286
7287 2003-06-08  Neil Booth  <neil@daikokuya.co.uk>
7288
7289         * Make-lang.in: Update.
7290         * lang.c: Include opts.h. Define cl_options_count and cl_options.
7291
7292 2003-06-07  Neil Booth  <neil@daikokuya.co.uk>
7293
7294         * lang.c (java_init_options): Update.
7295
7296 2003-06-05  Jan Hubicka  <jh@suse.cz>
7297
7298         * Make-lang.in:  Add support for stageprofile and stagefeedback
7299
7300 2003-05-31  Roger Sayle  <roger@eyesopen.com>
7301
7302         * lang.c (java_init_options): Prescribe wrap-around two's
7303         complement arithmetic overflow by setting flag_wrapv.
7304
7305 2003-05-29  Roger Sayle  <roger@eyesopen.com>
7306
7307         * builtins.c (cos_builtin, sin_builtin, sqrt_builtin): Delete.
7308         (builtin_record): Add an additional builtin_code field to
7309         record which GCC built-in corresponds to the Java function.
7310         (java_builtins):  Add new entries for atan, atan2, exp, log,
7311         pow and tan.
7312         (max_builtin, min_builtin, abs_builtin): Perform constant
7313         folding on the resulting tree.
7314         (java_build_function_call_expr): Likewise, perform constant
7315         folding on the resulting tree.
7316         (initialize_builtins): The NULL creators are now allowed in
7317         the java_builtins table, which is now terminated by an entry
7318         with builtin_code == END_BUILTINS.
7319         (check_for_builtin): Likewise.  If the matching creator is
7320         NULL, construct the call using java_build_function_call_expr
7321         directly with the decl for the corresponding builtin_code.
7322
7323 2003-05-23  Nathanael Nerode  <neroden@gcc.gnu.org>
7324
7325         * win32-host.c: Normalize copyright boilerplate.
7326
7327 2003-05-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7328
7329         * parse.y (print_int_node): Use string concatentation on
7330         HOST_WIDE_INT_PRINT_* format specifier to collapse multiple
7331         function calls into one.
7332
7333 2003-05-13  Zack Weinberg  <zack@codesourcery.com>
7334
7335         * jcf-parse.c, jcf-write.c, lex.c: Replace all calls to
7336         fatal_io_error with calls to fatal_error; add ": %m" to the end of
7337         all the affected error messages.
7338
7339 2003-05-13  Richard Henderson  <rth@redhat.com>
7340
7341         * class.c (layout_class_method): Set DECL_EXTERNAL.
7342         * decl.c (java_mark_decl_local, java_mark_class_local): New.
7343         * java-tree.h (java_mark_class_local): Declare.
7344         * jcf-parse.c (parse_class_file): Use it.
7345         * parse.y (java_expand_classes): Likewise.
7346
7347 2003-05-04  Nathan Sidwell  <nathan@codesourcery.com>
7348
7349         * Make-lang.in (java/parse.o, java/parse-scan.o): Depend on input.h.
7350         * lex.h: #include input.h.
7351         * jv-scan.c (input_filename): Remove.
7352
7353 2003-05-02  Tom Tromey  <tromey@redhat.com>
7354
7355         PR java/10491:
7356         * gjavah.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
7357         (handle_inner_classes): New function.
7358
7359 2003-05-01  Tom Tromey  <tromey@redhat.com>
7360
7361         PR java/10459:
7362         * parse.y (finish_for_loop): Do nothing if update expression is a
7363         EXPR_WFL_NODE wrapping nothing.
7364         (java_complete_lhs) <COMPOUND_EXPR>: Likewise.
7365
7366 2003-05-02  Nathan Sidwell  <nathan@codesourcery.com>
7367
7368         * lex.h (input_lineno): Remove declaration.
7369         * parse-scan.y: #include input.h.
7370         (input_filename): Remove declaration.
7371         (input_location): Add definition.
7372         (input_line): Remove definition.
7373
7374 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
7375
7376         * lex.h (lineno): Rename to ...
7377         (input_line): ... here
7378         * parse-scan.y (lineno): Rename to ...
7379         (input_line): ... here.
7380         (reset_report): Rename lineno to input_line.
7381         * check-init.c (check_init): Likewise.
7382         * class.c (push_class): Likewise.
7383         * decl.c (complete_start_java_method, end_java_method): Likewise.
7384         * expr.c (expand_byte_code): Likewise.
7385         * jcf-parse.c (give_name_to_class, parse_class_file): Likewise.
7386         * jcf-write.c (generate_bytecode_insns): Likewise.
7387         * lex.c (java_init_lex, java_allocate_new_line,
7388         do_java_lex): Likewise.
7389         * parse.h (YYNOT_TWICE): Likewise.
7390         * parse.y (empty_statement, expression_statement,
7391         java_pop_parser_context, java_parser_context_save_global,
7392         yyerror, register_fields, method_header, safe_layout_class,
7393         find_in_imports_on_demand, create_artificial_method,
7394         source_end_java_method, start_complete_expand_method,
7395         build_thisn_assign, java_complete_lhs,
7396         maybe_absorb_scoping_block): Likewise.
7397
7398 2003-04-20  Mohan Embar  <gnustuff@thisiscool.com>
7399
7400         * jcf-io.c (find_class): use DIR_SEPARATOR instead of
7401         '/' when computing java source filename
7402
7403 2003-04-13  Tom Tromey  <tromey@redhat.com>
7404
7405         * gjavah.c (print_c_decl): Indentation fix.
7406
7407 2003-04-12  Zack Weinberg  <zack@codesourcery.com>
7408
7409         * class.c (make_field_value, make_method_value, get_dispatch_table)
7410         (make_class_data, emit_offset_symbol_table)
7411         * constants.c (build_constants_constructor)
7412         * java-tree.h (START_RECORD_CONSTRUCTOR)
7413         * parse.y (maybe_build_array_element_wfl):
7414         Use build_constructor.
7415
7416 2003-04-10  Eric Blake  <ebb9@email.byu.edu>
7417
7418         PR java/10253:
7419         * parse.y (string_convert_int_cst): Always use at least one digit
7420         in string conversion. Remove ASCII dependence.
7421         (merge_string_cste): Fix merging of 3-byte UTF-8 characters.
7422
7423 2003-03-16  Mohan Embar  <gnustuff@thisiscool.com>
7424
7425         * Make-lang.in: added win32-host.c
7426         * jcf.h: defined macro JCF_OPEN_EXACT_CASE which
7427         resolves to open() on non-Win32 platforms and
7428         Win32-specific jcf_open_exact_case() on Win32
7429         * jcf-io.c (find_class): use JCF_OPEN_EXACT_CASE
7430         when trying .java and .class files
7431         * win32-host.c: added to repository. Defines
7432         Win32-specific jcf_open_exact_case()
7433
7434 2003-04-10  Andrew Haley  <aph@redhat.com>
7435
7436         * jcf-write.c (struct jcf_partial): num_jsrs: new field.
7437         (maybe_free_localvar): Renamed from localvar_free.
7438         Add new arg, really.
7439         (generate_bytecode_insns): Set new variable, jsrs.
7440         Only free local vars if no jsr insns have been emittted.
7441         Call maybe_free_localvar, not localvar_free.
7442
7443 2003-03-30  Joseph S. Myers  <jsm@polyomino.org.uk>
7444
7445         * gcj.texi: Remove @ at start of file.
7446
7447 2003-03-25  Tom Tromey  <tromey@redhat.com>
7448
7449         * parse.y (create_interface): Call CHECK_DEPRECATED.
7450
7451 2003-03-23  Zack Weinberg  <zack@codesourcery.com>
7452
7453         * Make-lang.in: Link jcf-dump against $(LDEXP_LIB).
7454
7455 2003-03-21  Zack Weinberg  <zack@codesourcery.com>
7456
7457         * javaop.h (jfloat, jdouble): Make them structures mirroring
7458         the bit fields of IEEE float and double respectively.
7459         (JFLOAT_FINITE, JFLOAT_QNAN_MASK, JFLOAT_EXP_BIAS,
7460         JDOUBLE_FINITE, JDOUBLE_QNAN_MASK, JDOUBLE_EXP_BIAS): New.
7461         (union Word, union DWord): Delete.
7462         (WORD_TO_FLOAT, WORDS_TO_DOUBLE): Update to match.
7463
7464         * gjavah.c (java_float_finite, java_double_finite, F_NAN_MASK,
7465         D_NAN_MASK): Delete.
7466         (jni_print_float, jni_print_double): New.  Generate
7467         hexadecimal floating constants.
7468         (print_field_info): Use jni_print_float/double.
7469
7470         * jcf-dump.c: Include math.h.  Use ldexp/frexp to assemble
7471         finite floating point numbers for output; special case
7472         non-finite floats.
7473
7474 2003-03-19  Nathanael Nerode  <neroden@gcc.gnu.org>
7475
7476         * lang.c (java_dump_tree): Change return type from 'int' to 'bool'.
7477         Replace 0 and 1 with true and false in return statements.
7478
7479 2003-03-19  Tom Tromey  <tromey@redhat.com>
7480
7481         * lex.c (do_java_lex): Renamed from java_lex.
7482         (java_lex): New function.
7483         Include timevar.h.
7484
7485 2003-03-13  Tom Tromey  <tromey@redhat.com>
7486
7487         * parse.y (resolve_inner_class): Error if qualifier is a primitive
7488         type.
7489
7490 2003-03-04  Andrew Haley  <aph@redhat.com>
7491
7492         * gjavah.c (is_first_data_member): New global variable.
7493         (print_c_decl): If it's the first data member, align it as the
7494         superclass.
7495         (process_file): Set is_first_data_member.
7496
7497 2003-03-11  Tom Tromey  <tromey@redhat.com>
7498
7499         * parse.y (resolve_field_access): Initialize class if field is
7500         found in another static field.
7501         * expr.c (build_class_init): Don't optimize out initialization of
7502         implemented interface.
7503
7504 2003-03-11  Andrew Haley  <aph@redhat.com>
7505
7506         * jcf-io.c (caching_stat): Initialize origsep to remove compiler
7507         warning.
7508
7509 2003-03-10  Ranjit Mathew  <rmathew@hotmail.com>
7510
7511         * jcf-io.c (caching_stat): Account for both DIR_SEPARATOR
7512         and DIR_SEPARATOR_2 for a target.
7513         Correct minor typos.
7514
7515         * jcf-write.c (make_class_file_name): Take both DIR_SEPARATOR
7516         and DIR_SEPARATOR_2 for a target into account.
7517
7518 2003-03-08  Neil Booth  <neil@daikokuya.co.uk>
7519
7520         * lang.c (java_init): Update prototype, move code to java_post_options.
7521         (java_post_options): Similarly.
7522
7523 2003-03-05  Ranjit Mathew  <rmathew@hotmail.com>
7524
7525         * jcf.h (COMPARE_FILENAMES): New macro similar to "strcmp" to
7526         compare file name components depending on the case-sensitivity
7527         or otherwise of the host file system.
7528
7529         * jcf-path.c (add_entry): Use COMPARE_FILENAMES instead of
7530         "strcmp" to compare file name components.
7531         Use IS_DIR_SEPARATOR instead of comparing directly against
7532         DIR_SEPARATOR.
7533         (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
7534         comparing directly against DIR_SEPARATOR.
7535
7536 2003-03-04  Tom Tromey  <tromey@redhat.com>
7537
7538         * Make-lang.in (java.tags): New target.
7539
7540 2003-03-01  Roger Sayle  <roger@eyesopen.com>
7541
7542         * java/builtins.c (builtin_type): Handle DEF_FUNCTION_TYPE_VAR_3.
7543         (initialize_builtins): Handle DEF_FUNCTION_TYPE_VAR_3.
7544
7545 2003-03-01  Tom Tromey  <tromey@redhat.com>
7546
7547         * parse.y (jdep_resolve_class): Only check deprecation if we found
7548         a decl.
7549
7550 2003-02-28  Tom Tromey  <tromey@redhat.com>
7551
7552         PR java/9695:
7553         * class.c (maybe_layout_super_class): Always pass a WFL to
7554         do_resolve_class.
7555         * parse.y (do_resolve_class): Updated comment to explain
7556         parameters.
7557
7558 2003-02-26  Tom Tromey  <tromey@redhat.com>
7559
7560         * jcf-write.c (generate_classfile): Check whether class is
7561         deprecated before writing attribute count.
7562
7563 2003-02-25  Roger Sayle  <roger@eyesopen.com>
7564
7565         * java/decl.c (java_init_decl_processing): Get soft_fmod_node from
7566         built_in_decls[BUILT_IN_FMOD] rather than define it ourselves.
7567
7568 2003-02-23  Tom Tromey  <tromey@redhat.com>
7569
7570         * lang-options.h: Added -Wdeprecated.
7571         * gcj.texi (Warnings): Document -Wdeprecated.
7572         * java-tree.h (flag_deprecated): Declare.
7573         * lang.c (lang_W_options): Added deprecated.
7574         (flag_deprecated): New global.
7575         * chartables.h: Rebuilt.
7576         * gen-table.pl (process_one): Look at whitespace.
7577         (print_tables): Define LETTER_SPACE, LETTER_MASK.
7578         * parse.h (CLEAR_DEPRECATED): New macro.
7579         (CHECK_DEPRECATED_NO_RESET): New macro.
7580         * jcf-parse.c (handle_deprecated): New function.
7581         (HANDLE_DEPRECATED_ATTRIBUTE): New define.
7582         * jcf-reader.c (get_attribute): Handle Deprecated attribute.
7583         * parse.y (resolve_type_during_patch): Check deprecation.
7584         (jdep_resolve_class): Likewise.
7585         (process_imports): Likewise.
7586         (resolve_expression_name): Likewise.
7587         (check_deprecation): Strip arrays from decl.  Check
7588         flag_deprecated.
7589         (patch_method_invocation): Also check the particular constructor
7590         for deprecation.
7591         (register_fields): Use CHECK_DEPRECATED_NO_RESET in loop.
7592         * jcf-write.c (append_deprecated_attribute): New function.
7593         (generate_classfile): Generate deprecated attribute when
7594         appropriate.
7595         * lex.c (java_parse_doc_section): Return type now void.  Rewrote.
7596         (java_lex) [case '*']: Simplify logic.
7597         (java_start_char_p): Use LETTER_MASK.
7598         (java_part_char_p): Likewise.
7599         (java_space_char_p): New function.
7600
7601 2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
7602
7603         Change base class access representation.
7604         * java/class.c (set_super_info): Don't set TREE_VIA_PUBLIC.
7605         (add_interface_do): Likewise.
7606
7607 2003-02-12  Ranjit Mathew  <rmathew@hotmail.com>
7608
7609         * decl.c (java_init_decl_processing): Change
7610         soft_lookupjnimethod_node to reflect the change in
7611         signature of _Jv_LookupJNIMethod in libjava/jni.cc
7612         * expr.c (build_jni_stub): Calculate and pass the size
7613         on the stack of the arguments to a JNI function. Use
7614         new target macro MODIFY_JNI_METHOD_CALL to allow a
7615         target to modify the call to a JNI method.
7616
7617 2003-02-08  Roger Sayle  <roger@eyesopen.com>
7618
7619         * jcf-io.c (java_or_class_file): Use libiberty's lbasename
7620         instead of basename to avoid compiler warnings on Tru64.
7621
7622 2003-02-04  Joseph S. Myers  <jsm@polyomino.org.uk>
7623
7624         * gcj.texi: Update to GFDL 1.2.
7625
7626 2003-01-31  Andrew Haley  <aph@redhat.com>
7627
7628         * parse.y (java_expand_classes): Scan the whole class list looking
7629         for access methods that haven't yet been expanded.
7630
7631 2003-01-31 Adrian Bunk <bunk@fs.tum.de>
7632
7633         Fix for java/4269:
7634
7635         * jv-scan.c: Use HAVE_LANGINFO_CODESET instead of HAVE_NL_LANGINFO
7636         to fix bootstrap on sparc-unknown-netbsdelf1.5.
7637         * jcf-parse.c: Likewise.
7638
7639 2003-01-31  Mark Wielaard  <mark@klomp.org>
7640
7641         * gjavah.c (throwable_p): Allocate 1 more byte for string.
7642
7643 2003-01-31  Nathan Sidwell  <nathan@codesourcery.com>
7644
7645         * class.c (make_class): Use BINFO_ELTS.
7646         (set_super_info): Likewse.
7647         (add_interface_do): Likewise.
7648
7649 2003-01-30  Tom Tromey  <tromey@redhat.com>
7650
7651         * jcf-parse.c (read_class): Update identifier's class value if it
7652         changed during parsing.
7653
7654 2003-01-30  Loren James Rittle  <ljrittle@acm.org>
7655
7656         * Make-lang.in (po-generated): Find the targets in $(parsedir).
7657         Propagate change to all other rules as required.
7658         (java/parse-scan.o): Add explicit dependency on
7659         $(parsedir)/java/parse-scan.c .
7660
7661 2003-01-29  Tom Tromey  <tromey@redhat.com>
7662
7663         * parse.y (patch_assignment): Only transform the rhs of an
7664         assignment when compiling to native.
7665
7666 2003-01-28  Tom Tromey  <tromey@redhat.com>
7667
7668         * jcf-write.c (generate_bytecode_conditional): Typo fixes.
7669
7670 2003-01-28  Tom Tromey  <tromey@redhat.com>
7671
7672         * lex.c (java_lex): Don't include UEOF as part of token.
7673         (java_read_unicode): Error if \u sequence prematurely terminated.
7674
7675 2003-01-27  Tom Tromey  <tromey@redhat.com>
7676
7677         * parse.y (java_check_regular_methods): Check for construct after
7678         checking types in throws clause.
7679
7680 2003-01-24  Tom Tromey  <tromey@redhat.com>
7681
7682         * class.c (build_static_field_ref): Only a String or numeric field
7683         can fold to a constant.
7684
7685 2003-01-23  Tom Tromey  <tromey@redhat.com>
7686
7687         * jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
7688         file name in resource buffer.
7689
7690 2003-01-23  Tom Tromey  <tromey@redhat.com>
7691
7692         * expr.c (build_known_method_ref): Use method's context to find
7693         method table index.
7694
7695 2003-01-23  Tom Tromey  <tromey@redhat.com>
7696
7697         * constants.c (set_constant_entry): Allocated cleared memory.
7698
7699 2003-01-22  Tom Tromey  <tromey@redhat.com>
7700
7701         * java-tree.h: Don't use PARAMS.
7702         * resource.c: Add prototypes for all functions.
7703         (write_resource_constructor): Use `const char *' to avoid
7704         warning.
7705
7706 2003-01-22 Nathanael Nerode  <neroden@gcc.gnu.org>
7707
7708         * jcf-parse.c (process_zip_dir): Remove unused variable.
7709
7710 2003-01-22  Tom Tromey  <tromey@redhat.com>
7711
7712         * expr.c (build_invokeinterface): Abort if method's context is not
7713         an interface.
7714
7715 2003-01-22  Tom Tromey  <tromey@redhat.com>
7716
7717         * gcj.texi (Input and output files): Mention non-class entries.
7718         * decl.c (java_init_decl_processing): Call
7719         init_resource_processing.
7720         * java-tree.h (compile_resource_data, write_resource_constructor,
7721         compile_resource_file, init_resource_processing): Declare.
7722         * config-lang.in (gtfiles): Added resource.c.
7723         * Make-lang.in (gt-java-resource.h): New target.
7724         (JAVA_OBJS): Added resource.o.
7725         (java/resource.o): New target.
7726         * resource.c: New file.
7727         * class.c (compile_resource_file): Moved to resource.c.
7728         (registerResource_libfunc): Likewise.
7729         (utf8_decl_list): Mark with GTY; now static.
7730         * jcf-parse.c (classify_zip_file): New function.
7731         (parse_zip_file_entries): Use it; compile .properties files.
7732         (process_zip_dir): Use classify_zip_file and compute_class_name.
7733         Don't write class name into zip directory.
7734         (java_parse_file): Call write_resource_constructor.
7735         (compute_class_name): New function.
7736         * jcf-io.c (read_zip_member): Reindented.
7737
7738 2003-01-21  Tom Tromey  <tromey@redhat.com>
7739
7740         * class.c (supers_all_compiled): New function.
7741         (make_class_data): Use it.
7742
7743 2003-01-21  Tom Tromey  <tromey@redhat.com>
7744
7745         * parse.y (method_header): Native method can't be strictfp.
7746         No method can be transient or volatile.
7747
7748 2003-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7749
7750         Make-lang.in (jvspec.o-warn): Add -Wno-error.
7751
7752 2003-01-18  Kazu Hirata  <kazu@cs.umass.edu>
7753
7754         * check-init.c: Fix comment typos.
7755         * class.c: Likewise.
7756         * constants.c: Likewise.
7757         * decl.c: Likewise.
7758         * except.c: Likewise.
7759         * expr.c: Likewise.
7760         * java-except.h: Likewise.
7761         * java-tree.h: Likewise.
7762         * javaop.h: Likewise.
7763         * jcf-dump.c: Likewise.
7764         * jcf-io.c: Likewise.
7765         * jcf-parse.c: Likewise.
7766         * jcf-write.c: Likewise.
7767         * lang.c: Likewise.
7768         * mangle.c: Likewise.
7769         * typeck.c: Likewise.
7770         * verify.c: Likewise.
7771
7772 2003-01-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7773
7774         * Make-lang.in (java/jcf-write.o): Depend on $(TM_P_H).
7775         * jcf-write.c: Include "tm_p.h".
7776
7777 2003-01-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7778
7779         * jcf-io.c (caching_stat): Cast the 3rd arg of scandir to void*.
7780
7781 2003-01-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7782
7783         * builtins.c (java_build_function_call_expr): Renamed from
7784         build_function_call_expr.  All callers changed.
7785
7786         * Make-lang.in (java/jcf-parse.o): Depend on $(TM_P_H).
7787         * jcf-parse.c: Include tm_p.h.
7788
7789         * jcf-write.c (generate_bytecode_insns): Avoid signed/unsigned
7790         warning.
7791
7792 2003-01-14  Tom Tromey  <tromey@redhat.com>
7793
7794         * class.c (make_class_data): Check that super is compiled before
7795         building class reference to it.
7796
7797 2003-01-14  Andrew Haley  <aph@redhat.com>
7798
7799         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7800         varargs function -- correct.
7801
7802 2003-01-14  Andrew Haley  <aph@redhat.com>
7803
7804         * decl.c (java_init_decl_processing): Temporarily back out previous patch.
7805
7806 2003-01-14  Andrew Haley  <aph@redhat.com>
7807
7808         * decl.c (java_init_decl_processing): _Jv_NewMultiArray is a
7809         varargs function -- correct.
7810
7811         * parse.y (patch_assignment): Copy the rhs of an assignment into a
7812         temporary if the RHS is a reference.
7813
7814 2003-01-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7815
7816         * Make-lang.in (keyword.h): Pass "-L ANSI-C" to gperf.
7817         * keyword.h: Regenerated.
7818
7819         * All Files: Convert to ISO C style function definitions.
7820
7821 2003-01-09  Nathanael Nerode  <neroden@gcc.gnu.org>
7822
7823         * parse.y (check_pkg_class_access): ANSIfy definition.
7824
7825 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7826
7827         * decl.c, parse-scan.y, parse.y: Don't cast return value of
7828         xmalloc et al.
7829
7830         * class.c, gjavah.c, parse.y, verify.c: Don't use PTR.
7831
7832 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
7833
7834         Merge from pch-branch:
7835
7836         2002-12-02  Geoffrey Keating  <geoffk@apple.com>
7837
7838         * Make-lang.in (java/gjavah.o): Update dependencies.
7839         * gjavah.c: Include ggc.h.
7840
7841         2002-08-16  Geoffrey Keating  <geoffk@redhat.com>
7842
7843         * Make-lang.in (GCJH_OBJS): Add ggc-none.o.
7844         (JCFDUMP_OBJS): Add ggc-none.o.
7845         (java/jcf-dump.o): Depend on GGC_H.
7846         * jcf-reader.c (jcf_parse_constant_pool): Use ggc_alloc to allocate
7847         CPool substructures.
7848         * jcf-parse.c (process_zip_dir): Use ggc_alloc to allocate JCFs.
7849         * jcf-dump.c: Include ggc.h.
7850
7851         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7852
7853         * jcf.h (union cpool_entry): New.
7854         (struct CPool): Use gengtype to mark.  Change field 'data' to be
7855         an array of unions.
7856         (struct JCF): Use gengtype to mark.
7857         (CPOOL_UINT): Update for new cpool_entry type.
7858         (CPOOL_USHORT1): Likewise.
7859         (CPOOL_USHORT2): Likewise.
7860         (CPOOL_FINISH): Use GC to free cpool subfields.
7861         * parse.h (struct parser_ctxt): Mark field current_jcf.
7862         * lex.c (java_init_lex): Use GC to allocate struct JCF.
7863         * jcf-parse.c (HANDLE_CONSTANT_Utf8): Update for new cpool_entry type.
7864         (main_jcf): Use gengtype to mark.
7865         (ggc_mark_jcf): Delete.
7866         (get_constant): Update for new cpool_entry type.
7867         (give_name_to_class): Likewise.
7868         (get_class_constant): Likewise.
7869         (init_outgoing_cpool): Use GGC to allocate struct CPool.
7870         (java_parse_file): Use GGC to allocate struct JCF.
7871         (init_jcf_parse): Don't call ggc_add_root.
7872         * jcf-reader.c (jcf_parse_constant_pool): Update for new
7873         cpool_entry type.
7874         * java-tree.h (current_jcf): Use gengtype to mark.
7875         (CPOOL_UTF): Update for new cpool_entry type.
7876         (outgoing_cpool): Use gengtype to mark.
7877         (struct lang_type): GC struct JCF and struct CPool.
7878         * config-lang.in (gtfiles): Add jcf.h.
7879         * constants.c (find_tree_constant): New.
7880         (set_constant_entry): Allocate cpool subfields using GGC.  Update
7881         for new cpool_entry type.
7882         (find_constant1): Update for new cpool_entry type.
7883         (find_constant2): Likewise.
7884         (find_utf8_constant): Use find_tree_constant.
7885         (find_class_or_string_constant): Remove unnecessary cast to jword.
7886         Update for new cpool_entry type.
7887         (count_constant_pool_bytes): Update for new cpool_entry type.
7888         (write_constant_pool): Likewise.
7889         (alloc_name_constant): Use find_tree_constant.
7890         (build_constants_constructor): Update for new cpool_entry type.
7891
7892         2002-08-08  Geoffrey Keating  <geoffk@redhat.com>
7893
7894         * parse.y (mark_parser_ctxt): Delete.
7895         (goal): Don't use ggc_add_root.
7896         (create_new_parser_context): Use GC to allocate struct parser_ctxt.
7897         (java_pop_parser_context): Let GC free parser_ctxt.
7898         (java_parser_context_resume): Likewise.
7899         * parse.h (struct parser_ctxt): Use gengtype to mark.
7900         (ctxp): Likewise.
7901         (ctxp_for_generation): Likewise.
7902         * lex.h (struct java_lc_s): Mark for gengtype.
7903         (java_lexer): Rearrange for gengtype.
7904         * config-lang.in (gtfiles): Add lex.h, parse.h.
7905
7906 2003-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7907
7908         * All Files: Remove PARAMS macro.
7909
7910         * expr.c, gjavah.c, javaop.h, jcf-dump.c, jcf-io.c, jcf-reader.c,
7911         jcf-write.c, jcf.h, jv-scan.c: Don't rely on the `DEFUN', `AND' or
7912         `__STDC__' macros.
7913
7914         * jv-scan.c, parse.y: Remove VPARAMS, VA_OPEN, VA_FIXEDARG and
7915         VA_CLOSE.
7916
7917 2003-01-09  Christian Cornelssen  <ccorn@cs.tu-berlin.de>
7918
7919         * Make-lang.in (java.install-common, java.uninstall,
7920         java.install-info, java.install-man): Prepend $(DESTDIR)
7921         to destination paths in all (un)installation commands.
7922         (java.install-common): Rewrite $(LN) command to support
7923         DESTDIR with "ln" as well as with "ln -s".
7924
7925 2003-01-08  Nathanael Nerode  <neroden@gcc.gnu.org>
7926
7927         * java-tree.h: Protect against multiple inclusion.
7928
7929 2003-01-07  Tom Tromey  <tromey@redhat.com>
7930
7931         * class.c (add_assume_compiled): Don't adjust parent if we're
7932         already at the root of tree.
7933
7934 2003-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7935
7936         * lang.c (dump_compound_expr): Prototype.
7937
7938 2003-01-03  Tom Tromey  <tromey@redhat.com>
7939
7940         Fix for PR java/8712:
7941         * expr.c (build_instanceof): Build an NE_EXPR, not a COND_EXPR,
7942         when simply checking against `null'.
7943
7944 2003-01-03  Tom Tromey  <tromey@redhat.com>
7945
7946         * gcj.texi (Standard Properties): Document http.proxyHost and
7947         http.proxyPort.
7948
7949         * gcj.texi (GNU Classpath Properties): Document new properties.
7950
7951 2003-01-02  Steven Bosscher <s.bosscher@student.tudelft.nl>
7952
7953         * java/jcf-reader.c, java/jvgenmain.c, java/keyword.gperf,
7954         java/lang-options.h, java/mangle.c, java/mangle_name.c,
7955         java/xref.c, java/zextract.c,java/zipfile.h: Fix copyright years.
7956
7957 2003-01-01  Steven Bosscher  <s.bosscher@student.tudelft.nl>
7958
7959         * Make-lang.in, boehm.c, buffer.c,
7960           buffer.h, builtins.c, class.c,
7961           config-lang.in, constants.c,
7962           convert.h, decl.c, except.c,
7963           expr.c, java-except.h,
7964           java-tree.h, javaop.def,
7965           jcf-parse.c, jcf-write.c,
7966           jv-scan.c, jvgenmain.c,
7967           jvspec.c, keyword.gperf,
7968           keyword.h, lang-options.h,
7969           lang-specs.h, lang.c, lex.c,
7970           lex.h, mangle.c, mangle_name.c,
7971           parse-scan.y, parse.h, parse.y,
7972           typeck.c, verify.c, xref.c,
7973           xref.h: Replace "GNU CC" with
7974           "GCC" in the copyright header.
7975
7976         * check-init.c, gjavah.c, javaop.h,
7977           jcf-depend.c, jcf-dump.c, jcf-io.c,
7978           jcf-path.c, jcf-reader.c, jcf.h,
7979           zextract.c, zipfile.h: These files are
7980           "part of GCC". Also say "GCC" not "GNU CC".
7981
7982 2002-12-30  DJ Delorie  <dj@redhat.com>
7983
7984         * Make-lang.in: Protect against texi2pod/pod2man failing.
7985
7986 2002-12-28  Joseph S. Myers  <jsm@polyomino.org.uk>
7987
7988         * gcj.texi: Use @copying.
7989
7990 2002-12-27  Mark Mitchell  <mark@codesourcery.com>
7991
7992         * gjavah.c (print_name_for_stub_or_jni): Adjust call to
7993         print_cxx_classname.
7994         (print_cxx_classname): Add add_scope parameter.
7995         (print_class_decls): Do not emit a semicolon after the extern
7996         "Java" block.
7997         (process_file): Adjust calls to print_cxx_classname.
7998
7999 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8000
8001         * gcj.texi: Include Cover Texts in man page.
8002
8003 2002-12-23  Jeff Sturm  <jsturm@one-point.com>
8004
8005         * class.c (build_static_field_ref): Check FIELD_FINAL.
8006
8007         * constants.c (alloc_class_constant): Use TYPE_CPOOL_DATA_REF
8008         instead of current_constant_pool_data_ref.
8009         * java-tree.h (current_constant_pool_data_ref): Undefine.
8010         (JTI_CURRENT_CONSTANT_POOL_DATA_REF): Remove.
8011         * jcf-parse.c (init_outgoing_cpool): Don't initialize
8012         current_constant_pool_data_ref.
8013
8014         * except.c (prepare_eh_table_type ): Use DECL_NAME of class type,
8015         not build_internal_class_name.
8016
8017         * parse.y (patch_incomplete_class_ref): Always emit `class$' method.
8018         Use it when class ref isn't certain to be compiled.
8019
8020 2002-12-23  Joseph S. Myers  <jsm@polyomino.org.uk>
8021
8022         * gcj.texi: Include gcc-common.texi.
8023         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Depend on
8024         $(srcdir)/doc/include/gcc-common.texi.
8025
8026 2002-12-22  Anthony Green  <green@redhat.com>
8027
8028         * gcj.texi (Limitations): Add note about org.xml.sax and
8029         org.w3c.dom.
8030
8031 2002-12-20  Tom Tromey  <tromey@redhat.com>
8032
8033         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Handle case
8034         where minimum case value is Integer.MIN_VALUE.
8035         Fixes PR java/8955.
8036
8037 2002-12-18  Andrew Haley  <aph@redhat.com>
8038
8039         * parse.y (patch_invoke): Force evaluation order when `check' is
8040         set.  For PR libgcj/8945.
8041
8042 2002-12-16  Mark Mitchell  <mark@codesourcery.com>
8043
8044         * gcj.texi: Change version number to 3.4.
8045
8046 2002-12-05  Ranjit Mathew <rmathew@hotmail.com>
8047         Andrew Haley <aph@redhat.com>
8048
8049         * parse.y (source_end_java_method): Remove custom encoding of line
8050         numbers for a function decl before passing it to the back end.
8051
8052 2002-12-03  Andrew Haley  <aph@redhat.com>
8053
8054         * class.c (make_class_data): New field, "chain".
8055         * decl.c (java_init_decl_processing): Likewise.
8056
8057 2002-12-02  Tom Tromey  <tromey@redhat.com>
8058
8059         For PR java/8740:
8060         * parse.y (do_resolve_class): Handle qualified name via
8061         recursion.
8062
8063 2002-11-30  Zack Weinberg  <zack@codesourcery.com>
8064
8065         * boehm.c, buffer.c, builtins.c, check-init.c, class.c,
8066         constants.c, decl.c, except.c, expr.c, gjavah.c, jcf-depend.c,
8067         jcf-dump.c, jcf-io.c, jcf-parse.c, jcf-path.c, jcf-write.c,
8068         jv-scan.c, jvgenmain.c, jvspec.c, lang.c, mangle.c, mangle_name.c,
8069         parse-scan.y, parse.y, typeck.c, verify.c, xref.c, zextract.c:
8070         Include coretypes.h and tm.h.
8071         * Make-lang.in: Update dependencies.
8072
8073 2002-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8074
8075         * decl.c (java_init_decl_processing): Use `LL' on 64-bit constant.
8076
8077 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8078
8079         * jcf-reader.c: Don't expand JCF_readu4 inside the
8080         expansion of JCF_SKIP.
8081
8082 2002-11-25  Diego Novillo  <dnovillo@redhat.com>
8083
8084         * jcf-reader.c: Don't expand JCF_readu4 inside the
8085         expansion of JCF_SKIP.
8086
8087 2002-11-22  Tom Tromey  <tromey@redhat.com>
8088
8089         * parse.y (patch_binop): Cast right hand side of shift expression
8090         to `int'.  Fixes PR java/8676.
8091
8092 2002-11-22  Ranjit Mathew <rmathew@hotmail.com>
8093             Andrew Haley <aph@redhat.com>
8094
8095         * gcc/java/jcf-write.c (write_classfile): Remove target
8096         class file, if it exists, before renaming the temporary
8097         class file to it.
8098
8099 2002-11-19  Jason Thorpe  <thorpej@wasabisystems.com>
8100
8101         * jvspec.c (lang_specific_spec_functions): New.
8102
8103 2002-11-18  Tom Tromey  <tromey@redhat.com>
8104
8105         Fix for PR java/7912:
8106         * expr.c (can_widen_reference_to): Allow cast of array to
8107         Cloneable or Serializable.
8108         * java-tree.h (java_lang_cloneable_identifier_node): Declare.
8109         (java_io_serializable_identifier_node): Likewise.
8110         * parse.y (java_lang_cloneable, java_io_serializable): Removed.
8111         (valid_ref_assignconv_cast_p): Use new identifier nodes.
8112         * lex.c (java_init_lex): Don't initialize java_lang_cloneable and
8113         java_io_serializable.
8114         * decl.c (java_init_decl_processing): Initialize
8115         java_lang_cloneable_identifier_node and
8116         java_io_serializable_identifier_node.
8117         (java_lang_cloneable_identifier_node): New global.
8118         (java_io_serializable_identifier_node): Likewise.
8119
8120 2002-11-14  Jens-Michael Hoffmann  <jensmh@gmx.de>
8121
8122         * buffer.c: Remove unnecessary casts.
8123         * check-init.c: Likewise.
8124         * class.c: Likewise.
8125         * constants.c: Likewise.
8126         * decl.c: Likewise.
8127         * except.c: Likewise.
8128         * gjavah.c: Likewise.
8129         * jcf-io.c: Likewise.
8130         * jcf-parse.c: Likewise.
8131         * jcf-path.c: Likewise.
8132         * jvspec.c: Likewise.
8133         * lang.c: Likewise.
8134         * lex.c: Likewise.
8135         * verify.c: Likewise.
8136
8137 2002-11-06  Tom Tromey  <tromey@redhat.com>
8138
8139         * gjavah.c (print_stub_or_jni): Include JNIEXPORT and JNICALL in
8140         a JNI header.
8141
8142 2002-11-05  Tom Tromey  <tromey@redhat.com>
8143
8144         Fix for PR java/6388.
8145         * lex.h (JAVA_INTEGRAL_RANGE_ERROR): Wrap in do...while.
8146         * java-tree.h (enum java_tree_index): New values
8147         JTI_DECIMAL_INT_MAX_NODE, JTI_DECIMAL_LONG_MAX_NODE.
8148         (decimal_int_max, decimal_long_max): New defines.
8149         * lex.c (yylex): Rewrote range checking.  Sign extend literals.
8150         (error_if_numeric_overflow): Rewrote range checking.
8151         * decl.c (java_init_decl_processing): Initialize decimal_int_max,
8152         decimal_long_max.
8153
8154 2002-11-02  Tom Tromey  <tromey@redhat.com>
8155
8156         * java-tree.h: Move JV_STATE_ERROR before JV_STATE_DONE.
8157
8158         * class.c (make_method_value): Put class name, not signature, into
8159         `throws' field.  For PR java/8415.
8160
8161 2002-10-24  Tom Tromey  <tromey@redhat.com>
8162
8163         * gcj.texi (Invoking gij): Document --showversion.
8164         (Standard Properties): java.library.path now set.
8165
8166 2002-10-23  Tom Tromey  <tromey@redhat.com>
8167
8168         * gjavah.c (decode_signature_piece): In JNI mode, print
8169         `jobjectArray' when array depth is nonzero.
8170         Fixes PR java/8296.
8171
8172 2002-10-15  Andrew Haley  <aph@redhat.com>
8173
8174         * parse.y (patch_invoke): Call force_evaluation_order on a static
8175         arg list.
8176         (resolve_qualified_expression_name): Call force_evaluation_order
8177         on a arg list that is part of a Qualified Expression Name.
8178
8179         * lang.c (dump_compound_expr): New.
8180         (java_dump_tree): New.
8181
8182 2002-10-20  Ranjit Mathew <rmathew@hotmail.com>
8183
8184         * gcj.texi: Added item describing the GCJ runtime property
8185         "gnu.gcj.progname".
8186
8187 2002-10-15  Richard Henderson  <rth@redhat.com>
8188
8189         * jcf-parse.c (get_constant): Fix type warning.
8190
8191 2002-10-15  Andrew Haley  <aph@redhat.com>
8192
8193         * java-tree.h (java_inlining_merge_static_initializers): Declare.
8194         (java_inlining_map_static_initializers): Declare.
8195
8196 2002-10-14  Andrew Haley  <aph@redhat.com>
8197
8198         * tree-inline.c (remap_block): All local class initialization
8199         flags go in the outermost scope.
8200         (expand_call_inline): Call java_inlining_map_static_initializers.
8201         (expand_call_inline): Call java_inlining_merge_static_initializers.
8202         * java/lang.c (merge_init_test_initialization): New.
8203         (java_inlining_merge_static_initializers): New.
8204         (inline_init_test_initialization): New.
8205         (java_inlining_map_static_initializers): New.
8206
8207 2002-10-11  Mark Wielaard  <mark@klomp.org>
8208
8209         * gcj.texi (Compatibility): Add Limitations and Extensions section.
8210
8211 2002-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8212
8213         * class.c (JAVA_TREEHASHHASH_H): Use htab_hash_pointer.
8214
8215 2002-10-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8216
8217         * parse.y (merge_string_cste): Add parentheses around & within |.
8218
8219 2002-10-08  Tom Tromey  <tromey@redhat.com>
8220
8221         * parse.y (variable_declarator_id): Simplify error path for
8222         array declarator error.  For PR java/8003.
8223
8224 2002-10-08  Zack Weinberg  <zack@codesourcery.com>
8225
8226         * gjavah.c, jcf-dump.c, jv-scan.c: Globally replace GCCBUGURL with
8227         bug_report_url.
8228
8229 2002-10-08  Andrew Haley  <aph@redhat.com>
8230
8231         * parse.y (attach_init_test_initialization_flags): Check for
8232         error_mark_node.
8233
8234 2002-10-07  Anthony Green  <green@redhat.com>
8235
8236         * parse.y (merge_string_cste): Fix bug in string concatenation.
8237
8238 2002-10-03  Michael Koch  <konqueror@gmx.de>
8239
8240         * gcj.texi (Standard properties):
8241         Change default of java.awt.toolkit to gnu.awt.gtk.GtkToolkit.
8242
8243 2002-10-02  Roger Sayle  <roger@eyesopen.com>
8244
8245         PR optimization/6627
8246         * lang.c (java_init): If storing the vbit in function
8247         pointers, ensure that force_align_functions_log is atleast
8248         one to aid compatability with g++ vtables.
8249
8250 2002-10-01  Nathan Sidwell  <nathan@codesourcery.com>
8251
8252         * jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
8253         foul of type-based aliasing.
8254
8255 2002-09-30  Anthony Green  <green@redhat.com>
8256
8257         * gcj.texi (Invoking jv-scan): Fix texinfo.
8258
8259 2002-09-28  Anthony Green  <green@redhat.com>
8260
8261         * gcj.texi (Invoking jv-scan): Add --no-assert documentation.
8262         (Code Generation): Add -fno-assert documentation.
8263         * jv-scan.c (flag_assert): New global.
8264         (options): Add assert option.
8265         (help): Add --no-assert documentation.
8266         * parse-scan.y (flag_assert): New global.
8267         * lang.c (lang_f_options): Add -fassert/-fno-assert support.
8268         (flag_assert): New global.
8269         * java-tree.h (flag_assert): New global.
8270         * lex.c (java_lex): Obey flag_assert.
8271         * jvspec.c (jvgenmain_spec): Strip -fassert/-fno-assert when
8272         calling cc1.
8273
8274 2002-09-26  Andrew Haley  <aph@redhat.com>
8275
8276         * expr.c (build_java_array_length_access): Check for null pointer.
8277         * expr.c (expand_java_arrayload): Likewise.
8278
8279 2002-09-21  Richard Henderson  <rth@redhat.com>
8280
8281         * jcf-parse.c (get_constant): Decode from IEEE no matter
8282         what the target format.
8283
8284 2002-09-20  Kazu Hirata  <kazu@cs.umass.edu>
8285
8286         * ChangeLog: Follow spelling conventions.
8287         * class.c: Likewise.
8288         * decl.c: Likewise.
8289         * expr.c: Likewise.
8290         * gjavah.c: Likewise.
8291         * java-tree.h: Likewise.
8292         * jcf-dump.c: Likewise.
8293         * jcf-parse.c: Likewise.
8294         * jvspec.c: Likewise.
8295         * lang.c: Likewise.
8296         * mangle.c: Likewise.
8297         * parse.y: Likewise.
8298
8299 2002-09-17  Tom Tromey  <tromey@redhat.com>
8300
8301         * lex.c (java_read_unicode_collapsing_terminators): Handle case
8302         where \r appears at EOF.  Fixes PR java/7950.
8303
8304 2002-09-16  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>
8305
8306         * jvspec.c (lang_specific_driver): Remove unused variable.
8307
8308 2002-09-16  Geoffrey Keating  <geoffk@apple.com>
8309
8310         * java-tree.h (union lang_tree_node): Add chain_next option.
8311
8312 2002-09-16  Richard Henderson  <rth@redhat.com>
8313
8314         * jcf-parse.c (get_constant): Runtime check for IEEE format;
8315         use new real.h interface.
8316         * jcf-write.c (find_constant_index): Use new real.h interface.
8317         * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL.
8318
8319 2002-09-15  Kazu Hirata  <kazu@cs.umass.edu>
8320
8321         * lang.c: Follow spelling conventions.
8322
8323 2002-09-11  Per Bothner  <per@bothner.com>
8324
8325         * parse.y (fold_constant_for_init):  If a VAR_DECL, convert numerical
8326         constant to the type of the field.
8327         (java_complete_tree):  Remove now-redundant code.
8328
8329         * parse.y (fold_constant_for_init):  'null' is not a constant expr.
8330
8331 2002-09-03  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
8332
8333         For PR java/5794:
8334         * verify.c (verify_jvm_instructions) [OPCODE_jsr]: Only push the
8335         return label if a ret instruction for the jsr has been reached.
8336
8337 2002-09-09  Ranjit Mathew  <rmathew@hotmail.com>
8338
8339         * parse.y (DIR_SEPARATOR): Don't define.
8340         (check_class_interface_creation): Use IS_DIR_SEPARATOR.
8341
8342 2002-08-28  Andrew Haley  <aph@redhat.com>
8343
8344         * verify.c (verify_jvm_instructions): Allow exception handler
8345         inside code that is being protected, but generate a warning.
8346         * except.c (link_handler): Initialize `expanded' in new eh_range.
8347         (binding_depth, is_class_level, current_pc): Declare extern.
8348
8349 2002-09-01  Mark Wielaard <mark@klomp.org>
8350
8351         * gcj.texi: Add chapter about system properties.
8352         Fixed some typos.
8353
8354 2002-08-26  Tom Tromey  <tromey@redhat.com>
8355
8356         * parse.y (try_builtin_assignconv): Allow narrowing primitive
8357         conversion if RHS_TYPE is byte, short, or char.
8358
8359 2002-08-22  Tom Tromey  <tromey@redhat.com>
8360
8361         * gcj.texi (Invoking gij): Document -cp and -classpath.
8362
8363 2002-08-21  Tom Tromey  <tromey@redhat.com>
8364
8365         * Make-lang.in (java/jcf-path.o): Use $(datadir), not
8366         $(prefix)/share.  For PR libgcj/7633.
8367
8368         For PR java/6005 and PR java/7611:
8369         * lang.c (LANG_HOOKS_CAN_USE_BITFIELDS_P): New define.
8370         (java_can_use_bit_fields_p): New function.
8371
8372 2002-08-16  Tom Tromey  <tromey@redhat.com>
8373
8374         * gcj.texi (Class Initialization): Mention class initialization of
8375         arrays.
8376
8377 2002-07-30  Andrew Haley  <aph@cambridge.redhat.com>
8378
8379         * Make-lang.in (java-tree-inline.o): New.
8380         (JAVA_OBJS): Add java-tree-inline.o.
8381         * parse.y (source_end_java_method): Call java_optimize_inline.
8382         (java_expand_method_bodies): Save method's tree in
8383         DECL_SAVED_TREE.
8384         (add_stmt_to_compound): Keep track of the number of statments.
8385         * lang.c (java_init): Enable flag_inline_trees.
8386         (java_post_options): If flag_inline_functions is on, enable
8387         flag_inline_trees instread.
8388         (decl_constant_value): New.
8389         (java_tree_inlining_walk_subtrees): New.
8390         * java-tree.h (DECL_NUM_STMTS): New macro.
8391         (java_optimize_inline): Declare.
8392         * expr.c (java_expand_expr): Allow a BLOCK to return a value.
8393         Handle a LABEL_EXPR.
8394         * decl.c (build_result_decl): If we already have a DECL_RESULT
8395         don't make another.
8396         (dump_function): New.
8397         (java_optimize_inline): New.
8398         (dump_function): New.
8399
8400 2002-08-13  Jesse Rosenstock  <jmr@fulcrummicro.com>
8401
8402         For PR java/7483:
8403         * parse.y (build_assertion): Invert return from
8404         desiredAssertionStatus.
8405
8406 2002-08-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8407
8408         * jcf-write.c (get_access_flags): Return correct access flags for
8409         private and protected inner classes.
8410
8411 2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
8412
8413         * java/Make-lang.in (java.mostlyclean): Remove coverage files.
8414
8415 2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
8416
8417         * mangle_name.c: Don't include obstack.h twice.
8418         * xref.c: Don't include obstack.h.
8419
8420 2002-08-04  Geoffrey Keating  <geoffk@redhat.com>
8421
8422         * class.c: (permanent_obstack): Delete declaration.
8423         * constants.c: (permanent_obstack): Delete declaration.
8424         * except.c: (permanent_obstack): Delete declaration.
8425         * expr.c: (permanent_obstack): Delete declaration.
8426         * jcf-parse.c: (permanent_obstack): Delete declaration.
8427         (saveable_obstack): Delete declaration.
8428         * parse.h: (permanent_obstack): Delete declaration.
8429         * typeck.c: (permanent_obstack): Delete declaration.
8430
8431 2002-08-04  Joseph S. Myers  <jsm@polyomino.org.uk>
8432
8433         * gcj.texi (version-gcc): Increase to 3.3.
8434
8435 2002-07-22  Tom Tromey  <tromey@redhat.com>
8436
8437         * lex.c (java_lex): Check for `e' or `E' after 0.
8438
8439 2002-07-21  Richard Henderson  <rth@redhat.com>
8440
8441         * lang.c (java_unsafe_for_reeval): New.
8442         (LANG_HOOKS_UNSAFE_FOR_REEVAL): New.
8443
8444 2002-07-21  Neil Booth  <neil@daikokuya.co.uk>
8445
8446         * jcf-path.c (GET_ENV_PATH_LIST): Remove.
8447         (jcf_path_init): Use GET_ENVIRONMENT.
8448
8449 2002-07-10  Roger Sayle  <roger@eyesopen.com>
8450             Zack Weinberg <zack@codesourcery.com>
8451
8452         * builtins.c (initialize_builtins): Remove defines that
8453         handled C/C++ specific junk hereby removed from builtins.def.
8454
8455 2002-07-07  Neil Booth  <neil@daikokuya.co.uk>
8456
8457         * lang.c (java_post_options): Update prototype.
8458
8459 2002-07-05  Roger Sayle  <roger@eyesopen.com>
8460
8461         * builtins.c (initialize_builtins): Ignore the additional
8462         parameter to DEF_BUILTIN.  Handle more C/C++ specific junk in
8463         the builtins.def file.
8464
8465 2002-07-01  Tom Tromey  <tromey@redhat.com>
8466
8467         For PR libgcj/7073:
8468         * parse.y (patch_incomplete_class_ref): Handle VOID_TYPE
8469         specially.
8470
8471 2002-07-01  Roger Sayle  <roger@eyesopen.com>
8472
8473         * java/decl.c (builtin_function): Accept additional parameter.
8474         (java_init_decl_processing): Pass an additional NULL_TREE
8475         argument to builtin_function.
8476
8477 2002-06-29  T.J. Mather  <tjmather@maxmind.com>
8478
8479         * gcj.texi: Fixed gcj invocation example so that it compiles.
8480
8481 2002-06-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8482
8483         * lex.c (java_init_lex): Avoid incorrect hardcoded constant 11.
8484         * parse.y (mark_parser_ctxt): Likewise.
8485         (check_modifiers, declare_local_variables): Avoid incorrect
8486         hardcoded constant 10.
8487
8488         * lex.c (java_read_char): Avoid "comparison is always true"
8489         warning.
8490
8491 2002-06-25  Andreas Schwab  <schwab@suse.de>
8492
8493         * expr.c (JSR): Avoid undefined operation on PC.
8494
8495 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8496
8497         * decl.c (clear_binding_level): Const-ify.
8498
8499 2002-06-13  Akim Demaille  <akim@epita.fr>
8500
8501         * parse.y (class_declaration, interface_declaration): Make sure
8502         all their rules have an action, in order to avoid meaningless `$$
8503         = $1' and their type clashes.
8504
8505 2002-06-11  Tom Tromey  <tromey@redhat.com>
8506
8507         * jcf-write.c (generate_classfile): Use FIELD_SYNTHETIC.
8508         * parse-scan.y (statement_without_trailing_substatement): Added
8509         assert_statement.
8510         (assert_statement): New rule.
8511         * java-tree.h (struct lang_type) [assertions]: New field.
8512         (TYPE_USES_ASSERTIONS): New macro.
8513         (CLASS_USES_ASSERTIONS): Likewise.
8514         (FIELD_SYNTHETIC): New define.
8515         * lex.c (java_lval;): Added ASSERT_TK.
8516         * parse.y (ASSERT_TK): Added.
8517         (statement_without_trailing_substatement): Added assert_statement.
8518         (assert_statement): New rule.
8519         (build_assertion): New function.
8520         (maybe_generate_pre_expand_clinit): Create and initialize
8521         $assertionsDisabled.
8522         (lookup_package_type): Removed decl.
8523         * keyword.h: Rebuilt.
8524         * keyword.gperf (assert): New token.
8525
8526 2002-06-10  Akim Demaille  <akim@epita.fr>
8527
8528         * parse.y (interface_type_list, class_member_declaration)
8529         (unary_expression_not_plus_minus): Remove duplicate %type.
8530         Whitespace changes.
8531
8532 2002-06-09  Tom Tromey  <tromey@redhat.com>
8533
8534         * Make-lang.in (java/lang.o): Use LANGHOOKS_DEF_H.
8535
8536         * parse.y (method_header): Give error message in all cases.
8537         Fixes PR java/6865.
8538
8539 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8540
8541         Don't use RTL inlining. Fix for PR java/6820.
8542         * lang.c (LANG_HOOKS_POST_OPTIONS): Define.
8543         (flag_really_inline): New.
8544         (java_decode_option): Set flag_really_inline if -finline-functions
8545         is seen.
8546         (java_post_options): New function. Turn off inlining unless
8547         flag_really_inline is set.
8548
8549 2002-06-10  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8550
8551         * gjavah.c (throwable_p): Accept argument as either a classname or
8552         signature fragment. Create null-terminated classname string for super
8553         when calling itself recursively.
8554         (decode_signature_piece): Skip first character from class name
8555         signature when calling throwable_p.
8556
8557 2002-06-08  H.J. Lu  (hjl@gnu.org)
8558
8559         * jcf-path.c (jcf_path_init): Allocate 1 more byte for string.
8560
8561 2002-06-04  Tom Tromey  <tromey@redhat.com>
8562
8563         * jcf-write.c (perform_relocations): Optmize a goto to a goto.
8564
8565 2002-06-04  Michael Koch  <konqueror@gmx.de>
8566
8567         * gcj.texi (Input Options): Fixed typo.
8568
8569 2002-06-04  Zack Weinberg  <zack@codesourcery.com>
8570
8571         * java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
8572         typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
8573         all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
8574         and all now-pointless local variables.  Rename other local
8575         variables to reflect their not being handles.
8576
8577         * java-tree.h, jcf-dump.c, jcf-io.c: Remove all
8578         #if JCF_USE_STDIO blocks.
8579
8580         * parse.y: Add missing semicolon at end of rule.
8581
8582 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
8583
8584         * check-init.c (attach_initialized_static_class): Delete, unused.
8585         * parse.y: Use htab_t instead of struct hashtable, update
8586         all uses.
8587         * java-tree.h: Include hashtab.h instead of hash.h.
8588         (struct lang_decl_func): Use htab_t, set up for gengtype.
8589         (struct init_test_hash_entry): Delete.
8590         (struct treetreehash_entry): New.
8591         (java_treetreehash_find): New
8592         (java_treetreehash_new): New prototype.
8593         (java_treetreehash_create): New prototype.
8594         (java_mark_tree): Delete prototype.
8595         (java_hash_hash_tree_node): Delete prototype.
8596         (java_hash_compare_tree_node): Delete prototype.
8597         (attach_initialized_static_class): Delete prototype.
8598         * expr.c (build_class_init): Update to use java_treetreehash
8599         functions.
8600         (java_expand_expr): Update to use htab_t.
8601         (emit_init_test_initialization): Likewise.
8602         * decl.c (java_mark_tree): Delete.
8603         * class.c (init_test_hash_newfunc): Delete.
8604         (java_hash_hash_tree_node): Delete.
8605         (java_hash_compare_tree_node): Delete.
8606         (add_method_1): Update to use java_treetreehash functions.
8607         (JAVA_TREEHASHHASH_H): New macro.
8608         (java_treetreehash_hash): New function.
8609         (java_treetreehash_compare): New function.
8610         (java_treetreehash_find): New function.
8611         (java_treetreehash_new): New function.
8612         (java_treetreehash_create): New function.
8613         * Make-lang.in (JAVA_TREE_H): Replace hash.h by HASHTAB_H.
8614
8615         * Make-lang.in (java/parse.o): Depend on debug.h.
8616         * java-tree.h (struct lang_identifier): Use gengtype.
8617         (union lang_tree_node): New.
8618         (struct lang_decl_func): Use gengtype.
8619         (struct lang_decl_var): Likewise.
8620         (struct lang_decl): Likewise.
8621         * parse.y: Include debug.h.
8622         * lang.c (LANG_HOOKS_MARK_TREE): Delete.
8623
8624         * lang.c (struct language_function): New dummy structure.
8625
8626         * java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Set
8627         descriminator for DECL_LANG_SPECIFIC.
8628         (struct lang_decl_func): Rename from struct lang_decl.
8629         (enum lang_decl_desc): New.
8630         (struct lang_decl): Make it a union.  Update all the accessor macros.
8631         (struct lang_type): Use gengtype.
8632         * class.c (add_method_1): Set descriminator for DECL_LANG_SPECIFIC.
8633         * decl.c (java_dup_lang_specific_decl): All lang_decl structures
8634         are now the same size.
8635         (lang_mark_tree): Use gengtype to mark TYPE_LANG_SPECIFIC;
8636         use discriminator to mark DECL_LANG_SPECIFIC.
8637
8638         * Make-lang.in (gt-java-builtins.h): New rule.
8639         (java/builtins.o): Add dependency on gt-<filename>.h.
8640         * builtins.c: Use gengtype for roots.
8641         (union string_or_tree): Use gengtype.
8642         (struct builtin_record): Use gengtype.
8643         * config-lang.in (gtfiles): Add builtins.c.
8644
8645         * Make-lang.in (gt-java-class.h, gt-java-constants.h,
8646         gt-java-decl.h, gt-java-expr.h, gt-java-jcf-parse.h,
8647         gt-java-jcf-write.h, gt-java-lang.h, gt-java-mangle.h,
8648         gt-java-parse.h, gtype-java.h): Add rules to generate.
8649         (parse.o): Add dependency on gt-java-parse.h, gt-java.h.
8650         (class.o): Add dependency on gt-*.h.
8651         (constants.o): Likewise.
8652         (decl.o): Likewise.
8653         (expr.o): Likewise.
8654         (jcf-parse.o): Likewise.
8655         (jcf-write.o): Likewise.
8656         (lang.o): Likewise.
8657         * config-lang.in (gtfiles): New.
8658         * class.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8659         * constants.c: Replace uses of ggc_add_* with GTY markers.
8660         Include gt-*.h.
8661         * decl.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8662         * expr.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8663         * java-tree.h: Replace uses of ggc_add_* with GTY markers.
8664         * jcf-parse.c: Replace uses of ggc_add_* with GTY markers.
8665         Include gt-*.h.
8666         * jcf-write.c: Replace uses of ggc_add_* with GTY markers.
8667         Include gt-*.h.
8668         * lang.c: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8669         * mangle.c: Replace uses of ggc_add_* with GTY markers.  Include
8670         gt-*.h.
8671         * parse.y: Replace uses of ggc_add_* with GTY markers.  Include gt-*.h.
8672         Include gtype-java.h.
8673
8674 2002-06-02  Tom Tromey  <tromey@redhat.com>
8675
8676         Fix for PR java/5913:
8677         * parse.y (patch_binop): Call patch_string on op1.
8678
8679 2002-06-02  Tom Tromey  <tromey@redhat.com>
8680
8681         Fix for PR java/1343, PR java/6336:
8682         * parse.y (make_nested_class_name): Remove extraneous `else'; fix
8683         formatting.  Changed return type.
8684         (anonymous_class_counter): Moved to top of file.
8685         (maybe_make_nested_class_name): Append number to class name for
8686         function-local classes.
8687
8688 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
8689
8690         * decl.c, jcf-parse.c, parse.y, typeck.c: Include real.h.
8691         * Make-lang.in: Update dependency lists.
8692
8693 2002-05-18  Mark Mitchell  <mark@codesourcery.com>
8694
8695         * gjavah.c (throwable_p): Do not free the name of the class after
8696         passing it to find_class.
8697         * java-tree.h (CLASS_BEING_LAIDOUT): Remove duplicate definition.
8698         * jcf-io.c (dirent.h): Include it.
8699         (fnmatch.h): Likewise.
8700         (compare_path): New function.
8701         (java_or_class_file): Likewise.
8702         (memoized_dirlist_entry): New type.
8703         (memoized_dirlist_lookup_eq): New function.
8704         (memoized_dirlists): New variable.
8705         (caching_stat): New function.
8706         (memoized_class_lookup_eq): New function.
8707         (memoized_class_lookups): Likewise.
8708         (find_class): Use memoized_class_lookups and caching_stat.
8709         * jcf.h (JCF_USE_SCANDIR): Define.
8710         * parse.y (java_expand_classes): Write the class files in reverse
8711         order.
8712
8713 2002-05-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8714
8715         * Make-lang.in: Allow for PWDCMD to override hardcoded pwd.
8716
8717 2002-05-13  Mark Mitchell  <mark@codesourcery.com>
8718
8719         * jcf-write.c (write_classfile): Unlink the temporary file if it
8720         cannot be renamed.  Use concat to build up the name of the
8721         temporary file.
8722
8723 2002-05-08  Mark Mitchell  <mark@codesourcery.com>
8724
8725         * jcf-write.c (write_classfile): Write the file to a
8726         temporary file and then rename it.
8727
8728 2002-05-07  Tom Tromey  <tromey@redhat.com>
8729
8730         * gjavah.c (throwable_p): Use xstrdup, not strdup.
8731
8732         Fix for PR java/1200:
8733         * gjavah.c (throwable_p): New function.
8734         (decode_signature_piece): Use it.  A `WeakReference' isn't the
8735         same as a `jweak'.
8736         Include hashtab.h.
8737         (gcjh_streq): New function.
8738
8739 2002-05-07  Andreas Jaeger  <aj@suse.de>
8740
8741         * parse.y (finish_for_loop): Fix if statement.
8742
8743 2002-05-06  Tom Tromey  <tromey@redhat.com>
8744
8745         Fix for PR java/5941:
8746         * parse.y (finish_for_loop): Set SUPPRESS_UNREACHABLE_ERROR for
8747         loop update expression.
8748         (java_complete_lhs): Use SUPPRESS_UNREACHABLE_ERROR.
8749         * java-tree.h (SUPPRESS_UNREACHABLE_ERROR): New macro.
8750
8751 2002-05-04  Mark Wielaard  <mark@klomp.org>
8752
8753         For PR java/6519:
8754         * parse.y (build_string_concatenation): Return just op1 only when op2
8755         is null and op1 is a STRING_CST, otherwise always construct a
8756         StringBuffer.
8757
8758 2002-04-27  Tom Tromey  <tromey@redhat.com>
8759
8760         For PR java/6382:
8761         * parse.y (string_convert_int_cst): New function.
8762         (merge_string_cste): Use it.
8763
8764 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
8765
8766         * java-tree.h (java_parse_file): Update.
8767         (java_set_yydebug): Remove.
8768         * jcf-parse.c (yydebug): Remove.
8769         (java_set_yydebug): Die.
8770         (java_parse_file): Update.
8771         * lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
8772
8773 2002-04-24  Tom Tromey  <tromey@redhat.com>
8774
8775         For PR java/6425:
8776         * parse.y (qualify_ambiguous_name) [case CALL_EXPR]: Always choose
8777         EXPR_WFL_QUALIFICATION of qual_wfl.
8778
8779 2002-04-23  Per Bothner  <per@bothner.com>
8780
8781         * expr.c (PRE_JSR):  Call NOTE_LABEL for return address.
8782         * java-tree.h (BCODE_RETURN_TARGET):  Removed - never set.
8783         (BCODE_TARGET):  Remove BCODE_RETURN_TARGET.
8784
8785 2002-04-23  Tom Tromey  <tromey@redhat.com>
8786
8787         For PR java/6314:
8788         * jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
8789         recognize `-fcompile-resource='.
8790         * gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
8791         a bit.
8792
8793 2002-04-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
8794
8795         * jcf-parse.c: (yyparse): Don't prepend "./" to relative
8796         paths. Fixes PR java/2791.
8797
8798 2002-04-19  Andrew Haley  <aph@redhat.com>
8799
8800         * jcf-write.c (push_long_const): lo, hi: New variables.
8801         Use rshift_double to extract the high part of a 64-bit long.
8802         Use WORD_TO_INT to extract the low part.
8803
8804         * jcf-parse.c (get_constant): CONSTANT_Integer: Use an unsigned
8805         HOST_WIDE_INT for num.  Use JPOOL_UINT to get it.
8806         CONSTANT_Double: Use JPOOL_UINT to get both halve of a double.
8807
8808 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
8809
8810         * typeck.c (incomplete_type_error): Remove.
8811
8812 2002-04-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8813
8814         * class.c (make_class_data): Set DECL_ALIGN on static class data,
8815         for hash synchronization.
8816         * expr.c (java_expand_expr): Set DECL_ALIGN on static array objects.
8817         * decl.c (java_init_decl_processing): Don't set TYPE_ALIGN for
8818         class_type_node.
8819
8820 2002-04-16  Mark Wielaard  <mark@klomp.org>
8821
8822         * jcf-write.c (generate_bytecode_insns): Only write const_0 if not
8823         negative zero.
8824
8825 2002-04-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8826
8827         Fix for PR java/6294:
8828         * parse.h (INNER_INTERFACE_MODIFIERS): Allow ACC_PRIVATE for inner
8829         interfaces.
8830
8831 2002-04-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8832
8833         Fix for PR java/6085:
8834         * parse.y (patch_method_invocation): Always use build_access_to_thisn
8835         to get enclosing "this" argument for inner-class constructor
8836         invocation. Pass correct arguments to build_access_to_thisn.
8837
8838 2002-04-10  Andreas Jaeger  <aj@suse.de>
8839
8840         * gcj.texi (Input Options): Fix extdirs patch.
8841
8842 2002-04-10  Anthony Green  <green@redhat.com>
8843
8844         * jcf-path.c (jcf_path_init) : Clean up local extdirs declaration.
8845
8846 2002-04-09  Anthony Green  <green@redhat.com>
8847
8848         * gcj.texi (Input Options): Add --extdirs documentation.
8849         * jcf-dump.c (OPT_extdirs): New macro.
8850         (options): Add extdirs option.
8851         (help): Describe --extdirs.
8852         (main): Handle OPT_extdirs.
8853         * gjavah.c (OPT_extdirs): New macro.
8854         (options): Add extdirs option.
8855         (help): Describe --extdirs.
8856         (main): Handle OPT_extdirs.
8857         * jcf-path.c (jcf_path_init): Add extdirs support.
8858         (jcf_path_extdirs_arg): New function.
8859         (extensions): New variable to hold extensions path entries.
8860         * jvspec.c: Remove -fextdirs= when compiling main().
8861         * lang.c (java_decode_option): Handle -fextdirs=.
8862         * jcf.h (jcf_path_extdirs_arg): Declare new function.
8863         * Make-lang.in: Compile jcf-path with version info for use in
8864         identifying the appropriate libgcj.jar.
8865
8866 2002-04-08  Tom Tromey  <tromey@redhat.com>
8867
8868         For PR libgcj/5303:
8869         * .cvsignore: Added rmic.1 and rmiregistry.1.
8870         * gcj.texi (Top): Link to new nodes.
8871         (Invoking rmic): New node.
8872         (Invoking rmiregistry): Likewise.
8873         * Make-lang.in (java.generated-manpages): Added rmic.1 and
8874         rmiregistry.1.
8875         (java.maintainer-clean): Likewise.
8876         ($(srcdir)/java/rmic.1): New target.
8877         ($(srcdir)/java/rmiregistry.1): Likewise.
8878         (java.install-man): Handle rmic.1 and rmiregistry.1.
8879
8880 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8881
8882         * gcj.texi (Invocation): Update JvAttachCurrentThread documentation.
8883         Add note about handling uncaught exceptions. Add an exception handler
8884         to example.
8885
8886 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8887
8888         * parse.y (resolve_qualified_expression_name): Clear "from_super" flag
8889         after using it to patch CALL_EXPR.
8890
8891 2002-04-08  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8892
8893         * gcj.texi (Invocation): Document CNI invocation API.
8894
8895 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
8896
8897         * expr.c (truthvalue_conversion): Rename.  Update.
8898         (expand_compare): Update.
8899         * java-tree.h (java_truthvalue_conversion): New.
8900         * lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
8901
8902 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8903
8904         * java-tree.h (java_mark_addressable): New.
8905         * lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
8906         * typeck.c (mark_addressable): Rename, update.
8907
8908 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
8909
8910         * expr.c (build_java_binop): Update.
8911         * java-tree.h (java_signed_type, java_unsigned_type,
8912         java_signed_or_unsigned_type): Update.
8913         * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
8914         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
8915         * parse.y (patch_binop): Update.
8916         * typeck.c (signed_or_unsigned_type, unsigned_type,
8917         signed_type): Update.
8918
8919 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
8920
8921         * lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
8922         (java_dummy_print): Remove.
8923         (lang_print_error): Rename.  Exit early if inhibiting output.
8924         (inhibit_error_printing_function): New.
8925         (java_init): Don't set hook.
8926         (lang_init_source): Use new boolean.
8927
8928 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8929
8930         * parse.y (do_resolve_class): Fix infinite recursion.
8931
8932 2002-03-29  Tom Tromey  <tromey@redhat.com>
8933
8934         * parse.y (check_inner_circular_reference): Ignore incomplete
8935         types.
8936
8937 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
8938
8939         * Make-lang.in (builtins.o): Update.
8940         * boehm.c (get_boehm_type_descriptor): Update.
8941         * builtins.c: Include langhooks.h.
8942         * decl.c (java_init_decl_processing): Update.
8943         * java-tree.h (java_type_for_mode, java_type_for_size): New.
8944         * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
8945         Redefine.
8946         * typeck.c (type_for_mode, type_for_size): Update.
8947
8948 2002-03-29  Martin Kahlert  <martin.kahlert@infineon.com>
8949
8950         * lex.c (java_new_lexer): Alias "646" to DEFAULT_ENCODING.
8951
8952 2002-03-28  Tom Tromey  <tromey@redhat.com>
8953
8954         * except.c (expand_end_java_handler): If the handler type is NULL,
8955         use java.lang.Throwable.  Fixes PR java/5986.
8956
8957 2002-03-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
8958
8959         Fix for PR java/4715:
8960         * jcf-parse.c (parse_source_file_3): New function.
8961         (read_class): Call it.
8962         (java_parse_file): Likewise.
8963
8964 2002-03-28  Jan Hubicka  <jh@suse.cz>
8965
8966         * java/lang.c (java_init_options): Set flag_trapping_math to 0.
8967
8968 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8969
8970         * parse.y (resolve_package): Initialize "decl".
8971         (lookup_package_type): Remove unused function.
8972
8973 2002-03-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8974
8975         Fix for PR java/5993:
8976         * parse.y (resolve_package): Return the decl if resolution was
8977         successful. Don't special case "java.lang" and "java.lang.reflect"
8978         packages. Set type_name to the merged identifier.
8979         (resolved_qualified_expression_name): Print error using "name" if
8980         resolve_package returns NULL_TREE.
8981
8982 2002-03-27  Tom Tromey  <tromey@redhat.com>
8983
8984         * expr.c (expand_invoke): Don't generate null pointer check if
8985         we're calling <init>.
8986
8987 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
8988
8989         * expr.c (java_lang_expand_expr): Rename java_expand_expr,
8990         fix prototype.
8991         * java-tree.h (java_lang_expand_expr): Similarly.
8992         * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
8993         (java_init): Don't set hook.
8994
8995 2002-03-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
8996
8997         Fix for PR java/5850:
8998         * parse.y (lookup_field_wrapper): Call itself recursively for enclosing
8999         context if field was not found in the current scope.
9000         * expr.c (lookup_field): Don't look in enclosing contexts.
9001
9002 2002-03-26  Tom Tromey  <tromey@redhat.com>
9003
9004         Fix for PR java/5942:
9005         * parse.y (init_src_parse): Added sanity check.
9006         * parse.h (struct parser_ctxt) [modifier_ctx]: Array has 12
9007         elements, not 11.
9008
9009 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
9010
9011         * decl.c (lang_mark_tree): Rename java_mark_tree.
9012         * java-tree.h (java_mark_tree): New.
9013         * java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
9014
9015 2002-03-25  Zack Weinberg  <zack@codesourcery.com>
9016
9017         * lex.c: Change java_perform_atof to take normal parameters
9018         instead of a pointer to a parameter block.  Call it directly
9019         from java_lex.
9020
9021 2002-03-22  Mark Wielaard  <mark@klomp.org>
9022
9023         Fix for PR java/5368:
9024         * parse.y (resolve_qualified_expression_name): Use decl not field_decl
9025         when printing error message.
9026
9027 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
9028
9029         * decl.c (maybe_build_cleanup): Remove.
9030
9031 2002-03-22  Tom Tromey  <tromey@redhat.com>
9032
9033         Andrew Haley  <aph@cambridge.redhat.com>
9034
9035         * expr.c (build_field_ref): Don't build a check if the field is a
9036         member of `this'.
9037
9038 2002-03-21  Eric Blake  <ebb9@email.byu.edu>
9039
9040         Fix for PR java/6026:
9041         * lex.c (java_lex): Fix parsing of consecutive floats.
9042
9043 2002-03-21  Tom Tromey  <tromey@redhat.com>
9044
9045         * parse.y (build_access_to_thisn): Stop when FROM is not an inner
9046         class.
9047
9048 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
9049
9050         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
9051         insert_block, getdecls, kept_level_p, global_bindings_p): New.
9052
9053 2002-03-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9054
9055         * gcj.texi: @code{gcj} becomes @command{gcj}.
9056         @code{gcc} becomes @command{gcc}.
9057         GcjRaw changed to gnu.gcc.RawData.
9058
9059 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
9060
9061         * decl.c (start_java_method): Use new hook.
9062         * lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
9063         (java_init): Remove old hook.
9064
9065 2002-03-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
9066
9067         * builtins.c (define_builtin): Do nothing if `type' is null.
9068         Fixes PR java/5876.
9069
9070 2002-03-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9071
9072         * parse.y (parser_check_super_interface): Fix error message
9073         grammar/order.
9074
9075 2002-03-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9076
9077         * jcf-parse.c (get_constant): Delete unused variables.
9078
9079 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
9080
9081         * java-tree.h (java_parse_file): New.
9082         * jcf-parse.c (yyparse): Rename java_parse_file.
9083         * lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
9084
9085 2002-03-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9086
9087         * parse.y (craft_constructor): Return the constructor decl.
9088         (java_expand_classes): Update comments.
9089         (lookup_method_invoke): Call fix_constructors immediately for
9090         anonymous class. Fixes PR java/5935.
9091
9092 2002-03-15  Anthony Green  <green@redhat.com>
9093
9094         * jcf-parse.c (yyparse): Don't emit class registration
9095         constructor when compiling resource files.
9096
9097 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9098
9099         * lang.c (java_tree_code_type, java_tree_code_length,
9100         tree_code_name): Delete.
9101         (tree_code_type, tree_code_length, tree_code_name): Define.
9102         (java_init): Don't try to copy into the various tree_code
9103         arrays.
9104
9105 2002-03-12  Tom Tromey  <tromey@redhat.com>
9106
9107         * jcf-parse.c (get_constant) [CONSTANT_String]: String values are
9108         UTF-8, not UCS-2.  Fixes PR java/5923.
9109
9110         * parse.y (qualify_ambiguous_name): Handle case where QUAL_WFL is
9111         a call_expr wrapped in a convert.  Fixes PR java/5848.
9112
9113 2002-03-12  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9114
9115         * jcf-write.c (write_classfile): Improve error strings.
9116
9117 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9118
9119         * lex.c: Adjust comments to GNU standards.
9120
9121 2002-03-11  Eric Blake  <ebb9@email.byu.edu>
9122
9123         Fix for PR java/5902:
9124         * lex.c (java_lex): Fix parsing of literals.
9125
9126 2002-03-11  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9127
9128         * parse.y (patch_assignment): Wrap the right-hand-side with a save_expr
9129         to prevent it getting evaluated twice in the store checking case.
9130         * expr.c (build_java_arraystore_check): Unwrap SAVE_EXPR's when
9131         examining OBJECT.
9132
9133 2002-03-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9134
9135         * decl.c (java_init_decl_processing): Make sure class_type_node
9136         alignment is not less than 64 bits if hash synchronization is enabled.
9137
9138 2002-03-08  Per Bothner  <per@bothner.com>
9139
9140         * parse.y (java_complete_lhs):  Check if patch_assignment
9141         returned an error-mark.
9142
9143         * parse.y (try_builtin_assignconv):  Don't special-case zero.
9144
9145 2002-03-08  Per Bothner  <per@bothner.com>
9146
9147         Fix for PR java/5812.
9148         * expr.c (build_java_jsr):  Take pc arguments, and do lookup_label
9149         here instead of in JSR macro.  Likewise with load_type_state call.
9150         Do the latter on if the return_pc has been verified (the jsr returns).
9151         (JSR):  Now just call build_java_jsr.
9152
9153 2002-03-07  Jeff Sturm  <jsturm@one-point.com>
9154
9155         * java/Make-lang.in (JAVA_TARGET_INSTALL_NAME): Define.
9156         (java.install-common): Link native driver to
9157         JAVA_TARGET_INSTALL_NAME.
9158
9159 2002-03-05  David Billinghurst <David.Billinghurst@riotinto.com>
9160
9161         * builtins.c(cos_builtin): method_return_type ATTRIBUTE_UNUSED
9162         * builtins.c(sin_builtin): Likewise
9163         * builtins.c(sqrt_builtin): Likewise
9164
9165 2002-03-03  Zack Weinberg  <zack@codesourcery.com>
9166
9167         * java/expr.c, java/jcf-parse.c, java/lex.c:
9168         Remove all #ifndef REAL_ARITHMETIC blocks, make all #ifdef
9169         REAL_ARITHMETIC blocks unconditional.  Delete some further
9170         #ifdef blocks predicated on REAL_ARITHMETIC.
9171
9172 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9173
9174         * class.c (init_class_processing): Use ARRAY_SIZE in lieu of
9175         explicit sizeof/sizeof.
9176         * decl.c (java_init_decl_processing): Likewise.
9177         * jcf-parse.c (init_jcf_parse): Likewise.
9178         * parse.y (init_src_parse): Likewise.
9179
9180 2002-03-02  Per Bothner  <per@bothner.com>
9181
9182         Make --CLASSPATH by a synonym for --classpath and -classpath.
9183         Implement --bootclasspath.
9184         * jcf-path.c (classpath_u):  Rename static variable to classpath_user.
9185         (classpath_l):  Remove.
9186         (jcf_path_CLASSPATH_arg):  Remove.
9187         (jcf_path_bootclasspath_arg):  New function.
9188         (jcf_path_seal):  Simplify accordingly.
9189
9190         * jcf.h (jcf_path_bootclasspath_arg):  New declarations.
9191         (jcf_path_CLASSPATH):  Remove declaration.
9192         * jvspec.c (jvgenmain_spec):  Also accept -fbootclasspath*.
9193         (lang_specific_driver):  Translate -bootclasspath.
9194         * lang-options.h:  Add --bootclasspath.  Update --CLASSPATH.
9195         * lang.c (decode_lang_options):  Do jcf_path_init first.
9196         Handle -fCLASSPATH same as -fclasspath.  Also process -fbootclasspath.
9197         * gjavah.c:  Also handle --bootclasspath.
9198         Handle --CLASSPATH as a synonum for --classpath.
9199         * jcf-dump.c: Likewise.
9200
9201         "." is not part of system path, but is the default for --classpath.
9202         * jcf-path.c (jcf_path_init):  Don't add "." to sys_dirs.
9203         (jcf_path_seal):  Add "." if no CLASSPATH specified.
9204
9205         * gcj.texi:  Document changes.
9206
9207 2002-03-01  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9208
9209         * expr.c (build_java_arraystore_check): Fix formatting.
9210
9211 2002-02-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
9212
9213         Fix for PR java/5758, java/5632:
9214         * jcf-parse.c (load_class): Renamed local variable, consider `.' an
9215         inner-class separator too.
9216         * parse.y (do_resolve_class): New local `decl_result.'
9217         Progressively build a name for what can have been loaded.
9218
9219 2002-02-28  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9220
9221         * expr.c (java_array_data_offset): Removed function.
9222         (JAVA_ARRAY_LENGTH_OFFSET): Removed macro.
9223         (build_java_array_length_access): Obtain "length" value using a
9224         COMPONENT_REF, instead of INDIRECT_REF and arithmetic.
9225         (build_java_arrayaccess): Correct comment. Access "data" using a
9226         COMPONENT_REF, and return an ARRAY_REF instead of an INDIRECT_REF.
9227         (build_java_arraystore_check): New function.
9228         (expand_java_arraystore): Use build_java_arraystore_check.
9229         * parse.y (patch_assignment): Simplify code to insert a store check
9230         when lvalue is an ARRAY_REF. Use build_java_arraystore_check.
9231         * check-init.c (check_init): Update to reflect that an array length
9232         access is now a COMPONENT_REF.
9233         * gcj.texi (Code Generation): Improve documentation of
9234         -fno-bounds-check. Add documentation for -fno-store-check.
9235         * java-tree.h (flag_store_check): Declare.
9236         (build_java_arraystore_check): Declare.
9237         * lang.c (flag_store_check): Initialize to 1.
9238         (lang_f_options): Add store-check option.
9239         * jvspec.c: Don't pass store-check option to jvgenmain.
9240         * lang-options.h: Add help string for -fno-store-check.
9241
9242 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
9243
9244         * decl.c (copy_lang_decl): Rename java_dup_lang_specific_decl.
9245         * java-tree.h (java_dup_lang_specific_decl): New.
9246         * lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
9247
9248 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
9249
9250         * builtins.c, decl.c: Delete traditional-mode-related code
9251         copied from the C front end but not used, or used only to
9252         permit the compiler to link.
9253
9254 2002-02-22  Tom Tromey  <tromey@redhat.com>
9255
9256         Fix for PR java/2369:
9257         * jvspec.c (verify_class_name): New function.
9258         (lang_specific_driver): Call it.
9259         (JAVA_START_CHAR_P): New macro.
9260         (JAVA_PART_CHAR_P): Likewise.
9261
9262 2002-02-22  Per Bothner  <per@bothner.com>
9263
9264         * class.c:  Change vtable to be more compatible with g++ v3 abi.
9265         (get_dispatch_table):  Prepend offset-to-top (always 0) and
9266         type_info pointer (currently unimplemented hence NULL) to vtable.
9267         Specifically, prepend offset-to-top and typeinfo ptr (currently null).
9268         (make_class_data):  Variable dtable_start_offset is sizeof 2 pointers.
9269         Adjust vtable pointers by dtable_start_offse - i.e. skip new words.
9270         (build_dtable_decl):  Add declarations for new fields.
9271
9272 2002-02-20  Per Bothner  <per@bothner.com>
9273
9274         * parse.y (patch_method_invocation): Set CAN_COMPLETE_NORMALLY on call
9275         to finit$ (otherwise generate_bytecode_insns drops it). However, we
9276         don't need to set it on the COMPOUND_EXPR - the caller does that.
9277
9278 2002-02-20  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9279
9280         * gcj.texi: Option `--classpath' becomes `--CLASSPATH.'Option
9281         `--CLASSPATH' becomes `--classpath.'
9282         * gjavah.c: Likewise.
9283         * jcf-dump.c: Likewise.
9284         * lang-options.h: Likewise.
9285         * lang.c: Likewise.
9286         * jcf-path.c: Updated comment.
9287         (jcf_path_classpath_arg): Renamed `jcf_path_CLASSPATH_arg.'
9288         (jcf_path_CLASSPATH_arg): Renamed `jcf_path_classpath_arg.'
9289         * jcf.h (jcf_path_CLASSPATH_arg): Ditto.
9290         (jcf_path_CLASSPATH_arg): Ditto.
9291         (classpath_u): Updated leading comment.
9292
9293 2002-02-20  Per Bothner  <per@bothner.com>
9294
9295         * builtins.c (check_for_builtin):  New function.
9296         (build_call_or_builtin):  Remove.
9297         * java-tree.h:  Update accordingly.
9298         * expr.c (expand_invoke):  Use build + check_for_builtin instead
9299         of build_call_or_builtin.
9300         * parse.y (patch_invoke):  Likewise.  This avoids needlessly creating
9301         a new CALL_EXPR node, which means we don't lose the CALL_USING_SUPER
9302         flag (which had caused jcf-write to incorrectly emit invokevirtual).
9303
9304 2002-02-17  Tom Tromey  <tromey@redhat.com>
9305
9306         * java-tree.h (TYPE_STRICTFP): New macro.
9307         (struct lang_type) [strictfp]: New field.
9308         (CLASS_STRICTFP): New macro.
9309         (METHOD_STRICTFP): New macro.
9310         (struct lang_decl) [strictfp]: New field.
9311         * parse.y (method_header): Disallow strictfp constructor or
9312         abstract method.
9313         (STRICT_TK): Move before MODIFIER_TK.
9314         * parse.h (CLASS_MODIFIERS): Added ACC_STRICT.
9315         (METHOD_MODIFIERS): Likewise.
9316         (INTERFACE_MODIFIERS): Likewise.
9317         * jcf-write.c (get_access_flags): Likewise.
9318         * class.c (set_class_decl_access_flags): Recognize ACC_STRICT.
9319         (add_method_1): Likewise.
9320         (get_access_flags_from_decl): Likewise.
9321         * jcf-dump.c (print_access_flags): Print in standard order.  Also,
9322         recognize strictfp flag.
9323         * jcf.h (ACC_STRICT): New define.
9324
9325 2002-02-12  David Billinghurst <Davod.Billinghurst@riotinto.com>
9326
9327         * class.c(build_utf8_ref): Move declaration of decl_size
9328
9329 2002-02-07  Tom Tromey  <tromey@redhat.com>
9330
9331         * gcj.texi (Input Options): --CLASSPATH does not suppress system
9332         path.
9333
9334 2002-02-04  Anthony Green  <green@redhat.com>
9335
9336         * class.c (build_utf8_ref): Put UTF-8 constants into merged
9337         sections if available.
9338
9339 2002-02-04  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9340
9341         * parse.y (java_expand_classes): Fix typo in static field loop.
9342
9343 2002-02-02  Richard Henderson  <rth@redhat.com>
9344
9345         * class.c (add_field): Mark static fields external.
9346         (build_class_ref): Remove redundant set.
9347         * parse.y (java_expand_classes): Mark static fields of classes
9348         to be compiled as local.
9349         * jcf-parse.c (parse_class_file): Likewise.
9350
9351 2002-02-02  Nic Ferrier  <nferrier@tapsellferrier.co.uk>
9352
9353         * gcj.texi (About CNI): New node.
9354
9355 2002-02-01  Craig Rodrigues  <rodrigc@gcc.gnu.org>
9356
9357         PR java/5080
9358         * jcf-parse.c : Check for HAVE_LOCALE_H before using
9359         setlocale() with LC_CTYPE as a parameter.
9360         * jv-scan.c: Same.
9361
9362 2002-01-31  Joseph S. Myers  <jsm28@cam.ac.uk>
9363
9364         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
9365         Follow GNU Coding Standards for --version.
9366
9367 2002-01-28  Tom Tromey  <tromey@redhat.com>
9368
9369         * expr.c (build_jni_stub): Ensure storage for `meth' is
9370         generated.
9371         * parse.y (java_complete_expand_methods): Set
9372         current_function_decl before building JNI stub.
9373
9374 2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
9375
9376         * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
9377         BUILT_IN_SQRTF.
9378
9379 2002-01-22  Tom Tromey  <tromey@redhat.com>
9380
9381         * decl.c (java_init_decl_processing): Use add_predefined_file.
9382         Predefine RawData.java.
9383         (predef_filenames): Removed.
9384         (java_init_decl_processing): Don't register predef_filenames.
9385         * jcf-parse.c (add_predefined_file): New function.
9386         (predefined_filename_p): Rewrote.
9387         (predefined_filename_p): No longer static.
9388         * decl.c (java_init_decl_processing): Call initialize_builtins.
9389         * Make-lang.in (JAVA_OBJS): Added builtins.o.
9390         (java/builtins.o): New target.
9391         * builtins.c: New file.
9392         * parse.y (patch_invoke): Use build_call_or_builtin.
9393         * java-tree.h (build_call_or_builtin): Declare.
9394         (initialize_builtins): Declare.
9395         (java_set_exception_lang_code): Removed unused declaration.
9396         (PREDEF_FILENAMES_SIZE): Removed.
9397         (java_tree_index): Added JTI_PREDEF_FILENAMES.
9398         (predef_filenames): New define.
9399         (add_predefined_file): Declare.
9400         (predefined_filename_p): Declare.
9401         * expr.c (expand_invoke): Use build_call_or_builtin.
9402
9403 2002-01-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9404
9405         * parse.y (patch_switch_statement): Fix format specifier.
9406
9407 2002-01-16  Tom Tromey  <tromey@redhat.com>
9408
9409         More for PR java/5365:
9410         * gjavah.c (print_stub_or_jni): Cause exception to be thrown by
9411         default.
9412         (process_file): Generate include for
9413         java.lang.UnsupportedOperationExceptions.
9414
9415 2002-01-15  Andreas Jaeger  <aj@suse.de>
9416
9417         * .cvsignore: Add man pages.
9418
9419 2002-01-15  Tom Tromey  <tromey@redhat.com>
9420
9421         Fix for PR java/5365:
9422         * gjavah.c (process_file): Turn class name into a file name.
9423
9424 2002-01-14  Matthias Klose  <doko@debian.org>
9425
9426         * gcj.texi: Fix whitespace and formatting errors in the
9427         synopsis of the man pages. Update copyright.
9428
9429 2002-01-14  Tom Tromey  <tromey@redhat.com>
9430
9431         For PR libgcj/5303:
9432         * Make-lang.in (java.install-man): Handle jv-convert man page.
9433         (java.generated-manpages): Added jv-convert.1.
9434         (java.uninstall): Remove jv-convert.1.
9435         (java.maintainer-clean): Likewise.
9436         ($(srcdir)/java/jv-convert.1): New target.
9437         * gcj.texi (Top): Link to jv-convert node.
9438         (Individual utilities): Likewise.
9439         (Invoking jv-convert): New node.
9440
9441 2001-01-10  Jeff Sturm  <jsturm@one-point.com>
9442             Martin Kahlert  <martin.kahlert@infineon.com>
9443
9444         * jcf-parse.c (get_constant): Don't swap lo/hi for big
9445         endian targets when HOST_BITS_PER_WIDE_INT >= 64.
9446
9447 2002-01-03  Graham Stott  <grahams@redhat.com>
9448
9449         * class.c (compile_resource_file): Update copyright date.
9450         Constify filename parameter.
9451         (java-tree.h): Update copyright date.
9452         (compile_resource_file): Constify filename parameter.
9453
9454 2002-01-03  Graham Stott  <grahams@redhat.com>
9455
9456         * gcc/jcf-parse.c: Update copyright date.
9457         (yyparse): Constify resource_filename.
9458
9459 2002-01-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9460
9461         * parse.y (src_parse_roots): Don't needlessly zero init.
9462
9463 2001-12-31  Tom Tromey  <tromey@redhat.com>
9464
9465         * parse.y (dump_java_tree): New function.
9466         (source_end_java_method): Call it.
9467         (end_class_declaration): Likewise.
9468         * lang.c (java_decode_option): Call dump_switch_p.
9469
9470 2001-12-28  Tom Tromey  <tromey@redhat.com>
9471
9472         * gen-table.pl: Don't process characters after \uffff.  Added
9473         comment pointing to input file.
9474
9475 2001-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9476
9477         * gen-table.pl: Const-ify output.  Document the location of a
9478         suitable unicode input file.
9479
9480         * chartables.h: Regenerate.
9481
9482 2001-12-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9483
9484         * chartables.h: Const-ify.
9485         * gjavah.c (options): Likewise.
9486         * jcf-dump.c (options): Likewise.
9487         * jv-scan.c (options): Likewise.
9488         * lex.c (java_start_char_p, java_part_char_p): Likewise.
9489         * parse.y (binop_lookup): Likewise.
9490
9491 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9492
9493         * Make-lang.in (keyword.h): Pass -C to gperf to const-ify
9494         the static arrays that are output.
9495         * jvspec.c (jvgenmain_spec): Make static.
9496         * keyword.gperf (struct java_keyword, java_keyword): Const-ify.
9497         * keyword.h: Regenerate.
9498         * lang.c (string_option, process_option_with_no, lang_f_options,
9499         lang_W_options): Const-ify.
9500         * lex.c (java_lex): Likewise.
9501
9502 2001-12-21  Richard Henderson  <rth@redhat.com>
9503
9504         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into ..
9505         (get_boehm_type_descriptor): ... here.  Arrange for the
9506         TREE_TYPE to get set properly.
9507
9508 2001-12-21  Richard Henderson  <rth@redhat.com>
9509
9510         * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor
9511         only if the target requires collect2.
9512
9513         * class.c (build_class_ref): Mark _Jv_fooClass DECL_EXTERNAL.
9514
9515 2001-12-20  Tom Tromey  <tromey@redhat.com>
9516
9517         For PR java/4509:
9518         * parse.y (java_complete_lhs) [COMPOUND_EXPR]: Correctly compute
9519         CAN_COMPLETE_NORMALLY for the node.
9520         * jcf-write.c (generate_bytecode_insns) [COMPOUND_EXPR]: Don't
9521         generate code for second branch if first branch can't complete
9522         normally.
9523         (generate_bytecode_insns) [LOOP_EXPR]: Don't generate `goto' to
9524         the loop head if the loop body can't complete normally.
9525
9526 2001-12-20  Tom Tromey  <tromey@redhat.com>
9527
9528         For PR java/4766:
9529         * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
9530         case where `finally' clause can't complete normally.
9531
9532 2001-12-20  Tom Tromey  <tromey@redhat.com>
9533
9534         Fixes PR java/5057:
9535         * parse.y (analyze_clinit_body): Added this_class parameter.
9536         Check for more cases where we must keep <clinit>.
9537         (maybe_yank_clinit): Cleaned up flow control.
9538
9539 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9540
9541         * decl.c (java_init_decl_processing): Don't initialize
9542         finit_leg_identifier_node.
9543         * java-tree.h (java_tree_index): Remove JTI_FINIT_LEG_IDENTIFIER_NODE.
9544         (finit_leg_identifier_node): Remove.
9545         (ID_FINIT_P): Don't check for JTI_FINIT_LEG_IDENTIFIER_NODE.
9546
9547 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9548
9549         * mangle.c (mangle_member_name): Don't special-case for
9550         NO_DOLLAR_IN_LABEL.
9551         * mangle_name.c (unicode_mangling_length): Likewise.
9552         (append_unicode_mangled_name): Likewise.
9553         * parse.y (make_nested_class_name): Remove dead NO_DOLLAR_IN_LABEL
9554         code.
9555
9556 2001-12-20  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9557
9558         * expr.c (build_java_array_length_access): Don't force null pointer
9559         check unless flag_check_references is set.
9560
9561 2001-12-20  Tom Tromey  <tromey@redhat.com>
9562
9563         Fix for PR java/3417:
9564         * parse.y (patch_assignment): Added special processing for
9565         `return'.
9566         (patch_return): Don't convert booleans to integers, and don't
9567         special-case `null'.
9568
9569 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
9570
9571         * config-lang.in (diff_excludes): Remove.
9572
9573 2001-12-17  Joseph S. Myers  <jsm28@cam.ac.uk>
9574
9575         * gcj.texi: Update link to GCC manual.
9576
9577 2001-12-17  Tom Tromey  <tromey@redhat.com>
9578
9579         * parse.y (link_nested_class_to_enclosing): Removed useless
9580         statement.
9581
9582 2001-12-16  Tom Tromey  <tromey@redhat.com>
9583
9584         * mangle.c (mangle_method_decl): Never emit `C2' constructor.
9585         Fixes PR java/5088.
9586
9587 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
9588
9589         * ChangeLog, Make-lang.in, class.c, expr.c, gcj.texi, java-tree.h,
9590         jcf-parse.c, jcf-write.c, lex.c, parse.h, parse.y, verify.c: Fix
9591         spelling errors.
9592
9593 2001-12-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9594
9595         * lex.c (java_read_unicode, java_lex): Use hex_p/hex_value.
9596
9597 2001-12-16  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9598
9599         * decl.c (java_init_decl_processing): Build otable_type correctly.
9600         otable_decl is an otable_type.
9601
9602 2001-12-15  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9603
9604         * java-tree.h (otable_methods, otable_decl, otable_syms_decl,
9605         otable_type, otable_ptr_type, method_symbol_type,
9606         method_symbols_array_type, method_symbols_array_ptr_type): New
9607         field/global tree definitions.
9608         (flag_indirect_dispatch): New flag.
9609         * decl.c (java_init_decl_processing): Initialize new otable and
9610         otable_syms type nodes and decls. Add new field "index" to
9611         method_type_node.
9612         * class.c (build_method_symbols_entry): New function.
9613         (make_method_value): Set "index" to to method's vtable index for
9614         virtual methods when indirect-dispatch is not used.
9615         (make_class_data): For indirect-dispatch, don't emit the dtable_decl,
9616         and set vtable_method_count to -1. Set otable and otable_syms field
9617         if indirect-dispatch is used and there was something to put in them.
9618         (build_method_symbols_entry): New function.
9619         (emit_offset_symbol_table): New function.
9620         * expr.c (get_offset_table_index): New function.
9621         (build_invokevirtual): Build array reference to otable at the index
9622         returned by get_offset_table_index, and use the result as the vtable
9623         offset.
9624         (build_invokeinterface): Similar.
9625         * jcf-parse.c (yyparse): If indirect-dispatch, call
9626         emit_offset_symbol_table at the end of compilation, after all classes
9627         have been generated.
9628         * jvspec.c: Don't pass findirect-dispatch to jvgenmain.
9629         * lang.c (flag_indirect_dispatch): Define.
9630         (lang_f_options): Add indirect-dispatch flag.
9631
9632 2001-12-14  Matthias Klose  <doko@debian.org>
9633
9634         * gcj.texi: Markup for man page generation. Document missing
9635         options printed by <tool> --help.
9636         Terminate description of gij's -ms option with a dot.
9637         * Make-lang.in ($(srcdir)/java/*.1): New targets.
9638         (java.generated-manpages java.install-man, java.uninstall,
9639         java-maintainer-clean) Updated.
9640
9641 2001-12-14  Hans Boehm  <Hans_Boehm@hp.com>
9642
9643         * class.c (get_dispatch_table): Fix java vtable layout
9644         for TARGET_VTABLE_USES_DESCRIPTORS.
9645         * decl.c (java_init_decl_processing): Initialize
9646         alloc_no_finalizer_node, finalize_identifier_node.
9647         * expr.c (class_has_finalize_method): New function.
9648         (expand_java_NEW): Generate calls for finalizer-free allocation.
9649         (build_invokevirtual): Fix java vtable layout for
9650         TARGET_VTABLE_USES_DESCRIPTORS.
9651         * java-tree.h (enum java_tree_index): New entries:
9652         JTI_ALLOC_NO_FINALIZER_NODE, JTI_FINALIZE_IDENTIFIER_NODE.
9653         (alloc_no_finalizer_node, finalize_deintifier_node): New macros.
9654         (class_has_finalize_method): declare.
9655         (HAS_FINALIZER_P): New macro.
9656         * parse.y (patch_invoke): Generate calls for finalizer-free
9657         allocation.
9658
9659 2001-12-12  Matthias Klose  <doko@debian.org>
9660
9661         * Make-lang.in: JAVA_INSTALL_NAME, JAVA_CROSS_NAME: Remove
9662         whitespace at end of line.
9663
9664 2001-12-11  Tom Tromey  <tromey@redhat.com>
9665
9666         * lex.c (java_init_lex): Define wfl_to_string as
9667         gnu.gcj.runtime.StringBuffer unless generating bytecode.
9668
9669 2001-12-11  Jeff Sturm  <jsturm@one-point.com>
9670
9671         * class.c (make_method_value): Use null_pointer_node to
9672         represent empty exception table.
9673
9674 2001-12-10  Tom Tromey  <tromey@redhat.com>
9675
9676         * check-init.c (check_init) [SWITCH_EXPR]: Use SWITCH_HAS_DEFAULT.
9677
9678 2001-12-10  Douglas B. Rupp  <rupp@gnat.com>
9679
9680         * Make-lang.in (jvspec.o): Add $(OUTPUT_OPTION).
9681
9682 2001-12-09  Per Bothner  <per@bothner.com>
9683
9684         * check-init.c (current_switch_has_default):  New static field.
9685         (check_init):  Case DEFAULT_EXPR: Set current_switch_has_default.
9686         Case SWITCH_EXPR:  Save/restore current_switch_has_default.  If no
9687         DEFAULT_EXPR seen, simulate a default alternative that copies state.
9688
9689 2001-12-09  Tom Tromey  <tromey@redhat.com>
9690
9691         * check-init.c (check_init): Don't allow pre- or post- increment
9692         or decrement of final variable.
9693         (final_assign_error): Minor error message rewording.
9694
9695 2001-12-08  Tom Tromey  <tromey@redhat.com>
9696
9697         * java-tree.h: Fixed typo.
9698
9699         * gjavah.c (decompile_method): Don't decompile to `return this'
9700         for static methods.
9701
9702         * gjavah.c (cxx_keywords): Re-sorted.
9703         * lex.c (cxx_keywords): Re-sorted.
9704
9705         * gjavah.c (HANDLE_METHOD): Set `decompiled' before doing anything
9706         else.
9707
9708         * gjavah.c (print_namelet): Clear subnamelets.
9709         (HANDLE_METHOD): Set `method_printed' earlier.
9710
9711 2001-12-07  Tom Tromey  <tromey@redhat.com>
9712
9713         * lang.c (lang_f_options): Added
9714         optimize-static-class-initialization.
9715         (java_decode_option): Removed special case.
9716
9717 2001-12-07  Per Bothner  <per@bothner.com>
9718
9719         * check-init.c (check_init):  Fix typo freeing memory twice.
9720
9721 2001-12-05  Per Bothner  <per@bothner.com>
9722
9723         Restore support for static class initialization optimization.
9724         * java-tree.h (STATIC_CLASS_INIT_OPT_P): Re-enable.
9725         * check-init.c (check_int):  At end of BLOCK handle initialization
9726         blocks, which used to be done in java_complete_expand_method but did
9727         not handle the case where check_for_initialization might allocate
9728         more than a word of bits.
9729         * decl.c (lang_make_tree):  The smic field is now a tree.
9730         * expr.c (build_class_init):  Set DECL_FUNCTION_INIT_TEST_CLASS field.
9731         * java-tree.h (DECL_FUNCTION_INIT_TEST_TABLE):  New macro.
9732
9733         * parse.y (emit_test_initialization):  Combine hash_lookup calls.
9734
9735         * java-tree.h (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND):
9736         Change from a hash table to a list.
9737         (struct_lang_decl):  Change field 'smic' to match.
9738         * class.c (add_method_1):  Initialize
9739         DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND to null list.
9740         * parse.y (adjust_init_test_initialization):  Removed - inlined into -
9741         (java_expand_method_bodies): -here, since 'smic' is now a list.
9742         (patch_invoke):  Add to 'smic' list, instead of hash_lookup.
9743
9744         * check-init.c (WORD_SIZE):  Use BITS_PER_UNIT.
9745
9746         * class.c (java_hash_compare_tree_node):  Fix casts.
9747
9748 2001-12-04  Per Bothner  <per@bothner.com>
9749
9750         * check-init.c:   Handle definite unassignment to finals in addition
9751         to definite assignment.
9752         (loop_current_locals):  New field.
9753         (num_current_locals, int start_current_locals, num_current_words):
9754         Make static.
9755         (SET_P, CLEAR_P, SET_BIT):  Add needed but missing parentheses.
9756         (ASSIGNED_P, UNASSIGNED_P, SET_ASSIGNED, SET_UNASSIGNED,
9757         CLEAR_ASSIGNED, CLEAR_UNASSIGNED):  New macros.
9758         (get_variable_decl, check_final_reassigned):  New functions.
9759         (check_init, check_bool_init):  Modify as needed for checking finals.
9760         (check_for_initialization):  Take extra parameter and return void.
9761         Do extra start-up logic to check final fields for assignment.
9762         * parse.y (check_static_final_variable_assignment_flag,
9763         reset_static_final_variable_assignment_flag, check_final_assignment,
9764         check_final_variable_local_assignment_flag,
9765         reset_final_variable_indirect_assignment_flag,
9766         reset_final_variable_global_assignment_flag):  Remove functions.
9767         (java_complete_expand_methods, outer_field_access_fix,
9768         patch_assignment): Remove no-longer used logic.
9769         * java-tree.h (DECL_FIELD_FINAL_IUD):  Change usage and comments.
9770         * parse.y (register_fields, java_complete_tree):  Update accordingly.
9771
9772         * check-init.c (ALLOC_WORDS/FREE_WORDS):  Use xmalloc/free, not alloca.
9773         (DECLARE_BUFFERS, RELEASE_BUFFERS, ALLOC_BUFFER, FREE_BUFFER):  New.
9774         (check_cond_init, check_bool2_init):  Use DECLARE_BUFFERS.
9775
9776         * java-tree.h (STATIC_CLASS_INIT_OPT_P):  Temporarily turn off.
9777
9778         * java-tree.h (DECL FINAL):  New bit-field.
9779         (METHOD_FINAL, FIELD_FINAL, CLASS_FINAL):  Define as DECL_FINAL.
9780         (LOCAL_FINAL_P):  Use DECL_FINAL rather than old LOCAL_FINAL.
9781         (DECL_INIT_CALLS_THIS):  New macro.
9782         (struct lang_decl):  New bit-field init_calls_this.
9783         (DECL_FUNCTION_ALL_FINAL_INITIALIZED, DECL_FIELD_FINAL_LIIC,
9784         DECL_FIELD_FINAL_IERR, LOCAL_FINAL, TYPE_HAS_FINAL_VARIABLE
9785         (DECL_BIT_INDEX):  Change to use pointer_alias_set since we now
9786         use it for both local variables and final fields.
9787         (struct lang_decl_var):  Remove bit-fields final_liic, final_ierr,
9788         and local_final.
9789         (struct lang_type):  Remove hfv bit-field.
9790         (check_for_initialization):  Change to return void.
9791
9792         * java-tree.h (IS_ARRAY_LENGTH_ACCESS):  New macros.
9793         * expr.c (build_java_array_length_access):  Set IS_ARRAY_LENGTH_ACCESS.
9794         * check-init.c (final_assign_error):  New helper function.
9795         (check_final_reassigned, check_init):  Use it.
9796         (check_init):  Also check IS_ARRAY_LENGTH_ACCESS for ARRAY.length.
9797
9798         * java-tree.h (struct lang_decl, struct lang_decl_var):  Change all
9799         bit-fields to unsigned.
9800
9801 2001-12-03  Per Bothner  <per@bothner.com>
9802
9803         * parse.y (patch_binop):  Minor constant folding.
9804
9805         * parse.y (build_current_thisn):  Shorter 'buffer'.
9806
9807 2001-12-03  Per Bothner  <per@bothner.com>
9808
9809         * decl.c (complete_start_java_method):  Now generate TRY_FINALLY_EXPR
9810         instead of CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR.
9811         * jcf-write.c (generate_bytecode_insns):  Remove support for
9812         CLEANUP_POINT_EXPR and WITH_CLEANUP_EXPR as they are no longer used.
9813         * check-init.c (check_init):  Likewise.
9814
9815 2001-12-03  Per Bothner  <per@bothner.com>
9816
9817         * verify.c (subroutine_nesting):  New function.
9818         (verify_jvm_instructions):  Use it to fix logic for checking that
9819         we're done with the current subroutine.
9820
9821         * verify.c (verify_jvm_instruction): For OPCODE_checkcast and
9822         OPCODE_instanceof use POP_TYPE macro for better diagnostics.
9823
9824 2001-12-03  Per Bothner  <per@bothner.com>
9825
9826         * jcf.h:  Fix obvious typo in comment.
9827         * typeck.c (build_null_signature):  Add comment.
9828
9829 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
9830
9831         * expr.c: Remove leading capital from diagnostic messages, as
9832         per GNU coding standards.
9833         * jcf-io.c: Similarly.
9834         * jcf-parse.c: Similarly.
9835         * jv-scan.c: Similarly.
9836         * jvspec.c: Similarly.
9837         * mangle.c: Similarly.
9838
9839 2001-12-02  Tang Ching-Hui  <nicholas@cs.nthu.edu.tw>
9840             Alexandre Petit-Bianco  <apbianco@redhat.com>
9841
9842         * expr.c (build_java_arrayaccess): Call save_expr on array for
9843         correct evaluation order, modified comment, fixed indentation.
9844         * parse.y: (patch_assignment): Correctly extract the array base
9845         from the tree generate by build_java_arrayaccess, added comments.
9846         (patch_array_ref): Remove SAVE_EXPR on ARRAY_REF.
9847         Fixes PR java/3096, PR java/3803, PR java/3965.
9848
9849 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
9850
9851         * expr.c (expand_byte_code): Remove trailing periods from messages.
9852         * jcf-parse.c (load_class, jcf_parse): Similarly.
9853         * jcf-write.c (generate_classfile): Similarly.
9854         * lex.c (java_lex): Similarly.
9855
9856 2001-11-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9857
9858         * class.c (add_interface_do): Set BINFO_VPTR_FIELD.
9859
9860 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
9861
9862         * Make-lang.in (java.generated-manpages): New dummy target.
9863
9864 2001-11-27  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9865
9866         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
9867         ASM_FINAL_SPEC.
9868         (lang_specific_pre_link): Use set_input to set input_filename.
9869         Append `main' here.
9870         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
9871         (main): Fix definition.
9872         Strip `main' from classname.
9873         Fixes PR java/227.
9874
9875 2001-11-18  Roger Sayle <roger@eyesopen.com>
9876
9877         * parse.h (java_expand_switch): Remove old prototype.
9878
9879 2001-11-18  Tom Tromey  <tromey@redhat.com>
9880
9881         Fix for PR java/1401:
9882         * jcf-write.c (generate_bytecode_insns) [binop]: Handle case where
9883         arg0 is null.
9884         (generate_bytecode_insns) [MODIFY_EXPR]: Handle `OP=' case
9885         correctly.
9886
9887 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
9888
9889         * lang.c (finish_parse): Rename to java_finish.
9890         (LANG_HOOKS_FINISH, java_finish): New.
9891
9892 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
9893
9894         * decl.c (init_decl_processing): Rename java_init_decl_processing.
9895         * java-tree.h: New prototype.
9896         * lang.c (java_init): Update prototype.  Combine with old init_parse.
9897
9898 2001-11-13  Tom Tromey  <tromey@redhat.com>
9899
9900         * gjavah.c (method_signature): New global.
9901         (HANDLE_METHOD): Set it.
9902         (decompile_return_statement): New function.
9903         (decompile_method): Use it.
9904         (print_method_info): Removed `synth' argument.
9905
9906 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9907
9908         * java-tree.h (java_set_yydebug): New.
9909         * jcf-parse.c (set_yydebug): Rename java_set_yydebug.
9910         * lang.c (LANG_HOOKS_SET_YYDEBUG): Override.
9911         (print_lang_decl, print_lang_type, print_lang_identifier,
9912         print_lang_statistics, lang_print_xnode): Remove.
9913
9914 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
9915
9916         * jcf-parse.c (init_lex): Remove.
9917         * lang.c (language_string, lang_identify): Remove.
9918         (struct lang_hooks): Constify.
9919         (LANG_HOOKS_NAME): Override.
9920         (init_parse): Update.
9921
9922 2001-11-08  Andreas Franck  <afranck@gmx.de>
9923
9924         * Make-lang.in (JAVA_INSTALL_NAME, JAVA_CROSS_NAME): Handle
9925         program_transform_name the way suggested by autoconf.
9926         (java.install-common): Also transform auxiliary program names with
9927         program_transform_name.
9928
9929 2001-11-08  Tom Tromey  <tromey@cygnus.com>
9930
9931         * parse.y (trap_overflow_corner_case): New rule.
9932         (unary_expression): Use it.
9933         * lex.c (java_init_lex): Don't set minus_seen.
9934         (yylex): Don't use minus_seen.  Communicate overflow to parser for
9935         it to handle.
9936         (error_if_numeric_overflow): New function.
9937         * parse.h (minus_seen): Removed field.
9938         (JAVA_RADIX10_FLAG): New define.
9939
9940 2001-11-07  Tom Tromey  <tromey@redhat.com>
9941
9942         Patch for PR java/1414:
9943         * parse.y (case_label_list): New global.
9944         (goal): Register case_label_list with GC.
9945         (java_complete_lhs): Save new case on case_label_list.
9946         (patch_switch_statement): Check for duplicate case labels.
9947
9948 2001-11-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
9949
9950         * parse.y (patch_assignment): Removed unused third argument.
9951         (java_complete_lhs): Removed unused third argument to patch_assignment.
9952
9953 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
9954
9955         * lang.c: Include langhooks-def.h.
9956         * Make-lang.in: Update.
9957
9958 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
9959
9960         * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
9961
9962 2001-10-29  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9963
9964         * mangle.c (find_compression_record_match): Don't match compression
9965         records for package name elements unless they occur at the start of
9966         the name. Fix for PR java/4717.
9967
9968 2001-10-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
9969
9970         * expr.c (expand_java_field_op): Don't special-case references to
9971         java.lang.PRIMTYPE.TYPE.
9972         (build_primtype_type_ref): Removed.
9973         * java-tree.h (build_primtype_type_ref): Remove prototype.
9974         * parse.y (maybe_build_primttype_type_ref): Removed.
9975         (complete_function_arguments): Don't special-case references to
9976         java.lang.PRIMTYPE.TYPE.
9977         (patch_assignment): Likewise.
9978         (array_constructor_check_entry): Likewise.
9979
9980 2001-10-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
9981
9982         * mangle.c (static tree compression_table): Fixed leading comment.
9983         * parse.h (struct parser_ctxt): Fixed field comment.
9984         * parse.y (check_pkg_class_access): New prototype, fixed leading
9985         comment, new parameter used to emit error only if passed as true.
9986         (parse_check_super): Pass extra argument to check_pkg_class_access.
9987         (do_resolve_class): Likewise.
9988         (process_imports): Likewise.
9989         (read_import_dir): Fixed indentation.
9990         (find_in_imports_on_demand): New local class_type_name. Local
9991         node_to_use deleted. while loop changed into for loop. Report
9992         multiple definition only for accessible classes. Improved error
9993         message.
9994         (start_complete_expand_method): Local `ptr' removed. DECL_ARGUMENTS
9995         assigned to parameter list, fixed indentation. while loop changed
9996         into for loop, restore TREE_CHAIN on local `tem' before the next
9997         iteration.
9998
9999 2001-10-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10000
10001         * lang.c (lang_get_alias_set): Deleted.
10002
10003 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10004
10005         * gjavah.c (jni_print_char): Fix thinko in last change.
10006
10007         * gjavah.c (jni_print_char, decode_signature_piece): Use
10008         safe-ctype macros and/or fold extra calls into fewer ones.
10009         * lex.c (java_read_unicode, java_lex): Likewise.
10010         * lex.h (JAVA_START_CHAR_P, JAVA_PART_CHAR_P, JAVA_ASCII_DIGIT,
10011         JAVA_ASCII_HEXDIGIT, JAVA_ASCII_LETTER): Likewise.
10012         * mangle_name.c (append_unicode_mangled_name,
10013         unicode_mangling_length): Likewise.
10014
10015 2001-10-17  Richard Henderson  <rth@redhat.com>
10016
10017         * Make-lang.in (java/lang.o): Depend on langhooks.h.
10018
10019 2001-10-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
10020
10021         * lang.c (langhooks.h): Included.
10022         (LANG_HOOKS_INIT): Redefined.
10023         (LANG_HOOKS_INIT_OPTIONS): Likewise.
10024         (LANG_HOOKS_DECODE_OPTION): Likewise.
10025         (struct lang_hooks lang_hooks): New initialization.
10026
10027 2001-10-11  Per Bothner  <per@bothner.com>
10028
10029         * parse.y (patch_synchronized_statement):  Use a TRY_FINALLY_EXPR
10030         rather than a CLEANUP_POINT_EXPR/WITH_CLEANUP_EXPR pair.
10031         The former is simpler, and jcf-write.c handles it better.
10032         (java_complete_lhs):  No longer need to handle CLEANUP_POINT_EXPR
10033         or WITH_CLEANUP_EXPR.
10034         * jcf-write.c:  Revert Alex's change from 2000-10-18.  It is no
10035         longer needed, as we already handle empty TRY_FINALLY_EXPR bodies fine.
10036
10037         * parse.y (patch_if_else_statement):  If the condition is constant,
10038         optimize away the test.
10039
10040 2001-10-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10041
10042         * parse.y (patch_cast): Call patch_string on the first operand of
10043         the incoming node, update it if necessary. Fixes PR java/4510.
10044
10045 2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10046
10047         * parse.y (find_as_inner_class): Don't disregard the enclosing scope
10048         when name qualifier matches a package name.
10049
10050 2001-10-08  Tom Tromey  <tromey@redhat.com>
10051
10052         Fix for PR java/4489:
10053         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Always
10054         force a new label when computing `body_block'.
10055
10056 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10057
10058         * jcf-io.c (format_uint): Const-ify.
10059         * lang.c (java_tree_code_type, java_tree_code_length): Likewise.
10060         * lex.c (java_get_line_col): Likewise.
10061         * parse.y (build_incdec): Likewise.
10062
10063 2001-10-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10064
10065         * parse.y (register_incomplete_type): Set JDEP_SUPER to be given
10066         a NULL enclosing context if appropriate. Fixes PR java/4466.
10067
10068 2001-10-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10069
10070         * parse.y (patch_assignment): Use lvalue's original TYPE when
10071         building the final COMPOUND_EXPR.
10072         (try_reference_assignconv): Fixed leading comment.
10073
10074 2001-09-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
10075
10076         * parse.y (check_final_variable_indirect_assignment): For
10077         COMPOUND_EXPR, return only if finals were found initialized
10078         properly, if not, keep on checking.
10079         (check_final_variable_global_assignment_flag): New local
10080         error_found, set when appropriate and used to decide whether to
10081         report uninitialized finals. Fixed typo in comment.
10082
10083 2001-09-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10084
10085         * decl.c (init_decl_processing): Fixed typo in predef_filenames
10086         last three initializations. Fixes PR java/4360.
10087
10088 2001-09-21  Richard Henderson  <rth@redhat.com>
10089
10090         * class.c (get_dispatch_table): Handle function descriptors.
10091         (build_dtable_decl): Likewise.
10092         * expr.c (build_invokevirtual): Likewise.
10093
10094 2001-09-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10095
10096         * parse.y (patch_method_invocation): Build class initialization
10097         when static finals are used to qualify method invocation.
10098         Fixes PR java/4366.
10099
10100 2001-09-19  Alexandre Petit-Bianco  <apbianco@redhat.com>
10101
10102         * parse.h: (WFL_STRIP_BRACKET): Re-written using
10103         build_type_name_from_array_name.
10104         (STRING_STRIP_BRACKETS): New macro.
10105         * parse.y (build_type_name_from_array_name): New function.
10106         (array_creation_expression:): Accumulate []s instead of [s.
10107         (cast_expression:): Accumulate []s instead of [s after cast type
10108         name.
10109         (build_array_from_name): Local string deleted, use
10110         build_type_name_from_array_name.
10111         (build_unresolved_array_type): Accumulate []s instead of [s after
10112         type name.
10113         (register_fields): Fixed comment.
10114         (resolve_class): Local name, base deleted, new locals tname and
10115         array_dims. Use build_type_name_from_array_name. Use array_dims to
10116         build array type.
10117         (purify_type_name): Use STRING_STRIP_BRACKETS.
10118
10119 2001-09-18  Andreas Jaeger  <aj@suse.de>
10120
10121         * parse.y: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.
10122         * jv-scan.c: Likewise.
10123
10124 2001-09-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10125
10126         * parse.y (patch_method_invocation): Inner class creation context
10127         check not enforced within constructors. Fixes PR java/1873.
10128
10129 2001-09-16  Tom Tromey  <tromey@redhat.com>
10130
10131         * jcf-write.c (generate_bytecode_insns) [SWITCH_EXPR]: Call
10132         NOTE_PUSH for single-case push.  Fixes PR java/4189.
10133
10134 2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10135
10136         * java-tree.h (TYPE_IMPORT_LIST): New macro.
10137         (TYPE_IMPORT_DEMAND_LIST): Likewise.
10138         (struct lang_type): New fields import_list and import_demand_list.
10139         * parse.y (java_complete_class): Initialize TYPE_IMPORT_LIST and
10140         TYPE_IMPORT_DEMAND_LIST with ctxp counterparts.
10141         (do_resolve_class): New local saved_enclosing_type, initialized,
10142         passed as parameter to find_in_imports and find_in_imports_on_demand.
10143         (find_in_imports): Added paramater enclosing_type, use its
10144         TYPE_IMPORT_LIST when applicable.
10145         (find_in_imports_on_demand): Added parameter enclosing_type, use
10146         its TYPE_IMPORT_DEMAND_LIST when applicable. Reorganized locals
10147         declaration and initialization.
10148         (fold_constant_for_init): Switch/restore current_class to the
10149         appropriate context.
10150
10151 2001-09-13  Mark Mitchell  <mark@codesourcery.com>
10152
10153         * verify.c (verify_jvm_instructions): Fix typo.
10154
10155 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10156
10157         * expr.c (expand_invoke): Const-ification.
10158         * parse.y (patch_method_invocation): Likewise.
10159
10160 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10161
10162         * gjavah.c (cxx_keywords): Const-ification.
10163         * keyword.gperf (java_keyword): Likewise.
10164         * lang.c (java_tree_code_name): Likewise.
10165         * lex.c (cxx_keywords): Likewise.
10166         * parse.y (java_parser_context_suspend, merge_string_cste): Likewise.
10167
10168 2001-09-11  Richard Henderson  <rth@redhat.com>
10169
10170         * parse.h (ctxp_for_generation): Mark extern.
10171
10172 2001-09-10  Richard Henderson  <rth@redhat.com>
10173
10174         * class.c (build_class_ref): Set DECL_EXTERNAL before make_decl_rtl.
10175
10176 2001-09-07  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
10177
10178         * typeck.c (java_array_type_length, build_prim_array_type):
10179         Represent empty arrays by NULL index.
10180
10181 2001-09-06  Alexandre Petit-Bianco  <apbianco@redhat.com>
10182
10183         * java-tree.h (compile_resource_file): Grouped with other prototypes.
10184         * jvspec.c (lang_specific_driver): Removed unused local `ptr.'
10185
10186 2001-09-06  Anthony Green  <green@redhat.com>
10187
10188         * class.c (O_BINARY): Define if necessary.
10189         (registerResource_libfunc): Declare.
10190         (init_class_processing): Initilize registerResource_libfunc.
10191         (compile_resource_file): New function.
10192         * java-tree.h (resource_name): Declare.
10193         (compile_resource_file): Declare.
10194         * jcf-parse.c (yyparse): Handle compiling java resource files.
10195         * lang.c (java_decode_option): Handle -fcompile-resource option.
10196         * jvspec.c (lang_specific_driver): Handle -R flag for compiling
10197         resource files.
10198         * gcj.texi (Code Generation): Add documentation for -R flag.
10199
10200 2001-09-05 Alexandre Petit-Bianco  <apbianco@redhat.com>
10201
10202         * jcf-write.c (generate_classfile): Issue an error in case of
10203         field/initial value mismatch.
10204         * parse.y (analyze_clinit_body): Keep <clinit> if an array is
10205         being initialized and we're generating bytecode.
10206         (java_complete_lhs): In MODIFY_EXPR section: added comments,
10207         set DECL_INITIAL properly when appropriate.
10208         Fixes PR java/4230
10209         Fixes PR java/4204
10210
10211 2001-09-01  Per Bothner  <per@bothner.com>
10212
10213         * parse.y (maybe_yank_clinit):  A field without an initializer is not
10214         relevant.  All initializers except static final and constant require
10215         <clinit>, regardless of flag_emit_class_files.
10216
10217 2001-08-31  Per Bothner  <per@bothner.com>
10218
10219         * class.c (set_constant_value):  When not emitting class files, then a
10220         String ConstantValue is a utf8const_ptr_type.
10221
10222 2001-08-30  Per Bothner  <per@bothner.com>
10223
10224         * jcf-write.c (generate_classfile):  Check that field is primitive
10225         or string before emitting ConstantValue attribute.
10226
10227 2001-08-30  Per Bothner  <per@bothner.com>
10228
10229         * parse.y (resolve_qualified_expression_name):  If creating a
10230         COMPOUND_EXPR, set it's type correctly.
10231
10232 2001-08-30  Per Bothner  <per@bothner.com>
10233
10234         * jcf-io.c (open_class):  Set filename field.
10235
10236         * jcf-parse,c (parse_class_file):  Set current_function_decl
10237         for better error message when Code attribute is missing.
10238
10239         * lang.c (put_decl_node, lang_print_error):  Re-arrange for
10240         better diagnostics, especially for constructors.
10241
10242 2001-08-30  Per Bothner  <per@bothner.com>
10243
10244         * jcf-write.c (generate_classfile):  Don't write ConstantValue
10245         attribute if field is not final, for compatibility with jdk.
10246
10247         * jcf-write.c (generate_classfile):  Convert ConstantValue values
10248         to correct type.  Work-around for front-end bug.
10249         * class.c (set_constant_value):  Error if constant has wrong type.
10250
10251 2001-08-30  Per Bothner  <per@bothner.com>
10252
10253         * jcf-dump.c (print_constant):  Fix fencepost error so "Float" and
10254         "Double" are printed at verbosity 1.
10255
10256         * jcf-dump.c (main):  Disable flag_print_attributes if --javap.
10257
10258         * jcf-dump.c (SPECIAL_IINC):  Remove unneeded casts to long.
10259
10260 2001-08-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10261
10262         * parse.y (patch_assignment): Don't verify final re-assignment here.
10263         (java_complete_lhs): Verify assignments to finals calling
10264         patch_assignment. Verify re-assignments to finals before calling
10265         patch_assignment.
10266
10267 2001-08-29  Alexandre Petit-Bianco  <apbianco@redhat.com>
10268
10269         * parse.y (java_complete_lhs): Allow final locals in CASE_EXPRs.
10270         Fixes PR java/1413
10271
10272 2001-08-28  Alexandre Petit-Bianco  <apbianco@redhat.com>
10273
10274         * lex.c (java_lex): new local found_hex_digits. Set and then used
10275         in test to reject invalid hexadecimal numbers.
10276         * parse.y (java_complete_tree): Prevent unwanted cast with
10277         initialized floating point finals.
10278         (patch_binop): Emit a warning when detecting a division by zero,
10279         mark result not constant, don't simplify non integer division.
10280
10281 2001-08-28  Per Bothner  <per@bothner.com>
10282
10283         * jcf-write.c  (generate_bytecode_insns):  For increments and
10284         decrements just recurse to push constant.  Improvement on Mark's patch.
10285
10286 2001-08-28  Mark Mitchell  <mark@codesourcery.com>
10287
10288         * jcf-write.c (generate_bytecode_insns): Generate an integer to
10289         real conversion for increments and decrements of reals.
10290
10291 2001-08-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10292
10293         * parse.y (resolve_qualified_expression_name): Handle unresolved
10294         qualified expressions, prevent numerical qualifiers, fixed typo.
10295         Fixes PR java/4141
10296
10297 2001-08-24  Alexandre Petit-Bianco  <apbianco@redhat.com>
10298
10299         * parse.y (check_deprecation): Handle TYPE_DECL in a special case,
10300         don't report anything but deprecated class when marked so. Handle
10301         VAR_DECL.
10302         (patch_method_invocation): Check deprecation on methods and types.
10303         (patch_binop): code becomes an enum tree_code, added default: to
10304         switch to handle that. Detect division by zero, try to fold and
10305         return before using a subroutine.
10306
10307 2001-08-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
10308
10309         * jcf-parse.c (yyparse): Set magic to 0, don't issue error for a
10310         file smaller than 4 bytes.
10311         * parse.y (check_inner_circular_reference): New function.
10312         (check_circular_reference): Likewise.
10313         (array_initializer:): Accept {,}.
10314         (java_check_circular_reference): Rewritten using
10315         check_circular_reference and check_inner_circular_reference.
10316         (java_complete_expand_method): Unconditionally save and restore
10317         the unpurged exception list.
10318         (build_dot_class_method_invocation): Unmangle signature parameter.
10319
10320 2001-08-21  Tom Tromey  <tromey@redhat.com>
10321
10322         * decl.c (init_decl_processing): Add `throws' field to method
10323         descriptor.
10324         * class.c (make_method_value): Compute `throws' field for method.
10325
10326 2001-08-22  Alexandre Petit-Bianco  <apbianco@redhat.com>
10327
10328         * parse.y (resolve_inner_class): Keep local_enclosing to NULL if
10329         circularity is detected.
10330         (ctors_unchecked_throws_clause_p): Fixed leading comment.
10331
10332 2001-08-17  Richard Henderson  <rth@redhat.com>
10333
10334         * class.c (emit_register_classes): Add align parameter to
10335         call to assemble_integer.
10336
10337 2001-08-16  Alexandre Petit-Bianco  <apbianco@redhat.com>
10338
10339         * jcf-parse.c (load_class): New locals saved and class_loaded. If
10340         loading a class_or_name fails, try considering an innerclass name
10341         and load the enclosing context.
10342         * parse.y (resolve_inner_class): New function.
10343         (find_as_inner_class): Added leading comment.
10344         (register_incomplete_type): Keep the current context as enclosing
10345         context for JDEP_FIELD dependencies.
10346         (do_resolve_class): Locals new_class_decl and super initialized to
10347         NULL. Call resolve_inner_class, explore the enclosing context
10348         superclass if necessary.
10349         Fixes PR java/4007
10350
10351 2001-08-16  Tom Tromey  <tromey@redhat.com>
10352
10353         * jcf-dump.c (main): Updated for change to jcf_path_seal.
10354         * gjavah.c (main): Updated for change to jcf_path_seal.
10355         * lang.c (version_flag): New global.
10356         (java_decode_option): Recognize `-version'.
10357         (java_init): Update for change to jcf_path_seal.
10358         * jcf.h (jcf_path_seal): Added `print' argument.
10359         * jcf-path.c (jcf_path_seal): Added `print' argument.
10360
10361 2001-08-13  Zack Weinberg  <zackw@panix.com>
10362
10363         * Make-lang.in (java/decl.o): Update dependencies.
10364         * decl.c: Include libfuncs.h, don't include toplev.h.
10365
10366 2001-08-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10367
10368         * decl.c (init_decl_processing): exception_type_node,
10369         class_not_found_type_node, and no_class_def_found_type_node
10370         initialized. predef_filenames augmented accordingly.
10371         instinit_identifier_node initialized.
10372         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): Entry removed.
10373         * java-tree.h (enum java_tree_index): New entries
10374         JTI_EXCEPTION_TYPE_NODE, JTI_CLASS_NOT_FOUND_TYPE_NODE,
10375         JTI_NO_CLASS_DEF_FOUND_TYPE_NODE, JTI_INSTINIT_IDENTIFIER_NODE.
10376         (exception_type_node): New macro.
10377         (class_not_found_type_node): Likewise.
10378         (no_class_def_found_type_node): Likewise.
10379         (instinit_identifier_node): Likewise.
10380         (PREDEF_FILENAMES_SIZE): Adjusted.
10381         (TYPE_HAS_FINAL_VARIABLE): Fixed typo.
10382         (struct lang_type): Fixed typo in bitfield name.
10383         (DECL_INSTINIT_P): New macro.
10384         (ID_INSTINIT_P): Likewise.
10385         * jcf-write.c (generate_classfile): instinit$ bears the Synthetic
10386         attribute.
10387         * parse.y (encapsulate_with_try_catch): New function.
10388         (generate_instinit): Likewise.
10389         (build_instinit_invocation): Likewise.
10390         (ctors_unchecked_throws_clause_p): Likewise.
10391         (add_instance_initializer): Deleted.
10392         (build_instance_initializer): Likewise.
10393         (in_instance_initializer): Likewise.
10394         (check_method_redefinition): instinit$ not to be verified.
10395         (java_complete_expand_methods): Generate instinit$, simplified code.
10396         (build_dot_class_method): Eliminated unnecessary locals. Use
10397         encapsulate_with_try_catch, removed unnecessary code.
10398         (fix_constructors): New local iii. Use build_instinit_invocation.
10399         (patch_method_invocation): Added comment.
10400         (maybe_use_access_method): Don't consider instinit$.
10401         (find_applicable_accessible_methods_list): Shorten the search for
10402         instinit$ too.
10403         (java_complete_lhs): case INSTANCE_INITIALIZERS_EXPR removed.
10404         (patch_return): Use DECL_INSTINIT_P instead of in_instance_initializer.
10405         (patch_throw_statement): Likewise. Fixed typo.
10406
10407 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
10408
10409         Revert:
10410         2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10411         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10412         ASM_FINAL_SPEC.
10413         (lang_specific_pre_link): Use set_input to set input_filename.
10414         Append `main' here.
10415         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10416         (main): Fix definition.
10417         Strip `main' from classname.
10418         Fixes PR java/227.
10419
10420 2001-08-11  Zack Weinberg  <zackw@panix.com>
10421
10422         * lex.h: Don't include setjmp.h.  Don't define
10423         SET_FLOAT_HANDLER or prototype set_float_handler.
10424
10425 2001-08-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10426
10427         * expr.c (java_lang_expand_expr): Call `expand_end_bindings' and
10428         `poplevel' in the right order.
10429
10430 2001-08-09  Richard Henderson  <rth@redhat.com>
10431
10432         * Make-lang.in (class.o): Depend on TARGET_H.
10433         * class.c (emit_register_classes): Use target hooks instead of
10434         assemble_constructor and assemble_destructor.
10435
10436 2001-08-08  Alexandre Petit-Bianco  <apbianco@redhat.com>
10437
10438         * check-init.c (flags.h): Include
10439         (check_init): Don't report uninitialized static class
10440         initialization flags, don't free bit index when doing static class
10441         initialization optimization.
10442         (check_for_initialization): Return type changed to `unsigned int.'
10443         (attach_initialized_static_class): New function.
10444         * class.c (add_method_1): Create the initialized static class
10445         table if necessary.
10446         (finish_class): Always emit deferred inline methods.
10447         * decl.c (emit_init_test_initialization): Moved to expr.c
10448         (complete_start_java_method): Don't traverse
10449         DECL_FUNCTION_INIT_TEST_TABLE.
10450         (lang_mark_tree): Mark hash tables in function decls.
10451         * expr.c (emit_init_test_initialization): Moved from decl.c.
10452         (build_class_init): Create LAG_DECL_SPECIFIC for the static class
10453         initialization flag, set DECL_CONTEXT and
10454         LOCAL_CLASS_INITIALIZATION_FLAG.
10455         (java_lang_expand_expr): Emit initialization code for static class
10456         initialized flags when entering block, if necessary.
10457         * gcj.texi (-fno-optimize-static-class-initialization): Documented.
10458         * java-tree.h (flag_optimize_sci): New global variable declaration.
10459         (DECL_FUNCTION_INITIALIZED_CLASS_TABLE): New macro.
10460         (DECL_FUNCTION_STATIC_METHOD_INVOCATION_COMPOUND): Likewise.
10461         (LOCAL_FINAL_P): Fixed typo in comment.
10462         (FINAL_VARIABLE_P): Likewise.
10463         (LOCAL_CLASS_INITIALIZATIO_FLAG): New macro.
10464         (LOCAL_CLASS_INITIALIZATIO_FLAG_P): Likewise.
10465         (struct lang_decl): New fields `ict', `smic' and `cif.'
10466         (check_for_initialization): New returned value for global.
10467         (attach_initialized_static_class): New global function.
10468         (STATIC_CLASS_INIT_OPT_P): New macro.
10469         * lang-options.h (-fno-optimize-static-class-initialization): New flag.
10470         * lang.c (java_decode_option): Handle
10471         `-fno-optimize-static-class-initialization'
10472         * parse.y (start_complete_expand_method): New function.
10473         (java_expand_method_bodies): Likewise.
10474         (attach_init_test_initialization_flags): Likewise.
10475         (adjust_init_test_initialization): Likewise.
10476         (emit_test_initialization): Likewise.
10477         (java_complete_expand_methods): Nullify abstract and native method
10478         bodies.
10479         (java_complete_expand_method): New locals `fbody', `block_body'
10480         and `exception_copy.' Reorganized: directly return on empty method
10481         bodies, call `start_complete_expand_method', remember definitely
10482         initialized static class in function, don't expand method bodies.
10483         (java_expand_classes): Call `java_expand_method_bodies' before
10484         `finish_class' when compiling to native.
10485         (resolve_expression_name): Use `orig' after building outer class
10486         field access.
10487         (patch_invoke): Remember static method invocations.
10488
10489 2001-08-06  Richard Henderson  <rth@redhat.com>
10490
10491         * class.c (emit_register_classes): Pass a symbol_ref and priority
10492         to assemble_constructor.
10493
10494 2001-08-02  Alexandre Petit-Bianco  <apbianco@redhat.com>
10495
10496         * java-tree.h (all_class_filename): New macro.
10497         (enum java_tree_index): New enum `JTI_ALL_CLASS_FILENAME.'
10498         (BUILD_FILENAME_IDENTIFIER_NODE): Fixed leading comment. Link
10499         newly created IDENTIFIER_NODE to `all_class_filename.'
10500
10501 2001-08-01  Jeff Sturm  <jsturm@one-point.com>
10502
10503         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE):
10504         Use ggc_add_tree_root to register roots.
10505
10506 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10507
10508         * check-init.c (check_init): WITH_CLEANUP_EXPR node to use its
10509         second operand calling check_init.
10510         * decl.c (complete_start_java_method): Swaped second and third
10511         arguments while creating WITH_CLEANUP_EXPR node.
10512         * jcf-write.c (generate_bytecode_insns): Use second operand
10513         instead of third when handling WITH_CLEANUP_EXPR.
10514         * parse.y (java_complete_lhs): Expand second operand of
10515         WITH_CLEANUP_EXPR nodes.
10516         (patch_synchronized_statement): Swaped second and third arguments
10517         while creating WITH_CLEANUP_EXPR node.
10518
10519 2001-07-18  Alexandre Petit-Bianco  <apbianco@redhat.com>
10520
10521         * parse.y (create_interface): Avoid cyclic inheritance report when
10522         syntax error encountered during class definition.
10523         Fixes PR java/2956
10524
10525 2001-08-02  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
10526
10527         * jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
10528         ASM_FINAL_SPEC.
10529         (lang_specific_pre_link): Use set_input to set input_filename.
10530         Append `main' here.
10531         * jvgenmain.c (usage): Append literal `main' to CLASSNAME.
10532         (main): Fix definition.
10533         Strip `main' from classname.
10534         Fixes PR java/227.
10535
10536 2001-07-18  Tom Tromey  <tromey@redhat.com>
10537
10538         For PR java/2812:
10539         * lex.h: Use HAVE_ICONV, not HAVE_ICONV_H.
10540         * lex.c (java_new_lexer): Use ICONV_CONST.
10541         (java_read_char): Likewise.
10542         * Make-lang.in (jc1$(exeext)): Link against LIBICONV.
10543         (jv-scan$(exeext)): Likewise.
10544
10545 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10546
10547         * parse.h (INTERFACE_INNER_MODIFIERS): Disallow `private.'
10548         * parse.y (check_class_interface_creation): Allow `private' if the
10549         enclosing is not an interface.
10550         (create_interface): Interface tagged public if the enclosing
10551         context is an interface.
10552         (create_class): Class tagged public if the enclosing context
10553         is an interface.
10554         Fixes PR java/2959
10555
10556 2001-07-17  Alexandre Petit-Bianco  <apbianco@redhat.com>
10557
10558         * class.c (push_class): Set DECL_SIZE to `integer_zero_node.'
10559         Fixes PR java/2665
10560
10561 2001-07-14  Tim Josling  <tej@melbpc.org.au>
10562
10563         * check-init.c (check_init): Remove references to EXPON_EXPR.
10564
10565 2001-07-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
10566
10567         * parse.y (java_complete_lsh): Set CAN_COMPLETE_NORMALLY and unset
10568         TREE_CONSTANT_OVERFLOW of CASE_EXPR value.
10569         Fixes PR java/3602
10570
10571 2001-07-13  Tom Tromey  <tromey@redhat.com>
10572
10573         * jvspec.c (jvgenmain_spec): Remove -ffilelist-file from cc1
10574         invocation.
10575
10576 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10577
10578         * parse.y (patch_method_invocation): Don't override primary if one
10579         is already provided, but let this$<n> be built. Fixed comment.
10580
10581 2001-07-12  Alexandre Petit-Bianco  <apbianco@redhat.com>
10582
10583         * parse.y (empty_statement:): Report empty statement error only
10584         when found at class declaration level.
10585         Fixes PR java/3635
10586
10587 2001-07-12  Tom Tromey  <tromey@redhat.com>
10588
10589         * expr.c (expand_load_internal): New function.
10590         (LOAD_INTERNAL): Use it.
10591
10592 2001-07-11  Alexandre Petit-Bianco  <apbianco@redhat.com>
10593
10594         * parse.y (verify_constructor_super): Compare anonymous class ctor
10595         args with `valid_method_invocation_conversion_p.'
10596         Fixes PR java/3285
10597
10598 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10599
10600         * lang-specs.h: Forbit the use if `-femit-class-file{s}' without
10601         `-fsyntax-only.' Fixes PR java/3248
10602
10603 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10604
10605         * jcf-io.c (find_class): Clarified error message. Fixes PR java/2603
10606
10607 2001-07-10  Alexandre Petit-Bianco  <apbianco@redhat.com>
10608
10609         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): No `this' is fine if the
10610         current function is static. Fixes PR java/1970
10611
10612 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10613
10614         * parse.y (patch_method_invocation): Add enclosing context to ctor
10615         calls if necessary. Fixes PR java/2953
10616
10617 2001-07-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
10618
10619         * parse.y (resolve_package): Abort if qualified expression member
10620         isn't right.
10621         (qualify_ambiguous_name): Don't qualify as type if `this' in use.
10622         Fixes PR java/1391
10623
10624 2001-07-07  Zack Weinberg  <zackw@stanford.edu>
10625
10626         * verify.c: Don't use // comments.
10627
10628 2001-07-05  Tom Tromey  <tromey@redhat.com>
10629
10630         * lang.c (flag_assume_compiled): Removed.
10631         * java-tree.h (flag_assume_compiled): Removed.
10632         * lang-options.h: Removed -ffile-list-file, -fuse-boehm-gc,
10633         -fhash-synchronization, -fuse-divide-subroutine,
10634         -fcheck-references, -femit-class-file, -femit-class-files,
10635         -fassume-compiled.  Updated --encoding information.  Changed
10636         -foutput-class-dir to `-d'.
10637
10638 2001-07-04  Daniel Berlin  <dan@cgsoftware.com>
10639
10640         * jcf-parse.c (parse_class_file): Add lineno parameter to
10641         debug_start_source_file call.
10642
10643 2001-07-04  Joseph S. Myers  <jsm28@cam.ac.uk>
10644
10645         * gcj.texi: Use gpl.texi.
10646         * Make-lang.in ($(srcdir)/java/gcj.info, java/gcj.dvi): Update
10647         dependencies and use doc/include in search path.
10648
10649 2001-07-03  Jeff Sturm  <jsturm@one-point.com>
10650
10651         * parse.y (fix_constructors): Test if a CALL_EXPR invokes
10652         `this'.  If so, don't build instance initializers.
10653
10654 2001-07-03  Alexandre Petit-Bianco  <apbianco@redhat.com>
10655
10656         * parse.y (resolve_expression_name): Improved error message for
10657         inner class cases. Fixes PR java/1958
10658
10659 2001-06-28  Gabriel Dos Reis  <gdr@codesourcery.com>
10660
10661         * lang.c: #include diagnostic.h
10662         (lang_print_error): Add a `diagnostic_context *' parameter.
10663         (java_dummy_print): Likewise.
10664         * Make-lang.in (JAVA_LEX_C): Depend on diagnostic.h
10665
10666 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10667
10668         * jcf-parse.c (gcc_mark_jcf): Test for a finished JCF.
10669         * jcf.h (typedef struct JCF): New bitfield `finished.'
10670         (JCF_FINISH): Set `finished.'
10671         (JCF_ZERO): Reset `finished.'
10672         Fixes PR java/2633
10673
10674 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10675
10676         * parse.y (class_body_declaration:): Don't install empty instance
10677         initializers.
10678         Fixes PR java/1314
10679
10680 2001-06-27  Alexandre Petit-Bianco  <apbianco@redhat.com>
10681
10682         * class.c (set_super_info): Call `set_class_decl_access_flags.'
10683         (set_class_decl_access_flags): New function.
10684         * java-tree.h (set_class_decl_access_flags): New prototype.
10685         * jcf-parse.c (handle_innerclass_attribute): Read and set access flags.
10686         (parse_class_file): New local `decl_max_locals.' Take wide types
10687         into account to compute DECL_MAX_LOCALS.
10688         * parse.y (type_import_on_demand_declaration:): Ignore duplicate
10689         imports on demand.
10690
10691 2001-06-22  Jan van Male  <jan.vanmale@fenk.wau.nl>
10692
10693         * zipfile.h: Use GCC_JCF_H instead of JCF_H.
10694
10695 2001-06-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
10696
10697         * class.c (java_hash_tree_node): Fixed indentation in leading comment.
10698         * parse.y (do_resolve_class): Moved comments out to leading comment
10699         section. Removed local `start', New local `_ht' and
10700         `circularity_hash.'  Record `enclosing' in hash table and search
10701         it to detect circularity.  Use `enclosing' as an argument to
10702         `lookup_cl.' Free the hash table when done.
10703
10704 2001-06-19  Tom Tromey  <tromey@redhat.com>
10705
10706         * lex.c (java_read_char): Disallow invalid and overlong
10707         sequences.  Fixes PR java/2319.
10708
10709 2001-06-05  Jeff Sturm  <jsturm@one-point.com>
10710
10711         * decl.c (create_primitive_vtable): Don't call make_decl_rtl.
10712
10713 2001-06-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10714
10715         * expr.c (force_evaluation_order): Match wrapped ctor calls, locate
10716         arguments accordingly.
10717
10718 2001-06-02  Joseph S. Myers  <jsm28@cam.ac.uk>
10719
10720         * gcj.texi: Move contents to just after title page.
10721
10722 2001-06-01  Alexandre Petit-Bianco  <apbianco@redhat.com>
10723
10724         * parse.y (type_literals:): Use `build_incomplete_class_ref' with
10725         builtin type.
10726         (patch_incomplete_class_ref): Build the class ref, build the class
10727         init if necessary, complete the tree.
10728         Fixes PR java/2605
10729
10730 2001-05-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
10731
10732         * parse.y (lookup_field_wrapper): Test `name' code.
10733         (resolve_qualified_expression_name): Test `qual_wfl' code.
10734         (qualify_ambiguous_name): Handle `CONVERT_EXPR', fixe indentation,
10735         handle `qual_wfl' by code.
10736         (maybe_build_primttype_type_ref): Test `wfl' code.
10737
10738 2001-05-23  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
10739
10740         * Make-lang.in ($(srcdir)/java/gcj.info): Added dependencies on
10741         fdl.texi.
10742         (java/gcj.dvi): Use TEXI2DVI instead of custom tex calls.  Create
10743         the dvi file in the java directory.
10744
10745 2001-05-25  Sam TH  <sam@uchicago.edu>
10746
10747         * gen-table.pl javaop.h jcf.h lex.h,
10748         parse.h: Fix header include guards.
10749
10750 2001-05-23  Joseph S. Myers  <jsm28@cam.ac.uk>
10751
10752         * jv-scan.c (version): Update copyright year.
10753
10754 2001-05-21  Per Bothner  <per@bothner.com>
10755
10756         * jcf-parse.c (read_class):  If class is from .class or .zip file
10757         and it's already been read, don't push/pop parser context.
10758
10759 2001-05-18  Per Bothner  <per@bothner.com>
10760
10761         * jvspec.c (lang_specific_pre_link):  Re-arrange the linker
10762         command line so the jvgenmain-generated main program comes first.
10763
10764 2001-05-15  Tom Tromey  <tromey@redhat.com>
10765
10766         * class.c (build_utf8_ref): Don't generate identifier based on
10767         utf8const contents.
10768
10769 2001-05-12  Richard Henderson  <rth@redhat.com>
10770
10771         * java-tree.def (JAVA_EXC_OBJ_EXPR): New.
10772         * expr.c (java_lang_expand_expr): Expand it.
10773         (process_jvm_instruction): Build JAVA_EXC_OBJ_EXPR instead of
10774         calling build_exception_object_ref.
10775         * parse.y (catch_clause_parameter): Likewise.
10776         (build_dot_class_method): Likewise.
10777         (try_reference_assignconv): Likewise.
10778         * check-init.c (check_init): Check JAVA_EXC_OBJ_EXPR not EXC_PTR_EXPR.
10779         * jcf-write.c (generate_bytecode_insns): Likewise.
10780
10781 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10782
10783         * parse.y (build_unresolved_array_type): Set
10784         EXPR_WFL_QUALIFICATION on the newly created wfl.
10785         Fixes PR java/2538. Fixes PR java/2535.
10786
10787 2001-05-07  Alexandre Petit-Bianco  <apbianco@redhat.com>
10788
10789         * parse.y (fix_constructors): Removed unnecessary assignment to
10790         local. Moved assignment to `this$<n>', fixed comments and
10791         indentation.
10792         (build_wfl_wrap): Fixed indentation.
10793         Fixes PR java/2598, java/2579 and java/2658.
10794
10795 2001-05-03  Mo DeJong  <mdejong@redhat.com>
10796
10797         * lex.c (java_new_lexer): Call iconv_close on temp handle used to
10798         check for byte swap.
10799
10800 2000-05-02  Jeff Sturm  <jsturm@one-point.com>
10801
10802         * expr.c (build_class_init): Move MODIFY_EXPR
10803         outside of COND_EXPR.  Remove variable `call'.
10804
10805 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10806
10807         * decl.c: NULL_PTR -> NULL.
10808         * jcf-write.c: Likewise.
10809
10810 2001-05-01  Tom Tromey  <tromey@redhat.com>
10811
10812         * Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
10813         (java/gcj.dvi): Added $(srcdir) to TEXINPUTS.
10814         * gcj.texi: Updated copyright text.  Include fdl.texi.
10815         (Top): Link to new node.
10816
10817 2001-05-01  Per Bothner  <per@bothner.com>
10818
10819         * parse.h (REGISTER_IMPORT):  Use tree_cons instead of chainon.
10820
10821 2001-05-01  Per Bothner  <per@bothner.com>
10822
10823         * parse.y (java_pop_parser_context):  The TREE_VALUE of a link in the
10824         import_list contains the name, not the TREE_PURPOSE.
10825
10826 2001-04-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10827
10828         * jcf-io.c (read_zip_member): Cast to long in comparison with
10829         signed value.
10830
10831         * jvspec.c (lang_specific_driver): Initialize variables.
10832
10833         * mangle.c (find_compression_record_match): Likewise.
10834
10835         * typeck.c (build_null_signature): Provide static prototype.  Mark
10836         parameter with ATTRIBUTE_UNUSED.
10837
10838         * verify.c (verify_jvm_instructions): Initialize variable.
10839
10840 2001-04-27  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10841
10842         * parse.y (do_resolve_class): Check for cyclic inheritance during
10843         inner class resolution.
10844
10845 2001-04-27  Per Bothner  <per@bothner.com>
10846
10847         * parse.y (java_expand_classes):  Don't change ctxp_for_generation
10848         while iterating, since that could cause gc to lose stuff.
10849
10850 2001-04-26  Per Bothner  <per@bothner.com>
10851
10852         Fix method search wrt scope of inner classes to match JLS2.
10853         * typeck.c (build_null_signature):  New static function.
10854         (has_method):  New function.  Uses build_null_signature and lookup_do.
10855         * java-tree.h (has_method):  New declaration.
10856         * parse.y (find_applicable_accessible_methods_list):  Do not search
10857         context of inner classes here.
10858         (patch_method_invocation):  Search scope, ie. current and outer clases,
10859         for method matching simple name, to find class.
10860
10861 2001-04-26  Per Bothner  <per@bothner.com>
10862
10863         * jcf-write.c (generate_bytecode_insns case SWITCH_EXPR):
10864         Fix thinko:  If a single case, use if_icmpeq, not ifeq.
10865
10866         * constants.c (find_methodref_with_class_index):  New function.
10867         (find_methodref_index):  Use find_methodref_with_class_index.
10868         * java-tree.h (find_methodref_with_class_index):  New declaration.
10869         * jcf-write.c (generate_bytecode_insns case CALL_EXPR):  Don't change
10870         DECL_CONTEXT, instead use new find_methodref_with_class_index function.
10871         If context changed from interface to class, don't use invokeinterface.
10872
10873 2001-04-25  Per Bothner  <per@bothner.com>
10874
10875         * verify.c (verify_jvm_instructions):  For field instructions,
10876         check that field index is valid.  For invoke instructions, check that
10877         method index is valid.
10878
10879 2001-04-25  Alexandre Oliva  <aoliva@redhat.com>
10880
10881         * config-lang.in (target_libs): Copy from $libgcj_saved.
10882
10883 2001-04-25  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
10884
10885         * decl.c (init_decl_processing): Add new class "protectionDomain"
10886         field.
10887         * class.c (make_class_data): Set initial value for "protectionDomain".
10888
10889 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10890
10891         * jvspec.c (lang_specific_driver): Fix memory allocation
10892         deficit, by using concat in lieu of xmalloc/sprintf.
10893
10894 2001-04-20  Per Bothner  <per@bothner.com>
10895
10896         Fixes to compile multiple .class files at once.
10897         * decl.c (init_decl_processing):  Don't set CLASS_LOADED_P.
10898         * java-tree.h (CLASS_PARSED_P):  New macro.
10899         (CLASS_LOADED_P):  Re-define to use TYPE_SIZE and CLASS_PARSED_P.
10900         * jcf-parse.c (jcf_parse_source):  Inline into read_class.
10901         (read_class):  Avoid some code duplication.
10902         Don't call JCF_FINISH for a .class file - might be needed later.
10903         (jcf_parse):  Don't call layout_class here.  Check/set CLASS_PARSED_P
10904         rather than CLASS_LOADED_P, since latter implies class laid out.
10905         (yyparse):  Do layout_class and JCF_FINISh here instead, in pass 2.
10906         * parse.y:  Don't need to set CLASS_LOADED_P for array types.
10907
10908 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10909
10910         * Make-lang.in (java/boehm.o): Depend on toplev.h.
10911
10912         * boehm.c: Include toplev.h.
10913
10914 2001-04-06  Tom Tromey  <tromey@redhat.com>
10915             Alexandre Petit-Bianco  <apbianco@redhat.com>
10916
10917         Fix for PR gcj/1404 and PR gcj/2332:
10918         * parse.y (build_array_from_name): If we use the type_wfl then
10919         accumulate dimensions from the original type as well.
10920         (build_unresolved_array_type): Don't modify TYPE_OR_WFL in place.
10921
10922 2001-04-06  Tom Tromey  <tromey@redhat.com>
10923
10924         * parse.y (analyze_clinit_body): Return true if the second operand
10925         of a METHOD_EXPR is nonzero.
10926
10927 2001-04-06  Tom Tromey  <tromey@redhat.com>
10928
10929         * Make-lang.in ($(srcdir)/java/parse-scan.c): Run bison from build
10930         directory.
10931         ($(srcdir)/java/parse.c): Likewise.
10932
10933 2001-04-05  Alexandre Petit-Bianco  <apbianco@redhat.com>
10934
10935         * gcj.texi: Use `which-gcj' instead of `which-g77.'
10936         (version-gcc): Initialized.
10937         (which-gcj): Likewise.
10938
10939 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10940
10941         * java-tree.h (struct lang_decl): New macro
10942         `DECL_FIXED_CONSTRUCTOR_P.' New field `fixed_ctor.'
10943         * parse.y (build_instance_initializer): New function.
10944         (add_instance_initializer): Use it.
10945         (java_fix_constructors): Set `current_class' before fix pass.
10946         (fix_constructors): Just return if already fixed. Move `super()'
10947         invocation ahead. Use `build_instance_initializer.'
10948         Fixes PR java/1315.
10949
10950 2001-04-04  Alexandre Petit-Bianco  <apbianco@redhat.com>
10951
10952         * parse.y (resolve_qualified_expression_name): Pass field's
10953         DECL_CONTEXT to `not_accessible_p.'
10954         (not_accessible_p): Changed parameters order in `inherits_from_p'
10955         invocation.
10956
10957 2001-03-27  Andrew Haley  <aph@cambridge.redhat.com>
10958
10959         * lang-options.h: Add flag_check_references.
10960
10961 2001-04-04  Per Bothner  <per@bothner.com>
10962
10963         * java-tree.h (CONSTANT_VALUE_P):  New macro.
10964         * jcf-write.c (generate_classfile):  Use CONSTANT_VALUE_P.
10965         * parse.y (maybe_build_class_init_for_field):  New static function.
10966         (resolve_expression_name, resolve_field_access):  Use
10967         maybe_build_class_init_for_field instead of build_class_init
10968         This does not do the init if the field is compile-time-constant.
10969         (resolve_field_access):  Simplify.
10970
10971         * parse.y (fold_constant_for_init):  Merge test into switch.
10972
10973 2001-04-03  Zack Weinberg  <zackw@stanford.edu>
10974
10975         * Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
10976         on gansidecl.h.
10977         * buffer.c, jvgenmain.c: Don't include gansidecl.h.
10978
10979 2001-04-02  Zack Weinberg  <zackw@stanford.edu>
10980
10981         * expr.c (pop_type_0): Save the result of the first
10982         lang_printable_name call in a scratch buffer, so it
10983         won't be clobbered by the second call.
10984
10985 2001-03-30  Alexandre Petit-Bianco  <apbianco@redhat.com>
10986
10987         * parse-scan.y (array_type:): Rewritten.
10988         (type_declaration:): `empty_statement' replaces `SC_TK.'
10989         (class_member_declaration:): `empty statement' added.
10990         (method_body:): Simplified.
10991         (static_initializer:): Likewise.
10992         (primary_no_new_array:): Use `type_literals.'
10993         (type_literals:): New rule.
10994         (dims:): Set and update `bracket_count.'
10995         Fixes PR java/1074. Fixes PR java/2412.
10996
10997 2001-03-28  Hans Boehm  <boehm@acm.org>
10998
10999         * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Set to use `build_int_2.'
11000         (get_boehm_type_descriptor): Set type on returned value to be a
11001         pointer length integer.
11002
11003 2001-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11004
11005         * expr.c (pop_type_0): Call `concat' rather than building the
11006         string manually.
11007         (pop_type): Add format specifier in call to `error'.
11008
11009         * parse.y (patch_method_invocation): Avoid casting away
11010         const-ness.
11011
11012 2001-03-28  Jeffrey Oldham  <oldham@codesourcery.com>
11013
11014         * jvgenmain.c (do_mangle_classname): End string constant with '\0'.
11015
11016 2001-03-28  Richard Henderson  <rth@redhat.com>
11017
11018         IA-64 ABI Exception Handling:
11019         * Make-lang.in (except.o): Don't depend on eh-common.h.
11020         * check-init.c (check_init): Handle EXC_PTR_EXPR.
11021         * decl.c (init_decl_processing) [throw_node]: No _Jv_Sjlj_Throw.
11022         [soft_exceptioninfo_call_node]: Remove.
11023         [eh_personality_libfunc, lang_eh_runtime_type]: New.
11024         (end_java_method): No emit_handlers.
11025         * except.c (java_set_exception_lang_code): Remove.
11026         (method_init_exceptions): Don't call it.
11027         (prepare_eh_table_type): No CATCH_ALL_TYPE.
11028         (build_exception_object_ref): New.
11029         (expand_end_java_handler): Update for except.h name changes.
11030         (emit_handlers, expand_resume_after_catch): Remove.
11031         * expr.c (java_lang_expand_expr): Update for except.h name changes.
11032         (process_jvm_instruction): Use build_exception_object_ref.
11033         * java-tree.h (JTI_SOFT_EXCEPTIONINFO_CALL_NODE): Remove.
11034         (soft_exceptioninfo_call_node): Remove.
11035         (build_exception_object_ref): Declare.
11036         * jcf-write.c (generate_bytecode_insns) [CALL_EXPR]: No
11037         soft_exceptioninfo_call_node.  Move processing ...
11038         [EXC_PTR_EXPR]: ... here.
11039         * parse.h (BUILD_ASSIGN_EXCEPTION_INFO): Remove dead code.
11040         * parse.y (catch_clause_parameter): Use build_exception_object_ref.
11041         (source_end_java_method): No java_set_exception_lang_code or
11042         emit_handlers.
11043         (build_dot_class_method): Use build_exception_object_ref.
11044         (try_reference_assignconv): Check EXC_PTR_EXPR not
11045         soft_exceptioninfo_call_node.
11046
11047 2001-03-28  Richard Henderson  <rth@redhat.com>
11048
11049         * java-tree.h (throw_node): Define as a single member of
11050         java_global_trees instead of a separate array.
11051         (JTI_THROW_NODE): New.
11052         * decl.c (throw_node): Don't declare.
11053         (init_decl_processing): Init a scalar throw_node.
11054         Don't register it for gc.
11055         * check-init.c (check_init): Reference scalar throw_node.
11056         * expr.c (build_java_athrow): Likewise.
11057         * jcf-write.c (generate_bytecode_insns): Likewise.
11058         * parse.h (BUILD_THROW): Likewise.
11059
11060 2001-03-28  Richard Henderson  <rth@redhat.com>
11061
11062         * decl.c (end_java_method): Do not save and restore
11063         flag_non_call_exceptions.
11064         * parse.y (source_end_java_method): Likewise.
11065         * lang.c (flag_exceptions): Don't declare.
11066         (java_init_options): Set flag_non_call_exceptions.  Set
11067         flag_exceptions here ...
11068         (java_init): ... not here.
11069
11070 2001-03-27  Richard Henderson  <rth@redhat.com>
11071
11072         * expr.c, parse.h: Use USING_SJLJ_EXCEPTIONS instead of
11073         exceptions_via_longjmp.
11074
11075         * lang.c (flag_new_exceptions): Don't declare it.
11076         (java_init_options): Or set it.
11077
11078 2001-03-27  Richard Henderson  <rth@redhat.com>
11079
11080         * decl.c (end_java_method): Rename asynchronous_exceptions to
11081         flag_non_call_exceptions.
11082         * parse.y (source_end_java_method): Likewise.
11083
11084 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11085
11086         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
11087
11088 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
11089
11090         * parse.h (DECL_END_SOURCE_LINE): Don't rely on DECL_FRAME_SIZE.
11091
11092 2001-03-26  Alexandre Petit-Bianco  <apbianco@redhat.com>
11093
11094         * parse.y (find_as_inner_class): Follow current package
11095         indications not to mistakingly load an unrelated class.
11096
11097 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11098
11099         * constants.c (PUTN): Use memcpy, not bcopy.
11100
11101         * lex.c (java_read_char): Use memmove, not bcopy.
11102
11103         * parse.y (java_parser_context_resume): Use memcpy, not bcopy.
11104
11105 2001-03-23  Per Bothner  <per@bothner.com>
11106
11107         * verify.c (verify_jvm_instructions):  Replace 3 pop_type by POP_TYPE
11108         macro for better error pin-pointing.
11109         * java-tree.h:  Fix typo in comment.
11110
11111         * jcf-write.c (generate_bytecode_insns):  Changes to TRY_FINALLY_EXPR.
11112         Don't include jsr/goto in exception range.
11113         Check if start and end of exception range are the same (also TRY_EXPR).
11114         Don't emit jsr after try_block if CAN_COMPLETE_NORMALLY is false.
11115         However, do emit the following goto even if try_block is empty.
11116         Defer freeing exception_decl until after the finalizer, to make
11117         sure the local isn't reused in the finalizer.  Fixes PR java/1208.
11118
11119         * parse.y (java_complete_lhs):  If the try-clause is empty, just
11120         return the finally-clause and vice versa.
11121
11122 2001-03-23  Alexandre Petit-Bianco  <apbianco@redhat.com>
11123
11124         * gcj.texi (Input Options): documented the check for attribute
11125         `gnu.gcc.gccj-compiled' and the `-fforce-classes-archive-check' flag.
11126         * java-tree.h (flag_force_classes_archive_check): Declared extern.
11127         * jcf-parse.c (HANDLE_GCJCOMPILED_ATTRIBUTE): New macro.
11128         (jcf_parse): Check for the right classes archive if necessary.
11129         * jcf-reader.c (get_attribute): Define `MATCH_ATTRIBUTE' and use it.
11130         (jcf_parse_fields): Fixed indentation.
11131         * jcf-write.c (append_gcj_attribute): New function.
11132         (generate_classfile): Compute the attribute count, invoke
11133         `append_gcj_attribute'.
11134         * jcf.h (typedef struct JCF): `seen_in_zip' and `java_source'
11135         turned into bit-fields. New bit-field `right_zip.'
11136         (JCF_ZERO): Set `right_zip' to zero.
11137         * lang-options.h (-fforce-classes-archive-check): Added flag.
11138         * lang.c (flag_force_classes_archive_check): New flag.
11139         (lang_f_options): New entry `force-classes-archive-check.'
11140         Fixes PR java/1213.
11141
11142 2001-02-07  Andrew Haley  <aph@redhat.com>
11143
11144         * gcj.texi (Configure-time Options): Add -fcheck-references.
11145         * expr.c (build_java_indirect_ref): New function.
11146         (java_check_reference): New function.
11147         (build_java_array_length_access): Use build_java_indirect_ref to
11148         check for null references.
11149         (build_java_arrayaccess): Likewise.
11150         (build_get_class): Likewise.
11151         (build_field_ref): Likewise.
11152         (invoke_build_dtable): Likewise.
11153         (build_invokeinterface): Likewise.
11154         * lang.c (lang_f_options): Add flag_check_references.
11155         * jvspec.c (jvgenmain_spec): Add flag_check_references.
11156         * java-tree.h (flag_check_references): New variable.
11157         * lang.c (flag_check_references): Likewise.
11158         * parse.y (patch_invoke): Use java_check_reference.
11159         (patch_assignment): Allow for extra nesting in
11160         _Jv_CheckArrayStore.
11161
11162 2001-03-23  Bryce McKinlay  <bryce@albatross.co.nz>
11163
11164         * gjavah.c (cxx_keywords): Update from the definitive list in cp/lex.c.
11165         * lex.c (cxx_keywords): Likewise.
11166
11167 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11168
11169         * parse.y (qualify_ambiguous_name): Broaden `length'
11170         recognition. Help MODIFY_EXPR be resolved as expression names.
11171         Fixes PR java/2066. Fixes PR java/2400.
11172
11173 2001-03-21  Bryce McKinlay  <bryce@albatross.co.nz>
11174
11175         * gjavah.c (process_file): Mark interface definitions with
11176         "__attribute__ ((java_interface))".
11177
11178 2001-03-21  Alexandre Petit-Bianco  <apbianco@redhat.com>
11179
11180         * class.c (layout_class): Fixed push_super_field's second
11181         argument. Fixes PR java/2333.
11182         (jdep_resolve_class): Reset TYPE_SIZE if `error_mark_node', it's
11183         too early to lay innerclasses out.
11184
11185 2001-03-20  Tom Tromey  <tromey@redhat.com>
11186             Alexandre Petit-Bianco <apbianco@redhat.com>
11187
11188         * parse.y (patch_assignment): Handle the case of a SAVE_EXPR
11189         inside an array reference. Insertion of the array store check
11190         rewritten. Fixes PR java/2299.
11191
11192 2001-03-20  Tom Tromey  <tromey@redhat.com>
11193
11194         * lex.c (java_read_unicode): Only accept leading `u's.
11195
11196 2001-03-20  Tom Tromey  <tromey@redhat.com>
11197
11198         * jcf-parse.c (read_class): Initialize `class'.
11199
11200 2001-03-20  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11201
11202         * jcf_parse.c (jcf_parse): Eliminate unused variable.
11203
11204 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
11205
11206         * class.c (build_class_ref): Use SET_DECL_ASSEMBLER_NAME.
11207         (layout_class): Likewise.
11208         (layout_class_method): Likewise.
11209         (emit_register_classes): Likewise.
11210         * decl.c (builtin_function): Likewise.
11211         (give_name_to_locals): Likewise.
11212
11213 2001-03-19  Per Bothner  <per@bothner.com>
11214
11215         * jcf-parse.c (load_inner_classes):  Check CLASS_LOADED_P
11216         before trying to load an inner class.
11217
11218         Fixes to process to command-line .class files in two passes.
11219         * java-tree.h (JAVA_FILE_P, CLASS_FILE_P, ZIP_FILE_P):  New flags.
11220         (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P):  Rename to ..
11221         (CLASS_FROM_CURRENTLY_COMPILED_P):  ... because it is more general now.
11222         * class.c (is_compiled_class):  Fix for renamed flag.
11223         * parse.y (maybe_create_class_interface_decl):  Likewise.
11224         * jcf-parse.c (yyparse):  Also set if compiling .class files.
11225         * jcf-parse.c (read_class);  Read current_class.
11226         (jcf_parse):  Make static.
11227         (load_inner_classes):  New function, with code moved from jcf_parse,
11228         because we need to inner classes after the command-line files are read.
11229         (yyparse):  Set finput to NULL when it doesn't need to be closed.
11230         Reduce use of main_jcf (basically only for archive) and
11231         use finput instead of main_jcf->read_state.
11232         Inline jcf_figure_file_type into yyparse.
11233         Set JAVA_FILE_P, CLASS_FILE_P, or ZIP_FILE_P on filename list name.
11234         Defer load_inner_classes and parse_class_file to a second pass,
11235         after we've correctly mapped command-line .clas fiels to classes.
11236         (jcf_figure_file_type):  Removed.
11237         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE):  Removed flags.
11238         (JCF_ZERO):  Also clear zipd field.
11239         * zipfile.h:  Conditionalize on JCF_H insread of JCF_ZIP.
11240
11241 2001-03-18  Matt Kraai  <kraai@alumni.carnegiemellon.edu>
11242
11243         * jcf-parse.c (yyparse): Change ch from char * to char.
11244
11245 2001-03-19  Per Bothner  <per@bothner.com>
11246
11247         * jvspec.c (lang_specific_driver):  Check for .zip and .jar files.
11248         Add constructed filelist-file at end, following -xjava.  Thus any .o
11249         and library files are not affected by the -xjava.  Also wrap
11250         explicit @FILE with -xjava and -xnone.
11251
11252 2001-03-19  Andrew Haley  <aph@cambridge.redhat.com>
11253
11254         * class.c (build_static_field_ref): Call make_decl_rtl() after
11255         setting the DECL_EXTERNAL flag.
11256
11257 2001-03-17  Per Bothner  <per@bothner.com>
11258
11259         * decl.c (clear_binding_level):  Fix initializer (broke 03-15).
11260
11261         * jcf-write.c (generate_bytecode_insns):  Handle emitting iinc
11262         when result is is needed (target is STACK_TARGET).
11263
11264         * parse.h (JDEP_SOLV):  Removed.
11265         * parse.y (register_incomplete_type):  Use JDEP_TO_RESOLVE instead.
11266
11267         * parse.y (incomplete_class_list): Removed.
11268         (obtain_incomplete_type): Don't use or set incomplete_class_list.
11269         It doesn't work if resolve_class changes the name of an array type
11270         that is on the list and then someone else looks for the modified name.
11271         Also, seems liable to break when compiling multiple source files at
11272         once.  So the simplest is to just remove incomplete_class_list -
11273         it is only a minor space win and it is not even clear it saves time.
11274
11275         * parse.y (resolve_class):  Remove unneeded promote_type.
11276
11277 2001-03-15  Per Bothner  <per@bothner.com>
11278
11279         * java-tree.h (BLOCK_IS_IMPLICIT):  New flag.
11280         * parse.h (BLOCK_EXPR_ORIGIN):  Removed macro.
11281         * parse.y (declare_local_variables, maybe_absorb_scoping_blocks):
11282         Use BLOCK_IS_IMPLICIT rather than BLOCK_EXPR_ORIGIN.
11283
11284         * jcf-parse.c (yyparse):  Set/reset input_filename for source file.
11285         * parse.y (java_expand_classes):  Likewise.
11286
11287         * parse.y (expand_start_java_method):  Was only called once and had a
11288         misleading name, so inline in caller java_complete_expand_method.
11289         (enter_a_block):  Likewise inline in enter_block and remove.
11290
11291         Remove junk from when gcc/java was created (by copying from C/C++).
11292         * decl.c (keep_next_level_flag, keep_next_if_subblocks):  Remove.
11293         (struct binding_level):  Remove fields keep, keep_if_subblocks,
11294         more_cleanups_ok, have_cleanups (which have never been used).
11295         (pushlevel, poplevel):  Remove related useless code.
11296
11297         * class.c (make_class_data):  The class_dtable_decl (i.e. the
11298         vtable for Class) should be external, except when compiling Class.
11299
11300         * jvspec.c (lang_specific_driver):  Fix -C handling.
11301         Check -save-temps to see if temp @FILE should be deleted.
11302         Follow-up to/fix for February 16 patch.
11303
11304         * verify.c (verify_jvm_instructions):  Better error msgs for dup.
11305         (type_stack_dup):  Remove no-longer neded error check.
11306
11307 2001-03-15  Bryce McKinlay  <bryce@albatross.co.nz>
11308
11309         * mangle.c (mangle_record_type): Rename 'from_pointer' argument
11310         to 'for_pointer'. If this type is for a pointer (argument) mangling,
11311         don't surround the element with 'N..E' if the type name is
11312         unqualified.
11313
11314 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
11315
11316         * class.c (build_static_field_ref): Use COPY_DECL_RTL,
11317         DECL_RTL_SET_P, etc.
11318         (make_method_value): Likewise.
11319         (get_dispatch_table): Likewise.
11320
11321         * decl.c (push_jvm_slot): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
11322
11323 2001-03-07  Tom Tromey  <tromey@redhat.com>
11324
11325         * config-lang.in (lang_requires): Define.
11326
11327 2001-03-07  Brad Lucier  <lucier@math.purdue.edu>
11328
11329         * typeck.c (convert): Check flag_unsafe_math_optimizations,
11330         not flag_fast_math.
11331
11332 2001-03-05  Per Bothner  <per@bothner.com>
11333
11334         Fix a problem where rest_of_decl_compilation applied to
11335         class_dtable_decl causes problems because it was done too early,
11336         before output file was opened.
11337         * decl.c (init_decl_processing):  Remove init of class_dtable_decl.
11338         * class.c (class_dtable_decl):  Add macro - element of class_roots.
11339         (make_class_data):  Define class_dtable_decl.
11340         * java-tree.h (JTI_CLASS_DTABLE_DECL, class_dtable_decl):  Removed.
11341
11342 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11343
11344         * java/class.c, java/decl.c, java/java-tree.h: Replace all
11345         uses of 'boolean' with 'bool'.
11346
11347 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
11348
11349         * lang-specs.h: Add zero initializer for cpp_spec field to all
11350         array elements.
11351
11352 2001-02-16  Per Bothner  <per@bothner.com>
11353
11354         Handle compiling multiple input files at once, and @FILE syntax.
11355         * gcj.texi:  Updated documentation to match.
11356         * java-tree.h (flag_filelist_file, init_src_parse):  New declarations.
11357         * jcf-parse.c (parse_source_file):  Split into ...
11358         (parse_source_file_1):  New function - and:
11359         (parse_source_file_2):  New function.
11360         (yyparse):  On -ffilelist-file, open and scan named file.
11361         On first pass over files, only do parse_source_file_1.
11362         A new second pass calls parse_source_file_2 for each file to compile.
11363         (init_jcf_parse):  Call init_src_parse.
11364         * jvspec.c (INDIRECT_FILE_ARG):  New flag.
11365         (lang_specific_driver):  Support @FILELIST-FILE syntax, as well
11366         as multiple input file combined in one compilation.
11367         * lang-options.h:  Add -ffilelist-file
11368         * lang.c (flag_filelist_file):  New flag variable.
11369         (lang_f_options):  Handle -ffilelist-file.
11370         * lex.c (java_init_lex): Don't clear ctxp->incomplete_class.
11371         * parse.h (struct parse_ctxt):  Remove fields incomplete_class and
11372         gclass_list - use global fields of src_parse_roots instead.
11373         * parse.y (src_parse_roots):  New array.
11374         (incomplete_class_list, gclass_list):  New macros.
11375         (push_parser_context, java_pop_parser_context,
11376         java_parser_context_resume):  Don't fiddle with deleted fields.
11377         (various):  Use incomplete_class gclass_list and global macros
11378         instead of parse_ctxt fields - the lists are global.
11379         (init_src_parse):  New function.
11380
11381 2001-02-23  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11382
11383         * decl.c (set_block): Set NAMES and BLOCKS from BLOCK.
11384
11385 2001-02-20  Alexandre Petit-Bianco  <apbianco@redhat.com>
11386
11387         * parse.y (check_inner_class_access): Moved declaration of local
11388         `enclosing_decl_type' to the right location.
11389
11390 2001-02-19  Bryce McKinlay  <bryce@albatross.co.nz>
11391
11392         * parse.y (parser_check_super_interface): Don't call
11393         check_pkg_class_access for an inner interface.
11394         (parser_check_super): Don't call check_pkg_class_access for inner
11395         class.
11396         (do_resolve_class): Simplify enclosing type loop. Don't call
11397         check_pkg_class_access if CL and DECL are not set.
11398         (find_in_imports_on_demand): Set DECL if class_type needed to be
11399         loaded. Don't call check_pkg_class_access for an inner class.
11400         (check_inner_class_access): Rewritten to implement member access
11401         rules as per spec 6.6.1.
11402         (check_pkg_class_access): Handle the empty package correctly.
11403         (in_same_package): New function. Determine if two classes are in the
11404         same package.
11405
11406 2001-02-18  Bryce McKinlay  <bryce@albatross.co.nz>
11407
11408         * typeck.c (build_java_array_type): Don't try to poke a public `clone'
11409         method into array types.
11410         * parse.y (patch_method_invocation): Bypass access check on clone call
11411         to array instance.
11412
11413 2001-02-15  Alexandre Petit-Bianco  <apbianco@redhat.com>
11414
11415         * expr.c (build_instanceof): Check for arrays when trying fold to
11416         false.
11417
11418 2001-02-15  Jim Meyering  <meyering@lucent.com>
11419
11420         * Make-lang.in (java.install-common): Depend on `installdirs'.
11421         (java.install-info): Likewise.
11422
11423 2001-02-15  Bryce McKinlay  <bryce@albatross.co.nz>
11424
11425         * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o.
11426
11427 2001-02-14  Tom Tromey  <tromey@redhat.com>
11428             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11429
11430         Fix for PR java/1261.
11431         * typeck.c (build_java_array_type): Add public `clone' method to
11432         arrays.
11433         * parse.y (resolve_qualified_expression_name): Use current_class
11434         when checking for inaccessibility.
11435         (patch_method_invocation): Fixed error message when accessibility
11436         denied.  Added `from_super' argument.
11437
11438 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11439
11440         * parse.y (resolve_class): Don't build a fake decl. Use the one
11441         already built.
11442         * typeck.c (build_java_array_type): Build and assign decl to array
11443         type.
11444
11445 2001-02-14  Alexandre Petit-Bianco  <apbianco@redhat.com>
11446
11447         * parse.y (not_accessible_p): Changed leading comment. Added extra
11448         `where' argument. Use it to enforce protected access rules.
11449         (resolve_qualified_expression_name): Added extra argument to
11450         not_accessible_p.
11451         (patch_method_invocation): Use argument `primary' to provide
11452         not_accessible_p with an extra argument.
11453         (lookup_method_invoke): Added extra argument to not_accessible_p.
11454         (search_applicable_method_list): Likewise.
11455
11456 2001-02-13  Alexandre Petit-Bianco  <apbianco@redhat.com>
11457
11458         * parse.y (resolve_qualified_expression_name): Try to resolve as
11459         an inner class access only if `decl' is a TYPE_DECL.
11460
11461 2001-02-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11462
11463         * decl.c (classdollar_identifier_node): Initialize.
11464         * java-tree.h (enum java_tree_index): New entry
11465         `JTI_CLASSDOLLAR_IDENTIFIER_NODE.'
11466         (classdollar_identifier_node): New macro.
11467         (ID_CLASSDOLLAR_P): Likewise.
11468         * parse.y (build_dot_class_method): Use `classdollar_identifier_node.'
11469         (build_dot_class_method_invocation): Likewise.
11470         (find_applicable_accessible_methods_list): `class$' can't be
11471         inherited.
11472
11473 2001-02-09  Raja R Harinath  <harinath@cs.umn.edu>
11474
11475         * Make-lang.in (java/mangle_name.o): Add 'make' prereqs.
11476
11477 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11478
11479         * Manke-lang.in (JVGENMAIN_OBJS): Added `errors.o'
11480         * jvgenmain.c (error): Reversed 2001-02-09 patch. `error' is now
11481         gone.
11482
11483 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11484
11485         * mangle_name (append_unicode_mangled_name): Emit `_' or `U'
11486         outside of the `__U' sequence too.
11487         (unicode_mangling_length): Count `_' or `U' outside of the `__U'
11488         sequence too.
11489
11490 2001-02-09  Alexandre Petit-Bianco  <apbianco@redhat.com>
11491
11492         * jvgenmain.c (error): Reversed 2001-02-01 deletion.
11493
11494 2001-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11495
11496         * Make-lang.in (JAVA_OBJS): Added java/mangle_name.o
11497         (JVGENMAIN_OBJS): Likewise.
11498         * java-tree.h (append_gpp_mangled_name): New prototype.
11499         * jcf-parse.c (ggc_mark_jcf): Argument now `void *.'
11500         Removed cast calling `gcc_add_root.'
11501         * jvgenmain.c (mangle_obstack): New global, initialized.
11502         (main): Use it.
11503         (do_mangle_class): Constify local `ptr.'
11504         Removed macro `MANGLE_NAME.' Removed cast in `for.' Call
11505         append_gpp_mangle_name and update `count' if necessary.
11506         Use `mangle_obstack.'
11507         * mangle.c (append_unicode_mangled_name): Removed.
11508         (append_gpp_mangled_name): Likewise.
11509         (unicode_mangling_length): Likewise.
11510         (mangle_member_name): Return type set to `void.'
11511         (mangle_field_decl): Don't append `U' in escaped names.
11512         (mangle_method_decl): Likewise.
11513         (mangle_member_name): Just use `append_gpp_mangled_name.'
11514         * mangle_name.c: New file.
11515
11516 2001-02-07  Per Bothner  <per@bothner.com>
11517
11518         * check-init.c (check_init):  Fix TRY_FINALLY_EXPR logic.
11519
11520         * check-init.c (check_init):  Don't call done_alternative after
11521         processing loop code, as a LOOP_EXPR never terminates normally.
11522
11523 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
11524
11525         * gcj.texi: Change sources.redhat.com reference to gcc.gnu.org.
11526
11527 2001-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11528
11529         * jcf-parse.c (HANDLE_SYNTHETIC_ATTRIBUTE): Don't handle field
11530         DECLs.
11531
11532 2001-02-06  Tom Tromey  <tromey@redhat.com>
11533
11534         * lex.c (java_new_lexer): Longer error message.
11535
11536 2001-02-05  Jeff Sturm  <jeff.sturm@commerceone.com>
11537             Alexandre Petit-Bianco  <apbianco@cygnus.com>
11538
11539         * typeck.c (build_prim_array_type): Added leading comment.
11540         (build_java_array_type): Moved locals out of
11541         block. Always create the `data' field, fixed alignment to match
11542         C++.
11543
11544 2001-02-04  Tom Tromey  <tromey@redhat.com>
11545
11546         * expr.c (java_lang_expand_expr): Don't bother recomputing
11547         `length'.  Use rest_of_decl_compilation, not make_decl_rtl.
11548         Fixes PR java/1866.
11549
11550 2001-02-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11551
11552         * parse.y (process_imports): Save the original name of the import
11553         for better error report.
11554
11555 2001-02-04  Bryce McKinlay  <bryce@albatross.co.nz>
11556
11557         * Make-lang.in (jvspec.o): Add DRIVER_DEFINES to the list
11558         of macros used when compiling jvspec.c.
11559         * jvspec.c (lang_specific_driver): Link with the shared
11560         libgcc by default.
11561
11562 2001-02-04  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11563
11564         * check-init.c (check_init): Call internal_error instead of fatal.
11565         * expr.c (java_lang_expand_expr): Likewise.
11566         * jcf-parse.c (get_constant): Likewise.
11567         * mangle.c (java_mangle_decl): Likewise.
11568         * parse.y (make_nested_class_name, java_complete_lhs): Likewise.
11569         (operator_string): Likewise.
11570         * check-init.c (check_init): Call abort instead of fatal.
11571         * class.c (build_class_ref): Likewise.
11572         * constants.c (write_constant_pool): Likewise.
11573         * decl.c (start_java_method): Likewise.
11574         * expr.c (push_type, java_stack_pop, java_stack_swap): Likewise.
11575         (java_stack_dup, encode_newarray_type): Likewise.
11576         (build_java_array_length_access): Likewise.
11577         (build_java_check_indexed_type, expand_java_pushc): Likewise.
11578         (build_java_soft_divmod, build_invokeinterface): Likewise.
11579         * java-tree.h (INNER_CLASS_P): Likewise.
11580         * jcf-parse.c (parse_signature, get_name_constant): Likewise.
11581         (give_name_to_class, get_class_constant): Likewise.
11582         * jcf-write.c (CHECK_PUT, CHECK_OP, get_access_flags): Likewise.
11583         (find_constant_index, generate_bytecode_conditional): Likewise.
11584         (generate_bytecode_insns, perform_relocations): Likewise.
11585         * lex.c (java_unget_unicode, java_lex): Likewise.
11586         * mangle.c (mangle_type, mangle_record_type): Likewise.
11587         (mangle_pointer_type, mangle_array_type, init_mangling): Likewise.
11588         (finish_mangling): Likewise.
11589         * parse.h (MARK_FINAL_PARMS): Likewise.
11590         * parse.y (pop_current_osb, unreachable_stmt_error): Likewise.
11591         (obtain_incomplete_type, java_complete_class): Likewise.
11592         (java_check_regular_methods, java_complete_expand_method): Likewise.
11593         (cut_identifier_in_qualified, check_deprecation): Likewise.
11594         (patch_invoke, find_applicable_accessible_methods_list): Likewise.
11595         (java_complete_lhs, lookup_name_in_blocks): Likewise.
11596         (check_final_variable_indirect_assignment, build_unaryop): Likewise.
11597         * typeck.c (set_local_type, parse_signature_type): Likewise.
11598         (parse_signature_string, build_java_signature): Likewise;
11599         (set_java_signature): Likewise.
11600         * verify.c (type_stack_dup, CHECK_PC_IN_RANGE): Likewise.
11601         * class.c (add_method): Call fatal_error instead of fatal.
11602         (build_static_field_ref): Likewise.
11603         * expr.c (build_known_method_ref, expand_invoke): Likewise.
11604         * jcf-parse.c (get_constant, jcf_parse): Likewise.
11605         * lex.c (java_new_new_lexer): Likewise.
11606         * jv-scan.c (main): Likewise.
11607         (fatal_error): Renamed from fatal.
11608         * jcf-parse.c (yyparse): Call fatal_io_error instead of
11609         pfatal_with_name.
11610         * jcf-parse.c (jcf_parse_source): Call fatal_io_error, not fatal.
11611         (yyparse): Likewise.
11612         * jcf-write.c (make_class_file_name, write_classfile): Likewise.
11613         * lex.c (java_get_line_col): Likewise.
11614         * jcf-parse.c (load_class): Make errors non-fatal.
11615         * lex.c (byteswap_init, need_byteswap): Only #ifdef HAVE_ICONV.
11616
11617 2001-02-01  Bryce McKinlay  <bryce@albatross.co.nz>
11618
11619         * jvgenmain.c (class_mangling_suffix): Remove unused string.
11620         (error): Remove unused function.
11621         (main): Don't use "__attribute__ alias" on generated class symbol.
11622
11623 2001-01-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11624
11625         * jcf-parse.c (init_jcf_parse): Added cast to ggc_add_root's last
11626         argument.
11627         * parse.y (finish_method_declaration): Code accounting for WFLed
11628         method DECL_NAMEs deleted.
11629         (check_abstract_method_definitions): Likewise.
11630         (resolve_type_during_patch): Layout resolved type.
11631         * typeck.c (lookup_do): Removed unused local.
11632
11633 2001-01-30  Bryce McKinlay  <bryce@albatross.co.nz>
11634
11635         * java-tree.h: Remove JTI_INTEGER_NEGATIVE_ONE_NODE.
11636         * decl.c (init_decl_processing): Use integer_minus_one_node, not
11637         integer_negative_one_node.
11638         * expr.c (build_java_binop): Likewise.
11639
11640 2001-01-24  Jeff Sturm  <jeff.sturm@commerceone.com>
11641
11642         * zextract.c (read_zip_archive): Read file_offset before writing
11643         zipd and consequently clobbering the header contents.
11644
11645 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11646
11647         * Make-lang.in: Remove all dependencies on defaults.h.
11648         * decl.c: Don't include defaults.h.
11649         * expr.c: Likewise.
11650         * parse.y: Likewise.
11651
11652 2001-01-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11653
11654         * ChangeLog (2001-01-21): Fixed typo.
11655         * class.c (layout_class_method): Code accounting for WFLed
11656         method DECL_NAMEs deleted.
11657         * constant.c (find_methodref_index): Likewise.
11658         * decl.c (lang_mark_tree): Mark `wfl' field in struct lang_decl.
11659         * java-tree.h (DECL_FUNCTION_WFL): New macro.
11660         (struct lang_decl): New field `wfl'.
11661         (java_get_real_method_name): Prototype deleted.
11662         * mangle.c (mangle_method_decl): Code accounting for WFLed
11663         method DECL_NAMEs deleted.
11664         * parse.h (GET_METHOD_NAME): Macro deleted.
11665         * parse.y (reset_method_name): Deleted.
11666         (method_header): Set DECL_FUNCTION_WFL.
11667         (check_abstract_method_header): Code accounting for WFLed method
11668         DECL_NAMEs deleted.
11669         (java_get_real_method_name): Deleted.
11670         (check_method_redefinition): Code accounting for WFLed method
11671         DECL_NAMEs deleted. Use DECL_FUNCTION_WFL.
11672         (java_check_regular_methods): Likewise.
11673         (java_check_abstract_methods): Likewise.
11674         (java_expand_classes): Don't call `reset_method_name.'
11675         (search_applicable_method_list): Use DECL_NAMEs instead of
11676         GET_METHOD_NAME.
11677         * typeck.c (lookup_do): Code accounting for WFLed method
11678         DECL_NAMEs deleted.
11679
11680 2001-01-25  Richard Earnshaw  <rearnsha@arm.com>
11681
11682         * lex.c (java_read_char): Check for EOF from getc first.
11683
11684 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11685
11686         * class.c (layout_class): Don't lay the superclass out if it's
11687         already being laid out.
11688         * jcf-parse.c (handle_innerclass_attribute): New function.
11689         (HANDLE_INNERCLASSES_ATTRIBUTE): Invoke
11690         handle_innerclasses_attribute.
11691         (jcf_parse): Don't load an innerclasses if it's already being
11692         laid out.
11693         * jcf-write.c (append_innerclass_attribute_entry): Static
11694         `anonymous_name' and its initialization deleted. `ocii' and `ini'
11695         to be zero for anonymous classes.
11696
11697 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11698
11699         * class.c (set_constant_value): Set DECL_FIELD_FINAL_IUD if
11700         necessary.
11701         * jcf-parse.c (set_source_filename): Use
11702         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC if necessary.
11703
11704 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11705
11706         * expr.c (build_jni_stub): Set DECL_CONTEXT on `meth_var' so it
11707         gets a unique asm name.
11708
11709 2001-01-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11710
11711         * jcf-parse.c (HANDLE_END_METHODS): Nullify current_method.
11712         (HANDLE_START_FIELD): Invoke MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
11713         if necessary.
11714         (HANDLE_SYNTHETIC_ATTRIBUTE): New macro.
11715         * jcf-reader.c (get_attribute): Handle `Synthetic' attribute.
11716         * parse.y (lookup_package_type_and_set_next): Deleted.
11717         (resolve_package): Removed unnecessary code.
11718         (find_applicable_accessible_methods_list): `finit$' can't be
11719         inherited.
11720         * verify.c (pop_argument_types): Added missing prototype.
11721
11722 2001-01-23  Bryce McKinlay  <bryce@albatross.co.nz>
11723
11724         * config-lang.in: Disable java by default.
11725
11726 2001-01-23  Tom Tromey  <tromey@redhat.com>
11727
11728         * gcj.texi (Copying): New node.
11729         Added copyright information.
11730
11731 2001-01-21  Per Bothner  <per@bothner.com>
11732
11733         Various fixes to allow compiling a compressed .jar/.zip archive.
11734         * zipfile.h (struct ZipFileCache):  Replace by struct ZipFile.
11735         (struct ZipFile):  Add fields name and next (from  ZipFileCache).
11736         (struct ZipDirectory):  New field zipf points to owning ZipFile.
11737         * jcf.h (struct ZipDirectory):  Add forward declaration.
11738         (struct JCF):   Declare zipd field to have type struct ZipDirectory.
11739         Remove seen_in_zip and zip_offset fields.
11740         (JCF_SEEN_IN_ZIP):  New macro.
11741         * zextract.c (read_zip_archive):  Set ZipDirectory's zipf field.
11742         * jcf-io.c:  Change all ZipFileCache to ZipFile.
11743         (read_zip_member):  New function.
11744         (open_in_zip):  Call read_zip_member.
11745         * jcf-parse.c (find_in_current_zip):  Remove function.
11746         (read_class):  Merge in find_in_current_zip functionality.
11747         Call read_zip_member if needed.
11748         (parse_zip_file_entries):  Use read_zip_member.
11749         (process_zip_dir):  Update for removed and added JCF fields.
11750         (jcf_figure_file_type):  Re-use, don't copy initial ZipFile struct.
11751
11752 2001-01-21  Per Bothner  <per@bothner.com>
11753
11754         Minor optimization of static ggc roots.
11755         * jcf-parse.c (parse_roots):  New static field.
11756         (current_field, current_method, current_file_list):  Replace by macros
11757         naming fields of parse_roots.
11758         (init_jcf_parse):  Combine 3 ggc_add_tree_root calls to 1.
11759         * class.c (class_roots):  New static field.
11760         (registered_class, fields_ident, info_ident, class_list):
11761         New macros naming fields of parse_roots.
11762         (build_static_field_ref):  Don't register roots here.
11763         (layout_class):  Static field list replaced by macro class_list.
11764         (init_class_processing):  Call ggc_add_tree_root for 4 roots.
11765         Initialize fields_ident and info_ident here.
11766
11767 2001-01-21  Per Bothner  <per@bothner.com>
11768
11769         * jcf-parse.c (ggc_mark_jcf):  New function.
11770         (init_jcf_parse):  Register current_jcf as ggc root.
11771
11772 2001-01-21  Per Bothner  <per@bothner.com>
11773
11774         * lang.c (put_decl_node):  Print method's name.
11775
11776 2001-01-21  Per Bothner  <per@bothner.com>
11777
11778         * verify.c (VERIFICATION_ERROR_WITH_INDEX):  New macro.
11779         (verify_jvm_instructions):  Use it, for better error messages on loads.
11780
11781 2001-01-21  Per Bothner  <per@bothner.com>
11782
11783         * verify.c (merge_type_state):  Still may have to merge even if
11784         LABEL_VERIFIED (label).
11785
11786 2001-01-21  Per Bothner  <per@bothner.com>
11787
11788         * parse.y (method_header):  Don't set the DECL_NAME of a FUNCTION_DECL
11789         to a EXPR_WITH_FILE_LOCATION - that is just too fragile and wrong.
11790
11791 2001-01-19  Per Bothner  <per@bothner.com>
11792
11793         * expr.c (pop_type_0):  Only return object_ptr_type_node on mismatch
11794         if expeting an interface type.  Refines Tom's change of 2000-09-12.
11795
11796 2001-01-18  Per Bothner  <per@bothner.com>
11797
11798         * gcj.texi (Input Options): Mention .java files.
11799
11800 2001-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11801
11802         * lang-options.h (-Wunsupported-jdk11): Removed.
11803         * lang.c (flag_not_overriding): Deleted.
11804         (flag_static_local_jdk1_1): Likewise.
11805         (lang_W_options): Removed "unsupported-jdk11" entry.
11806         * parse.y (java_check_methods): Removed dead code.
11807
11808 2001-01-17  Tom Tromey  <tromey@redhat.com>
11809
11810         Changes suggested by Per Bothner:
11811         * gcj.texi (Input Options): Don't mention input files.
11812         (Code Generation): Updated --main information.
11813         (Invoking jcf-dump): Mention that --javap is incomplete.
11814         From Alexandre Petit-Bianco:
11815         (Warnings): Don't mention -Wunsupported-jdk11.
11816         My stuff:
11817         (Compatibility): Mention JDK 1.2-ness of libraries.
11818         (Resources): Mention resources used when writing gcj.
11819
11820 2001-01-17  Tom Tromey  <tromey@redhat.com>
11821
11822         * gcj.texi: New file.
11823         * Make-lang.in ($(srcdir)/java/gcj.info): New target.
11824         (java.info): Depend on gcj.info.
11825         (java/gcj.dvi): New target.
11826         (java.dvi): Depend on gcj.dvi.
11827         (java.install-info): Wrote.
11828
11829 2001-01-16  Jeff Sturm  <jeff.sturm@appnet.com>
11830
11831         * expr.c (java_lang_expand_expr): Use TREE_SYMBOL_REFERENCED after
11832         having called make_decl_rtl.
11833
11834 2001-01-14  Per Bothner  <per@bothner.com>
11835
11836         Various patches to emit better messages on verification errors.
11837         * expr.c (push_type_0):  Return error indication on stack overflow,
11838         instead of callinfg fatal.
11839         (push_type):  Now just call push_type_0 (nd fatal on overflow).
11840         (pop_type_0):  Return detailed error message (in a char** argument).
11841         (pop_type):  If pop_type_0 fails, print error message.
11842         (pop_argument_types):  Moved to verify.c.
11843         * verify.c (pop_argument_types):  Moved from expr.c.
11844         Return a (possible) error message, rather than void.
11845         (POP_TYPE, POP_TYPE_CONV, PUSH_TYPE, PUSH_PENDING):  New macros.
11846         (verify_jvm_instruction):  Use new macros, improving error messages.
11847         For case OPCODE_astore use object_ptr_type_node.
11848         * java-tree.h (TYPE_UNDERFLOW, TYPE_UNEXPECTED):  New macros.
11849         (pop_type_0, push_type_0, pop_argument_types):  Update accordingly.
11850
11851         * parse.y (java_complete_lhs case EXPR_WITH_FILE_LOCATION): If body is
11852         constant, return body without wrapper.  (Improves constant folding.)
11853         * lex.c (build_wfl_node):  Clear TREE_TYPE from returned node.
11854
11855 2001-01-13  Per Bothner  <per@bothner.com>
11856
11857         * expr.c (expand_java_field_op):  Assigning to a final field outside
11858         an initializer does not violate JVM spec, so should be warning, not
11859         error.  (Sun's verifier does not complain - though MicroSoft's does.)
11860
11861 2001-01-12  Joseph S. Myers  <jsm28@cam.ac.uk>
11862
11863         * gjavah.c (version), jcf-dump.c (version): Update copyright year
11864         to 2001.
11865
11866 2001-01-11  Bryce McKinlay  <bryce@albatross.co.nz>
11867
11868         * parse.y (resolve_expression_name): Permit instance variables from
11869         enclosing context in super constructor call.
11870         (resolve_qualified_expression_name): Permit enclosing class's qualified
11871         "this" in super constructor call.
11872
11873 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
11874
11875         * class.c (build_utf8_ref): Remove last argument in call to
11876         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
11877         (build_class_ref): Likewise.
11878         (build_static_field_ref): Likewise.
11879         (get_dispatch_table): Likewise.
11880         (layout_class_method): Likewise.
11881         (emit_register_classes): Likewise.
11882         * constants.c (build_constant_data_ref): Likewise.
11883         * decl.c (builtin_function): Likewise.
11884         (create_primitive_vtable): Likewise.
11885         * expr.c (build_known_method_def): Likewise.
11886         (build_jni_stub): Likewise.
11887         (java_lang_expand_expr): Likewise.
11888
11889 2001-01-10  Tom Tromey  <tromey@redhat.com>
11890
11891         * jvspec.c (jvgenmain_spec): Omit -fencoding from cc1 invocation.
11892
11893 2001-01-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11894
11895         * java-tree.h (lang_printable_name_wls): New prototype.
11896         * lang.c (put_decl_name): Removed dead code. Use DECL_CONTEXT
11897         rather than `current_class' to print type name. Don't prepend type
11898         names when printing constructor names.
11899         (lang_printable_name_wls): New function.
11900         * jcf-parse.c (jcf_parse_source): Pass NULL `file' argument to
11901         `build_expr_wfl', alway set EXPR_WFL_FILENAME_NODE.
11902         * parse.y (patch_method_invocation): Message tuned for constructors.
11903         (not_accessible_p): Grant `private' access from within
11904         enclosing contexts.
11905
11906 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11907
11908         All files with updated copyright when applicable.
11909         * Make-lang.in (JVGENMAIN_OBS): Removed java/mangle.o.
11910         * class.c (mangle_class_field): Function removed.
11911         (append_gpp_mangled_type, mangle_static_field, mangle_field): Likewise.
11912         (utf8_cmp, cxx_keyword_p): Moved to lex.c.
11913         (build_class_ref): Call `java_mangle_class_field' instead of
11914         `mangle_class_field.'
11915         (build_dtable_decl): Rewritten to call `java_mangle_vtable.'
11916         (layout_class): Call `java_mangle_decl' instead of
11917         `mangle_static_field.'
11918         (cxx_keywords): Initialized static array moved to `lex.c.'
11919         (layout_class_method): Changed leading comment. Simplified to
11920         call `java_mangle_decl.' Local `ptr' moved in for loop body.
11921         * decl.c (lang_mark_tree): Mark field `package_list.'
11922         * java-tree.h (TYPE_PACKAGE_LIST): New macro.
11923         (struct lang_type): New field `package_list.'
11924         (unicode_mangling_length): Prototype removed.
11925         (append_gpp_mangled_name, append_gpp_mangled_classtype,
11926         emit_unicode_mangled_name): Likewise.
11927         (cxx_keyword_p): New prototype.
11928         (java_mangle_decl, java_mangle_class_field,
11929         java_mangle_class_field_from_string, java_mangle_vtable): Likewise.
11930         * jcf-parse.c (jcf_parse_source): Constify `file' argument to
11931         `build_expr_wfl.'
11932         * jvgenmain.c (main_method_prefix): Global variable removed.
11933         (main_method_suffix): Likewise.
11934         (do_mangle_classname): New function.
11935         (main): Call it. Format changed to accommodate new mangling scheme.
11936         * lex.c: (utf8_cmp): Conditionally prototyped.
11937         (cxx_keywords): Moved from class.c, conditionally defined.
11938         (utf8_cmp, cxx_keyword_p): Likewise.
11939         * mangle.c (obstack.h, ggc.h): Included.
11940         (mangle_field_decl): New function.
11941         (mangle_method_decl, mangle_type, mangle_pointer_type,
11942         mangle_array_type, mangle_record_type,
11943         find_compression_pointer_match, find_compression_array_match,
11944         find_compression_record_match,
11945         find_compression_array_template_match, set_type_package_list,
11946         entry_match_pointer_p, emit_compression_string, init_mangling,
11947         finish_mangling, compression_table_add, mangle_member_name): Likewise.
11948         (mangle_obstack): New global.
11949         (MANGLE_RAW_STRING): New macro.
11950         (unicode_mangling_length): Turned static.
11951         (append_unicode_mangled_name): Renamed from
11952         `emit_unicode_mangled_name.'  Turned static. `mangle_obstack'
11953         replaces `obstack', removed from the parameter list.
11954         (append_gpp_mangled_name): Turned static. `mangle_obstack'
11955         replaces parameter `obstack', removed from the parameter list. Call
11956         `append_unicode_mangled_name' instead of `emit_unicode_mangled_name.
11957         (append_gpp_mangled_classtype): Removed.
11958         (compression_table, compression_next): New static variables.
11959         * parse.y (temporary_obstack): Extern declaration removed.
11960
11961 2001-01-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
11962
11963         * parse.y (patch_binop): Compute missing type in error situations.
11964
11965 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11966
11967         * class.c (make_class_data): Push initial value for "arrayclass".
11968         * decl.c (init_decl_processing): Add new class field "arrayclass".
11969
11970 2001-01-05  Bryce McKinlay  <bryce@albatross.co.nz>
11971
11972         From patha@softlab.ericsson.se:
11973         * parse.y (switch_label): Use build, not build1, to construct
11974         DEFAULT_EXPR.
11975
11976 2001-01-04  Neil Booth  <neil@daikokuya.demon.co.uk>
11977
11978         * lang.c (lang_decode_option): Change -MA to -MP.
11979         * jcf-depend.c (jcf_dependency_add_target, jcf_dependency_set_target):
11980         Update to new prototype; do quote targets.
11981         (jcf_dependency_write): Update.
11982
11983 2000-12-22  Bryce McKinlay  <bryce@albatross.co.nz>
11984
11985         Shorten primitive array allocation path:
11986         * decl.c (init_decl_processing): Use _Jv_NewPrimArray not _Jv_NewArray
11987         to create new primitive arrays.
11988         * expr.c (build_newarray): If generating native code, call
11989         soft_newarray_node with a reference to the primitive TYPE identifier
11990         instead of type_value.
11991
11992 2000-12-17  Bryce McKinlay  <bryce@albatross.co.nz>
11993
11994         Fix for PRs gcj/312 and gcj/253:
11995         * parse.y (valid_ref_assignconv_cast_p): Load classes for source and
11996         dest if they arn't already.
11997         * class.c (layout_class): Call maybe_layout_super_class on
11998         superinterfaces also, but only if compiling from bytecode.
11999
12000         Fix for PR gcj/373:
12001         * parse.y (create_class): Set ACC_STATIC if class is declared in an
12002         interface.
12003
12004 2000-12-15  Tom Tromey  <tromey@redhat.com>
12005
12006         * jcf-parse.c (jcf_parse_source): Set wfl_operator if not already
12007         set.
12008
12009 2000-12-14  Andrew Haley  <aph@redhat.com>
12010
12011         * boehm.c (mark_reference_fields): Change test to correctly detect
12012         bitmap overflow.
12013
12014 2000-12-15  Andreas Jaeger  <aj@suse.de>
12015
12016         * config-lang.in (lang_dirs): Added.
12017
12018 2000-12-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12019
12020         * parse.y (end_artificial_method_body): Fixed undefined behavior.
12021         Credits go to rth for finding it.
12022
12023 2000-12-13  Mike Stump  <mrs@wrs.com>
12024
12025         * parse.y (check_static_final_variable_assignment_flag): Fix spelling.
12026
12027 2000-11-07  Tom Tromey  <tromey@cygnus.com>
12028
12029         * Make-lang.in (JAVA_LEX_C): Added chartables.h.
12030         * lex.c (java_ignorable_control_p): Removed.
12031         (java_letter_or_digit_p): Removed.
12032         (java_start_char_p): New function.
12033         (java_read_char): Return `int', not `unicode_t'.  Changed
12034         callers.
12035         (java_read_unicode): Likewise.
12036         (java_read_unicode_collapsing_terminators): Likewise.
12037         (java_get_unicode): Likewise.
12038         (java_new_lexer): Initialize hit_eof.
12039         (java_parse_end_comment): Take `int' argument.
12040         (java_parse_doc_section): Likewise.
12041         (java_parse_escape_sequence): Don't allow backlash-newline.
12042         Return `int'.
12043         * lex.h (JAVA_DIGIT_P): Removed.
12044         (_JAVA_LETTER_OR_DIGIT_P): Removed.
12045         (_JAVA_IDENTIFIER_IGNORABLE): Removed.
12046         (JAVA_START_CHAR_P): Renamed from JAVA_ID_CHAR_P.
12047         (JAVA_PART_CHAR_P): New macro.
12048         (UEOF): Now -1.
12049         (JAVA_CHAR_ERROR): Now -2.
12050         (java_lexer): New field `hit_eof'.
12051         * chartables.h: New file.
12052         * gen-table.pl: new file.
12053
12054 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12055             Alexandre Petit-Bianco  <apbianco@cygnus.com>
12056
12057         * parse.y (java_complete_lhs): Only allow compound assignment of
12058         reference type if type is String.
12059
12060 2000-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12061
12062         * Make-lang.in (java/jcf-path.o:): libgcj.jar replaces libgcj.zip.
12063         jcf-path.c: Likewise.
12064
12065 2000-12-09  Anthony Green  <green@redhat.com>
12066
12067         * zipfile.h (ZipDirectory): Declare size, uncompressed_size,
12068         filestart and filename_length as int values.
12069
12070 2000-12-07  Mo DeJong  <mdejong@redhat.com>
12071
12072         * jcf-io.c (find_class): Correct the logic that tests to see if a
12073         .java file is newer than its .class file. The compiler was
12074         incorrectly printing a warning when file mod times were equal.
12075
12076 2000-12-07  Zack Weinberg  <zack@wolery.stanford.edu>
12077
12078         * jvgenmain.c: Use ISPRINT not isascii.
12079
12080 2000-12-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12081
12082         * parse.y (end_artificial_method_body): Fixed typo.
12083
12084 2000-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12085
12086         * parse.y (patch_method_invocation): Pick the correct enclosing
12087         context when creating inner class instances.
12088         Fixes gcj/332.
12089
12090 2000-11-26  Joseph S. Myers  <jsm28@cam.ac.uk>
12091
12092         * gjavah.c (version), jcf-dump.c (version), jv-scan.c (version):
12093         Update copyright year to 2000.
12094
12095 2000-11-23  Anthony Green  <green@redhat.com>
12096
12097         * jcf-parse.c (init_jcf_parse): Register current_file_list root.
12098         Move current_file_list out of yyparse and make it static.
12099
12100         * expr.c: Declare quick_stack and tree_list_free_list as static
12101         (init_expr_processing): Register quick_stack and
12102         tree_list_free_list roots.
12103
12104 2000-11-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12105
12106         * parse.y (build_outer_field_access): New local `decl_ctx', use
12107         it. Check for field's context and current class immediate outer
12108         context inheritance.
12109         (outer_field_access_p): Consider fields inherited from the last
12110         enclosing context.
12111         (build_access_to_thisn): Stop at the last enclosing context if
12112         necessary.
12113         Fixes gcj/367.
12114
12115 2000-11-23  J"orn Rennecke <amylaar@redhat.com>
12116
12117         * Make-lang.in (jvspec.o): Depend on $(CONFIG_H).
12118
12119 2000-11-22  Bryce McKinlay  <bryce@albatross.co.nz>
12120
12121         * jcf-parse.c (get_constant): Call UT8_CHAR_LENGTH on `utf8', not the
12122         scratch buffer.
12123
12124 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12125
12126         * jv-scan.c (help): Document --complexity.
12127         (options): Added --complexity.
12128         (flag_complexity): New global.
12129         (main): Call `report'.
12130         * parse-scan.y (complexity): New global.
12131         (if_then_statement, if_then_else_statement,
12132         if_then_else_statement_nsi, switch_block_statement_group,
12133         while_expression, do_statement, for_begin, continue_statement,
12134         throw_statement, catch_clause, finally, method_invocation,
12135         conditional_and_expression, conditional_or_expression,
12136         conditional_expression): Update complexity.
12137         (reset_report): Reset complexity.
12138         (report): New function.
12139
12140 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12141
12142         * lex.c (yylex): Added STRICT_TK case.
12143         * parse.y (STRICT_TK): Added.
12144         * parse-scan.y (STRICT_TK): Added.
12145         * Make-lang.in ($(srcdir)/java/keyword.h): Added missing `\' and
12146         `;'.  Use 4, not 3, with -k option.  Correctly rename resulting
12147         file.
12148         * keyword.h: Rebuilt.
12149         * keyword.gperf (strictfp): Added.
12150
12151 2000-11-20  Tom Tromey  <tromey@cygnus.com>
12152
12153         * lex.c (yylex): Recognize floating point constants with leading
12154         0.
12155
12156 2000-11-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12157
12158         * java-tree.h (cyclic_inheritance_report): Constify.
12159         * parse.y (cyclic_inheritance_report): Likewise.
12160
12161 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
12162
12163         * parse.y (goal): Remove call to ggc_add_string_root.
12164
12165 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
12166
12167         * jcf-parse.c (get_constant), parse.y (do_merge_string_cste):
12168         Create string in scratch buffer, then pass to build_string.
12169
12170 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
12171
12172         * parse.y (issue_warning_error_from_context): Add
12173         ATTRIBUTE_PRINTF.
12174
12175 2000-11-11  Anthony Green  <green@redhat.com>
12176
12177         * jcf-parse.c (process_zip_dir): Add finput parameter.
12178         (jcf_figure_file_type): Call process_zip_dir with appropriate
12179         argument.
12180
12181 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12182
12183         * decl.c (copy_lang_decl): Use memcpy, not bcopy.
12184         * jcf-parse.c (jcf_figure_file_type): Likewise.
12185
12186 2000-11-09  Joseph S. Myers  <jsm28@cam.ac.uk>
12187
12188         * parse.y (create_new_parser_context): Use memset () instead of
12189         bzero ().
12190
12191 2000-11-08  Tom Tromey  <tromey@cygnus.com>
12192
12193         * gjavah.c (process_file): Only include gcj/cni.h when generating
12194         CNI stubs.
12195
12196 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12197
12198         * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
12199         (init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
12200         instead of bzero ().
12201
12202 2000-11-05  Tom Tromey  <tromey@cygnus.com>
12203
12204         * lex.h (JAVA_FLOAT_RANGE_ERROR): Typo fix.
12205         * lex.c (IS_ZERO): New define.
12206         (java_perform_atof): Error on floating point underflow.
12207
12208 2000-11-04  Tom Tromey  <tromey@cygnus.com>
12209
12210         * lex.c (java_parse_escape_sequence): Only read two octal
12211         characters if the first one is greater than 3.  Don't allow
12212         "octal" numbers to include the digits 8 or 9.
12213
12214 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
12215
12216         * Make-lang.in (java.distdir): Remove.
12217
12218 2000-11-03  Tom Tromey  <tromey@cygnus.com>
12219
12220         * Make-lang.in (java.dvi): New target.
12221         Partial fix for PR other/567.
12222
12223         * lang-options.h: Mention -Wout-of-date.
12224         * jcf-dump.c (flag_newer): New global.
12225         * gjavah.c (flag_newer): New global.
12226         * jcf-io.c (find_class): Only warn when flag_newer set.
12227         * lang.c (flag_newer): New global.
12228         (struct string_option): New declaration.
12229         (lang_W_options): New global.
12230         (process_option_with_no): New function.
12231         (lang_decode_option): Use it.
12232
12233         * class.c (cxx_keyword_p): Accept keywords with trailing `$'s.
12234         * gjavah.c (cxx_keyword_subst): Handle any number of trailing
12235         `$'.
12236
12237         * lex.h (_JAVA_IDENTIFIER_IGNORABLE): New macro.
12238         (JAVA_ID_CHAR_P): Also try java_ignorable_control_p.
12239         * lex.c (java_read_unicode): Removed `term_context' argument.
12240         Recognize any number of `u' in `\u'.
12241         (java_read_unicode_collapsing_terminators): New function.
12242         (java_get_unicode): Use it.
12243         (java_lineterminator): Removed.
12244         (yylex): Produce error if character literal is newline or single
12245         quote.  Return if eof found in middle of `//' comment.  EOF in
12246         `//' comment is only an error if pedantic.
12247         (java_ignorable_control_p): New function.
12248         (java_parse_end_comment): Return if eof found in middle of
12249         comment.
12250         Include flags.h.
12251         * jv-scan.c (pedantic): New global.
12252
12253 2000-10-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12254
12255         * parse.y (outer_field_access_p): Inherited fields aren't
12256         consider outer fields.
12257         (maybe_build_thisn_access_method): Use
12258         PURE_INNER_CLASS_TYPE_P instead of INNER_CLASS_TYPE_P.
12259         (resolve_expression_name): Trigger an error if a static field
12260         is being accessed as an outer field.
12261
12262 2000-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12263
12264         * Make-lang.in (LIBGCJ_ZIP_FILE): Define with `$(prefix)'.
12265         Fixes gcj/365.
12266
12267 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
12268
12269         * Make-lang.in: Move all build rules here from Makefile.in,
12270         adapt to new context.  Wrap all rules that change the current
12271         directory in parentheses.  Expunge all references to $(P).
12272         When one command depends on another and they're run all at
12273         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
12274         all object-file generation rules.  Delete obsolete variables.
12275
12276         * Makefile.in: Delete.
12277         * config-lang.in: Delete outputs= line.
12278
12279 2000-10-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12280
12281         * parse.y (patch_method_invocation): NULLify this_arg when already
12282         inserted.
12283         (maybe_use_access_method): Handle call to methods unrelated to the
12284         current class. Fixed comment.
12285         Fixes gcj/361.
12286
12287 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12288
12289         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Check inherited type in
12290         scope.
12291
12292 2000-10-24  Tom Tromey  <tromey@cygnus.com>
12293
12294         * lex.c (java_new_lexer): Initialize new fields.  Work around
12295         broken iconv() implementations.
12296         (java_read_char): Swap bytes if required.  Use fallback decoder if
12297         required.
12298         (byteswap_init, need_byteswap): New globals.
12299         (java_destroy_lexer): Only close iconv handle if it is in use.
12300         * lex.h (java_lexer): New fields read_anything, byte_swap,
12301         use_fallback.
12302         Made out_buffer unsigned.
12303
12304 2000-10-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12305
12306         * parse.y (register_incomplete_type): Include JDEP_FIELD as a case
12307         where an enclosing context can be set on the jdep.
12308         (do_resolve_class): Fixed identation.
12309
12310 2000-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12311
12312         * gjavah.c (NEED_PEEK_ATTRIBUTE, NEED_SKIP_ATTRIBUTE): Define
12313
12314         * jcf-reader.c (peek_attribute, skip_attribute): Only define
12315         when requested.
12316
12317         * parse.h (yyerror): If JC1_LITE, mark with ATTRIBUTE_NORETURN.
12318
12319         * verify.c (CHECK_PC_IN_RANGE): Cast result of stmt-expr to void.
12320
12321 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12322
12323         * jcf-write.c (OP1): Update `last_bc'.
12324         (struct jcf_block): Fixed indentation and typo in comments.  New
12325         field `last_bc'.
12326         (generate_bytecode_insns): Insert `nop' if `jsr' immediately
12327         follows `monitorenter'.
12328         * parse.y (patch_synchronized_statement): New local `tmp'. Call
12329         `patch_string'.
12330         Fixes gcj/232.
12331
12332 2000-10-16  Tom Tromey  <tromey@cygnus.com>
12333
12334         * jvspec.c (lang_specific_driver): Recognize -MF and -MT.
12335         * lang-specs.h: Added %{MA}, %{MF*}, %{MT*}.
12336         * lang-options.h: Added -MA, -MT, -MF..
12337         * lang.c (lang_decode_option): Recognize -MA, -MT, -MF.
12338         (DEPEND_TARGET_SET): New macro.
12339         (DEPEND_FILE_ALREADY_SET): Likewise.
12340         (init_parse): Handle new flags.
12341         * jcf.h (jcf_dependency_print_dummies): Declare.
12342         * Make-lang.in (s-java): Added mkdeps.o.
12343         * Makefile.in (BACKEND): Added mkdeps.o.
12344         (../gcjh$(exeext)): Added mkdeps.o.
12345         (../jcf-dump$(exeext)): Added mkdeps.o.
12346         * jcf-depend.c: Include mkdeps.h.
12347         (struct entry, dependencies, targets, MAX_OUTPUT_COLUMNS,
12348         add_entry): Removed.
12349         (jcf_dependency_reset): Rewrote.
12350         (dependencies): New global.
12351         (jcf_dependency_set_target): Rewrote.
12352         (jcf_dependency_add_target): Likewise.
12353         (jcf_dependency_add_file): Likewise.
12354         (munge): Removed.
12355         (print_ents): Removed.
12356         (jcf_dependency_write): Rewrote.
12357         (print_dummies): New global.
12358         (jcf_dependency_print_dummies): New function
12359         (jcf_dependency_write): Call deps_dummy_targets if required.
12360
12361 2000-10-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12362
12363         * gjavah.c (add_class_decl): Removed unused variables `tname',
12364         `tlen' and `name_index'.
12365         * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): New macro.
12366         * jcf-parse.c (jcf_parse_source): Use it and set EXPR_WFL_FILENAME
12367         in `wfl_operator' with value.
12368         (yyparse): Use BUILD_FILENAME_IDENTIFIER_NODE.
12369         (jcf_figure_file_type): Fixed identation.
12370         * lex.c (java_get_line_col): Use EOF. Tuned `^' placement.
12371         * parse.y (analyze_clinit_body): New function.
12372         (static_initializer:): Reset `current_static_block'.
12373         (java_parser_context_restore_global): Set EXPR_WFL_FIILENAME_NODE in
12374         `wfl_operator' with new value.
12375         (lookup_cl): Use EXPR_WFL_FILENAME.
12376         (maybe_yank_clinit): Handle bogus <clinit> bodies, call
12377         analyze_clinit_body.
12378         (build_outer_field_access): Access to this$<n> built from
12379         current_class, not its outer context.
12380         (build_access_to_thisn): Fixed leading comment. Tidied things up.
12381         (resolve_qualified_expression_name): Handle `T.this' and `T.this.f()'.
12382         (patch_method_invocation): Use `is_static_flag' when already
12383         initialized.
12384         (patch_newarray): Removed assignment in ternary operator.
12385
12386 2000-10-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12387
12388         * except.c (free_eh_ranges): Don't free `whole_range'.
12389
12390 2000-10-15  Anthony Green  <green@redhat.com>
12391
12392         * decl.c (init_decl_processing): Call init_class_processing before
12393         anything else.
12394
12395 2000-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12396
12397         * check-init.c (check_init): Fixed leading comment. Use
12398         LOCAL_FINAL_P.
12399         * decl.c (push_jvm_slot): Use MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12400         (give_name_to_locals): Likewise.
12401         (lang_mark_tree): Handle FIELD_DECL. Register `am' and `wfl'
12402         fields in lang_decl_var.
12403         * java-tree.h (DECL_FUNCTION_SYNTHETIC_CTOR,
12404         DECL_FUNCTION_ALL_FINAL_INITIALIZED): New macros.
12405         (FIELD_INNER_ACCESS): Removed ugly cast, macro rewritten.
12406         (FIELD_INNER_ACCESS_P, DECL_FIELD_FINAL_IUD, DECL_FIELD_FINAL_LIIC,
12407         DECL_FIELD_FINAL_IERR, DECL_FIELD_FINAL_WFL): New macros.
12408         (LOCAL_FINAL): Rewritten.
12409         (LOCAL_FINAL_P, FINAL_VARIABLE_P, CLASS_FINAL_VARIABLE_P
12410         MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): New macros.
12411         (struct lang_decl): Fixed comments. Added `synthetic_ctor' and
12412         `init_final' fields.
12413         (struct lang_decl_var): Fixed leading comment. Added `am', `wfl',
12414         `final_uid', `final_liic', `final_ierr' and `local_final' fields.
12415         (TYPE_HAS_FINAL_VARIABLE): New macro.
12416         (struct lang_type): Added `afv' field.
12417         * parse.y (check_static_final_variable_assignment_flag): New function.
12418         (reset_static_final_variable_assignment_flag): Likewise.
12419         (check_final_variable_local_assignment_flag): Likewise.
12420         (reset_final_variable_local_assignment_flag): Likewise.
12421         (check_final_variable_indirect_assignment): Likewise.
12422         (check_final_variable_global_assignment_flag): Likewise.
12423         (add_inner_class_fields): Use LOCAL_FINAL_P.
12424         (register_fields): Handle local finals and final variables.
12425         (craft_constructor): Set DECL_FUNCTION_SYNTHETIC_CTOR.
12426         (declare_local_variables): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12427         (source_start_java_method): Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC
12428         on local finals.
12429         (java_complete_expand_methods): Loop to set
12430         TYPE_HAS_FINAL_VARIABLE. Call
12431         `reset_final_variable_local_assignment_flag' and
12432         `check_final_variable_local_assignment_flag' accordingly before
12433         and after constructor expansion. Call
12434         `reset_static_final_variable_assignment_flag'
12435         before expanding <clinit> and after call
12436         `check_static_final_variable_assignment_flag' if the
12437         current_class isn't an interface. After all methods have been
12438         expanded, call `check_final_variable_global_assignment_flag' and
12439         `check_static_final_variable_assignment_flag' if the current class
12440         is an interface.
12441         (maybe_yank_clinit): Fixed typo in comment.
12442         (build_outer_field_access_methods): Removed old sanity check. Use
12443         FIELD_INNER_ACCESS_P. Call MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC.
12444         Don't create access methods for finals.
12445         (resolve_field_access): Use `CLASS_FINAL_VARIABLE_P'.
12446         (java_complete_tree): Likewise. Reset DECL_FIELD_FINAL_IUD if
12447         existing DECL_INIT has been processed.
12448         (java_complete_lhs): Likewise.
12449         (check_final_assignment): Filter input on `lvalue''s TREE_CODE.
12450         Test for COMPONENT_REF to get to the FIELD_DECL. Implemented new
12451         logic.
12452         (patch_assignment): Use LOCAL_FINAL_P.
12453         (fold_constant_for_init): Reset DECL_FIELD_FINAL_IUD if
12454         DECL_INITIAL is nullified.
12455         Fixes gcj/163.
12456
12457 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12458
12459         * Make-lang.in (parse.c, parse-scan.c): Create atomically.
12460
12461         * Makefile.in (parse.c, parse-scan.c): Likewise.
12462
12463 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
12464
12465         * class.c (temporary_obstack): Remove.
12466         (make_class): Don't mess with obstascks.
12467         (push_class): Likewise.
12468         (set_super_info): Likewise.
12469         (add_method_1): Likewise.
12470         (add_method): Likewise.
12471         (add_field): Likewise.
12472         (build_utf8_ref): Likewise.
12473         (build_class_ref): Likewise.
12474         (build_static_field_ref): Likewise.
12475         (finish_class): Likewise.
12476         (push_super_field): Likewise.
12477         (layout_class): Likewise.
12478         (layout_class_methods): Likewise.
12479         (init_class_processing): Likewise.
12480         * constants.c (get_tag_node): Likewise.
12481         (build_constant_data_ref): Likewise.
12482         * decl.c (ggc_p): Remove.
12483         (copy_lang_decl): Use ggc_alloc.
12484         (complete_start_java_method): Don't mess with obstacks.
12485         (start_java_method): Likewise.
12486         (end_java_method): Likewise.
12487         * except.c (link_handler): Use xmalloc.
12488         (free_eh_ranges): New function.
12489         (method_init_exceptions): Use it.
12490         (add_handler): Use xmalloc.
12491         (expand_start_java_handler): Don't mess with obstacks.
12492         (prepare_eh_table_type): Likewise.
12493         (expand_end_java_handler): Likewise.
12494         * expr.c (push_value): Likewise.
12495         (create_label_decl): Likewise.
12496         (build_jni_stub): Likewise.
12497         (java_lang_expand_expr): Likewise.
12498         (note_instructions): Use xrealloc.
12499         (java_push_constant_from_pool): Don't mess with obstacks.
12500         (process_jvm_instruction): Likewise.
12501         * java-tree.h (cyclic_inheritance_report): Remove duplicate
12502         declaration.
12503         * jcf-parse.c (get_constant): Don't mess with obstacks.
12504         (read_class): Likewise.
12505         (jcf_parse): Likewise.
12506         * lex.c (expression_obstack): Remove.
12507         (java_lex): Don't use obstack_free.
12508         * parse.h (exit_java_complete_class): Don't mess with obstacks.
12509         (MANGLE_OUTER_LOCAL_VARIABLE_NAME): Adjust.
12510         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): Likewise.
12511         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STRING): Likewise.
12512         * parse.y (gaol): Add more GC roots.
12513         (add_inner_class_fields): Adjust calls to MANGLE_* macros.
12514         (lookup_field_wrapper): Likewise.
12515         (obtain_incomplete_type): Don't mess with obstacks.
12516         (build_alias_initializer_parameter_list): Adjust calls to MANGLE_*
12517         macros.
12518         (craft_constructor): Don't mess with obstacks.
12519         (safe_layout_class): Likewise.
12520         (java_complete_class): Likewise.
12521         (source_end_java_method): Likewise.
12522         (build_outer_field_access_methods): Likewise.
12523         (build_outer_method_access_method): Likewise.
12524         (maybe_build_thisn_access_method): Likewise.
12525         (build_dot_class_method_invocation): Likewise.
12526         (java_complete_tree): Likewise.
12527         (java_complete_lhs): Likewise.
12528         (do_merge_string_cste): Likewise.
12529         (patch_string_cst): Likewise.
12530         (array_constructor_check_entry): Likewise.
12531         * typeck.c (build_java_array_type): Likewise.
12532         (parse_signature_string): Likewise.
12533         (build_java_signature): Likewise.
12534
12535 2000-10-12  Tom Tromey  <tromey@cygnus.com>
12536
12537         Fix for PR gcj/356:
12538         * gjavah.c (add_class_decl): Don't special-case inner classes.
12539         (add_namelet): Likewise.
12540
12541 2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>
12542
12543         * java-tree.h: Constify current_encoding.
12544         * lang.c: Constify current_encoding.
12545
12546 2000-10-10  Jeff Sturm  <jeff.sturm@appnet.com>
12547
12548         * jvgenmain.c (class_mangling_suffix): Omit `.'.
12549         (main): Use `$' when NO_DOLLAR_IN_LABEL is not set, otherwise `.'.
12550
12551 2000-10-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12552
12553         * expr.c (java_lang_expand_expr): Reinstall 1999-08-14 Anthony's
12554         patch. Fixes gcj/340.
12555
12556 2000-10-10  Tom Tromey  <tromey@cygnus.com>
12557
12558         * lex.c (java_new_lexer): Initialize out_first and out_last
12559         fields.
12560         * lex.h (java_lexer): Added out_buffer, out_first, out_last.
12561
12562 2000-10-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12563
12564         * parse.y (pop_current_osb): New function.
12565         (array_type:): Use `dims:', changed actions
12566         accordingly. Suggested by Anthony Green.
12567         (array_creation_expression:): Used pop_current_osb.
12568         (cast_expression:): Likewise.
12569         (search_applicable_method_list): Fixed indentation.
12570
12571 2000-10-08  Anthony Green  <green@redhat.com>
12572
12573         * parse.y (array_type_literal): Remove production.
12574         (type_literals): Refer to array_type, not array_type_literal.
12575
12576 2000-10-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12577
12578         Patch contributed by Corey Minyard.
12579         * decl.c (check_local_named_variable): New function.
12580         (tree check_local_unnamed_variable): Likewise.
12581         (find_local_variable): Splitted. Call check_local_{un}named_variable.
12582
12583 2000-10-07  Anthony Green  <green@redhat.com>
12584
12585         * class.c (layout_class): Handle case where superclass can't be
12586         layed out yet.
12587
12588 2000-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
12589
12590         * Makefile.in (keyword.h): Refer to GNU FTP site for updated
12591         gperf.
12592
12593 2000-10-05  Tom Tromey  <tromey@cygnus.com>
12594
12595         * jvspec.c (jvgenmain_spec): Added `-fdollars-in-identifiers'.
12596         * jvgenmain.c (class_mangling_prefix): Removed.
12597         (class_mangling_suffix): New global.
12598         (main): Use it.
12599         * gjavah.c (cxx_keyword_subst): Mangle C++ keywords by appending
12600         `$'.
12601         (print_method_info): Handle overrides for static and final
12602         methods.
12603         (process_file): Generate declaration for class object field.
12604         * class.c (cxx_keywords): New array.
12605         (utf8_cmp): New function.
12606         (cxx_keyword_p): New function.
12607         (layout_class_method): Mangle C++ keywords by appending `$'.
12608         (mangle_field): New function.
12609         (mangle_class_field): Use mangle_field.  Mangle class name as
12610         `class$'.
12611         (mangle_static_field): Use mangle_field.
12612
12613 2000-10-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12614
12615         * decl.c (find_local_variable): Removed uncessary type check and
12616         fixed range check typo. From Corey Minyard.
12617
12618 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12619
12620         * decl.c (give_name_to_locals): New local `code_offset'. Call
12621         `maybe_adjust_start_pc'.
12622         * expr.c (note_instructions): New function.
12623         (expand_byte_code): Don't collect insn starts here.
12624         (peek_opcode_at_pc): New function.
12625         (maybe_adjust_start_pc): Likewise.
12626         * java-tree.h (maybe_adjust_start_pc): Declare.
12627         (note_instructions): Likewise.
12628         * jcf-parse.c (parse_class_file): Call `note_instructions'.
12629
12630 2000-09-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12631
12632         * parse.y (field_access:): Fixed indentation.
12633         (qualify_ambiguous_name): Properly qualify `this.a[b].c'.
12634
12635 2000-09-07  Tom Tromey  <tromey@cygnus.com>
12636
12637         Fix for PR gcj/307:
12638         * parse.y (patch_binop): Use JNUMERIC_TYPE_P, not
12639         JPRIMITIVE_TYPE_P, for arithmetic operators.
12640         (patch_method_invocation): Indentation fix.
12641         (try_builtin_assignconv): Handle boolean specially.  Fixed typo.
12642         (valid_builtin_assignconv_identity_widening_p): Handle boolean.
12643         (do_unary_numeric_promotion): Cleaned up code.
12644         (valid_cast_to_p): Handle boolean correctly.
12645
12646 2000-09-27  Tom Tromey  <tromey@cygnus.com>
12647
12648         * lex.c (java_read_unicode): Reset bs_count when finished with
12649         `\u' sequence.
12650
12651 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
12652
12653         Convert to GC.
12654         * Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
12655         * Makefile.in (BACKEND): Don't include ggc-callbacks.o.
12656         (typeck.o): Depend on ggc.h.
12657         * class.c (add_method_1): Use GC functions for allocation.
12658         (init_class_processing): Register roots.
12659         * decl.c (ggc_p): Set to 1.
12660         (pending_local_decls): Make it static.
12661         (push_jvm_slot): Use GC functions for allocation.
12662         (init_decl_processing): Register roots.
12663         (give_name_to_locals): Use GC functions for allocation.
12664         (lang_mark_tree): New function.
12665         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
12666         functions for allocation.
12667         * jcf-parse.c (jcf_parse_source): Use ggc_strdup.
12668         * lex.c (java_lex): Use build_string, rather than replicating it
12669         inline.
12670         * parse.y (goal): Add more roots.
12671         (mark_parser_ctxt): New function.
12672         * typeck.c: Include ggc.h.
12673
12674 2000-09-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12675
12676         * parse.y (maybe_yank_clinit): Also keep <clinit> if its body
12677         contains something else than MODIFY_EXPR.
12678
12679 2000-09-23  Mark Mitchell  <mark@codesourcery.com>
12680
12681         * Make-lang.in (JAVA_SRCS): Include java-tree.h.
12682         * Makefile.in (parse.o): Depend on ggc.h.
12683         (class.o): Likewise.
12684         (constants.o): Likewise.
12685         (decl.o): Likewise.
12686         (expr.o): Likewise.
12687         (jcf-parse.o): Likewise.
12688         (jcf-write.o): Likewise.
12689         (mangle.o): Likewise.
12690         * class.c: Include ggc.h.
12691         (build_static_field_ref): Register GC roots.
12692         (layout_class): Likewise.
12693         (init_class_processing): Likewise.
12694         * constants.c: Include ggc.h.
12695         (current_constant_pool_data_ref): Remove.
12696         (tag_nodes): Move it to ...
12697         (get_tag_node): ... here.  Register GC roots.
12698         * decl.c: Include ggc.h.  Remove many global tree definitions.
12699         (throw_node): Define.
12700         (java_global_trees): Likewise.
12701         (predef_filenames): Make the size a constant.
12702         (init_decl_processing): Adjust accordingly.
12703         (init_decl_processing): Call init_jcf_parse.  Register GC roots.
12704         * expr.c: Include ggc.h.
12705         (init_expr_processing): Register GC roots.
12706         (build_invokeinterface): Likewise.
12707         * java-tree.h: Replace extern tree declarations with macros.
12708         (java_global_trees): New variable.
12709         (java_tree_index): New enumeration.
12710         (init_jcf_parse): Declare.
12711         * jcf-parse.c: Include ggc.h.
12712         (current_class): Remove declaration.
12713         (main_class): Likewise.
12714         (all_class_list): Likewise.
12715         (predefined_filename_p): Adjust for constant size of
12716         predef_filenames.
12717         (init_jcf_parse): New function.
12718         * jcf-write.c: Include ggc.h.
12719         (generate_classfile): Register GC roots.
12720         (append_synthetic_attribute): Likewise.
12721         (append_innerclass_attribute_entry): Likewise.
12722         * lang.c: Include ggc.h.
12723         (lang_print_error): Register GC roots.
12724         * parse.h (struct parser_ctxt): Rename fields to avoid conflicts
12725         with macros.
12726         * parse.y: Include ggc.h.
12727         (wfl_operator): Remove.
12728         (goal): Register GC roots.
12729         (java_pop_parser_context): Adjust for new field names.
12730         (java_parser_context_save_global): Likewse.
12731         (java_parser_context_restore_global): Likewise.
12732         (java_parser_context_suspend): Likewise.
12733         (java_parser_context_resume): Likewise.
12734         (verify_constructor_circularity): Register GC roots.
12735         (lookup_cl): Likewise.
12736         (java_reorder_fields): Likewise.
12737         (build_current_this): Likewise.
12738         (class_in_current_package): Likewise.
12739         (argument_types_convertible): Likewise.
12740         (patch_cast): Rename wfl_op parameter to avoid macro conflicts.
12741
12742 2000-09-14  Tom Tromey  <tromey@cygnus.com>
12743
12744         * lex.h: Use HAVE_ICONV_H, not HAVE_ICONV.
12745
12746 2000-09-13  Tom Tromey  <tromey@cygnus.com>
12747
12748         * jcf-parse.c: Include <locale.h>.
12749         * jv-scan.c: Include <locale.h>.
12750
12751 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12752
12753         * expr.c (pop_type_0): Return `Object' if trying to merge two
12754         interface types.
12755         * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
12756         interface types; `Object' is always a valid supertype.
12757
12758 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12759
12760         Fix for PR gcj/33:
12761         * jv-scan.c (help): Document --encoding.
12762         (options): Added `encoding' entry.
12763         (OPT_ENCODING): New define.
12764         (main): Handle --encoding.
12765         Include <langinfo.h> if nl_langinfo exists.
12766         * lang-options.h: Document --classpath, --CLASSPATH, --main, and
12767         --encoding.
12768         * jcf-parse.c Include <langinfo.h> if we have nl_langinfo.
12769         (parse_source_file): Correctly call java_init_lex.  Added `finput'
12770         argument.  Use nl_langinfo to determine default encoding.
12771         * java-tree.h (current_encoding): Declare.
12772         * parse.y (java_parser_context_restore_global): Don't restore
12773         `finput'.
12774         (java_parser_context_save_global): Don't set `finput' field.
12775         (java_pop_parser_context): Don't restore `finput'.  Free old lexer
12776         if required.
12777         * lang.c (current_encoding): New global.
12778         (lang_decode_option): Recognize `-fencoding='.
12779         (finish_parse): Don't close finput.
12780         * parse.h (struct parser_ctxt): Removed `finput' and
12781         `unget_utf8_value' fields.  Added `lexer' field.
12782         (java_init_lex): Fixed declaration.
12783         * lex.c (java_new_lexer): New function.
12784         (java_destroy_lexer): Likewise.
12785         (java_read_char): Added `lex' argument.  Handle iconv case.
12786         (java_read_unicode): Added `lex' argument.  Count backslashes in
12787         lexer structure.
12788         (java_init_lex): Added `finput' and `encoding' arguments.  Set
12789         `lexer' field in ctxp.
12790         (BAD_UTF8_VALUE): Removed.
12791         (java_lex): Handle seeing UEOF in the middle of a string literal.
12792         * lex.h: Include <iconv.h> if HAVE_ICONV defined.
12793         (java_lexer): New structure.
12794         (UNGETC): Removed.
12795         (GETC): Removed.
12796         (DEFAULT_ENCODING): New define.
12797         (java_destroy_lexer): Declare.
12798
12799 2000-09-12  Tom Tromey  <tromey@cygnus.com>
12800
12801         Fix for PR gcj/343:
12802         * lex.c (java_init_lex): Initialize java_io_serializable.
12803         * parse.y (java_io_serializable): New global.
12804         (valid_ref_assignconv_cast_p): An array can be cast to
12805         serializable.
12806
12807 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
12808
12809         * decl.c, expr.c: Include defaults.h if not already included.
12810         Don't define the *_TYPE_SIZE macros.
12811
12812 2000-09-09  Geoffrey Keating  <geoffk@cygnus.com>
12813
12814         * typeck.c (build_java_array_type): Correct first parameter
12815         in ADJUST_FIELD_ALIGN invocation.
12816
12817 2000-09-06  Tom Tromey  <tromey@cygnus.com>
12818
12819         * lang-specs.h: Also recognize `-femit-class-files'.
12820
12821 2000-09-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12822
12823         * verify.c (merge_types): Load the types to merge if necessary.
12824
12825 2000-09-02  Anthony Green  <green@redhat.com>
12826
12827         * jcf-io.c: Include zlib.h.
12828         (open_in_zip): Read compressed class file archives.
12829         * zipfile.h (ZipDirectory): Add uncompressed_size and
12830         compression_method fields.
12831         * zextract.c (read_zip_archive): Collect file compression info.
12832
12833 2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>
12834
12835         * parse.y (do_resolve_class): Also explore superclasses of
12836         intermediate enclosing contexts when searching for inner classes.
12837
12838 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12839
12840         * parse.y (variable_declarator_id:): Better error message.
12841         (expression_statement:): Use YYNOT_TWICE.
12842         (cast_expression:): Likewise.
12843         (assignment:): Likewise.
12844
12845 2000-08-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12846
12847         * parse.y (do_merge_string_cste): New locals. Create new
12848         STRING_CSTs each time, use memcpy. Fixes gcj/311.
12849
12850 2000-08-07  Hans Boehm  <boehm@acm.org>
12851
12852         * boehm.c (mark_reference_fields): Set marking bits for all words in
12853         a multiple-word record.
12854         (get_boehm_type_descriptor): Use the procedure marking descriptor for
12855         java.lang.Class.
12856
12857 2000-08-31  Mike Stump  <mrs@wrs.com>
12858
12859         * Make-lang.in (jc1$(exeext), gcjh$(exeext), jv-scan$(exeext),
12860         jcf-dump$(exeext)): Make parallel safe.
12861
12862 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
12863
12864         * jcf-parse.c (set_source_filename): Constify a char *.
12865         * jcf-write.c (append_innerclasses_attribute,
12866         make_class_file_name): Constify a char *.  Don't recycle a
12867         variable for an unrelated purpose.
12868         * parse.y: (build_alias_initializer_parameter_list): Constify a char *.
12869         (breakdown_qualified): Do not modify IDENTIFIER_POINTER strings.
12870
12871 2000-08-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12872
12873         * expr.c (can_widen_reference_to): Fixed indentation.
12874         * java-tree.h (CLASS_METHOD_CHECKED_P): Added leading comment.
12875         * parse.y: `finit$' replaces `$finit$' in comments.
12876         (try_builtin_assignconv): Fixed leading comment.
12877
12878 2000-08-25  Greg McGary  <greg@mcgary.org>
12879
12880         * gjavah.c (cxx_keyword_subst): Use ARRAY_SIZE.
12881
12882 2000-08-24  Greg McGary  <greg@mcgary.org>
12883
12884         * lang.c (lang_decode_option): Use ARRAY_SIZE.
12885         * parse.y (BINOP_LOOKUP): Likewise.
12886
12887 2000-08-22  Andrew Haley  <aph@cygnus.com>
12888
12889         * javaop.h (WORD_TO_INT): Mask lower 32 bits of a jword before
12890         sign extending. Fixes gcj/321.
12891         * jcf-parse.c (get_constant): Mask lower 32 bits of a jint before
12892         combining to make a jlong. Fixes gcj/321.
12893
12894 2000-08-21  Nix  <nix@esperi.demon.co.uk>
12895
12896         * lang-specs.h: Do not process -o or run the assembler if
12897         -fsyntax-only.
12898
12899 2000-08-16  Andrew Haley  <aph@cygnus.com>
12900
12901         * typeck.c (build_java_array_type): Rewrite code to do array
12902         alignment.  Take into account back-end macros when aligning array
12903         data.  Remove setting of TYPE_USER_ALIGN; Java doesn't allow the
12904         user to set alignment. Fixes gcj/252 and 160.
12905
12906 2000-08-09  Tom Tromey  <tromey@cygnus.com>
12907
12908         * parse.y (check_abstract_method_definitions): Now return `int'.
12909         Check implemented interfaces.  Fixes PR gcj/305.
12910
12911         * parse.y (patch_switch_statement): Disallow `long' in switch
12912         expressions.  Fixes PR gcj/310.
12913
12914 2000-08-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12915
12916         * decl.c (finit_leg_identifier_node): New global.
12917         (init_decl_processing): Use `finit$' to initialize
12918         finit_identifier_node. Use `$finit$' to initialize
12919         finit_leg_identifier_node.
12920         * expr.c (expand_java_field_op): Use ID_FINIT_P.
12921         * java-tree.h (finit_identifier_node): Changed attached comment.
12922         (finit_leg_identifier_node): New declaration.
12923         (ID_FINIT_P): Take finit_identifier_node and
12924         finit_leg_identifier_node into account. This is a backward
12925         compatibility hack.
12926
12927 2000-08-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12928
12929         * jcf-write.c (generate_bytecode_conditional): Re-installed lost
12930         Jan 6 2000 patch.
12931         (generate_bytecode_insns): Check `nargs' before emitting it.
12932         * verify.c (merge_type_state): Fixed typo.
12933         * ChangeLog: Fixed typo in some jcf-write.c entries mentioning
12934         generate_bytecode_{conditional,insns}.
12935
12936 2000-08-13  Anthony Green  <green@redhat.com>
12937
12938         * check-init.c (check_init): Add case for BIT_FIELD_REF (required
12939         for -pg builds).
12940
12941 2000-08-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12942
12943         * class.c (maybe_layout_super_class): Fixed indentation.
12944         * java-tree.h (CLASS_METHOD_CHECKED_P): New macro.
12945         (java_check_methods): New function declaration.
12946         * jcf-parse.c (get_constant): Let `char_len' go up to 3. Use `str'
12947         instead of `str_ptr'.
12948         * jcf-write.c (generate_bytecode_insns): Emit number the of args
12949         of a `invokeinterface' at the right time.
12950         * parse.h (WFL_STRIP_BRACKET): New macro.
12951         (SET_TYPE_FOR_RESOLUTION): Use it.
12952         * parse.y (build_unresolved_array_type): Reuse `type_or_wfl'.
12953         (check_class_interface_creation): Don't check for cross package
12954         innerclass name clashes.
12955         (method_header): Behave properly if MDECL is `error_mark_node'.
12956         (method_declarator): Return `error_mark_node' if bogus current
12957         class.
12958         (resolve_class): Apply WFL_STRIP_BRACKET on `cl' if necessary.
12959         (resolve_and_layout): New local `decl_type', set and used. Call
12960         java_check_methods.
12961         (java_check_methods): New method.
12962         (java_layout_classes): Use it.
12963         (resolve_qualified_expression_name): No EH check necessary in
12964         access$<n>.
12965         (java_complete_lhs): Use VAR_DECL's DECL_INITIAL when evaluating
12966         `case' statement.
12967         (patch_assignment): Set DECL_INITIAL on integral final local.
12968
12969 2000-08-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12970
12971         * java-tree.h (flag_extraneous_semicolon): New extern.
12972         * lang-options.h: (-Wextraneous-semicolon): New option.
12973         * lang.c (flag_redundant): Fixed typo in leading comment.
12974         (flag_extraneous_semicolon): New global.
12975         (lang_decode_option): Set `flag_extraneous_semicolon' when
12976         -Wall. Decode `-Wextraneous-semicolon'.
12977         * parse.y (type_declaration:): Removed `SC_TK' hack, added
12978         `empty_statement' rule.
12979         (class_body_declaration): Likewise.
12980         (method_body:): Accept `;' as a method body.
12981         (static_initializer:): Removed `SC_TK' hack.
12982         (constructor_block_end:): Likewise.
12983         (empty_statement:): Report deprecated empty declaration. Fixes
12984         gcj/295
12985
12986 2000-08-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
12987
12988         * parse.y (build_dot_class_method_invocation): Changed parameter
12989         name to `type'. Build signature from `type' and convert it to a
12990         STRING_CST if it's an array.
12991         (patch_incomplete_class_ref): `build_dot_class_method_invocation'
12992         to use `ref_type' directly.
12993
12994 2000-08-06  Ovidiu Predescu  <ovidiu@cup.hp.com>
12995
12996         * lang-options.h: Added a comma after the last element to avoid
12997         syntax errors when other languages define additional options.
12998
12999 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
13000
13001         * Make-lang.in (jc1, jv-scan): Depend on $(BACKEND), not stamp-objlist.
13002         * Makefile.in: Add BACKEND; delete OBJS, OBJDEPS.
13003         (jc1): Link with $(BACKEND).
13004         (jv-scan): Depend on version.o, not all of $(OBJS) or $(BACKEND).
13005
13006 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
13007
13008         * jvspec.c: Adjust type of second argument to
13009         lang_specific_driver, and update code as necessary.
13010
13011         * class.c (build_dtable_decl): Initialize dummy.
13012
13013 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13014
13015         * parse.y (maybe_yank_clinit): When generating bytecode: non empty
13016         method bodies not to rule out discarding `<clinit>'; don't use
13017         <clinit> to initialize static fields with constant initializers.
13018
13019 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13020
13021         * gjavah.c (print_method_info): Added `synth' parameter. Skip
13022         synthetic methods.
13023         (method_synthetic): New global.
13024         (HANDLE_METHOD): Recognize synthetic method and tell
13025         `print_method_info' about it.
13026         (HANDLE_END_METHOD): Do not issue an additional `;\n' if we're
13027         processing a synthetic method.
13028         * jcf-reader.c (skip_attribute): New function.
13029         ( skip_attribute): Likewise.
13030
13031 2000-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13032
13033         * parse.y (build_outer_field_access): Fixed comments.
13034         (fix_constructors): Emit the initialization of this$<n> before
13035         calling $finit$.
13036         (resolve_qualified_expression_name): Build an access to `decl' if
13037         necessary.
13038
13039 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13040
13041         * parse-scan.y (curent_class): Non longer const.
13042         (inner_qualifier, inner_qualifier_length): Deleted.
13043         (current_class_length): New global.
13044         (bracket_count): Fixed typo in leading comment.
13045         (anonymous_count): New global.
13046         (class_instance_creation_expression:): Handle anonymous classes.
13047         (anonymous_class_creation:): New rule.
13048         (push_class_context): Rewritten.
13049         (pop_class_context): Likewise.
13050         (INNER_QUALIFIER): Macro deleted.
13051         (report_class_declaration): call `push_class_context' when
13052         entering the function. `fprintf' format modified not to use
13053         INNER_QUALIFIER.
13054         (report_class_declaration): Assign `package_name' and
13055         `current_class' to NULL separately.
13056
13057 2000-07-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13058
13059         * expr.c (build_invokeinterface): Call layout_class_methods on
13060         target interface.
13061
13062 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13063             Anthony Green  <green@cygnus.com>
13064             Alexandre Petit-Bianco  <apbianco@cygnus.com>
13065
13066         * class.c (make_class_data): Create vtable for abstract classes.
13067         (get_dispatch_table): Changed to cope with abstract classes.
13068
13069 2000-07-27  Tom Tromey  <tromey@cygnus.com>
13070
13071         * parse.y (patch_method_invocation): Don't reverse the argument
13072         list when dealing with anonymous class constructors. Fixed typo in
13073         comment.
13074
13075 2000-07-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13076
13077         * parse.y (build_alias_initializer_parameter_list): Reverse
13078         crafted list when building aliases for anonymous class
13079         constructors.
13080
13081 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13082
13083         * parse.y (jdep_resolve_class): Don't bother checking potential
13084         innerclass access if `decl' is NULL.
13085         (find_in_imports_on_demand): TREE_PURPOSE of `import' contains the
13086         WFL.
13087
13088 2000-07-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13089
13090         * parse.c: Remove (again.)
13091
13092 2000-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13093
13094         * parse.y (find_as_inner_class): Removed 2000-07-19 patches.
13095         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Local `decl' moved
13096         outside the `if' statement, alias to innerclass removed, `decl'
13097         used to mark the class complete.
13098
13099 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13100
13101         * parse.y (simple_name:): Fixed typo in error message.
13102
13103 2000-07-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13104
13105         * parse.y (java_complete_lhs): LOOP_EXPR:, SWITCH_EXPR: the node
13106         or its first operand can be error marks.
13107
13108 2000-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13109
13110         * parse.h (SET_TYPE_FOR_RESOLUTION): Use GET_CPC.
13111         * parse.y (method_header): Likewise.
13112
13113 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13114
13115         * parse.y (process_imports): Consider that one might be trying to
13116         import an innerclass. Fixes gcj/254
13117
13118 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13119
13120         * parse.y (find_as_inner_class): Handle the case where the
13121         enclosing context of an innerclass has been loaded as bytecode.
13122
13123 2000-07-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13124
13125         * parse.y (simple_name:): Reject `$' in type names.
13126         (resolve_type_during_patch): Use `type' as a second
13127         argument to resolve_no_layout. Fixes gcj/257.
13128
13129 2000-07-18  Bryce McKinlay  <bryce@albatross.co.nz>
13130
13131         * parse.y (find_most_specific_methods_list): Select the only
13132         non-abstract method even if max has been set.
13133         Fixes gcj/285, gcj/298.
13134
13135 2000-07-18  Jeff Sturm  <jeff.sturm@appnet.com>
13136
13137         * lang-specs.h: Added %(jc1) to java compiler options.
13138
13139 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
13140
13141         * .cvsignore: New file.
13142
13143 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13144
13145         * parse.y (not_accessible_p): Access granted to innerclasses
13146         (indirectly) extending the reference type. Fixes gcj/249.
13147
13148 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13149
13150         * parse.y (patch_method_invocation): Fixed comment.
13151         (maybe_use_access_method): Build this$<n>s to the context of the
13152         target method, or a type that extends it. Fixes gcj/242.
13153
13154 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
13155
13156         * parse.c: Remove.
13157
13158 2000-07-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13159
13160         * parse.y (fold_constant_for_init): Avoid bullish conversion.
13161
13162 2000-07-13  Tom Tromey  <tromey@cygnus.com>
13163
13164         * lang-specs.h: Added %{I*}.
13165
13166 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
13167
13168         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
13169
13170 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
13171
13172         * parse-scan.c: Remove.
13173
13174 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13175
13176         * class.c (set_super_info): Handled protected inner classes.
13177         (common_enclosing_context_p): Bail early if arguments aren't both
13178         inner classes.
13179         (get_access_flags_from_decl): Handle private and protected inner
13180         classes.
13181         * java-tree.h (TYPE_PROTECTED_INNER_CLASS): New macro.
13182         (CLASS_PROTECTED): Likewise.
13183         (struct lang_type): New bitfield `poic'.
13184         * parse.y (jdep_resolve_class): Call check_inner_class_access on
13185         inner classes only.
13186         (check_inner_class_access): Renamed arguments, added
13187         comments. Handles protected inner classes (fixes gcj/225)
13188         (not_accessible_p): Fixed comments. Avoid handling inner classes.
13189
13190 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13191
13192         * parse.y (resolve_qualified_expression_name): Verify qualified
13193         access to `this'. Fixes gcj/239.
13194
13195 2000-07-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13196
13197         * jcf-write.c (generate_classfile): Don't install ConstantValue
13198         for null pointers.
13199
13200 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13201
13202         * parse.y (resolve_qualified_expression_name): Handle inner class
13203         access. Fixes gcj/256.
13204
13205 2000-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13206
13207         * jcf-write.c (generate_classfile): Properly install the
13208         ConstantValue attribute and the initial value constant pool index
13209         on string constants.
13210         * parse.y (java_complete_lhs): Keep DECL_INITIAL when emitting
13211         class files.
13212
13213 2000-07-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13214
13215         * parse.h (BUILD_PTR_FROM_NAME): Surround with a do/while
13216         construct.
13217         * parse.y (find_as_inner_class): Fixed typo.
13218         (do_resolve_class): Explore enclosing contexts when searching for
13219         innerclasses. Removed curly brackets around BUILD_PTR_FROM_NAME.
13220         (check_inner_class_access): Check `decl' which can be null in case
13221         of previous errors.
13222
13223 2000-07-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13224
13225         * java-tree.h (java_debug_context): Declared `extern'.
13226         (safe_layout_class): Likewise.
13227         * parse.y (resolve_field_access): Field must be `static' in order
13228         to be replaced by its initial value. Added comments.
13229         (find_applicable_accessible_methods_list): Fixed typo.
13230         (find_most_specific_methods_list): Methods found in innerclasses
13231         take over methods founds in the enclosing contexts.
13232         (java_complete_tree): Loosen restrictions on the type of DECLs
13233         that can be replaced by their initialization values.
13234         (valid_ref_assignconv_cast_p): Removed call to `enclosing_context_p'.
13235
13236 2000-07-05  Tom Tromey  <tromey@cygnus.com>
13237
13238         * Make-lang.in (PARSE_DIR): New macro.
13239         (PARSE_RELDIR): Likewise.
13240         (PARSE_C): Likewise.
13241         (PARSE_SCAN_C): Likewise.
13242         ($(PARSE_C)): New target.
13243         ($(PARSE_SCAN_C)): Likewise.
13244         (SET_BISON): New macro.
13245         (BISONFLAGS): Likewise.
13246         (JAVABISONFLAGS): Likewise.
13247
13248 2000-07-02  Bryce McKinlay  <bryce@albatross.co.nz>
13249
13250         * gjavah.c (HANDLE_METHOD): Call print_method_info with a NULL stream
13251         argument on the first pass for CNI as well as JNI.
13252         (print_method_info): Set up method name on the first pass only.
13253
13254 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13255
13256         * parse.y (parser_qualified_classname): Removed parameter
13257         `is_static'.
13258         (create_interface): Removed first passed parameter to
13259         parser_qualified_classname.
13260         (create_class): Likewise. Don't install alias on static
13261         innerclasses. Fixes gcj/275.
13262
13263 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13264
13265         * parse.y (maybe_generate_pre_expand_clinit): Don't build a
13266         debugable statement with empty_stmt_node. Fixes gcj/272
13267
13268 2000-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13269
13270         * expr.c (build_instanceof): Layout type after it's loaded. Fixes
13271         gcj/271.
13272
13273 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13274
13275         * jcf-write.c (push_long_const): Appropriately cast short negative
13276         constant to jword.
13277
13278 2000-06-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13279
13280         * parse.y (verify_constructor_super): Use loop variable
13281         `m_arg_type' initialized with `mdecl_arg_type'.
13282
13283 2000-06-29  Tom Tromey  <tromey@cygnus.com>
13284
13285         * parse.y (resolve_field_access): Handle case where `type_found'
13286         is NULL.
13287
13288 2000-06-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13289
13290         * expr.c (lookup_field): The same field can be found through two
13291         different interface. Don't declare it ambiguous in that case.
13292
13293 2000-06-27  Tom Tromey  <tromey@cygnus.com>
13294
13295         * lex.c (java_lineterminator): Don't recognize \r after \n.  If \r
13296         follows \r, then unget it at a lower level.
13297
13298 2000-06-26  Tom Tromey  <tromey@cygnus.com>
13299
13300         * parse.y (resolve_field_access): Pass decl, not DECL_INITIAL, to
13301         java_complete_tree.
13302
13303 2000-06-25  Tom Tromey  <tromey@cygnus.com>
13304
13305         * parse.y (for_statement): Wrap expression in a WFL if it is a
13306         constant.  For PR gcj/268.
13307
13308 2000-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13309
13310         * parse.y (do_resolve_class): Minor optimiztion in the package
13311         list search. Removed unnecessary test and return statement.
13312         (valid_ref_assignconv_cast_p): Order of arguments to
13313         enclosing_context_p fixed.
13314
13315 2000-06-24  Tom Tromey  <tromey@cygnus.com>
13316
13317         * expr.c (lookup_field): Print error and return error_mark_node if
13318         field reference is ambiguous.
13319
13320         * parse.y (check_abstract_method_definitions): Also check if
13321         `other_method' is abstract.
13322
13323 2000-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13324
13325         * class.c (set_super_info): Handle ACC_PRIVATE for (inner)
13326         classes.
13327         * java-tree.h (TYPE_PRIVATE_INNER_CLASS): New macro.
13328         (struct lang_type): New field `pic'.
13329         (CLASS_PRIVATE): New macro.
13330         * parse.y (check_inner_class_access): New function.
13331         (jdep_resolve_class): Call it.
13332
13333 2000-06-23  Tom Tromey  <tromey@cygnus.com>
13334
13335         * parse.y (patch_incomplete_class_ref): Initialize the returned
13336         class.  For PR gcj/260.
13337
13338 2000-06-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13339
13340         * except.c (prepare_eh_table_type): Use `CATCH_ALL_TYPE'.
13341
13342 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13343
13344         * check-init.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13345         Java specific checks.
13346         * expr.c (build_instanceof): CLASS_INTERFACE and CLASS_FINAL usage
13347         screened by DECL_P.
13348         * java-tree.def (CASE_EXPR): Marked 'e'.
13349         (DEFAULT_EXPR): Likewise.
13350         * jcf-parse.c (set_source_filename): CLASS_COMPLETE_P usage
13351         screened by DECL_P.
13352         * jcf-write.c (ENABLE_JC1_CHECKING): Replaces ENABLE_CHECKING for
13353         Java specific checks.
13354         (generate_bytecode_insns): Test try_block for BLOCK before using
13355         BLOCK_EXPR_BODY.
13356         * parse.y (build_wfl_wrap): Added `location' argument. Set
13357         EXPR_WFL_LINECOL accordingly.
13358         (dim_expr:): Wrap constants with WFLs.
13359         (method_declarator): Use TREE_TYPE not TYPE_NAME on GET_CPC.
13360         (resolve_package): Check for `stmt' not being a BLOCK before
13361         building a debuggable statement with it.
13362         (make_qualified_primary): Added extra parameter to build_wfl_wrap
13363         invocation.
13364         (resolve_field_access): Make sure `decl' is a DECL before treating
13365         it as such.
13366         (maybe_build_primttype_type_ref): Make sure `wfl''s node is an
13367         IDENTIFIER_NODE before treating it as such.
13368         (patch_new_array_init): Make sure `elt' is a TREE_LIST before
13369         treating it as such.
13370         (find_applicable_accessible_methods_list): CLASS_INTERFACE macro
13371         to be applied only on non array types.
13372
13373 2000-06-16  Per Bothner  <per@bothner.com>
13374
13375         * java-tree.h (LABEL_RETURN_LABELS, LABEL_PENDING_CHAIN):  Don't
13376         define in terms of DECL_RESULT, as that fails when --enable-checking.
13377
13378 2000-06-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13379
13380         * jcf-write.c (CHECK_PUT): Add static prototype.  Make pointer
13381         types the same in comparison.
13382         (CHECK_OP): Add static prototype.
13383
13384 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
13385
13386         * typeck.c (build_java_array_type): Set TYPE_USER_ALIGN.
13387         * parse.y (java_complete_class): Set DECL_USER_ALIGN.
13388         * parse.c: Rebuilt.
13389
13390 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13391
13392         * decl.c (create_primitive_vtable): Prototype.
13393
13394         * jcf-write.c (generate_bytecode_insns): Initialize variable
13395         `saved_context'.
13396
13397         * lang.c (lang_get_alias_set): Mark parameter with ATTRIBUTE_UNUSED.
13398
13399 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13400
13401         * parse.y (find_applicable_accessible_methods_list): Use a hashtable
13402         to track searched classes, and do not search the same class more than
13403         once. Call find_applicable_accessible_methods_list on immediate
13404         superclass, instead of search_applicable_method_list on all ancestors.
13405         Fix for PR gcj/238.
13406
13407 2000-06-09  Bryce McKinlay  <bryce@albatross.co.nz>
13408
13409         * parse.y (register_fields): Permit static fields in inner classes
13410         if they are final. Fix for PR gcj/255.
13411
13412 2000-06-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13413
13414         * parse.h (REGISTER_IMPORT): Use `chainon' to link new entries.
13415         * parse.y (find_in_imports): Returned type changed to void,
13416         leading comment fixed.
13417         (register_package): New function.
13418         (qualify_and_find): Likewise.
13419         (package_declaration:): Use `register_package'.
13420         (single_type_import_declaration:): Removed local variable
13421         `node'. Added missing `;' for consistency.
13422         (type_import_on_demand_declaration:): Use `chainon' to link new
13423         entries.
13424         (lookup_field_wrapper): Lookup local variables defined in outer
13425         contexts first.
13426         (java_complete_class): Don't reverse the list of imported on demand.
13427         (do_resolve_class): Reorganized. Removed local variable
13428         `original_name'. Call `qualify_and_find' with the current package
13429         name, invoke `find_in_imports_on_demand' right after. Call
13430         `qualify_and_find' with the packages we've seen so far. Fixed
13431         operations numbering in comments.
13432         (java_expand_class): Don't reverse `package_list'.
13433         (find_most_specific_methods_list): New local variables `abstract'
13434         and `candidates'. Use them to pick the right method.
13435
13436 2000-06-06  Tom Tromey  <tromey@ferrule.cygnus.com>
13437
13438         * parse.y (check_modifiers_consistency): Don't subtract out
13439         `PUBLIC_TK' from argument to THIS_MODIFIER_ONLY.
13440
13441 2000-06-04  Philipp Thomas  <pthomas@suse.de>
13442
13443         * Makefile.in (INTLLIBS): New.
13444         (LIBS): Add above.
13445         (DEPLIBS): Ditto.
13446
13447 2000-06-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13448
13449         * class.c (get_dispatch_table): Build the vtable dummy entry list
13450         element with a null purpose. Fixed leading comment.
13451         (build_dtable_decl): Build an accurate dtable type when appropriate
13452         and use it.
13453
13454 2000-06-02  Richard Henderson  <rth@cygnus.com>
13455
13456         * lang.c (lang_get_alias_set): New.
13457
13458 2000-05-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13459
13460         * parse.y (resolve_field_access): Complete the DECL_INITIAL tree
13461         before using it as the accessed field.
13462
13463 2000-05-31  Tom Tromey  <tromey@cygnus.com>
13464
13465         * java-tree.h (boolean_array_vtable, byte_array_vtable,
13466         char_array_vtable, short_array_vtable, int_array_vtable,
13467         long_array_vtable, float_array_vtable, double_array_vtable):
13468         Declare.
13469         * expr.c (get_primitive_array_vtable): New function.
13470         (create_primitive_vtable): New function.
13471         (java_lang_expand_expr): Enable code to statically generate
13472         arrays.
13473         * decl.c (init_decl_processing): Create primitive vtables.
13474         (boolean_array_vtable, byte_array_vtable, char_array_vtable,
13475         short_array_vtable, int_array_vtable, long_array_vtable,
13476         float_array_vtable, double_array_vtable): Define.
13477
13478 2000-05-26  Zack Weinberg  <zack@wolery.cumb.org>
13479
13480         * java/parse.y (find_applicable_accessible_methods_list):
13481         Don't add an uninitialized value to the list.
13482
13483 2000-05-25  Tom Tromey  <tromey@cygnus.com>
13484
13485         * parse.y (resolve_field_access): Don't check DECL_LANG_SPECIFIC
13486         when trying to see if field's class should be initialized.  Always
13487         initialize field's declaring class, not qualified class.
13488         For PR gcj/162.
13489
13490         * parse.y (array_constructor_check_entry): Pass `wfl_value', not
13491         `wfl_operator', to maybe_build_primttype_type_ref.
13492         Fixes PR gcj/235.
13493
13494 2000-05-23  Bryce McKinlay  <bryce@albatross.co.nz>
13495
13496         * parse.y (patch_method_invocation): Don't try to lookup methods
13497         in primitive types.
13498
13499 2000-05-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13500
13501         * parse.y (resolve_field_access): Call the appropriate <clinit>
13502         before accessing the length of a static array. Craft a decl for
13503         the field while its time. Fixes PR gcj/129.
13504
13505 2000-05-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13506
13507         * parse.y (resolve_package): Correctly set `*next' (was off by
13508         one.)
13509         (resolve_qualified_expression_name): Fixed comment.
13510
13511 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13512
13513         * jcf-parse.c (jcf_parse_source): Reset current_class and
13514         current_function_decl to NULL before parsing a new file.
13515
13516 2000-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13517
13518         * parse.y (block_end:): If the collected block doesn't feature a
13519         statement, insert an empty statement.
13520
13521 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13522
13523         * parse.y (maybe_yank_clinit): New function.
13524         (maybe_generate_pre_expand_clinit): Always link <clinit> at the
13525         end of the list of methods belonging to a class.
13526         (java_complete_expand_method): Check whether <clinit> is really
13527         necessary and expand it accordingly.
13528
13529 2000-04-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13530
13531         * parse.y (fold_constant_for_init): Let VAR_DECL and FIELD_DECL be
13532         processed by the method's switch statement.
13533
13534 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13535
13536         * java-tree.h: Added init state enum.
13537         * decl.c (emit_init_test_initialization): Initialize class
13538         initialization check variable by looking at class' state.
13539
13540 2000-05-19  Tom Tromey  <tromey@cygnus.com>
13541
13542         * java-tree.h (build_instanceof): Declare.
13543         (build_get_class): Declare.
13544         * parse.y (patch_binop): Use build_instanceof.
13545         * expr.c (build_instanceof): New function.  If class is final,
13546         don't make a function call.
13547         (expand_java_INSTANCEOF): Use it.
13548         (build_get_class): New function.
13549
13550 2000-05-18  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
13551
13552         * jcf-write.c (generate_classfile): Scan the source_file for
13553         slashes with the right pointer variable.
13554
13555 2000-05-17  Andrew Cagney  <cagney@b1.cygnus.com>
13556
13557         * lang.c (lang_decode_option): Update -Wunused flags by calling
13558         set_Wunused.
13559         * decl.c (poplevel): Replace warn_unused with warn_unused_label.
13560
13561 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
13562
13563         * check_init.c (check_init): Constify local char *.
13564         * class.c (push_class): Constify local char *.
13565         * java_tree.h: Update prototypes.
13566         * jcf-io.c (open_class): Constify filename parameter and
13567         return value.
13568         (find_class): Remove redundant string copy.  Cast return from
13569         open_class.
13570         * jcf-parse.c (read_class, parse_class_file, yyparse):
13571         Constify local char *.
13572         * jcf-write.c (generate_bytecode_insns, generate_classfile):
13573         Constify local char *.
13574         * jcf.h (JCF): Constify filename and classname.
13575         (JCF_FINISH): Cast args to FREE to char * when appropriate.
13576         * lang.c (init_parse): Constify parameter and return value.
13577         * lex.c (java_get_line_col): Constify filename parameter.
13578         * parse.h: Constify parser_ctxt.filename.  Update prototypes.
13579         * parse.y (java_parser_context_suspend,
13580         issue_warning_error_from_context, safe_layout_class): Constify
13581         local char *.
13582         * parse.c: Regenerate.
13583
13584 2000-05-08  Tom Tromey  <tromey@cygnus.com>
13585
13586         * expr.c (build_jni_stub): Cache the result of
13587         _Jv_LookupJNIMethod.
13588
13589 2000-05-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13590
13591         * decl.c (predef_filenames_size): Now 7.
13592         (predef_filenames): New seventh entry.
13593
13594 2000-05-04  Tom Tromey  <tromey@cygnus.com>
13595
13596         * boehm.c (mark_reference_fields): Don't mark RawData fields.
13597         Keep track of when we've seen a reference field after a
13598         non-reference field.
13599         (get_boehm_type_descriptor): Handle case where we see
13600         non-reference fields but no trailing reference field.
13601         * decl.c (rawdata_ptr_type_node): Define.
13602         (init_decl_processing): Initialize rawdata_ptr_type_node.
13603         * java-tree.h (rawdata_ptr_type_node): Declare.
13604
13605 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13606
13607         * jcf-dump.c (SPECIAL_IINC): Ensure arguments match format
13608         specifiers in calls to fprintf.
13609
13610 2000-05-03  Andrew Haley  <aph@cygnus.com>
13611
13612         * expr.c (build_java_jsr): Use emit_jump, not expand_goto.
13613
13614         * javaop.h (WORD_TO_INT): New function.
13615         (IMMEDIATE_s4): Use WORD_TO_INT.
13616         * jcf.h (JPOOL_INT): Ditto.
13617
13618         * gjavah.c (decode_signature_piece): Don't treat `$' as namespace
13619         separator.
13620
13621 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13622
13623         * class.c (add_method_1): Set both DECL_EXTERNAL and METHOD_NATIVE
13624         on native function.
13625         * jcf-parse.c (parse_class_file): Call build_jni_stub for native
13626         JNI methods.
13627         * expr.c (build_jni_stub): New function.
13628         * lang-specs.h: -fjni and -femit-class-file are incompatible.
13629         * parse.c: Rebuilt.
13630         * parse.y (java_complete_expand_methods): Expand a native method
13631         and call build_jni_stub if -fjni given.
13632         * lang-options.h: Document -fjni.
13633         * lang.c (flag_jni): New global.
13634         (lang_f_options): Added `jni' entry.
13635         * java-tree.h (soft_lookupjnimethod_node,
13636         soft_getjnienvnewframe_node, soft_jnipopsystemframe_node):
13637         Declare.
13638         (flag_jni): Declare.
13639         (build_jni_stub): Declare.
13640         (struct lang_decl): Added `native' flag.
13641         (METHOD_NATIVE): Redefined to use `native' field of lang specific
13642         structure.
13643         * decl.c (soft_lookupjnimethod_node, soft_getjnienvnewframe_node,
13644         soft_jnipopsystemframe_node): New globals.
13645         (init_decl_processing): Set them.  _Jv_InitClass only takes one
13646         argument.
13647
13648         * java-tree.def: Put into `C' mode.
13649
13650 2000-04-27  Tom Tromey  <tromey@cygnus.com>
13651
13652         Fix for PR gcj/2:
13653         * expr.c (expand_invoke): Generate check to see if object pointer
13654         is null in nonvirtual invocation case.
13655         * java-tree.h (soft_nullpointer_node): Declare.
13656         * decl.c (soft_nullpointer_node): New global.
13657         (init_decl_processing): Initialize soft_nullpointer_node.
13658         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13659         or `private' methods.
13660         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13661
13662 2000-04-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13663
13664         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
13665         from <clinit>
13666
13667 2000-04-26  Tom Tromey  <tromey@cygnus.com>
13668
13669         * zextract.c (find_zip_file_start): New function.
13670         (read_zip_archive): Use it.
13671
13672 2000-04-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13673
13674         * parse.y (register_incomplete_type): Handle JDEP_ANONYMOUS.
13675
13676 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13677
13678         * class.c (common_enclosing_context_p): New function.
13679         * java-tree.h (common_enclosing_context_p): Added prototype.
13680         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Relaxed test to allow
13681         classes sharing an outer context with the current instance.
13682         * parse.y (build_access_to_thisn): Fixed leading comment.
13683         (verify_constructor_super): New local `supper_inner'. Skip
13684         enclosing context argument in the case of inner class constructors.
13685         (patch_method_invocation): Insert proper context as second
13686         parameter to pure inner class constructor super invocations.
13687
13688 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13689
13690         * parse.y (end_class_declaration): Reset the interface number
13691         counter.
13692
13693 2000-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13694
13695         * parse.y (source_start_java_method): Deleted unnecessary code.
13696         (patch_method_invocation): Fixed comment.
13697
13698 2000-04-24  Robert Lipe <robertlipe@usa.net>
13699
13700         * parse.h (_jdep): Member `kind' now ENUM_BITFIELD.
13701
13702 2000-04-23  Tom Tromey  <tromey@cygnus.com>
13703
13704         * boehm.c (mark_reference_fields): Use int_byte_position.
13705
13706 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13707
13708         * boehm.c (mark_reference_fields): Only call byte_position on
13709         non-static fields.
13710
13711 2000-04-22  Tom Tromey  <tromey@cygnus.com>
13712
13713         * boehm.c (mark_reference_fields): Added `last_view_index'
13714         argument.  Use DECL_FIELD_OFFSET to determine field's offset.
13715
13716 2000-04-20  Mo DeJong  <mdejong@cygnus.com>
13717
13718         * parse.h (INTERFACE_INNER_MODIFIERS): New macro.
13719         * parse.y (check_class_interface_creation): Fixed comments. Select
13720         permitted modifiers for (inner) interfaces. Changed error message
13721         to report rejected modifiers used with local classes.
13722
13723 2000-04-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13724
13725         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Immediate inner classes
13726         of directly inherited type considered in scope.
13727         * parse.y (do_resolve_class): Search inherited classes for inner
13728         classes.
13729
13730 2000-04-20  Tom Tromey  <tromey@cygnus.com>
13731
13732         * parse.y (not_accessible_p): Use member's class, not current
13733         class, when doing inheritance check for protected reference.
13734         Fixes PR gcj/124.
13735
13736 2000-04-20  Jason Schroeder  <shrode@subnature.com>
13737
13738         * jcf-dump.c (SPECIAL_IINC): Fixed typo printing iinc instruction.
13739
13740 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13741
13742         * parse.y (lookup_field_wrapper): Search for final local aliases.
13743         (resolve_expression_name): Let lookup_field_wrapper search for
13744         final local aliases. Force the value of `name' if one is found.
13745         (qualify_ambiguous_name): CONVERT_EXPR is enough to now we have
13746         an expression name. Fixed comments.
13747
13748 2000-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13749
13750         * parse.y (yyerror): `msg' can be null, don't use it in that case.
13751
13752 2000-04-19  Tom Tromey  <tromey@cygnus.com>
13753
13754         * gjavah.c (cxx_keyword_subst): Avoid potential infinite loop.
13755
13756 2000-04-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13757
13758         * parse.y (maybe_make_nested_class_name): Use `obstack_grow0'.
13759
13760 2000-04-18  Tom Tromey  <tromey@cygnus.com>
13761
13762         PR gcj/211:
13763         * gjavah.c (utf8_cmp): Changed return value.
13764         (cxx_keyword_subst): Handle all C++ keywords.  Allocate new return
13765         result.
13766         (cxx_keywords): New global.
13767         (get_field_name): Handle new result of cxx_keyword_subst.
13768         (print_method_info): Likewise.
13769
13770 2000-04-17  Bryce McKinlay  <bryce@albatross.co.nz>
13771
13772         * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names
13773         with a newline, for CNI.
13774         (print_stub_or_jni): Print a space or newline before method name for
13775         CNI as well as JNI.
13776         (print_cxx_classname): Don't write leading "::" in CNI stub method.
13777         (process_file): Include gcj/cni.h if generating CNI stubs.
13778
13779 2000-04-16  Tom Tromey  <tromey@cygnus.com>
13780
13781         * gjavah.c (decompile_method): Use print_field_name.
13782         Fixes PR gcj/205.
13783
13784 2000-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13785
13786         * parse.y (java_expand_classes): Reverse the package list once.
13787         (java_complete_lhs): PLUS_EXPR: don't try rhs and lhs at string
13788         reduction.
13789         (patch_binop): New temp `cn'. Call patch_string on LHS/RHS of
13790         the `==' and `!=' operators.
13791
13792 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13793
13794         * jcf-write.c (generate_bytecode_insns): At invocation time,
13795         always relate an interface method to the type of its selector.
13796
13797 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13798
13799         Fix for PR gcj/2:
13800         * expr.c (expand_invoke): Generate check to see if object pointer
13801         is null in nonvirtual invocation case.
13802         * java-tree.h (soft_nullpointer_node): Declare.
13803         * decl.c (soft_nullpointer_node): New global.
13804         (init_decl_processing): Initialize soft_nullpointer_node.
13805         * parse.y (invocation_mode): Return INVOKE_NONVIRTUAL for `final'
13806         or `private' methods.
13807         (patch_invoke): Handle INVOKE_NONVIRTUAL case.
13808
13809 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13810
13811         Fix for PR gcj/140:
13812         * parse.y (check_final_assignment): Recognize assignments to the
13813         `length' field of an array when generating class files.
13814
13815 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13816
13817         * class.c (decl_hash): Prototype removed.
13818         (decl_compare): Likewise.
13819
13820 2000-04-05  Tom Tromey  <tromey@cygnus.com>
13821
13822         * parse.h (THIS_MODIFIER_ONLY): Changed meaning of `v' parameter.
13823         * parse.y (check_modifiers_consistency): Check for final/volatile
13824         clash.  Fixes PR gcj/164.
13825
13826 2000-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13827
13828         * class.c: (java_hash_hash_tree_node): Renamed from `decl_hash',
13829         made global.
13830         (java_hash_compare_tree_node): Renamed from `decl_compare, made
13831         global.
13832         (add_method_1): Use `java_hash_hash_tree_node' and
13833         `java_hash_compare_tree_node'.
13834         * java-tree.h: (java_hash_hash_tree_node): Prototyped.
13835         (java_hash_compare_tree_node): Likewise.
13836         * parse.y (find_applicable_accessible_methods_list): Create,
13837         delete and use a hash table to remember already searched interfaces.
13838
13839 2000-04-03  Matt Welsh  <mdw@cs.berkeley.edu>
13840
13841         * jcf-depend.c (add_entry): Fixed bug where list was always replaced
13842         with latest entry.
13843
13844 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13845
13846         * boehm.c (mark_reference_fields, set_bit): Prototype.
13847         (set_bit): Un-ANSI-fy definition.
13848
13849         * class.c (init_test_hash_newfunc, decl_hash, decl_compare):
13850         Prototype.
13851
13852         * decl.c (emit_init_test_initialization): Likewise.
13853
13854         * gjavah.c (jni_print_char): Likewise.
13855
13856         * parse.y (create_new_parser_context): Likewise.
13857
13858 2000-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13859
13860         * expr.c (java_lang_expand_expr): Added Anthony's Thu Jan 6 2000
13861         patch missing hunk. Fixed indentation.
13862
13863 2000-03-30  Tom Tromey  <tromey@cygnus.com>
13864
13865         * gjavah.c (D_NAN_MASK): Only define as word-reversed when
13866         HOST_FLOAT_WORDS_BIG_ENDIAN and HOST_WORDS_BIG_ENDIAN disagree.
13867
13868 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13869
13870         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13871         when negative *before* using it as an array index.
13872         * ChangeLog: Fixed typo.
13873
13874 2000-03-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13875
13876         * parse-scan.y (pop_class_context): Reset `inner_qualifier_length'
13877         to 0 when it reaches -1.
13878
13879 2000-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13880
13881         * jcf-parse.c (get_constant): Properly cast `num' during the
13882         invocation of `add_double'.
13883         * jcf-write.c (push_long_const): Properly cast `lo' before
13884         comparing it to short bounds.
13885         * parse-scan.y (interface_declaration:): Rule re-arrange so that
13886         `interface_body:' is reduced after the current interface is
13887         pushed.
13888
13889 2000-03-26  Tom Tromey  <tromey@cygnus.com>
13890
13891         * jvspec.c (jvgenmain_spec): Add `%{<...}' construct for each
13892         Java-specific `-f' option.
13893
13894 2000-03-26  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13895
13896         * decl.c (init_decl_processing): Only call initialize_sizetypes once.
13897         Adjust order of making types.
13898         Make bitsize_*_node values.
13899
13900 2000-03-25  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13901
13902         * class.c (make_field_value): Use byte_position.
13903         * expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
13904         (java_array_data_offset): Likewise.
13905         * java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
13906         bzero call.
13907
13908 2000-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13909
13910         * parse.y (check_abstract_method_definitions): New local
13911         `end_type_reached'. Make sure we also consider `end_type'.
13912         (java_check_abstract_method_definitions): Make sure we eventually
13913         consider `java.lang.Object'.
13914         (maybe_use_access_method): Don't use access method if not in the
13915         context of a pure inner class or if the method's context is right.
13916         (find_applicable_accessible_methods_list): New static flag
13917         `object_done'. Don't search abstract classes as interfaces. Fixed
13918         indentation. Fixed the `java.lang.Object' only search. Search
13919         class interface(s) first, then fully search enclosing contexts.
13920         (find_most_specific_methods_list): Pick the closest candidate when
13921         they're all abstract.
13922
13923 2000-03-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13924
13925         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
13926         properly initialize `finished_label'. Don't emit gotos for empty
13927         try statements.
13928
13929 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13930
13931         * except.c (emit_handlers): Clear catch_clauses_last.
13932
13933 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13934
13935         * parse.y (check_method_types_complete): New function.
13936         (create_class): Reset anonymous class counter only when seeing an
13937         non inner classe.
13938         (java_complete_class): JDEP_METHOD: Don't recompute signature
13939         if incomplete.
13940
13941 2000-03-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13942
13943         * class.c (build_static_ref): Fixed indentation in comment.
13944         * java-tree.def (TRY_EXPR): Fixed typo in name.
13945         (CLASS_LITERAL): Likewise.
13946         * java-tree.h: (TYPE_DOT_CLASS): New macro.
13947         (struct lang_type): New field `dot_class'.
13948         * jcf-write.c (generate_bytecode_insns): Fixed error message.
13949         (generate_classfile): Method `class$' is synthetic.
13950         * parse.y (build_do_class_method): New function.
13951         (build_dot_class_method_invocation): Likewise.
13952         (java_complete_expand_methods): Expand TYPE_DOT_CLASS if necessary.
13953         (resolve_qualified_expression_name): Handle CLASS_LITERAL.
13954         (qualify_ambiguous_name): Likewise.
13955         (patch_incomplete_class_ref): Invoke synthetic method if necessary.
13956         (build_try_statement): Fixed leading comment.
13957
13958 2000-03-17  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13959
13960         * class.c (make_field_value): Properly handle sizes.
13961         (get_dispatch_vector): Use tree_low_cst and host_integerp.
13962         (layout_class_method): Count using trees.
13963         * decl.c (push_promoted_type): Set TYPE_{MIN,MAX}_VALUE with copy_node.
13964         * expr.c (java_array_data_offset): Use int_bit_position.
13965         (build_newarray, build_anewarray): Use host_integerp and tree_low_cst.
13966         (build_invokevirtual): Use tree_low_cst and do computations with trees.
13967
13968 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13969
13970         * lang.c (flag_hash_synchronization): New global.
13971         (lang_f_options): Added `hash-synchronization'.
13972         * lang-options.h: Mention -fhash-synchronization.
13973         * java-tree.h (flag_hash_synchronization): Declare.
13974         * expr.c (java_lang_expand_expr): Only push `sync_info' value when
13975         hash table synchronization is disabled.
13976         * decl.c (init_decl_processing): Only push `sync_info' value when
13977         hash table synchronization is disabled.
13978         * class.c (make_class_data): Only push `sync_info' field when hash
13979         table synchronization is disabled.  Removed dead code.
13980
13981 2000-03-16  Tom Tromey  <tromey@cygnus.com>
13982
13983         * lang.c (lang_decode_option): Enable -Wunused when -Wall given.
13984
13985 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13986
13987         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): Disregard anonymous
13988         classes.
13989         * parse.y (patch_method_invocation): Handle anonymous classes
13990         creation in static context.
13991
13992 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13993
13994         * parse.h (INNER_ENCLOSING_SCOPE_CHECK): New macro.
13995         * parse.y (resolve_qualified_expression_name): Use it.
13996         (patch_method_invocation): Likewise.
13997
13998 2000-03-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
13999
14000         * parse.y (register_incomplete_type): JDEP_ENCLOSING set
14001         depending on the type of dependency which dictates what the
14002         current class is.
14003         (unresolved_type_p): Resolved types limited to the current class.
14004
14005 2000-03-15  Tom Tromey  <tromey@cygnus.com>
14006
14007         * decl.c (init_decl_processing): Set type of `sync_info' to be
14008         pointer to Object.
14009
14010         * boehm.c (get_boehm_type_descriptor): Correctly compute `bits'.
14011         Correctly compute bit number for current slot.  Zero `high' and
14012         `low' in DS_LENGTH case.  Don't skip inherited fields.  Use
14013         mark_reference_fields.
14014         (mark_reference_fields): New function.
14015
14016 2000-03-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14017
14018         * parse.y (register_incomplete_type): Fixed initialization of
14019         JDEP_ENCLOSING.
14020
14021 2000-02-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14022
14023         * parse-scan.y (inner_qualifier, inner_qualifier_length): New
14024         static globals.
14025         (push_class_context, pop_class_context): New function.
14026         (class_body:): Call pop_class_context.
14027         (interface_body:): Likewise.
14028         (INNER_QUALIFIER): New macro.
14029         (report_class_declaration): Changed output format and use
14030         INNER_QUALIFIER. Call push_class_context.
14031
14032 2000-02-14  Andrew Haley  <aph@cygnus.com>
14033
14034         * check-init.c (check_init): Add new cases for unary and binary
14035         tree nodes.
14036
14037 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14038
14039         * parse.y (resolve_package): Set `next' once a type name has been
14040         progressively discovered.
14041         (resolve_qualified_expression_name): Propagate resolution only if
14042         there are remaining qualifiers. Take into account `q' might have
14043         been cleared after re-qualification.
14044         * parse.y (patch_method_invocation): New local `resolved'.
14045         Section dealing with qualified expression rewritten to use
14046         resolve_field_access.
14047
14048 2000-03-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14049
14050         * parse.h (PUSH_CPC): Fixed indentation.
14051         (DEBUG_CPC): New macro.
14052         (SET_CPC_INITIALIZER_STMT, SET_CPC_STATIC_INITIALIZER_STMT,
14053         SET_CPC_INSTANCE_INITIALIZER_STMT): New macros.
14054         * parse.y (class_body_declaration:): Use
14055         SET_CPC_INSTANCE_INITIALIZER_STMT.
14056         (method_declaration:): Check for null current_function_decl.
14057         (static_initializer:): Use SET_CPC_STATIC_INITIALIZER_STMT.
14058         (java_parser_context_pop_initialized_field): Better handling of
14059         empty lists.
14060         (maybe_make_nested_class_name): Mark nested class name as
14061         qualified when necessary.
14062         (end_class_declaration): Don't call java_parse_context_resume when
14063         one or more error occurred.
14064         (add_inner_class_fields): Use SET_CPC_INITIALIZER_STMT.
14065         (register_fields): Use SET_CPC_STATIC_INITIALIZER_STMT and
14066         SET_CPC_INITIALIZER_STMT.
14067         (method_header): Check for inner classes declaring static methods.
14068         (resolve_qualified_expression_name): Handle situation where `this'
14069         is implied.
14070
14071 2000-03-13  Hans Boehm <boehm@acm.org>
14072
14073         * typeck.c (build_prim_array_type): Correctly set the high word too.
14074
14075 2000-03-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14076
14077         * parse.y (java_complete_expand_methods): Leave <clinit> out of
14078         ordinary methods.
14079         (maybe_generate_pre_expand_clinit): Put <clinit> at the end of the
14080         list of methods for interfaces.
14081
14082 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14083
14084         * parse.y (qualify_ambiguous_name): Properly handle expressions
14085         using `null'.
14086
14087 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14088
14089         * parse.y (check_final_assignment): Extended to process
14090         COMPOUND_EXPR.
14091         (patch_assignment): Have check_final_assignment called only once.
14092
14093 2000-03-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14094
14095         * java-tree.h (IS_INIT_CHECKED): New flag.
14096         * check-init.c (check_init): Test and set IS_INIT_CHECKED.
14097         * parse.y (patch_string): Call force_evaluation_order on the
14098         completed string concatenation tree.
14099         * expr.c (force_evaluation_order): Call force_evaluation_order on
14100         function's arguments too.
14101
14102 2000-03-06  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14103
14104         * decl.c (emit_init_test_initialization): Mark KEY as unused.
14105         * expr.c (build_newarray): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
14106         (build_anewarray): Likewise.
14107         * parse.y (patch_newarray): Likewise.
14108         * parse.c: Regenerated.
14109
14110 2000-03-06  Bryce McKinlay  <bryce@albatross.co.nz>
14111
14112         * decl.c (init_decl_processing): Added new class fields `depth',
14113         `ancestors', and `idt' to class_type_node. Use
14114         _Jv_LookupInterfaceMethodIdx for soft_lookupinterfacemthod_node.
14115         * class.c (make_class_data): Push initial values for new fields.
14116         * java-tree.h: Updated prototype for `build_invokeinterface'.
14117         * expr.c (build_invokeinterface): Changed parameters to accept
14118         `method' tree. Calculate index of `method' in its declaring
14119         interface. Build call to _Jv_LookupInterfaceMethodIdx.
14120         (expand_invoke): Call `build_invokeinterface' with new parameters.
14121         * parse.y (patch_invoke): Call `build_invokeinterface' with new
14122         parameters.
14123
14124 2000-03-06  Bryce McKinlay <bryce@albatross.co.nz>
14125
14126         * typeck.c (lookup_do): Search superinterfaces first
14127         when looking up an interface method. From Godmar Back
14128         <gback@cs.utah.edu>
14129
14130 2000-03-06  Tom Tromey  <tromey@cygnus.com>
14131
14132         * Make-lang.in (JAVA_SRCS): Added boehm.c, lex.c.
14133
14134 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14135
14136         * java-tree.h (lookup_argument_method2): Declared.
14137         (safe_layout_class): Prototype moved from parse.h.
14138         * parse.h (safe_layout_class): Prototype moved to java-tree.h.
14139         * parse.y (java_check_regular_methods): Local `super_class' gone.
14140         Call lookup_argument_method2 instead of lookup_argument_method.
14141         Perform modifier match for methods found declared in implemented
14142         interfaces. Fixed indentation problem. Overriding/hiding error
14143         report to take place only for methods found in classes.
14144         * typeck.c (lookup_argument_method): Changed leading
14145         comment. Re-written by calling lookup_do.
14146         (lookup_argument_method2): New function.
14147         (lookup_java_method): Re-written by calling lookup_do.
14148         (lookup_do): New function.
14149
14150 2000-03-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14151
14152         * check-init.c (check_init): Removed dead code. Handle (blank)
14153         final variables.
14154         * parse.y (declare_local_variables): New local `final_p', set it
14155         and use it to initialize LOCAL_FINAL.
14156         (check_final_assignment): Only check FIELD_DECLs.
14157
14158 2000-02-17  Tom Tromey  <tromey@cygnus.com>
14159
14160         * Makefile.in (JAVA_OBJS): Added boehm.o.
14161         (boehm.o): New target.
14162         * Make-lang.in (JAVA_SRCS): Added boehm.c.
14163         * java-tree.h (flag_use_boehm_gc): Declare.
14164         (get_boehm_type_descriptor): Declare.
14165         * lang.c (lang_f_options): Added `use-boehm-gc'.
14166         (flag_use_boehm_gc): New global.
14167         * lang-options.h: Added -fuse-boehm-gc.
14168         * boehm.c: New file.
14169         * class.c (get_dispatch_table): If class uses a Boehm type
14170         descriptor, put it in the vtable.
14171         (make_class_data): Removed dead code.
14172
14173 2000-03-03  Per Bothner  <per@bothner.com>
14174
14175         * decl.c (init_decl_processing):  Initialize sizetype properly.
14176
14177 2000-03-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14178
14179         * java-tree.h (LOCAL_CLASS_P): New flag usage and macro.
14180         (PURE_INNER_CLASS_DECL_P, PURE_INNER_CLASS_TYPE_P): New macros.
14181         * jcf-dump.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14182         * jcf-parse.c (HANDLE_INNERCLASSES_ATTRIBUTE): Likewise.
14183         (jcf_parse): New local `current'. Load innerclasses seen in outer
14184         context being processed.
14185         * jcf-reader.c (HANDLE_INNERCLASSES_ATTRIBUTE): New macro.
14186         * jcf-write.c (append_innerclasses_attribute): New function.
14187         (append_innerclasses_attribute_entry): Likewise.
14188         (get_access_flags): Handle static classes. Set anonymous and local
14189         classes to be private.
14190         (generate_classfile): Attribute count adjusted. Call
14191         append_innerclasses_attribute.
14192         * parse.h (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use
14193         PURE_INNER_CLASS_TYPE_P.
14194         * parse.y (parser_qualified_classname): New parameter `is_static',
14195         produce non qualified name accordingly.
14196         (block_statement:): Set LOCAL_CLASS_P when declaring local class.
14197         (create_interface): Added argument to parser_qualified_classname.
14198         (create_class): Added argument to parser_qualified_classname. Setup
14199         alias for top level classes. Use PURE_INNER_CLASS_DECP_P.
14200         (add_inner_class_fields): Fixed indentation.
14201         (method_declarator): Use PURE_INNER_CLASS_DECP_P.
14202         (method_declarator): Fixed typo in comment.
14203         (craft_constructor): Use PURE_INNER_CLASS_DECP_P.
14204         (build_current_thisn): Likewise.
14205         (patch_method_invocation): Likewise.
14206
14207 2000-03-01  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14208
14209         * decl.c (current_function_decl): Move to toplev.c.
14210
14211 2000-02-28  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14212
14213         * java-tree.h (LABEL_PC): Relect name changes in ../tree.h.
14214         (DECL_BIT_INDEX): Use underlying representation.
14215         * parse.h (DECL_INHERITED_SOURCE_LINE): Likewise.
14216
14217 2000-02-27  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14218
14219         * expr.c (build_java_ret): Pass proper type to size_binop.
14220
14221 2000-02-25  Anthony Green  <green@cygnus.com>
14222
14223         * expr.c (build_class_init): Mark the decl to be ignored by
14224         check_init.
14225         * java-tree.h (DECL_BIT_INDEX): Move definition from check-init.c
14226         * check-init.c: Move DECL_BIT_INDEX to java-tree.h
14227         * class.c (init_test_hash_newfunc): New function.
14228         (decl_hash): New function.
14229         (decl_compare): New function.
14230         * decl.c (emit_init_test_initialization): New function.
14231         (complete_start_java_method): Traverse the init test hashtable,
14232         calling emit_init_test_initialization.
14233         (always_initialize_class_p): Define.
14234         * expr.c (build_class_init): Use initialization tests when
14235         emitting class initialization code.
14236         (always_initialize_class_p): Declare.
14237         * jcf-parse.c (parse_class_file): Set always_initialize_class_p to
14238         1.
14239         * java-tree.h: Include hash.h.
14240         (DECL_FUNCTION_INIT_TEST_TABLE): Define.
14241         (struct lang_decl): Add init_test_table field.
14242         (init_test_hash_entry): Define.
14243
14244 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14245
14246         * gjavah.c (main): Avoid using `argi' to report unimplemented
14247         options.
14248
14249 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14250
14251         * jcf-write.c (generate_bytecode_insns): TRY_FINALLY_EXPR:
14252         initialize locals to avoid warnings. Local `exception_type' moved
14253         into if statement.
14254
14255 2000-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14256
14257         * parse.y (resolve_expression_name): Use `orig' as a second
14258         argument to resolve_field_access.
14259         (resolve_field_access): Removed unnecessary code when dealing with
14260         static fields.
14261
14262 2000-02-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14263
14264         * class.c (push_super_field): Don't push the field twice.
14265         * jcf-parse.c (parse_source_file): Call java_reorder_fields.
14266         * parse.h (java_reorder_fields): Prototyped.
14267         * parse.y (java_reorder_fields): New function.
14268         (java_layout_class): Simplified not to worry about re-ordering.
14269
14270 2000-02-23  Tom Tromey  <tromey@cygnus.com>
14271
14272         * gjavah.c (print_name): In JNI case, correctly quote string.
14273         (print_method_info): Don't handle overrides in JNI mode.
14274
14275 2000-02-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14276
14277         * parse.y (init_decl_processing): `_Jv_IsInstanceOf' returned
14278         value type set to `boolean_type_node'.
14279
14280 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14281
14282         * jcf-dump.c (main): Test for correct condition after
14283         output file creation.
14284
14285 2000-02-19  Anthony Green  <green@cygnus.com>
14286
14287         * jcf-depend.c (add_entry): Fix test for first list entry.
14288
14289 2000-02-19  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14290
14291         * class.c (build_class_ref, push_super_field): Set DECL_SIZE_UNIT.
14292         * constants.c (build_constants_constructor): Likewise.
14293
14294 2000-02-19  Anthony Green  <green@cygnus.com>
14295
14296         * jcf-depend.c (add_entry): Add entries to the end of the list.
14297
14298 1999-11-03  Pekka Nikander  <pekka.nikander@hut.fi>
14299
14300         * decl.c (INT_TYPE_SIZE): Define if necessary.
14301         (expand_java_return): Handle the case of a native integer smaller
14302         than a JVM integer.
14303
14304 2000-02-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
14305
14306         * gjavah.c (help): Use GCCBUGURL.
14307         * jv-scan.c (help): Likewise.
14308         * jcf-dump.c (help): Likewise.
14309
14310 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14311
14312         * jcf-write.c (generate_bytecode_insns): Don't generate empty
14313         `finally' clauses.
14314
14315 2000-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14316
14317         * jcf-parse.c (load_class): Call `fatal' if no file containing
14318         the target class are found.
14319
14320 2000-02-16  Zack Weinberg  <zack@wolery.cumb.org>
14321
14322         * Makefile.in (PARSE_C, PARSE_SCAN_C): Move dependencies on
14323         lex.c, lex.h, and PARSE_H to...
14324         (parse.o, parse-scan.o): ...here, respectively.
14325
14326         * lex.c: Split out code that may trigger SIGFPE from yylex()
14327         to its own function.
14328         * lex.h (JAVA_FLOAT_RANGE_ERROR): Don't set value.
14329
14330 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14331
14332         * Make-lang.in (jvspec.o): Depend on $(GCC_H), not gcc.h.
14333
14334 2000-02-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14335
14336         * parse.y (outer_field_access_p): Stop in time when outer contexts
14337         are exhausted.
14338         (resolve_qualified_expression_name): Properly qualify *everything*
14339         after a package.type to be resoled as expression names.
14340         (find_applicable_accessible_methods_list): Save/restore `class' to
14341         isolate it from a possible outer context search.
14342
14343 2000-02-15  Tom Tromey  <tromey@cygnus.com>
14344
14345         * gjavah.c (jni_print_char): New function.
14346         (print_full_cxx_name): Use it.
14347         (decode_signature_piece): Likewise.
14348         (print_cxx_classname): Likewise.
14349
14350 2000-02-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14351
14352         * Makefile.in (jv-scan, jcf-dump, gcjh): Depend on and link with
14353         version.o.
14354         (jcf-dump.o, gjavah.o, jv-scan.o): Depend on version.h.
14355
14356         * gjavah.c: Include version.h.
14357
14358         * jcf-dump.c: Likewise.
14359
14360         * jv-scan.c: Likewise.
14361
14362 2000-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14363
14364         * parse.y (outer_field_access_fix): First parameter now a tree
14365         node. Check for assignment to final. First argument to
14366         build_outer_field_access_fix modified to accommodate prototype.
14367         (build_outer_field_access): Don't check for assignment to final
14368         here.
14369         (java_complete_lhs): MODIFY_EXPR case: Check for `error_mark_node'
14370         possibly returned by outer_field_access_fix. Changed
14371         outer_field_access_fix's first argument.
14372         (check_final_assignment): $finit$'s context is OK.
14373         (patch_unaryop): Use node instead of its line/column value when
14374         calling outer_field_access_fix.
14375
14376 2000-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14377
14378         * parse.y (interface_declaration:): No longer tagged
14379         <node>. Re-installed default action.
14380         (class_member_declaration:): Handle inner interfaces.
14381         (interface_member_declaration): Handle inner interfaces and
14382         classes.
14383         (create_interface): Push error if one seen. Suspend parsing
14384         context when processing an inner interface.
14385         (register_fields): Inner class static field limitations not to
14386         apply to inner interfaces.
14387
14388 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14389
14390         * jcf-parse.c (load_class): Update `java_error_count' when a
14391         class' file can't be found.
14392         (parse.y): Avoid (byte)code generation when errors seen.
14393
14394 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14395
14396         * parse.y (java_complete_lhs): Handle TRUNC_DIV_EXPR. Ensure `fatal'
14397         decodes a valid node.
14398         (patch_binop): Handle TRUNC_DIV_EXPR.
14399
14400 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14401
14402         * parse.y (resolve_package): New local `acc'. Try to progressively
14403         build and guess a package and type name.
14404
14405 2000-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14406
14407         * parse.y (find_applicable_accessible_methods_list): Load and
14408         layout the search class if necessary.
14409         (java_complete_tree): Keep to original type of the folded initial
14410         value.
14411
14412 2000-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14413
14414         * class.c (layout_class): Set and test CLASS_BEING_LAIDOUT.
14415         Generate error message if circularity is detected. New static
14416         local `list'.
14417         * java-tree.h (CLASS_BEING_LAIDOUT): New flag usage, new macro.  *
14418         * jcf-write.c (generate_bytecode_insns): Very simply handle
14419         SAVE_EXPR.
14420         * parse.y (java_check_circular_reference): Use
14421         `cyclic_inheritance_report' during report, if necessary.
14422         (java_complete_lhs): fixed comment with `THROW_EXPR:' case. Avoid
14423         walking NEW_ARRAY_INIT twice.
14424
14425 2000-02-09  Tom Tromey  <tromey@cygnus.com>
14426
14427         * parse.y (check_class_interface_creation): Allow inner classes to
14428         be `private' or `protected', check modifiers' consistency. Prevent
14429         block local classes from bearing any modifiers.
14430
14431 2000-02-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14432
14433         * except.c (check_start_handlers): Re-add prototype lost in last
14434         patch.
14435         (maybe_start_try): Remove excess argument to `check_start_handlers'.
14436
14437 2000-02-09  Andrew Haley  <aph@cygnus.com>
14438
14439         * decl.c (clear_binding_level): Remove excess initializer.
14440         (maybe_poplevels): Remove unused variable.
14441         (force_poplevels): Ditto.
14442         (struct binding_level): Add comment.
14443
14444 2000-02-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14445
14446         * jcf-write.c (generate_classfile): Don't consider
14447         pre-initialization with reference value (use <clinit> instead.)
14448         * parse.y (java_fix_constructors): No generated constructor for
14449         interfaces.
14450         (build_outer_field_access): Removed debug message.
14451         (outer_field_expanded_access_p): Adapted to bytecode generation.
14452         (build_outer_field_access_method): Use fix_method_argument_names.
14453         (build_outer_method_access_method): Fixed indentation. Added
14454         comment. Handle access method generation for static and also void
14455         methods.
14456         (build_access_to_thisn): Inserted debug message.
14457         (maybe_build_thisn_access_method): Use fix_method_argument_names.
14458         (resolve_qualified_expression_name): Fixed comment.
14459         (not_accessible_p): Adapted to bytecode generation. Added comment.
14460         (patch_method_invocation): Added comment.
14461         (maybe_use_access_method): Fixed leading comment. Handle static
14462         methods.
14463         (java_complete_lhs): Don't shortcut handling of initialized upon
14464         declaration String type static fields when generating bytecode.
14465         (patch_unaryop): Handle outer field access when generating
14466         bytecode.
14467
14468 2000-02-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14469
14470         * java-tree.h (FIELD_THISN): New macro.
14471         * jcf-write.c (append_synthetic_attribute): New function.
14472         (generate_classfile): Set "Synthetic" attribute on this$<n>,
14473         val$<name> fields, access$<n> and $finit$ methods. Fixed indentation.
14474         * parse.y (add_inner_class_fields): Set FIELD_THISN for created
14475         this$<n> fields.
14476         (build_outer_field_access): Turned on access functions usage and
14477         generation when compiling to bytecode.
14478         (maybe_use_access_method): Likewise.
14479
14480 2000-01-25  Andrew Haley  <aph@cygnus.com>
14481
14482         * java-except.h (struct eh_range): Add `expanded' field.
14483         (maybe_start_try): Add end_pc arg.
14484         (maybe_end_try): Ditto.
14485         * java-tree.h (force_poplevels): new function.
14486         * expr.c (expand_byte_code): Don't call maybe_start_try or
14487         maybe_end_try.
14488         * except.c (add_handler): Reset expanded.
14489         (expand_start_java_handler): Set expanded.
14490         (check_start_handlers): Don't expand a start handler that's
14491         already been expanded.
14492         (maybe_start_try): Add end_pc arg.  Only expand a handler which
14493         ends after end_pc.
14494         (expand_end_java_handler): call force_poplevels.
14495         (force_poplevels): new function.
14496         * decl.c (binding_level): Add start_pc of binding level.
14497         (maybe_pushlevels): Call maybe_start_try when pushing binding
14498         levels.
14499         (maybe_poplevels): Call maybe_end_try when popping binding levels.
14500         (LARGEST_PC): Define.
14501         (clear_binding_level): Use LARGEST_PC.
14502
14503         * java-tree.h (DEBUG_JAVA_BINDING_LEVELS): new define.
14504         * decl.c (DEBUG_JAVA_BINDING_LEVELS): new define.
14505         (binding_depth, is_class_level, current_pc): new variables.
14506         (struct binding_level): ditto.
14507         (indent): new function.
14508         (push_jvm_slot): add debugging info.
14509         (maybe_pushlevels): ditto.
14510         (maybe_poplevels): ditto.
14511         (pushlevel): ditto.
14512         (poplevel): ditto.
14513         (start_java_method): ditto.
14514         (give_name_to_locals): comment only.
14515         * except.c (binding_depth, is_class_level, current_pc):
14516         new variables.
14517         (expand_start_java_handler): add debugging info.
14518         (expand_end_java_handler): ditto.
14519
14520 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14521
14522         * gjavah.c (overloaded_jni_method_exists_p): Add prototype.
14523         (print_name_for_stub_or_jni, process_file): Constify a char*.
14524
14525 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14526
14527         * jcf-io.c (jcf_print_utf8_replace): Handle UTF-8 input.
14528
14529 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14530
14531         * gcc/java/javaop.h (WORDS_TO_DOUBLE): Allow WORDS_TO_DOUBLE to
14532         assemble doubles correctly when HOST_FLOAT_WORDS_BIG_ENDIAN is
14533         defined to be 1.
14534
14535 2000-02-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14536
14537         * java-tree.def (INSTANCE_INITIALIZERS_EXPR): New tree code.
14538         * java-tree.h (TYPE_II_STMT_LIST): New macro.
14539         (struct lang_type): New field `ii_block'.
14540         * lex.c (java_init_lex): Use CPC_INITIALIZER_LIST,
14541         CPC_STATIC_INITIALIZER_LIST and CPC_INSTANCE_INITIALIZER_LIST.
14542         * parse.h (struct parser_ctxt): New field `instance_initializers'.
14543         (CPC_INITIALIZER_LIST, CPC_STATIC_INITIALIZER_LIST,
14544         CPC_INSTANCE_INITIALIZER_LIST, CPC_INITIALIZER_STMT,
14545         CPC_STATIC_INITIALIZER_STMT, CPC_INSTANCE_INITIALIZER_STMT): New
14546         macros.
14547         * parse.y (add_instance_initializer): New function.
14548         (in_instance_initializer): New static global.
14549         (class_body_declaration:): Link instance initializer block.
14550         (static_initializer:): Use CPC_STATIC_INITIALIZER_STMT.
14551         (array_creation_expression:): Remove unused local.
14552         (java_parser_context_push_initialized_field): Fixed leading
14553         comment. Use CPC_STATIC_INITIALIZER_LIST, CPC_INITIALIZER_LIST and
14554         CPC_INSTANCE_INITIALIZER_LIST.
14555         (java_parser_context_pop_initialized_field): Likewise.
14556         (add_inner_class_fields): Use CPC_INITIALIZER_STMT.
14557         (register_fields): Use CPC_STATIC_INITIALIZER_STMT and
14558         CPC_INITIALIZER_STMT.
14559         (fix_constructors): New local `class_type'. Use it. Call
14560         add_instance_initializer.
14561         (java_complete_lhs): New case INSTANCE_INITIALIZERS_EXPR.
14562         (patch_return): Forbid return in instance initializers.
14563         (patch_throw_statement): Enforce exception handling in the context
14564         of instance initializers.
14565
14566 2000-02-03  Tom Tromey  <tromey@cygnus.com>
14567
14568         * Make-lang.in (java.mostlyclean): Remove executables in
14569         `mostlyclean'.
14570
14571 2000-01-31  Scott Bambrough  <scottb@netwinder.org>
14572
14573         * gcc/java/gjavah.c (D_NAN_MASK): Alternate definition required when
14574         HOST_FLOAT_WORDS_BIG_ENDIAN is defined to be 1.
14575         (java_float_finite): Convert to use union Word from javaop.h.
14576         (java_double_finite): Convert to use union DWord from javaop.h.
14577
14578 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14579
14580         * gjavah.c (options): Added `jni' entry.
14581         (help): Document -jni.
14582         (flag_jni): New global.
14583         (process_file): Handle JNI output.  Don't print text from
14584         -prepend, -add, etc, when generating stubs.  Only remove `.class'
14585         suffix if it actually exists.
14586         (main): Create a `.c' file when run with `--jni --stubs'.  Create
14587         correct output file name with `--jni'.
14588         (print_include): Mangle header name differently in JNI case.
14589         (HANDLE_METHOD): In JNI mode, call print_method_info to generate
14590         method list.
14591         (print_method_info): Handle JNI case.  Put signature info into
14592         method name.  Handle case when STREAM is NULL.
14593         (print_name_for_stub_or_jni): New function.
14594         (print_stub_or_jni): Renamed from `print_stub'.  Handle JNI.
14595         (print_cxx_classname): Handle JNI.
14596         (print_full_cxx_name): Likewise.
14597         (decode_signature_piece): Likewise.
14598         (overloaded_jni_method_exists_p): New function.
14599         (struct method_name): Added `signature' and `sig_length' fields.
14600         (HANDLE_END_FIELD): Do nothing in JNI mode.
14601
14602 2000-02-02  Tom Tromey  <tromey@cygnus.com>
14603
14604         * jv-scan.c: Include version.c, <getopt.h>.
14605         (LONG_OPT, OPT_HELP, OPT_VERSION): New macros.
14606         (options): New array.
14607         (usage): New function.
14608         (version): New function.
14609         (main): Use getopt_long to parse command line.
14610         * jcf-dump.c: Include version.c, <getopt.h>.
14611         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_VERSION,
14612         OPT_JAVAP): New macros.
14613         (options): New array.
14614         (usage): Return `void'.  Changed message.
14615         (help): New function.
14616         (version): New function.
14617         (main): Use getopt_long_only to parse command line.
14618         * gjavah.c: Include <getopt.h>.
14619         (LONG_OPT, OPT_classpath, OPT_CLASSPATH, OPT_HELP, OPT_TEMP,
14620         OPT_VERSION, OPT_PREPEND, OPT_FRIEND, OPT_ADD, OPT_APPEND, OPT_M,
14621         OPT_MM, OPT_MG, OPT_MD, OPT_MMD): New macros.
14622         (options): New array.
14623         (java_no_argument): Removed.
14624         (help): Updated with missing options.
14625         (main): Use getopt_long_only to parse command line.
14626         (usage): Changed message.
14627
14628 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14629
14630         * java-tree.def (NEW_ANONYMOUS_ARRAY_EXPR): New tree code.
14631         * parse.h (ANONYMOUS_ARRAY_BASE_TYPE, ANONYMOUS_ARRAY_DIMS_SIG,
14632         ANONYMOUS_ARRAY_INITIALIZER): New access macros.
14633         * parse.y (array_creation_expression:): Handle anonymous arrays.
14634         (build_array_from_name): Don't set `ret_name' if null.
14635         (resolve_qualified_expression_name): New case NEW_ANONYMOUS_ARRAY_EXPR.
14636         (qualify_ambiguous_name): Likewise.
14637         (java_complete_expand_class): Likewise.
14638
14639 2000-02-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14640
14641         * java-tree.def (SYNCHRONIZED_EXPR): Fixed typo.
14642         * parse.h (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID): New macro.
14643         (MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_STR): Likewise.
14644         (SKIP_THIS_AND_ARTIFICIAL_PARMS): Use DECL_FINIT_P.
14645         (AIPL_FUNCTION_FINIT_INVOCATION): Replaces
14646         AIPL_FUNCTION_COMPLETED_INVOCATION.
14647         (AIPL_FUNCTION_CTOR_INVOCATION): Replaces
14648         AIPL_FUNCTION_INVOCATION_READY.
14649         (AIPL_FUNCTION_DECLARATION): New enum entry.
14650         * parse.y (reorder_static_initialized): New function.
14651         (java_parser_context_pop_initialized_field): Use it.
14652         (add_inner_class_fields): Use
14653         MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID. Comment
14654         augmented. Install marker after last alias initializer, if any.
14655         (generate_finit): Fixed typo. Don't try to retain only the used
14656         fields.
14657         (method_header): Compute and set DECL_FUNCTION_NAP.
14658         (method_declarator): Fixed comment. Insert alias initializer in
14659         parameter list.
14660         (build_alias_initializer_parameter_list): Fixed leading
14661         comment. New case for AIPL_FUNCTION_DECLARATION. Old enum value
14662         replaced by new ones. Use MANGLE_ALIAS_INITIALIZER_PARAMETER_NAME_ID.
14663         (java_complete_expand_class): Code to retain only used aliases
14664         removed.
14665         (java_complete_expand_methods): New local `first_decl'. Generate
14666         $finit$ first, then expand the constructors, regular methods and
14667         <clinit>.
14668         (java_complete_expand_method): Don't report error on missing
14669         return statement if previously detected bogus.
14670         (fix_constructors): Don't patch constructor parameters list.
14671         (patch_method_invocation): Use new AIPL enum values. Reverse
14672         alias initializer list for anonymous classes.
14673
14674 2000-01-30  Anthony Green  <green@redhat.com>
14675
14676         * jcf-write.c (generate_bytecode_insns): Use TYPE_IS_WIDE to
14677         determine how many stack slots to pop.
14678
14679 2000-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14680
14681         * parse.y (formal_parameter:): Set `$$' to NULL_TREE for better
14682         error handling/recovery.
14683         * java-tree.h (SYNCHRONIZED_EXPR): Fixed typo in comment.
14684
14685 2000-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14686
14687         * java-tree.h (ARG_FINAL_P, FIELD_LOCAL_ALIAS,
14688         FIELD_LOCAL_ALIAS_USED): New macros.
14689         (DECL_FUNCTION_NAP): New macro.
14690         (struct lang_decl): New field `nap'.
14691         (TYPE_FINIT_STMT_LIST, TYPE_CLINIT_STMT_LIST): New macros.
14692         (struct lang_type): New fields `finit_stmt_list' and
14693         `clinit_stmt_list'.
14694         (CLASS_HAS_FINIT_P): Defined using TYPE_FINIT_STMT_LIST.
14695         * parse.h (MANGLE_OUTER_LOCAL_VARIABLE_NAME): New macro.
14696         (SKIP_THIS_AND_ARTIFICIAL_PARMS, MARK_FINAL_PARMS,
14697         UNMARK_FINAL_PARMS, CRAFTED_PARAM_LIST_FIXUP): New macros.
14698         (AIPL_FUNCTION_CREATION, AIPL_FUNCTION_COMPLETED_INVOCATION,
14699         AIPL_FUNCTION_INVOCATION_READY): New enum fields.
14700         (BUILD_THROW): Macro line separator re-indented.
14701         * parse.y (end_class_declaration): New function.
14702         (maybe_generate_pre_expand_clinit): New name for
14703         java_pre_expand_clinit. Create <clinit> off TYPE_CLINIT_STMT_LIST,
14704         pre-expand static fields.
14705         (maybe_generate_clinit): Function deleted.
14706         (check_for_static_method_reference): Prototype's parameter list
14707         indented.
14708         (generate_finit): New name for maybe_generate_finit. Changed
14709         leading comment. Function rewritten to use
14710         TYPE_FINIT_STMT_LIST. Call build_alias_initializer_parameter_list.
14711         (build_alias_initializer_parameter_list): New function.
14712         (java_parser_context_pop_initialized_field): Likewise.
14713         (add_inner_class_fields): Likewise.
14714         (type_declaration:): Call end_class_declaration.
14715         (class_member_declaration:): Likewise.
14716         (formal_parameter_list:): Fixed typos.
14717         (formal_parameter:): Use ARG_FINAL_P to mark created tree list
14718         element. Improved error handling.
14719         (block_statement:): Call end_class_declaration.
14720         (anonymous_class_creation:): Likewise.
14721         (create_anonymous_class): Fixed comments.
14722         (create_class): Call add_inner_class_fields.
14723         (register_fields): Set FIELD_LOCAL_ALIAS according to ARG_FINAL_P.
14724         (method_header): Use MARK_FINAL_PARMS.
14725         (finish_method_declaration): Use UNMARK_FINAL_PARMS.
14726         (method_declarator): Propagate final argument flag.
14727         (craft_constructor): New local `artificial'. Call
14728         build_alias_initializer_parameter_list. Use
14729         CRAFTED_PARAM_LIST_FIXUP, assign DECL_FUNCTION_NAP.
14730         (source_start_java_method): Mark parm decls with LOCAL_FINAL if
14731         necessary.
14732         (complete_expand_class): Get rid of unused outer context local
14733         alias fields.
14734         (java_complete_expand_methods): Fixed leading
14735         comment. Generate/pre-expand <clinit> first. Changed method
14736         expansion order to regular, $finit$, constructors, <clinit>.
14737         (java_complete_expand_method): Set current_function_decl.
14738         (fix_constructors): Fix constructor parameter list to account for
14739         outer context local alias initializers.
14740         (verify_constructor_super): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14741         (resolve_expression_name): Lookup outer context local aliases. New
14742         local `access', use it.
14743         (patch_method_invocation): Patch inner class ctor invocation with
14744         outer context local aliases initialization values. $finit$
14745         invocation patching now includes things generated with
14746         build_alias_initializer_parameter_list.
14747         (argument_types_convertible): Use SKIP_THIS_AND_ARTIFICIAL_PARMS.
14748         (build_super_invocation): Likewise.
14749         (patch_assignment): Changed comment.
14750
14751 2000-01-27  Andrew Haley  <aph@cygnus.com>
14752
14753         * jcf-write.c (emit_goto): RESERVE 3 bytes for insn.
14754         (emit_if): Ditto.
14755         (emit_jsr): Ditto.
14756
14757 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14758
14759         * parse.h (OBSOLETE_MODIFIER_WARNING): Don't use ANSI string
14760         concatenation.
14761         (OBSOLETE_MODIFIER_WARNING2): New macro allowing two args.
14762
14763         * parse.y (register_fields): Don't pass a format specifier to
14764         OBSOLETE_MODIFIER_WARNING.
14765         (check_abstract_method_header): Use OBSOLETE_MODIFIER_WARNING2
14766         instead of OBSOLETE_MODIFIER_WARNING, and don't pass a format
14767         specifier.
14768         (check_modifiers): Change function into a macro.
14769         (check_class_interface_creation): Pass a literal format string.
14770
14771 2000-01-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14772
14773         * buffer.h: PROTO -> PARAMS.
14774         * check-init.c: Likewise.
14775         * class.c: Likewise.
14776         * constants.c: Likewise.
14777         * convert.h: Likewise.
14778         * decl.c: Likewise.
14779         * except.c: Likewise.
14780         * expr.c: Likewise.
14781         * gjavah.c: Likewise.
14782         * java-except.h: Likewise.
14783         * java-tree.h: Likewise.
14784         * jcf-depend.c: Likewise.
14785         * jcf-dump.c: Likewise.
14786         * jcf-parse.c: Likewise.
14787         * jcf-path.c: Likewise.
14788         * jcf-reader.c: Likewise.
14789         * jcf-write.c: Likewise.
14790         * jcf.h: Likewise.
14791         * jv-scan.c: Likewise.
14792         * jvgenmain.c: Likewise.
14793         * jvspec.c: Likewise.
14794         * lang.c: Likewise.
14795         * lex.c: Likewise.
14796         * lex.h: Likewise.
14797         * parse-scan.y: Likewise.
14798         * parse.h: Likewise.
14799         * parse.y: Likewise.
14800         * typeck.c: Likewise.
14801         * verify.c: Likewise.
14802         * xref.c: Likewise.
14803         * xref.h: Likewise.
14804         * zextract.c: Likewise.
14805         * zipfile.h: Likewise.
14806
14807 2000-01-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14808
14809         * class.c (make_class): Use MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14810         (is_compiled_class): Remove test on TYPE_LANG_SPECIFIC, use TYPE_JCF.
14811         * constants.c (build_constant_data_ref): Check for cached
14812         current_constant_pool_data_ref. Cache current_constant_pool_data_ref
14813         in TYPE_CPOOL_DATE_REF.
14814         * java-tree.h (TYPE_JCF, TYPE_CPOOL, TYPE_CPOOL_DATA_REF,
14815         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC:) New macros.
14816         (struct lang_type): New fields `cpool' and `cpool_data_ref'.
14817         (LOCAL_FINAL): New macro.
14818         * jcf-parse.c (init_outgoing_cpool): Always allocate new outgoing
14819         constant pool -- don't try to reuse.
14820         (parse_zip_file_entries): Use TYPE_JCF, don't lazily allocate
14821         TYPE_LANG_SPECIFIC.
14822         (find_in_current_zip): Use TYPE_JCF.
14823         * parse.h (java_check_final): Prototype removed.
14824         * parse.y (create_class): Reversed Jan 12, 2000 extra argument patch.
14825         (maybe_create_class_interface_decl,
14826         check_class_interface_creation): Likewise.
14827         (java_expand_finals): Function removed.
14828         (class_declaration:): Reversed Jan 12, 2000 extra argument patch.
14829         (block_statement:): Fixed comment.
14830         (anonymous_class_creation:): Likewise.
14831         (check_class_interface_creation): Reversed Jan 12, 2000 extra
14832         argument patch.
14833         (check_class_interface_creation): Loosened error report on (inner)
14834         public class declarations. CPC_INNER_P replaces GET_CPC_LIST.
14835         (link_nested_class_to_enclosing): Reversed Jan 12, 2000 patch.
14836         (maybe_create_class_interface_decl): Reversed Jan 12, 2000 extra
14837         argument patch.
14838         (create_interface): Likewise.
14839         (anonymous_class_counter): New static global.
14840         (create_anonymous_class): Reversed Jan 12, 2000 extra argument
14841         patch. Fixed comments.
14842         (create_class): Reversed Jan 12, 2000 extra argument patch. Reset
14843         anonymous_class_counter when declaring a toplevel class.
14844         (craft_constructor): Fixed constructor name when handling
14845         anonymous classes. Anonymous class constructors to feature hidden
14846         this$<n> parameter.
14847         (java_fix_constructors): Added comment.
14848         (java_check_final): Function removed.
14849         (java_complete_expand_methods): Fixed comment. Don't generate
14850         class data, save its outgoing constant pool instead.
14851         (verify_constructor_super): Skip anonymous class constructor
14852         hidden this$<n> parameter.
14853         (java_expand_classes): New local `saved_ctxp'. Removed call to
14854         java_expand_finals and java_check_final. Expand anonymous class
14855         constructors. Generate class data.
14856         (build_super_invocation): Skip anonymous class hidden this$<n>
14857         parameter.
14858         * typeck.c (build_java_signature): Use TYPE_SIGNATURE and
14859         MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC.
14860         (set_java_signature): Likewise.
14861
14862 2000-01-18  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14863
14864         * gjavah.c: Delete ACC_VISIBILITY define.
14865         * jcf.h: Add ACC_VISIBILITY define.
14866         * parse.y: final: rule tagged <value>.
14867         (java_check_regular_methods): Use ACC_VISIBILITY define for
14868         default package access check.
14869         (local_variable_declaration_statement): Use final: rule.
14870
14871 2000-01-17  Joerg Brunsmann  <joerg.brunsmann@fernuni-hagen.de>
14872
14873         * parse.y (format_parameter:): Use final: rule instead of modifiers:.
14874         (final:): New rule.
14875
14876 2000-01-17  Tom Tromey  <tromey@cygnus.com>
14877
14878         * gjavah.c (print_field_info): Allow non-static final fields.
14879
14880 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14881
14882         * parse.h (enum jdep_code): New entry `JDEP_ANONYMOUS'.
14883         * parse.y (patch_anonymous_class): New function.
14884         (create_anonymous_class): Register incomplete type when the
14885         class/interface to extends/implement isn't known yet.
14886         (parser_check_super_interface): Simplify argument to CLASS_INTERFACE.
14887         (verify_constructor_super): Tuned error message.
14888
14889 2000-01-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14890
14891         * java-tree.h (FOR_LOOP_P): Replaces IS_FOR_LOOP_P.
14892         (ANONYMOUS_CLASS_P): New macro.
14893         (TYPE_SIGNATURE, TYPE_JCF): New macros.
14894         (INNER_CLASS_TYPE_P): Fixed typo in leading comment.
14895         * parse.y (create_class): Added leading argument.
14896         (maybe_create_class_interface_decl,
14897         check_class_interface_creation): Likewise.
14898         (craft_constructor): New function.
14899         (verify_constructor_super): Added argument in prototype.
14900         (class_declaration:): Inserted leading argument.
14901         (for_begin:): Use FOR_LOOP_P.
14902         (anonymous_class_creation): Create WFL of the anonymous class to
14903         instantiate. Call build_new_invocation. Added comments.
14904         (check_class_interface_creation): Handle parameter `anonymous' in
14905         verbose mode class creation announce.
14906         (link_nested_class_to_enclosing): Exclude anonymous classes.
14907         (maybe_create_class_interface_decl): Don't set DECL_CONTEXT on
14908         anonymous class, even though they appear to have an enclosing
14909         context.
14910         (create_interface): Pass extra argument to
14911         check_class_interface_creation.
14912         (create_anonymous_class): Set ANONYMOUS_CLASS_P to 1.
14913         (create_class): Call check_class_interface_creation and
14914         maybe_create_class_interface_decl with extra new argument. Don't
14915         add private this$<n> to anonymous classes.
14916         (method_declarator): Insert hidden this$<n> to anonymous class
14917         constructors.
14918         (java_fix_constructors): Deleted code creating default
14919         constructor. Call craft_constructor instead.
14920         (java_check_regular_methods): Set `saw_constructor' to 1 for
14921         anonymous classes.
14922         (fix_constructors): Pass extra argument to verify_constructor_super.
14923         (verify_constructor_super): New local `sdecl', use it. Search for
14924         matching constructor (possibly featuring arguments) in super
14925         class.
14926         (lookup_method_invoke): Craft constructor according to arguments
14927         list when dealing with anonymous class constructors.
14928         (build_super_invocation): Pass arguments to anonymous class super
14929         constructors.
14930         (search_loop): Use FOR_LOOP_P.
14931         (labeled_block_contains_loop_p): Likewise.
14932
14933 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
14934
14935         * class.c (set_super_info): Set CLASS_STATIC when appropriate.
14936         (enclosing_context_p): New function.
14937         (get_access_flags_from_decl): Handle CLASS_STATIC.
14938         (maybe_layout_super_class): Extra first argument passed to
14939         do_resolve_class.
14940         (layout_class_method): Use ID_FINIT_P, DECL_CLINIT_P and
14941         ID_INIT_P.
14942         * decl.c (access0_identifier_node): New global.
14943         (init_decl_processing): access0_identifier_node initialized.
14944         (pushdecl): Set DECL_CONTEXT only on non type decls.
14945         * expr.c (lookup_field): Lookup inner class fields in enclosing
14946         contexts.
14947         (expand_invoke): Use ID_INIT_P.
14948         (expand_java_field_op): Use DECL_CLINIT_P.
14949         * java-tree.def (CLASS_LITERAL): New tree code.
14950         * java-tree.h (DECL_FUNCTION_ACCESS_DECL,
14951         DECL_FUNCTION_INNER_ACCESS, FIELD_INNER_ACCESS): New macros.
14952         (struct lang_decl): New field `inner_access'.
14953         (enclosing_context_p): Prototyped.
14954         (DECL_INIT_P, DECL_FINIT_P, DECL_CLINIT_P, ID_INIT_P, ID_FINIT_P,
14955         ID_CLINIT_P): New macros.
14956         (CLASS_STATIC): New macro.
14957         (CLASS_ACCESS0_GENERATED_P): New macro.
14958         (OUTER_FIELD_ACCESS_IDENTIFIER_P, INNER_CLASS_DECL_P,
14959         TOPLEVEL_CLASS_DECL_P, INNER_CLASS_TYPE_P, TOPLEVEL_CLASS_TYPE_P,
14960         INNER_CLASS_P): New macros.
14961         (DECL_INNER_CLASS_LIST): New macro.
14962         * jcf-parse.c (yyparse): Avoid the use of ANSI string
14963         concatenation.
14964         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
14965         the shift value to int. Fixed typo in comment.
14966         * lex.c (inst_id, wpv_id): Initialize.
14967         * mangle.c (unicode_mangling_length): Take `$' into account.
14968         * parse.h (DRECOVER, RECOVER): Terminate properly.
14969         (IDENTIFIER_INNER_CLASS_OUTER_FIELD_ACCESS): New macro.
14970         (typedef struct _jdep): New field `enclosing'.
14971         (JDEP_ENCLOSING): New macro.
14972         (IS_CLINIT): Deleted (DECL_CLINIT_P replaces it.)
14973         (struct parser_ctxt): New fields `marker_beginning', `marked_end'.
14974         (GET_CPC_LIST, CPC_INNER_P, GET_CPC, GET_CPC_UN, GET_CPC_UN_MODE,
14975         GET_CPC_DECL_NODE, GET_ENCLOSING_CPC, GET_NEXT_ENCLOSING_CPC,
14976         GET_ENCLOSING_CPC_CONTEXT): New macros.
14977         (PUSH_CPC, PUSH_ERROR, POP_CPC): New macros.
14978         (do_resolve_class): Added extra argument in prototype.
14979         * parse.y (resolve_class): Added extra argument in prototype.
14980         (maybe_create_class_interface_decl): Likewise.
14981         (maybe_use_access_method, build_wfl_wrap): New functions.
14982         (java_complete_expand_classes, java_complete_expand_class):
14983         Likewise.
14984         (java_parser_context_push_initialized_field,
14985         java_parser_context_suspend, java_parser_context_resume):
14986         Likewise.
14987         (maybe_make_nested_class_name, make_nested_class_name,
14988         set_nested_class_simple_name_value,
14989         link_nested_class_to_enclosing, find_as_inner_class,
14990         find_as_inner_class_do, check_inner_class_redefinition,
14991         build_thisn_assign, build_current_thisn, build_access_to_thisn,
14992         maybe_build_thisn_access_method, build_outer_field_access,
14993         build_outer_field_access_methods, build_outer_field_access_expr,
14994         build_outer_method_access_method, build_new_access_id,
14995         build_outer_field_access_method, outer_field_access_p,
14996         outer_field_expanded_access_p, outer_field_access_fix,
14997         build_incomplete_class_ref, patch_incomplete_class_ref,
14998         create_anonymous_class): Likewise.
14999         (inst_id, wpv_id): New static global variables.
15000         (synchronized:): New rule, tagged <node>.
15001         (type_declaration:): No longer tagged <node>. Call POP_CPC in sub
15002         rules.
15003         (anonymous_class_creation:): New rule, tagged <node>.
15004         (NEW_TK): Tagged <node>.
15005         (type_literals, array_type_literal): New rules, tagged <node>.
15006         (class_declaration:): Removed action when reducing by class_body:
15007         (class_body:): Set DECL_END_SOURCE_LINE and rule's returned value
15008         using GET_CPC in sub-rules.
15009         (class_member_declaration): Handle inner classes.
15010         (method_declaration): When reducing method_header:, reset
15011         current_function_decl when appropriate.
15012         (method_declarator:): Set the number of formal parameter to 0 for
15013         method declared without arguments.
15014         (constructor_declarator:): Likewise.
15015         (static_initializer:): List of elements kept in a list.
15016         (static:): Rule modifiers: replaces MODIFIER_TK. Enforce correct
15017         use of the keyword `static' for type declarations.
15018         (block_statement:): Handle inner class declarations.
15019         (primary_no_new_array:): Use type_literals:. Fixed comment. Handle
15020         type qualified `this'.
15021         (class_instance_creation_expression): Use anonymous_class_creation:
15022         to handle inner class instances creation. Handle qualified `new'.
15023         (something_dot_new): Added appropriate actions.
15024         (create_new_parser_context): New function.
15025         (java_push_parser_context, java_parser_context_save_global,
15026         java_parser_context_suspend): Use create_new_parser_context.
15027         (check_modifiers): Changed leading comment.
15028         (check_class_interface_creation): Handle interclasses.
15029         (add_superinterfaces): Fixed comment.
15030         (create_interface): Build qualified name from the raw_name instead
15031         of its matching WFL. Push the initialized fields list. raw_name added
15032         as an extra argument to maybe_create_class_interface_decl.
15033         (create_class): Build qualified name from the raw_name instead of
15034         its matching WFL. Removed assignment to current_parsed_class_un.
15035         Call PUSH_ERROR before returning an error. Suspend the current
15036         parser context when processing an inner class. Push the
15037         initialized fields list. raw_name added as an extra argument to
15038         maybe_create_class_interface_decl. Add the private this$<n>
15039         field.
15040         (duplicate_declaration_error_p): Use GET_CPC when calling find_field.
15041         (register_fields): Get the class type from GET_CPC and handle
15042         previous errors.  Added code to handle the creation of static
15043         fields in inner classes. Initialized fields initialization
15044         statements kept in a list of lists.
15045         (maybe_generate_finit): Initialized fields initialization
15046         statements kept in a list of lists. Use GET_CPC.
15047         (maybe_generate_clinit): Likewise.
15048         (method_header): Use GET_CPC and GET_CPC_UN.
15049         (parser_qualified_classname): Handle inner classes.
15050         (register_incomplete_type): Set JDEP_ENCLOSING using GET_CPC.
15051         (java_fix_constructors): Hide pointer to enclosing context
15052         instance in constructor list when dealing with inner classes.
15053         (jdep_resolve_class): Call resolve_class with extra first argument
15054         JDEP_ENCLOSING.
15055         (resolve_class): Add enclosing context as a first extra argument
15056         to do_resolve_class.
15057         (do_resolve_class): Call find_as_inner_class. Handle WFLs
15058         properly.
15059         (resolve_no_layout): Extra argument added to resolve_class
15060         invocation.
15061         (reset_method_name): Use DECL_CLINIT_P, DECL_FINIT_P.
15062         (java_get_real_method_name): Use GET_CPC_UN.
15063         (check_abstract_method_definitions): Use DECL_CLINIT_P.
15064         (java_check_abstract_methods): Handle static method declared in
15065         inner classes by an error.
15066         (java_check_regular_methods): Use DECL_CLINIT_P.
15067         (source_start_java_method): Also set DECL_MAX_LOCALS.
15068         (create_artificial_method): Call java_parser_context_save_global
15069         and java_parser_context_restore_global instead of saving/restoring
15070         the context by hand.
15071         (expand_start_java_method): Improved verbose mode message.
15072         (java_complete_expand_methods): Fixed leading comment. Use
15073         DECL_CLINIT_P.
15074         (fix_constructors): Added assignment to this$<n> if necessary.
15075         (java_expand_classes): Call java_complete_expand_classes instead
15076         of java_complete_expand_methods.
15077         (make_qualified_primary): Simplified.
15078         (merge_qualified_name): Optimized for missing left or right parts.
15079         (resolve_expression_name): Handle access to outer class fields from
15080         interclasses.
15081         (resolve_qualified_expression_name): New macro
15082         RESTORE_THIS_AND_CURRENT_CLASS, used. Handle creation of inner
15083         classes. Report error on non appropriate qualification of
15084         `new'. Handle qualified `this'.
15085         (not_accessible_p): Allow access to outer class private fields from
15086         inner classes.
15087         (patch_method_invocation): Handle method invocations through
15088         access methods and inner class constructor invocations.
15089         (find_applicable_accessible_methods_list): Search enclosing
15090         contexts of an inner class.
15091         (search_applicable_methods_list): Fixed typo.
15092         (argument_types_convertible): Handle inner class constructors'
15093         hidden outer context reference argument.
15094         (qualify_ambiguous_name): Handle qualified `this'.
15095         (java_complete_lhs): Handle use of field accessed through
15096         artificial access methods in various cases of assignments. Handle
15097         CLASS_LITERAL node.
15098         (check_final_assignment): Use DECL_CLINIT_P.
15099         (valid_ref_assignconv_cast_p): Handle the destination being an
15100         enclosing context of the source.
15101         (patch_unaryop): Handle use of field accessed through artificial
15102         access methods.
15103         (patch_return): Use DECL_CLINIT_P.
15104         (patch_throw_statement): Use DECL_CLINIT_P.
15105         (check_thrown_exceptions): Use DECL_FINIT_P and DECL_INIT_P.
15106         * verify.c (verify_jvm_instructions): Use ID_CLINIT_P and
15107         ID_INIT_P.
15108
15109 2000-01-16  Anthony Green  <green@cygnus.com>
15110
15111         * parse.y (build_string_concatenation): Only use
15112         StringBuffer(String) shortcut if String arg is constant.
15113
15114 2000-01-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15115
15116         * jcf-write.c (generate_bytecode_insns): binop: Change the type of
15117         the shift value to int. Fixed typo in comment.
15118
15119 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
15120
15121         * jcf-path.c: Delete PATH_SEPARATOR and DIR_SEPARATOR macros.
15122         * jcf-write.c: Likewise.
15123         * parse.y: Likewise.
15124         * parse.c: Regenerate.
15125
15126 2000-01-09  Anthony Green  <green@cygnus.com>
15127
15128         * jcf-write.c (generate_bytecode_insns): Emit invokeinterface
15129         bytecodes in the correct order.
15130
15131 2000-01-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15132
15133         * Makefile.in (jcf-dump, gcjh): Move ../errors.o before $(LIBS).
15134
15135 2000-01-06  Anthony Green  <green@cygnus.com>
15136
15137         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15138         before building constant array decl.
15139
15140 2000-01-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15141
15142         * jcf-write.c (generate_bytecode_conditional): Fixed indentation in
15143         method invocation and typo in conditional expression.
15144         (generate_bytecode_insns): COND_EXPR can be part of a binop. Issue
15145         the appropriate NOTE_POP.
15146         * parse.y (patch_binop): Shift value mask to feature the right
15147         type.
15148
15149 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15150
15151         * class.c (assume_compiled, assume_compiled_node): Add static
15152         prototype.
15153         (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup.
15154
15155         * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch.
15156
15157         * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN.
15158
15159         * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier'
15160         to `__modifier' to avoid stringifying it.
15161
15162         * parse.y (verify_constructor_circularity): Don't call a variadic
15163         function with a non-literal format string.
15164         (java_check_abstract_methods): Move unreachable code inside
15165         `continue' statement.
15166         (lookup_method_invoke): Call xstrdup, not strdup.
15167
15168         * expr.c (expand_java_field_op): Avoid the use of ANSI string
15169         concatenation.
15170
15171         * jcf-parse.c (yyparse): Likewise.
15172
15173         * jv-scan.c (main): Likewise.
15174
15175 1999-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15176
15177         * parse.h (ABSTRACT_CHECK, JCONSTRUCTOR_CHECK,
15178         ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
15179         ERROR_CAST_NEEDED_TO_INTEGRAL): Avoid the use of ANSI string
15180         concatenation.
15181
15182         * parse.y (synchronized, variable_redefinition_error,
15183         check_class_interface_creation, create_interface, create_class,
15184         method_header, finish_method_declaration,
15185         check_modifiers_consistency, method_declarator,
15186         complete_class_report_errors, check_abstract_method_definitions,
15187         java_check_regular_methods, check_throws_clauses,
15188         java_check_abstract_methods, read_import_dir,
15189         check_pkg_class_access, declare_local_variables, fix_constructors,
15190         cut_identifier_in_qualified, resolve_expression_name,
15191         resolve_qualified_expression_name, patch_method_invocation,
15192         java_complete_lhs, patch_assignment, try_builtin_assignconv,
15193         patch_binop, patch_array_ref, patch_newarray, build_labeled_block,
15194         patch_exit_expr, patch_exit_expr, patch_switch_statement,
15195         patch_try_statement, patch_synchronized_statement,
15196         patch_throw_statement, check_thrown_exceptions,
15197         patch_conditional_expr): Likewise.
15198
15199 1999-12-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15200
15201         * Makefile.in (LIBDEPS): Added gcc's errors.o
15202         (../jcf-dump$(exeext):): Link with gcc's errors.o
15203         (../gcjh$(exeext):): Likewise.
15204         * expr.c (expand_java_NEW): Layout the entire target type instead of
15205         laying out its methods only.
15206         (lookup_field): Layout the class after having loaded it.
15207         * java-tree.h (java_debug_context): Declared.
15208         * jcf-io.c (toplev.h): Included.
15209         (find_class): Removed assignment to jcf's outofsynch
15210         field. Force source file to be read if newer than its matching
15211         class file. Tweaked debug messages.
15212         * jcf-parse.c (jcf_out_of_synch): Deleted.
15213         (read_class): Call to jcf_out_of_synch removed.
15214         * jcf.h (typedef struct JCF): Field `outofsynch' deleted.
15215         (jcf_out_of_synch): Prototype deleted.
15216         * parse.h (struct parser_ctxt): `minus_seen', `java_error_flag',
15217         `deprecated' and `class_err': integer turned into bit-fields.
15218         New bit-fields `saved_data_ctx' and `saved_data'. Fixed comments.
15219         * parse.y (package_list): New global.
15220         (package_declaration:): Record newly parsed package name.
15221         (extra_ctxp_pushed_p): Static global deleted.
15222         (java_parser_context_save_global): Create buffer context for the
15223         purpose of saving globals, if necessary.
15224         (java_parser_context_restore_global): Pop context pushed for the
15225         purpose of saving globals, if necessary.
15226         (java_debug_context_do): New prototype and function.
15227         (java_debug_context): Likewise.
15228         (do_resolve_class): Use already parsed package names to qualify
15229         and lookup class candidate.
15230         (java_pre_expand_clinit): Removed unnecessary local variable.
15231
15232 1999-12-17  Tom Tromey  <tromey@cygnus.com>
15233
15234         * gjavah.c (decode_signature_piece): Print "::" in JArray<>.  This
15235         fixes PR gcj/119.
15236         (process_file): Use `\n\' at end of each line in string.
15237
15238 1999-12-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15239
15240         * expr.c (expand_invoke): Layout the loaded class before
15241         attempting to use it.
15242         (expand_java_field_op): Allow final field assignments to take
15243         place in $finit$.
15244         * typeck.c (convert): Return error_mark_node if expr is null.
15245
15246 1999-12-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15247
15248         * class.c (class_depth): Return -1 if the class doesn't load
15249         properly.
15250         * expr.c (can_widen_reference_to): Check for errors during depth
15251         computation and return 0 accordingly.
15252         * jcf-parse.c (parse_source_file): Call java_fix_constructors to
15253         create default constructors and add an other error check.
15254         * parse.h (java_fix_constructors): Prototyped.
15255         * parse.y (java_pre_expand_clinit): Likewise.
15256         (build_super_invocation): Re-prototyped to feature one argument.
15257         (java_check_circular_reference): Directly use `current'.
15258         (java_fix_constructors): New function.
15259         (java_check_regular_methods): Don't create default constructors
15260         here, but abort if none were found.
15261         (java_complete_expand_methods): Pre-process <clinit> calling
15262         java_pre_expand_clinit.
15263         (java_pre_expand_clinit): New function.
15264         (fix_constructors): build_super_invocation invoked with the
15265         current method declaration as an argument.
15266         (build_super_invocation): Use the context of the processed method
15267         decl argument instead of current_class.
15268         * typeck.c (lookup_java_method): Take WFLs in method names into
15269         account.
15270
15271 1999-12-14  Per Bothner  <per@bothner.com>
15272
15273         * class.c (make_class_data): flag_keep_inline_functions to keep
15274         private methods in the method array.
15275
15276 1999-12-15  Anthony Green  <green@cygnus.com>
15277
15278         * check-init.c (check_init): Take into account both types of
15279         `throw's when checking for uninitialized variables.
15280
15281 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15282
15283         * parse.y (java_complete_lhs): Force conversion of array
15284         dimensions to int_type_node, that's what runtime's ABI expects.
15285
15286 1999-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15287
15288         * parse.h (EXPR_WFL_QUALIFICATION): Temporary uses the third
15289         operand of a WFL, until the Java front-end gets fixed with regard
15290         to Mark Mitchell's gcc/tree.h patch (1999-12-04.)
15291
15292 1999-12-10  Andrew Haley  <aph@cygnus.com>
15293
15294         * parse.h (BUILD_THROW): Add support for sjlj-exceptions.
15295         decl.c (init_decl_processing): Add _Jv_Sjlj_Throw.
15296         expr.c (build_java_athrow): Add support for sjlj-exceptions.
15297         java-tree.h: Ditto.
15298         jcf-write.c: Ditto.
15299
15300 1999-12-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15301
15302         * expr.c (java_lang_expand_expr): Switch to permanent obstack
15303         before calling expand_eh_region_start and expand_start_all_catch.
15304         * except.c (expand_start_java_handler): Switch to permanent
15305         obstack before calling expand_eh_region_start.
15306         (expand_end_java_handler): Switch to permanent obstack before
15307         calling expand_start_all_catch.
15308
15309 1999-12-5  Anthony Green  <green@cygnus.com>
15310
15311         * decl.c (init_decl_processing): Mark throw_node as a noreturn
15312         function with side effects.
15313         (init_decl_processing): Mark all memory allocating DECLs with
15314         DECL_IS_MALLOC.
15315
15316 1999-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15317
15318         * except.c (expand_end_java_handler): Call
15319         expand_resume_after_catch and end_catch_handler.
15320
15321 1999-11-30  Anthony Green  <green@cygnus.com>
15322
15323         * verify.c (verify_jvm_instructions): Create new return label
15324         chain if non existent (don't rely on the verified state of the jsr
15325         target.)
15326
15327 1999-11-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15328
15329         * jcf-write.c (generate_bytecode_insns): Fixed indentation for
15330         COMPOUND_EXPR and FIX_TRUNC_EXPR cases.
15331
15332         * parse.y (patch_assignment): Removed bogus final class test on
15333         lhs when checking on whether to emit an ArrayStoreException runtime
15334         check.
15335         * expr.c (expand_java_arraystore): Likewise.
15336
15337 1999-11-28 Anthony Green <green@cygnus.com>
15338
15339         * decl.c (find_local_variable): Reuse single slot decls when
15340           appropriate.
15341
15342 1999-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15343
15344         * jcf-parse.c (saw_java_source): Global variable removed.
15345         (read_class): Don't use `saw_java_source'. Added extra braces.
15346         (yyparse): Code setting `saw_java_source' removed.
15347
15348 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
15349
15350         * except.c (emit_handlers): Zero catch_clauses after emitting them.
15351
15352 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15353
15354         * verify.c (merge_type_state): Non verified subroutines being
15355         considered more than once to trigger passive type merge.
15356
15357 1999-11-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15358
15359         * parse.y (catch_clause_parameter:): Still set `$$' to NULL_TREE
15360         in case of error. Error message tuned.
15361
15362 1999-11-21  Anthony Green  <green@cygnus.com>
15363
15364         * constants.c (find_methodref_index): Unwrap method names before
15365         inserting them in the constant pool.
15366
15367         * jcf-parse.c (jcf_parse): Display `interface' when appropriate.
15368
15369         * class.c (assume_compiled_node): New typedef.
15370         (assume_compiled_tree): New static data.
15371         (find_assume_compiled_node): New function.
15372         (add_assume_compiled): New function.
15373         (assume_compiled): New function.
15374         * class.c (make_class_data): Use assume_compiled.
15375         (is_compiled_class): Use assume_compiled.
15376
15377         * java-tree.h (add_assume_compiled): Declare.
15378
15379         * lang.c (lang_decode_option): Parse new options.
15380
15381 1999-11-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15382
15383         * class.c (layout_class): Always convert TYPE_SIZE_UNIT to
15384         int_type_node: that's what `_Jv_AllocObject' expects.
15385
15386 1999-11-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15387
15388         * parse.y (lookup_method_invoke): Use lang_printable_name to
15389         reliably build the type name during error report. Fixes PR gcj/97.
15390
15391 1999-11-09  Tom Tromey  <tromey@cygnus.com>
15392
15393         * jcf-path.c: Include <sys/stat.h>.
15394         (jcf_path_init): Search for libjava.zip.  Fixes PR gcj/84.
15395         (DIR_UP): New macro.
15396
15397 1999-11-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15398
15399         * parse.y (source_end_java_method): Resume permanent allocation,
15400         reversing Apr 27 1998 patch.
15401         (patch_string_cst): Pop obstacks after having pushed the permanent
15402         ones.
15403
15404 1999-11-05  Tom Tromey  <tromey@cygnus.com>
15405
15406         * class.c (finish_class): Emit inlined methods if any native
15407         methods exist in the class.  Fixes PR gcj/85.
15408
15409 1999-11-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15410
15411         * parse.y (resolve_qualified_expression_name): Handle PLUS_EXPR.
15412         (qualify_ambiguous_name): Likewise.
15413
15414 1999-11-03  Godmar Back <gback@cs.utah.edu>
15415
15416         * typeck.c: (lookup_java_method):  search all inherited
15417         interfaces when looking up interface method.
15418
15419 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15420
15421         * parse.y (method_header:): Issue error message for rule `type
15422         error'.
15423         (synchronized:): Error report when not using synchronized.
15424
15425 1999-11-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15426
15427         * parse.y (resolve_qualified_expression_name): Prevent `this' from
15428         being used before the superclass constructor has been called.
15429         (complete_function_arguments): Use CALL_EXPLICIT_CONSTRUCTOR_P
15430         instead of `CALL_THIS_CONSTRUCTOR_P'.
15431
15432 1999-10-30  Todd T. Fries <todd@lighthouse.fries.net>
15433
15434         * check-init.c: Fix typo in comment.
15435
15436 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15437
15438         * class.c (add_method_1): Set DECL_INLINE to 1 for private, static
15439         and final method.
15440
15441 1999-10-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15442
15443         * parse.y (expression_statement:): Call function to report
15444         improper invocation of a constructor.
15445         (parse_ctor_invocation_error): New function.
15446
15447 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
15448
15449         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS or call
15450         remember_end_note.
15451
15452 1999-10-21  Tom Tromey  <tromey@cygnus.com>
15453
15454         * jvgenmain.c (main): _Jv_Compiler_Properties now an extern; set
15455         in generated `main'.
15456
15457 1999-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15458
15459         * parse.y (resolve_qualified_expression_name): Handle MODIFY_EXPR.
15460         (qualify_ambiguous_name): Likewise.
15461
15462 1999-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15463
15464         * parse.y (java_complete_tree): fold_constant_for_init to work on
15465         permanent_obstack.
15466         (java_complete_lhs): Likewise.
15467         (array_constructor_check_entry): Complete an initializer element
15468         on permanent_obstack.
15469
15470 1999-10-19  Tom Tromey  <tromey@cygnus.com>
15471
15472         * jcf-parse.c (parse_source_file): Call jcf_dependency_add_file.
15473         From Mike Moreton <mike@pillim.demon.co.uk>.
15474
15475 1999-10-15  Greg McGary  <gkm@gnu.org>
15476
15477         * java-tree.h (flag_bounds_check): Remove extern decl.
15478         * lang.c (flag_bounds_check): Remove global variable.
15479         (lang_f_options): Remove "bounds-check" entry.
15480         (lang_init_options): Default flag_bounds_check to "on".
15481
15482 1999-10-14  Tom Tromey  <tromey@cygnus.com>
15483
15484         * jvgenmain.c (usage): New function.
15485         (main): Use it.  Also, handle `-D' options.
15486         * jvspec.c (lang_specific_driver): Recognize -D.
15487         (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation.
15488
15489         * jvspec.c (jvgenmain_spec): Use `%umain', not just `%u'.
15490
15491 1999-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15492
15493         * jcf-dump.c (print_constant, disassemble_method): Don't call a
15494         variadic function with a non-literal format string.
15495
15496         * parse-scan.y (report_main_declaration): Likewise.
15497
15498         * parse.h (ERROR_CAST_NEEDED_TO_INTEGRAL): Likewise.
15499
15500         * parse.y (read_import_dir, patch_assignment, patch_binop,
15501         patch_array_ref): Likewise.
15502
15503         * typeck.c (build_java_array_type): Likewise.
15504
15505         * verify.c (verify_jvm_instructions): Likewise.
15506
15507 1999-10-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15508
15509         * jcf-write.c (RELOCATION_VALUE_1): Fixed integer value from 0 to 1.
15510
15511 1999-10-07  Anthony Green  <green@cygnus.com>
15512
15513         * jcf-write.c (generate_classfile): Use UNSAFE_PUTx in cases
15514         where CHECK_PUT may fail for valid reasons.
15515
15516         * jcf-write.c (UNSAFE_PUT1, UNSAFE_PUT2, UNSAFE_PUT3,
15517         UNSAFE_PUTN): New macros.
15518
15519 1999-10-04  Tom Tromey  <tromey@cygnus.com>
15520
15521         * lex.h (BUILD_OPERATOR2): Return ASSIGN_ANY_TK in `lite' case as
15522         well.  Fixes Java PR gcj/59.
15523         * parse-scan.y (yyerror): Report errors.
15524
15525 1999-09-24  Glenn Chambers  <GChambers@provsol.com>
15526
15527         * decl.c (insert_block): Remove unconditional `abort'.
15528
15529 1999-09-24  Bernd Schmidt  <bernds@cygnus.co.uk>
15530
15531         * decl.c (builtin_function): No longer static.  New arg CLASS.  Arg
15532         FUNCTION_CODE now of type int.  All callers changed.
15533         Set the builtin's DECL_BUILT_IN_CLASS.
15534
15535 1999-09-23  Tom Tromey  <tromey@cygnus.com>
15536
15537         * jvspec.c (lang_specific_driver): Don't read spec file if
15538         -fsyntax-only given.
15539
15540 1999-09-22  Tom Tromey  <tromey@cygnus.com>
15541
15542         * lang-specs.h: Added `%(jc1)' to the jc1 spec.
15543
15544         * javaop.h (WORD_TO_FLOAT): Use `inline' unconditionally.
15545         (WORDS_TO_LONG): Likewise.
15546         (WORDS_TO_DOUBLE): Likewise.
15547
15548 1999-09-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15549
15550         * jcf-write.c (RELOCATION_VALUE_0): New macro.
15551         (RELOCATION_VALUE_1): Likewise.
15552         (emit_iinc, emit_reloc, push_constant1, push_constant2,
15553         push_in_const, push_long_const): Prototyped.
15554         (push_constant1): Argument `index' is of type HOST_WIDE_INT.
15555         (push_constant2): Likewise.
15556         (push_int_const): Cast find_constant1's integer arguments to `jword'.
15557         (find_constant_wide): Cast find_constant2's integer arguments to
15558         `jword'.
15559         (find_constant_index): Cast find_constant2's and find_constant2's
15560         integer arguments to `jword'.
15561         (emit_pop): Argument `value' is of type HOST_WIDE_INT.
15562         (emit_switch_reloc): Use RELOCATION_VALUE_0.
15563         (emit_if): Use RELOCATION_VALUE_1.
15564         (emit_goto): Likewise.
15565         (emit_jsr): Likewise.
15566         (generate_bytecode_insns): Use RELOCATION_VALUE_0. Cast second
15567         argument to push_long_const to HOST_WIDE_INT.
15568
15569 1999-09-15  Andreas Schwab  <schwab@suse.de>
15570
15571         * Makefile.in (parse.o): Depend on $(JAVA_TREE_H).
15572
15573 1999-09-20  Nick Clifton  <nickc@cygnus.com>
15574
15575         * lang.c (lang_decode_option): Extend comment.
15576
15577 1999-09-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15578
15579         * parse.y (java_method_add_stmt): Test against GET_CURRENT_BLOCK
15580         instead of fndecl.
15581
15582 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15583
15584         * gjavah.c (get_field_name, print_method_info, print_include,
15585         add_namelet): Use xmalloc, not malloc.
15586
15587         * jcf-depend.c (add_entry): Likewise.  Use xstrdup, not strdup.
15588         (munge): Use xrealloc, not realloc, trust xrealloc to handle a
15589         NULL pointer.
15590
15591         * jcf-io.c (open_in_zip, find_class): Use xstrdup, not strdup.
15592
15593         * jcf-parse.c (jcf_out_of_synch, yyparse): Likewise.
15594
15595         * jcf-path.c (add_entry): Likewise.
15596
15597         * jcf.h (ALLOC, REALLOC): Use xmalloc/xrealloc, not malloc/realloc.
15598
15599         * jv-scan.c (xmalloc): Remove definition.
15600
15601         * jvgenmain.c (xmalloc): Likewise.
15602
15603         * jvspec.c (lang_specific_driver): Use xcalloc, not xmalloc/bzero.
15604
15605         * lex.c (java_store_unicode): Use xrealloc, not realloc.
15606
15607         * parse-scan.y: Use concat, not of xmalloc/assign/strcpy.  Use
15608         concat, not xmalloc/sprintf.
15609         (java_push_parser_context): Use xcalloc, not xmalloc/bzero.
15610         (xstrdup): Remove definition.
15611
15612         * parse.y (duplicate_declaration_error_p,
15613         constructor_circularity_msg, verify_constructor_circularity,
15614         check_abstract_method_definitions, java_check_regular_methods,
15615         java_check_abstract_methods, patch_method_invocation,
15616         check_for_static_method_reference, patch_assignment, patch_binop,
15617         patch_cast, array_constructor_check_entry, patch_return,
15618         patch_conditional_expr): Use xstrdup, not strdup.
15619
15620         * zextract.c (ALLOC): Use xmalloc, not malloc.
15621
15622 1999-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15623
15624         * Make-lang.in (jvspec.o): Depend on system.h and gcc.h.
15625
15626         * jvspec.c: Include gcc.h.  Don't include gansidecl.h.
15627         (do_spec, lang_specific_pre_link, lang_specific_driver,
15628         input_filename, input_filename_length): Don't declare.
15629         (main_class_name, jvgenmain_spec, lang_specific_driver):
15630         Constify a char*.
15631         (lang_specific_driver): All calls to the function pointer
15632         parameter now explicitly call `fatal'.
15633
15634 1999-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15635
15636         * parse.y (find_applicable_accessible_methods_list): Search
15637         abstract classes as interfaces.
15638
15639 1999-09-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15640
15641         * class.c (finish_class): We're now outside a valid method
15642         declaration. Tell the rest of gcc so.
15643
15644 1999-09-08  Bruce Korb  autogen@linuxbox.com
15645
15646         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
15647
15648 1999-09-07  Tom Tromey  <tromey@cygnus.com>
15649
15650         * gjavah.c (add_class_decl): Generate include for gcj/array.h, not
15651         java-array.h.
15652         (decode_signature_piece): Don't emit "::" in JArray<>.
15653         (print_namelet): Only print trailing `;' when printing a class.
15654
15655 1999-09-10  Bernd Schmidt  <bernds@cygnus.co.uk>
15656
15657         * java-tree.h: Delete declarations for all tree nodes now moved to
15658         global_trees.
15659         * decl.c: Delete their definitions.
15660
15661 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
15662
15663         * Make-lang.in (jc1): Depend on ggc-callbacks.o.
15664         * Makefile.in (OBJS): Add ggc-callbacks.o.
15665         (OBJDEPS): Likewise.
15666
15667 1999-09-03  Tom Tromey  <tromey@cygnus.com>
15668
15669         * parse.y (strip_out_static_field_access_decl): Return operand if
15670         it satisfies JDECL_P.
15671
15672 1999-09-02  Tom Tromey  <tromey@cygnus.com>
15673
15674         * gjavah.c (decode_signature_piece): Emit "::" in JArray<>.
15675         Handle nested arrays, like `[[I'.
15676
15677 1999-09-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15678
15679         * class.c (finish_class): Remove unused parameter, all callers
15680         changed.
15681
15682         * expr.c (build_java_athrow): Change return type to void.
15683         (java_lang_expand_expr): Make sure each case in switch returns a
15684         value.
15685
15686         * java-tree.h (finish_class): Fix prototype to take void args.
15687
15688         * jcf-dump.c (usage): Mark with ATTRIBUTE_NORETURN.
15689         (main): Issue return from main, not exit.
15690
15691         * jcf-parse.c (parse_class_file): Fix call to `finish_class'.
15692
15693         * jcf.h (jcf_unexpected_eof): Mark with ATTRIBUTE_NORETURN.
15694
15695         * jv-scan.c (main): Issue return from main, not exit.
15696
15697         * parse.y (check_abstract_method_definitions,
15698         java_check_abstract_method_definitions): Add static prototypes.
15699         (java_complete_expand_methods): Fix call to `finish_class'.
15700
15701         * verify.c (verify_jvm_instructions): Initialize variables `oldpc'
15702         and `prevpc'.
15703
15704 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15705
15706         * lang.c (language_string): Constify.
15707
15708 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15709
15710         * Makefile.in (LIBS): Fix definition so we link with $(CLIB).
15711         Remove hacks for stuff which comes from libiberty.
15712
15713         * Make-lang.in: Likewise.
15714
15715 1999-08-30  Hans-Peter Nilsson  <hp@axis.se>
15716
15717         * Makefile.in (xref.o): Depend on xref.c explicitly.
15718
15719 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15720
15721         * java-tree.h (lang_printable_name): Constify a char*.
15722
15723         * lang.c (lang_printable_name): Likewise.
15724
15725 1999-08-27  Jeffrey A Law  (law@cygnus.com)
15726
15727         * gjavah.c, jcf-write.c, verify.c: Do not use C++ style
15728         comments in C code.
15729
15730 1999-08-26  Tom Tromey  <tromey@cygnus.com>
15731
15732         * gjavah.c (print_cxx_classname): Print "::" before qualified
15733         name.
15734
15735 1999-08-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15736
15737         * parse.y (lookup_cl): Changed leading comment. Now does its best
15738         to set the column number.
15739         (qualify_ambiguous_name): Take WFL wrappers into account.
15740
15741 1999-08-25  Gregg Townsend  <gmt@cs.arizona.edu>
15742
15743         * verify.c (verify_jvm_instructions): Don't check instruction
15744         validity beyond end of method.
15745
15746 1999-08-25  Tom Tromey  <tromey@cygnus.com>
15747
15748         * jvspec.c (lang_specific_driver): Correctly handle --help again.
15749
15750 1999-08-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15751
15752         * gjavah.c (print_name, print_base_classname, utf8_cmp,
15753         cxx_keyword_subst, generate_access, name_is_method_p,
15754         get_field_name, print_field_name, super_class_name, print_include,
15755         decode_signature_piece, print_class_decls, usage, help,
15756         java_no_argument, version, add_namelet, print_namelet): Add static
15757         prototype.
15758         (print_base_classname, utf8_cmp, cxx_keyword_subst,
15759         name_is_method_p): Constify a char*.
15760         (get_field_name): Likewise.  Prefer xstrdup over malloc/strcpy.
15761         Provide a final else clause in an if-else-if.
15762         (print_field_info): Add missing final arg in function call to
15763         `print_field_name'.
15764         (print_method_info, decompile_method, decode_signature_piece,
15765         print_c_decl, print_full_cxx_name, print_stub,
15766         print_mangled_classname, super_class_name, print_include,
15767         add_namelet, add_class_decl, print_class_decls, process_file,
15768         help): Constify a char*.
15769
15770         * jcf-write.c (jcf_handler, push_constant1, push_constant2,
15771         push_int_const, find_constant_wide, find_constant_index,
15772         push_long_const, field_op, maybe_wide, emit_dup, emit_pop,
15773         emit_iinc, emit_load_or_store, emit_load, emit_store, emit_unop,
15774         emit_binop, emit_reloc, emit_switch_reloc, emit_case_reloc,
15775         emit_if, emit_goto, emit_jsr, call_cleanups,
15776         make_class_file_name): Add static prototypes.
15777         (generate_bytecode_return, generate_bytecode_insns): Pass a
15778         NULL_PTR, not a NULL_TREE.
15779
15780         * jv-scan.c: Include "jcf.h".
15781         (main): Declare using DEFUN macro.
15782
15783         * jvspec.c (find_spec_file, lang_specific_pre_link,
15784         lang_specific_driver): Add prototypes.
15785         (find_spec_file): Constify a char*.
15786
15787         * keyword.gperf (hash, java_keyword): Add prototypes.
15788
15789         * lang.c (lang_print_error): Add static prototype.
15790         (lang_init): Prefer memcpy over bcopy to avoid casts.
15791
15792         * lex.c (yylex): Add static prototype.
15793
15794         * parse-scan.y: Include "lex.c" earlier.
15795
15796         * parse.h: Remove redundant declaration for `yylex'.
15797
15798         * parse.y (java_decl_equiv, binop_compound_p, search_loop,
15799         labeled_block_contains_loop_p): Add static prototypes.
15800         (not_accessible_p): Make static to match prototype.
15801
15802         * verify.c (start_pc_cmp): Don't needlessly cast away const.
15803
15804 1999-08-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15805
15806         * parse.y (check_method_redefinition): Changed leading comment.
15807         (check_abstract_method_definitions): New function.
15808         (java_check_abstract_method_definitions): New function.
15809         (java_check_regular_methods): Call it.
15810         (verify_constructor_super): Fixed indentation.
15811         (lookup_method_invoke): Likewise.
15812
15813 1999-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15814
15815         * parse.y (method_header): Return a null pointer if the current
15816         class node is null.
15817         (finish_method_declaration): Return if the current function decl
15818         is null.
15819         (source_start_java_method): Likewise.
15820         (java_method_add_stmt): Likewise.
15821
15822 1999-08-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15823
15824         * class.c (emit_register_class): Removed unnecessary call to
15825         start_sequence.
15826         * parse.y (labeled_block_contains_loop_p): Removed unused local
15827         variable.
15828
15829 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15830
15831         * parse.y (java_refold): Added prototype.
15832
15833 1999-08-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
15834
15835         * parse.y (BINOP_COMPOUND_CANDIDATES): New macro.
15836         (java_stabilize_reference): Removed unnecessary `else'.
15837         (java_complete_lhs): Set flag to remember boolean. Call
15838         java_refold. Added comments.
15839         (java_decl_equiv): New function.
15840         (binop_compound_p): Likewise.
15841         (java_refold): Likewise.
15842         (patch_unaryop): Striped static field access assigned to decl and
15843         op. Changed promotion scheme for ++/-- operators.
15844         (search_loop): New function.
15845         (labeled_block_contains_loop_p): Likewise.
15846         (patch_loop_statement): Call labeled_block_contains_loop_p. Added
15847         comment.
15848         (patch_bc_statement): Call search_loop. Fixed comment.
15849
15850 1999-08-14  Anthony Green  <green@cygnus.com>
15851
15852         * expr.c (java_lang_expand_expr): Mark static array data as
15853         referenced.
15854
15855 1999-08-10  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
15856
15857         * jvgenmain.c (main): NUL-terminate name_obstack.
15858
15859 1999-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15860
15861         * check-init.c (check_bool2_init, done_alternative): Add static
15862         prototypes.
15863
15864         * class.c (add_interface_do, maybe_layout_super_class): Likewise.
15865         (add_method, build_utf8_ref, build_class_ref,
15866         append_gpp_mangled_type, layout_class_method): Constify a char*.
15867
15868         * decl.c (push_promoted_type, make_binding_level): Add static
15869         prototypes.
15870         (push_promoted_type, pushdecl): Constify a char*.
15871
15872         * except.c (find_handler_in_range, link_handler,
15873         check_start_handlers): Add static prototypes.
15874
15875         * expr.c (process_jvm_instruction): Constify a char*.
15876
15877         * gjavah.c (main): Constify a char*.
15878
15879         * java-tree.h (verify_jvm_instructions, process_jvm_instruction):
15880         Constify a char*.
15881
15882         * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add
15883         static prototypes.
15884         (add_entry, jcf_dependency_set_target, jcf_dependency_add_target,
15885         munge, print_ents): Constify a char*.
15886
15887         * jcf-dump.c (disassemble_method): Constify a char*.
15888         (print_constant_pool, print_exception_table): Add static prototypes.
15889         (print_constant, print_exception_table, main, disassemble_method):
15890         Constify a char*.
15891
15892         * jcf-io.c (find_classfile, find_class): Likewise.
15893
15894         * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise.
15895         (set_source_filename, predefined_filename_p): Add static prototypes.
15896         (set_source_filename, get_constant, get_class_constant,
15897         find_in_current_zip): Constify a char*.
15898
15899         * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add
15900         static prototypes.
15901         (add_entry, add_path, jcf_path_classpath_arg,
15902         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15903
15904         * jcf-reader.c (get_attribute, jcf_parse_preamble,
15905         jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields,
15906         jcf_parse_one_method, jcf_parse_methods,
15907         jcf_parse_final_attributes): Add static prototypes.
15908         (get_attribute): Constify a char*.
15909
15910         * jcf.h (find_class, find_classfile, jcf_dependency_set_target,
15911         jcf_dependency_add_target, jcf_path_classpath_arg,
15912         jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*.
15913
15914         * jv-scan.c (main): Constify a char*.
15915         (gcc_obstack_init): Add prototype arguments.
15916
15917         * jvgenmain.c (gcc_obstack_init): Likewise.
15918         (main): Constify a char*.
15919
15920         * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add
15921         static prototypes.
15922         (put_decl_string, lang_print_error): Constify a char*.
15923         (lang_init): Remove redundant extern prototype.
15924
15925         * mangle.c (emit_unicode_mangled_name): Constify a char*.
15926
15927         * typeck.c (convert_ieee_real_to_integer, parse_signature_type):
15928         Add static prototypes.
15929         (get_type_from_signature): Constify a char*.
15930
15931         * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ):
15932         Add static prototypes.
15933         (start_pc_cmp): Prefer PTR over GENERIC_PTR.
15934         (verify_jvm_instructions): Constify a char*.
15935
15936         * xref.c (xref_flag_value): Likewise.
15937
15938         * xref.h (xref_flag_value): Likewise.
15939
15940         * zextract.c (makeword, makelong): Add static prototypes.
15941         (makeword, makelong): Constify a uch*.
15942
15943 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15944
15945         * lang.c (java_dummy_print): Constify a char*.
15946         (lang_print_error): Likewise.
15947         (lang_init): Remove redundant prototype for `print_error_function'.
15948         (lang_init_source): Likewise.
15949         (lang_identify): Constify a char*.
15950
15951 1999-08-09  Tom Tromey  <tromey@cygnus.com>
15952
15953         * javaop.h (WORD_TO_FLOAT): only inline if building with gcc.
15954         (WORDS_TO_LONG): Likewise.
15955         (WORDS_TO_DOUBLE): Likewise.
15956
15957 1999-08-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
15958
15959         * Makefile.in (lang.o): Depend on $(RTL_H) $(EXPR_H).
15960
15961         * expr.c (java_stack_pop, java_array_data_offset,
15962         build_java_throw_out_of_bounds_exception, case_identity,
15963         build_java_check_indexed_type): Add static prototypes.
15964         (linenumber_table, expand_invoke, expand_java_field_op,
15965         build_primtype_type_ref, expand_byte_code): Constify a char*.
15966
15967         * java-tree.h (build_primtype_type_ref, linenumber_table):
15968         Constify a char*.
15969         (java_lang_expand_expr): Add prototype.
15970
15971         * lang.c: Include rtl.h and expr.h.  Remove extern prototype for
15972         `java_lang_expand_expr'.
15973
15974         * lex.c (java_lex_error): Constify a char*.
15975         (java_get_unicode, java_read_char, java_allocate_new_line,
15976         java_unget_unicode, java_sneak_unicode): Prototype.
15977
15978         * parse-scan.y (current_class, package_name, method_declarator,
15979         report_class_declaration, yyerror): Constify a char*.
15980
15981         * parse.h (java_report_errors): Prototype.
15982         (yyerror): Constify a char*.
15983
15984         * parse.y (classitf_redefinition_error, check_modifiers,
15985         parse_jdk1_1_error, lookup_package_type,
15986         lookup_package_type_and_set_next, get_printable_method_name,
15987         purify_type_name): Constify a char*.
15988         (build_super_invocation, maybe_generate_finit,
15989         verify_constructor_super, parser_add_interface,
15990         add_superinterfaces, jdep_resolve_class, note_possible_classname,
15991         java_complete_expand_methods, java_expand_finals,
15992         cut_identifier_in_qualified, java_stabilize_reference,
15993         do_unary_numeric_promotion, operator_string, do_merge_string_cste,
15994         merge_string_cste): Prototype.
15995         (single_type_import_declaration, yyerror,
15996         variable_redefinition_error, build_array_from_name,
15997         build_unresolved_array_type, check_class_interface_creation,
15998         resolve_class, complete_class_report_errors,
15999         note_possible_classname, read_import_dir,
16000         find_in_imports_on_demand, resolve_package, fix_constructors,
16001         check_deprecation, lookup_method_invoke,
16002         maybe_build_primttype_type_ref, array_constructor_check_entry):
16003         Constify a char*.
16004         (java_complete_expand_methods, java_expand_finals): Make static.
16005         (convert_narrow): Remove static prototype.
16006
16007 1999-08-03  J"orn Rennecke <amylaar@cygnus.co.uk>
16008
16009         * Makefile.in (decl.o): Depends on $(srcdir)/../defaults.h.
16010
16011 1999-08-02  Richard Henderson  <rth@cygnus.com>
16012
16013         * decl.c: Include defaults.h instead of expr.h.
16014         * parse.y: Likewise.
16015
16016 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
16017
16018         * java/decl.c (start_java_method): Change all uses of
16019         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
16020         Ensure expr.h is included.
16021         * java/expr.c (pop_arguments): Ditto.
16022         * java/parse.y (expand_start_java_method): Ditto.
16023
16024 1999-08-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16025
16026         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
16027
16028 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
16029
16030         * decl.c: Include "function.h".
16031         * except.c: Likewise.
16032         * parse.y: Likewise.
16033         * Makefile.in: Update dependencies.
16034
16035 1999-07-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16036
16037         * expr.c (build_java_soft_divmod): Provide a default case in switch.
16038         (java_lang_expand_expr): Mark parameters `target', `tmode' and
16039         `modifier' with ATTRIBUTE_UNUSED.
16040
16041         * gjavah.c (process_file): Add braces around ambiguous `else'.
16042
16043         * jcf-dump.c (print_access_flags, localvar_free): Change return
16044         type to void.
16045
16046         * parse.y (java_complete_expand_method): Initialize variable
16047         `exception_copy'.
16048         (resolve_qualified_expression_name): Likewise for `field_decl'.
16049         (patch_method_invocation): Likewise for `class_to_search'.
16050         (qualify_ambiguous_name): Likewise for `name' and `ptr_type'.
16051         (patch_assignment): Likewise for `lhs_type'.
16052
16053         * verify.c (verify_jvm_instructions): Remove unused variable
16054         `caller'.
16055
16056 1999-07-25  Richard Henderson  <rth@cygnus.com>
16057
16058         * decl.c (va_list_type_node): New.
16059
16060 1999-07-25  Anthony Green  <green@cygnus.com>
16061
16062         * gjavah.c (print_stub): New function.
16063         (METHOD_IS_NATIVE): New macro.
16064         (print_mangled_classname): Make static.
16065         (HANDLE_END_FIELD): Don't emit fields during stub generation.
16066         (process_file): Perform stub generation.
16067         (HANDLE_METHOD): Don't emit class decls during stub
16068         generation.
16069         (HANDLE_END_METHOD): Take into account stub generation.
16070         (print_method_info): Handle stub generation.
16071         (print_stub): New function.
16072         (print_cxx_classname): Make signature consistant with others.
16073         (help): Describe -stubs option.
16074         (main): Create stub file.
16075         (version): Use version.c.
16076         (print_full_cxx_name): New function.
16077         (print_c_decl): Use print_full_cxx_name.
16078
16079 1999-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16080
16081         * check-init.c (check_init): Handle MAX_EXPR.
16082
16083 1999-07-15  Andrew Haley  <aph@cygnus.com>
16084
16085         * lang.c (flag_use_divide_subroutine): New variable.
16086         * typeck.c: (convert_ieee_real_to_integer): Bounds check
16087         fp-to-integer conversion.
16088         (convert): Call convert_ieee_real_to_integer when flag_fast_math
16089         is not set.
16090
16091         * expr.c (build_java_soft_divmod): New function.
16092         (build_java_binop): Call build_java_soft_divmod if
16093         flag_use_divide_subroutine is set.
16094         * decl.c: soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16095         soft_lrem_node: new builtin functions.
16096         (init_decl_processing) Initialize the new builtins.
16097         * java-tree.h soft_idiv_node, soft_irem_node, soft_ldiv_node, tree
16098         soft_lrem_node: new builtin functions.
16099         (build_java_soft_divmod): New function.
16100         * parse.y: Call build_java_soft_divmod if
16101         flag_use_divide_subroutine is set.
16102         * parse.c: Rebuilt.
16103
16104         * jvspec.c (lang_specific_driver): Always allow an extra arg (for
16105         a --specs= arg) even if not linking.
16106         * lang-options.h (DEFINE_LANG_NAME ("Java")): Add
16107         -fuse-divide-subroutine
16108
16109 1999-07-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16110
16111         * parse.y (resolve_and_layout): Check methods only once.
16112         (resolve_qualified_expression_name): Verify thrown exceptions
16113         compatibility.
16114         (check_thrown_exceptions): Reject exceptions thrown in
16115         initializer. Error message tuned.
16116
16117 1999-07-14  Andrew Haley  <aph@cygnus.com>
16118
16119         * expr.c (expand_expr): Do not return the last statement in a
16120         block as the block's value.
16121
16122 1999-07-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16123
16124         * expr.c (force_evaluation_order): Save the COMPOUND_EXPR'ed
16125         CALL_EXPR, to avoid order of evaluation changes.
16126
16127 1999-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16128
16129         * parse.y (qualify_ambiguous_name): Do not use
16130         IDENTIFIER_LOCAL_VALUE when name is a STRING_CST.
16131
16132 1999-07-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16133
16134         * check-init.c (check_init): Handle MAX_EXPR.
16135         * expr.c (force_evaluation_order): Force method call arguments to
16136         be evaluated in left-to-right order.
16137         * parse.y (qualify_ambiguous_name): Loop again to qualify
16138         NEW_ARRAY_EXPR properly.
16139
16140 1999-06-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16141
16142         * parse.y (patch_invoke): Resolve unresolved invoked method
16143         returned type.
16144         (qualify_ambiguous_name): STRING_CST to qualify expression for
16145         type name resolution.
16146
16147 1999-06-24  Andrew Haley  <aph@cygnus.com>
16148
16149         * class.c (finish_class): Whenever a deferred method is
16150         output, rescan the list of methods to see if a new candidate for
16151         output can be found.
16152
16153 1999-06-28  Tom Tromey  <tromey@cygnus.com>
16154
16155         * jvspec.c (lang_specific_driver): Recognize --help.
16156
16157 1999-06-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16158
16159         * parse.y (resolve_package): Fixed bogus return statement.
16160         (patch_method_invocation): Resolve method invocation beginning with
16161         a package name qualifier.
16162
16163 1999-06-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16164
16165         * Make-lang.in (java.stage1): Depend on stage1-start.
16166         (java.stage2): Likewise for stage2-start.
16167         (java.stage3): Likewise for stage3-start.
16168         (java.stage4): Likewise for stage4-start.
16169
16170 1999-06-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16171
16172         * parse.y (java_complete_lhs): When doing cross referencing, don't
16173         try to keep file location on a WFL expanded as a CALL_EXPR.
16174
16175 1999-06-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16176
16177         * parse.y (finish_method_declaration): Insert a RETURN_EXPR when
16178         compiling to class file a void method with an empty method body.
16179         As a side effect, the bytecode backend will generate the
16180         appropriate `return' instruction.
16181
16182 1999-06-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16183
16184         * parse.y (lookup_package_type_and_set_next): New function prototype.
16185         (resolve_package): Search current and imported packages.
16186         (lookup_package_type_and_set_next): New function.
16187
16188 1999-06-22  Andrew Haley  <aph@cygnus.com>
16189
16190         * verify.c (verify_jvm_instructions): Check for pending blocks
16191         before invalid PC test and opcode switch, not after.
16192
16193 1999-06-21  Andrew Haley  <aph@cygnus.com>
16194
16195         * except.c (find_handler_in_range): The upper limit for exception
16196         ranges is exclusive, not inclusive: (start <= pc < end).
16197         (link_handler): find child pointer which points to outer by
16198         searching sibling list: previous code incorrectly assumed that
16199         outer->outer->first_child must point to outer.
16200         * verify.c (verify_jvm_instructions): FIXME added to code for
16201         `athrow'.
16202         (verify_jvm_instructions): Do not assume that the last block
16203         processed in a subroutine is a block which ends with a `ret'
16204         instruction.  With some control flows it is possible that the last
16205         block ends with an `athrow'.
16206
16207 1999-06-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16208
16209         * parse.y (qualify_ambiguous_name): Reorganized the post
16210         evaluation of non WFL leading expression nodes.
16211
16212 1999-06-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16213
16214         * parse.y (qualify_ambiguous_name): Handle ARRAY_REF after
16215         CONVERT_EXPR.
16216
16217 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16218
16219         * parse.y (qualify_ambiguous_name): Handle qualified expression
16220         beginning with a STRING_CST.
16221
16222 1999-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16223
16224         * parse.y (register_fields): Set DECL_INITIAL on both
16225         pre-initialized static and public fields.
16226         (resolve_field_access): Static field access expressions to always
16227         use pointer types.
16228         (qualify_ambiguous_name): Work out buried CALL_EXPR for proper
16229         qualification. CONVERT_EXPR to be resolved as an expression name.
16230         (java_complete_lhs): Identify and access qualified final
16231         initialized field in switch statement case expression.
16232         (fold_constant_for_init): Pre-initialized field decl constant to
16233         be folded.
16234
16235 1999-06-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16236
16237         * parse.y (note_possible_classname): Mark returned node with
16238         QUALIFIED_P only if the original class name contained a '/'.
16239
16240 1999-06-05  Anthony Green  <green@cygnus.com>
16241
16242         * Make-lang.in (gcjh): More parallel build fixes.
16243
16244 1999-06-03  Mike Stump  <mrs@wrs.com>
16245
16246         * Make-lang.in (JCF_DUMP_SOURCES, jvgenmain): Fix parallel builds.
16247
16248 1999-06-02  Anthony Green  <green@cygnus.com>
16249
16250         * except.c (link_handler): Chain exception handlers in order.
16251
16252 1999-06-02  Anthony Green  <green@cygnus.com>
16253
16254         * expr.c (expand_byte_code): Fill unreachable bytecode regions
16255         with nops and process as usual in order to always set correct EH
16256         ranges.  Emit detailed warnings about unreachable bytecodes.
16257
16258 1999-06-02  Anthony Green  <green@cygnus.com>
16259
16260         * class.c (build_utf8_ref): Mark cinit and utf8 tree nodes as
16261         constant.
16262
16263 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16264
16265         * parse.y (lookup_field_wrapper): Unified returned value to NULL
16266           or the searched field decl.
16267
16268 1999-05-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16269
16270         * parse.y (fold_constant_for_init): Convert numerical constant
16271         values to the type of the assigned field.
16272
16273 1999-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16274
16275         * expr.c (lookup_field): Relaxed the test on class loading error
16276         detection.
16277         * parse.y (fold_constant_for_init): Enabeled old code.
16278
16279 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16280
16281         * parse.y (valid_ref_assignconv_cast_p): Let `_Jv_CheckCast'
16282         decide the validity of the cast of a java.lang.Cloneable reference
16283         to an array.
16284         (patch_conditional_expr): Fixed first argument passed to
16285         binary_numeric_promotion.
16286
16287 1999-05-26  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16288
16289         * parse.y (qualify_ambiguous_name): Take into account that a
16290         CONVERT_EXPR might specify a type as a WFL.
16291
16292 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16293
16294         * parse.y (patch_assignment): Save the rhs before using it as an
16295         argument to _Jv_CheckArrayStore.
16296
16297 1999-05-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16298
16299         * lex.c (java_parse_doc_section): Fixed `tag' buffer size.
16300
16301 1999-05-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16302
16303         * lex.c (java_lex): Accepts `+' or `-' after the beginning of a
16304         floating point literal only when the exponent indicator has been
16305         parsed.
16306
16307 1999-05-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16308
16309         * parse.y (formal_parameter:): Construct argument tree list
16310         element even if a yet unsupported final parameter was encountered.
16311
16312 1999-05-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16313
16314         * parse.y (finish_method_declaration): Issue errors for native or
16315         abstract methods declared with a method body, as well as for non
16316         native or non abstract methods with no method body.
16317
16318 1999-05-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16319
16320         * class.c (build_utf8_ref): Initialize variable `field'.
16321
16322         * decl.c (init_decl_processing): Initialize variable `field'.
16323
16324         * expr.c (build_known_method_ref): Mark parameters `method_type',
16325         `method_signature' and `arg_list' with ATTRIBUTE_UNUSED.
16326         (process_jvm_instruction): Likewise for parameter `length'.
16327
16328         * jvspec.c (lang_specific_driver): Mark variables `saw_math',
16329         `saw_libc', `saw_gc', `saw_threadlib' and `saw_libgcj' with
16330         ATTRIBUTE_UNUSED.
16331
16332         * parse.y (maybe_generate_clinit): Remove unused variable
16333         `has_non_primitive_fields'.
16334         (find_in_imports_on_demand): Initialize variables `node_to_use'
16335         and `cl'.
16336         (patch_binop): Likewise for variable `prom_type'.
16337         (patch_unaryop): Likewise for variable `prom_type'.
16338
16339         * verify.c (verify_jvm_instructions): Likewise for variable `last'.
16340
16341         * xref.c (xref_table): Add missing initializer.
16342
16343 1999-05-14  Tom Tromey  <tromey@cygnus.com>
16344
16345         * java-except.h (struct eh_range): Removed unused `next' member.
16346         * verify.c (verify_jvm_instructions): Call check_nested_ranges
16347         after adding all exception handlers.  Sort exception ranges in
16348         order of start PC.
16349         (struct pc_index): New structure.
16350         (start_pc_cmp): New function.
16351         * except.c (add_handler): Return `void'.  Don't call link_handler;
16352         instead construct an ordinary linked list and do range
16353         coalescing.
16354         (check_nested_ranges): New function.
16355         (link_handler): Changed interface to allow merging of eh_ranges.
16356         Split overlapping ranges.  Return `void'.
16357
16358 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16359
16360         * parse.y (constructor_block_end:): New rule, tagged <node>.
16361         (constructor_body:): Use `constructor_block_end' instead of
16362         `block_end'.
16363
16364 1999-05-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16365
16366         * parse.y (statement_nsi:): Pop `for' statement block.
16367         (java_complete_lhs): Labeled blocks containing no statement are
16368         marked as completing normally.
16369
16370 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16371
16372         * xref.c (xref_set_current_fp): New function, defined.
16373         * xref.h (xref_set_current_fp): New function, prototyped.
16374
16375 1999-05-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16376
16377         * check-init.c (check_init): Take into account that
16378         LABELED_BLOCK_STMT can be empty.
16379
16380 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16381
16382         * parse.y (java_check_regular_methods): Warning check on not
16383         overriding methods with default access in other packages does not
16384         apply to `<clinit>'.
16385         (java_complete_lhs): If block body is an empty_stmt_node, replace
16386         it by NULL_TREE. This prevents gcc from generating an irrelevant
16387         warning.
16388
16389 1999-05-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16390
16391         * check-init.c (check_init): Removed code accepting to see things
16392         falling through default:, when doing xrefs.
16393         * java-tree.h (do_not_fold): New global variable, declared.
16394         * parse.y (do_not_fold): New global variable, defined.
16395         (java_complete_expand_method): Set `do_not_fold' to the value of
16396         `flag_emit_xref'. When doing xrefs: copy the thrown exceptions,
16397         and reinstall them after them have been purged; do not check for
16398         initializations; do not issue missing return errors.
16399         (java_complete_lhs): Do not attempt to patch INSTANCEOF_EXPR nodes
16400         when doing xrefs.
16401         (patch_binop): Skip the fold part when doing xrefs.
16402         (build_string_concatenation): Skip the concatenation part when
16403         doing xrefs.
16404         (patch_synchronized_statement): Do not generate a try-finally when
16405         doing xrefs.
16406         (patch_throw_statement): When doing xrefs, do not call BUILD_THROW
16407         and keep the location where the throw was seen.
16408         * typeck.c (convert): When `do_not_fold' is set, do not attempt
16409         any treatment on the converted node an simply return a NOP_EXPR of
16410         the targeted type.
16411         * xref.c (xref_get_data): New function, defined.
16412         * xref.h (xref_get_data): New function, declared.
16413         (XREF_GET_DATA): Use xref_get_data.
16414
16415 1999-05-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16416
16417         * gjavah.c (print_include): Cast the result of `strlen' to int
16418         when comparing against a signed value.
16419         (add_namelet): Likewise.
16420
16421 1999-05-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16422
16423         * expr.c (expand_invoke): Mark parameter `nargs' with
16424         ATTRIBUTE_UNUSED.
16425         (PRE_LOOKUP_SWITCH): Likewise for variable `match'.
16426
16427         * jcf-io.c (jcf_unexpected_eof): Mark parameter `count' with
16428         ATTRIBUTE_UNUSED.
16429
16430         * jcf-reader.c (get_attribute): Cast a value to long
16431         when comparing against a signed expression.  Likewise.
16432
16433         * lex.h: Never define HOST_WIDE_INT, HOST_BITS_PER_WIDE_INT or
16434         HOST_BITS_PER_CHAR.
16435
16436 1999-05-11  Andrew Haley  <aph@cygnus.com>
16437
16438         * parse.y (source_end_java_method): If the current method contains
16439         any exception handlers, force asynchronous_exceptions: this is
16440         necessary because signal handlers in libjava may throw exceptions.
16441         * decl.c (end_java_method): Ditto.
16442
16443 1999-05-11  Tom Tromey  <tromey@cygnus.com>
16444
16445         * Make-lang.in (jvspec.o): Don't define WITH_THREAD_x or WITH_GC_x
16446         flags.
16447         * jvspec.c (THREAD_NAME): Removed.
16448         (GC_NAME): Likewise.
16449         (MATHLIB): Likewise.
16450         (WITHLIBC): Likewise.
16451         (GCLIB): Likewise.
16452         (THREADLIB): Likewise.
16453         (MATH_LIBRARY): Likewise.
16454         (lang_specific_driver): Don't add `-l' options to command line.
16455         Instead, add a single --specs option.  Recognize `-L' options and
16456         use them to search for spec file.
16457         (find_spec_file): New function.
16458         (SPEC_FILE): New define.
16459
16460 1999-05-11  Dave Brolley  <brolley@cygnus.com>
16461
16462         * lang-options.h: -MD, -MMD, -M and -MM not needed here for
16463         cpplib-enabled build.
16464
16465 1999-05-05  Per Bothner  <bothner@cygnus.com>
16466
16467         * class.c (make_field_value):  DECL_INITIAL may be a string literal;
16468         temporarily zero it while calling rest_of_decl_compilation.
16469
16470         * java-tree.h (string_ptr_type_node):  Add declaration.
16471         * decl.c:  Define and initialize string_ptr_type_node.
16472         * parse.y (patch_string_cst):  Use string_ptr_type_node.
16473
16474         * parse.h (LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P):  Removed.
16475         * parse.y (for_statement):  Now unconditionally exit_block.
16476         (finish_labeled_statement):  No longer exit_block if for-loop.
16477         (patch_loop_statement):  Check harder if the loop is already labeled.
16478
16479         * parse.y (patch_initialized_static_field):  Removed function.
16480         (maybe_generate_clinit):  Removed special handling for interfaces.
16481         (java_complete_expand_methods):  Do a preliminary java_complete_tree
16482         on <clinit> to determine if it can be removed.
16483         (java_complete_expand_method):  Remove special handling for <clinit>.
16484         (java_complete_lhs):  For BLOCK and EXPR_WITH_FILE_LOCATION
16485         optimize if we get back empty_stmt_node.
16486         For MODIFY_EXPR, re-do checking of static initializers.
16487         (fold_constant_for_init):  Don't return immediate if VAR_DECL.
16488         For VAR_DECL, pass correct context.
16489
16490         * verify.c (verify_jvm_instructions):  Better error messages.
16491
16492 1999-05-03  Tom Tromey  <tromey@cygnus.com>
16493
16494         * parse-scan.y (interface_declaration): Call
16495         report_class_declaration for interfaces.
16496
16497 1999-04-30 20:54 -0400  Zack Weinberg  <zack@rabi.columbia.edu>
16498
16499         * Makefile.in: Remove -v from bison command lines.
16500
16501 1999-04-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16502
16503         * check-init.c (check_init): Exclude a case of error when doing
16504         xrefs.
16505         * class.c (layout_class_method): Don't generate the error message
16506         twice when compiling from source.
16507         * lang-options.h: Added `-Wredundant-modifers' and
16508         `-Wunusupported-jdk11' flags and help text.
16509         * lang.c (lang_decode_option): Added support for
16510         `-Wunsupported-jdk11' and `-Wredundant-modifiers'.
16511         flag_static_local_jdk11 and flag_redundant set accordingly.
16512         * lex.c (java_lex): Call BUILD_OPERATOR on CCB_TK.
16513         * parse.h (EXPR_WFL_ADD_COL): New macro.
16514         (DECL_END_SOURCE_LINE): Likewise.
16515         (DECL_INHERITED_SOURCE_LINE): Likewise.
16516         * parse.y (static_ref_err): New function, prototyped.
16517         (CCB_TK): Now tagged <operator>.
16518         (class_body:): Remember the location of the closing '}' of a class
16519         definition when doing xrefs.
16520         (block:): Likewise.
16521         (block_end:): Likewise.
16522         (create_class): Remember the location of the inherited class
16523         identifier when doing xrefs.
16524         (register_fields): Added test on first operand of `init' before
16525         testing it TREE_CODE.
16526         (method_header): Store the location of the class identifier in the
16527         class decl when doing xrefs.
16528         (finish_method_declaration): Don't combine first/last method line
16529         when doing xref.
16530         (java_check_regular_methods): Warning check on not overriding
16531         methods with default access on other packages move before check on
16532         static methods. Initialization of `aflags' also moved up.
16533         (resolve_expression_name): Call static_ref_err to report the error.
16534         (static_ref_err): New function, implemented.
16535         (resolve_field_access): Returned simplified static field access
16536         when doing xrefs.
16537         (resolve_qualified_expression_name): Check for illegal use of
16538         static fields in a non static context. Call static_ref_err to
16539         report error in various places.
16540         (java_complete_tree): Do not fold initialized static fields when
16541         doing xrefs.
16542         (java_complete_lhs): Likewise.
16543
16544 1999-04-29  Anthony Green  <green@cygnus.com>
16545
16546         * expr.c (generate_name): Use ASM_GENERATE_INTERNAL_LABEL to
16547         create internal labels.
16548         (lookup_label): Ditto.
16549
16550 1999-04-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16551
16552         * class.c (layout_class_method): Generate <clinit>'s rtl for
16553         interfaces.
16554         * decl.c (complete_start_java_method): Don't call _Jv_InitClass
16555         for interfaces' <clinit>.
16556         * expr.c (lookup_field): Search for fields in interfaces.
16557         (expand_invoke): Fixed indentation.
16558         (expand_java_field_op): Likewise. Use IS_CLINIT.
16559         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): Macro removed.
16560         (IS_CLINIT): New macro.
16561         * parse.y (type_declaration:): Call maybe_generate_clinit after an
16562         interface was parsed.
16563         (maybe_generate_clinit): Don't generate if the current class is an
16564         interface with only fields of primitive types.
16565         (reset_method_name): Use IS_CLINIT.
16566         (java_complete_expand_method): Expand <clinit> when it exists for
16567         interfaces. Use IS_CLINIT.
16568         (resolve_expression_name): Use DECL_CONTEXT instead of
16569         current_class to build static field references.
16570         (java_complete_lhs): Use IS__CLINIT. Don't use SAVE_EXPR on
16571         ARRAY_REF when doing xreferencing.
16572         (check_final_assignment): Fixed typo in leading comment. Use
16573         IS_CLINIT.
16574         (patch_array_ref): Don't fully expand array references when
16575         xreferencing.
16576         (patch_return): Use IS_CLINIT.
16577         (patch_throw_statement): Likewise.
16578
16579 1999-04-22  Tom Tromey  <tromey@cygnus.com>
16580
16581         * Make-lang.in (JAVA_SRCS): Added check-init.c.
16582
16583 1999-04-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16584
16585         * decl.c (predef_filenames, predef_filenames_size): New globals
16586         (init_decl_processing): predef_filenames and predef_filenames_size
16587         initialized.
16588         * java-tree.h (predef_filenames, predef_filenames_size): Declared
16589         extern.
16590         * jcf-parse.c (predefined_filename_p): New function.
16591         (yyparse): Check that files on the command line are specified only
16592         once and issue a warning otherwise.
16593         * parse.h (JPRIMITIVE_TYPE_OR_VOID_P): New macro.
16594         * parse.y (source_end_java_method): Nullify NOP method bodies, to
16595         avoid a gcc warning with -W -Wall turned on.
16596         (java_expand_classes): Abort if errors were encountered.
16597         (java_complete_lhs): If the cross reference flag is set, wrap
16598         field DECL node around a WFL when resolving expression name.
16599
16600 1999-04-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16601
16602         * lang.c (lang_decode_option): Fixed returned value when parsing
16603         `-fxref=...' and `-Wall'.
16604         * parse.y (source_end_java_method): Do not generate code when
16605         flag_emit_xref is set.
16606         (resolve_expression_name): Do not build static field access when
16607         flag_emit_xref is set.
16608         (resolve_field_access): No special treatment on `length' when
16609         flag_emit_xref is set. Do not build qualified static field access
16610         when flag_emit_xref is set.
16611         (patch_invoke): Keep the method DECL as operand 0 of the CALL_EXPR
16612         when flag_emit_xref is set.
16613         (patch_assignment): Do not generate array store runtime check when
16614         flag_emit_xref is set.
16615         * xref.c (xref_flag_value): Fixed function declaration
16616         indentation.
16617         (xset_set_data): New function.
16618         * xref.h (xref_set_data): Added prototype for new function.
16619         (typedef struct xref_flag_table): New field data.
16620         (XREF_GET_DATA): New macro.
16621
16622 1999-04-19  Tom Tromey  <tromey@cygnus.com>
16623
16624         * xref.h (enum): Removed trailing comma.
16625
16626         * parse.y (resolve_qualified_expression_name): Added missing
16627         `break'.
16628
16629 1999-04-15  Anthony Green  <green@cygnus.com>
16630
16631         * gjavah.c: New prototypes for java_float_finite and
16632         java_double_finite.
16633
16634 1999-04-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16635
16636         * parse.y (patch_unaryop): Fixed ++/-- operator check on array
16637         references.
16638
16639 1999-04-06  Jeffrey A Law  (law@cygnus.com)
16640
16641         * Makefile.in (TREE_H): Add tree-check.h.
16642         (RTL_H): Add genrtl.h.
16643
16644 1999-04-06  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16645
16646         * parse.y (patch_assignment): Added ArrayStoreException runtime
16647         check.
16648
16649 1999-04-06  Per Bothner  <bothner@cygnus.com>
16650
16651         * expr.c (pop_type_0):  New function.
16652         (pop_type):  Use pop_type_0.
16653         * java-tree.h (pop_type_0):  New declaration.
16654         * verify.c (verify_jvm_instructions):  Check return instructions.
16655
16656         * parse.y (patch_binop):  Don't fold if non-constant and emiting
16657         class files.
16658
16659 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16660
16661         * Makefile.in (gjavah.o): Depend on $(JAVA_TREE_H).
16662
16663         * gjavah.c: Include math.h earlier.  Include tree.h/java-tree.h.
16664         (main_jcf): Don't define.
16665         (process_file): Don't set `main_jcf'.
16666
16667         * java-tree.h (main_jcf): Don't declare.
16668
16669         * jcf-parse.c (main_jcf): Add static definition.
16670
16671         * lang.c (main_jcf): Don't define.
16672
16673 1999-04-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16674
16675         * class.c (add_method_1): Cast the argument of `bzero' to PTR.
16676
16677         * decl.c (copy_lang_decl): Likewise for `bcopy'.
16678
16679         * jcf-depend.c: Include "config.h", not <config.h>.
16680
16681         * jcf-parse.c (jcf_figure_file_type): Cast the arguments of
16682         `bcopy' to PTR.
16683
16684         * jcf-path.c: Include "config.h", not <config.h>.
16685
16686         * lex.c: Don't include various system header files.
16687         (java_init_lex): Cast the argument of `bzero' to PTR
16688
16689         * parse-scan.y (java_push_parser_context): Likewise.
16690
16691         * parse.y (java_push_parser_context): Likewise.
16692         (patch_bc_statement): Match format specifier to variable argument.
16693
16694         * xref.c: Don't include <stdio.h>.
16695
16696 1999-04-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16697
16698         * parse.y (struct parser_ctxt *ctxp): Now global.
16699         (declare_local_variables): Use WFL compound value for the
16700         declaration source line value, when doing cross-referencing.
16701
16702 1999-03-31  Tom Tromey  <tromey@cygnus.com>
16703
16704         * gjavah.c (print_field_info): Allow constants of other types.
16705         (print_include): Generate include when new name is proper prefix
16706         of already printed name.
16707         (add_namelet): Likewise.
16708         (cxx_keyword_subst): New function.
16709         (print_method_info): Use it.
16710         (print_field_name): New function.
16711         (get_field_name): New function.
16712         (print_field_info): Use get_field_name and print_field_name.
16713
16714 1999-03-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16715
16716         * Makefile.in (keyword.h): Generate using gperf language 'C', not
16717         'KR-C', so gperf uses the `const' keyword on strings.
16718
16719         * keyword.gperf (java_keyword): Const-ify a char*.
16720
16721 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16722
16723         * parse.y (patch_bc_statement): Fixed identation and a bogus
16724         `printf' format.
16725
16726 1999-03-30  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16727
16728         * parse.y (patch_assignment): Allow static variables in other
16729         classes to be assigned.
16730
16731 1999-03-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16732
16733         * class.c (maybe_add_interface): Remove unused variable
16734         `interface_binfo'.
16735         (make_class_data): Use = for assignment, not ==.  Likewise.
16736         (emit_register_classes): Remove unused variable `decl'.
16737
16738         * lex.c: Fix comment so as not to contain an embedded `/*'.
16739
16740         * verify.c (verify_jvm_instructions): Remove unused variable
16741         `self_type'.
16742
16743 1999-03-27  Per Bothner  <bothner@cygnus.com>
16744
16745         * parse.y (complete_loop_body):  Rename to finish_loop_body.
16746         (complete_labeled_statement):  Rename to finish_labeled_statement.
16747         (complete_for_loop):  Rename to finish_for_loop.
16748         (complete_method_declaration):  Rename to finish_method_declaration.
16749
16750         * java-tree.h (continue_identifier_node):  New global node.
16751         * decl.c:  Define and initialize continue_identifier_node.
16752         * parse.y (generate_labeled_block):  Remove - no longer needed.
16753         (build_loop_body):  Use continue_identifier_node for continue block.
16754         (finish_labeled_statement):  Also do pop_labeled_block actions.
16755         (java_complete_lhs):  POP_LOOP even if error.
16756         (build_labeled_block):  Special handling for continue_identifier_node.
16757         (patch_loop_statement):  Re-organize.
16758         (patch_bc_statement):  Re-write.
16759
16760 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16761
16762         * parse.h (EXPR_WFL_GET_LINECOL): Set a line and column count
16763         using a WFL compound value.
16764         * parse.y (xref.h): Include.
16765         (maybe_create_class_interface_decl): Set DECL_SOURCE_LINE to the
16766         WFL compound value.
16767         (register_fields): Set WFL compound value to lineno if doing
16768         xrefs.
16769         (java_complete_expand_method): Call expand_xref if flag_emit_xref
16770         is set.
16771         * xref.c (system.h, jcf.h, parse.h, obstack.h): Include.
16772         * xref.h (expand_xref): Prototype renamed from xref_generate.
16773
16774 1999-03-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16775
16776         * parse.h (BLOCK_CHAIN_DECL): New use GET_CURRENT_BLOCK.
16777         (GET_CURRENT_BLOCK): New macro.
16778         * parse.y (current_static_block): New global variable.
16779         (method_body:): Define action.
16780         (complete_method_declaration): Set current_function_decl to NULL
16781         when work on the current method is done.
16782         (declare_local_variables): Use GET_CURRENT_BLOCK.
16783         (java_method_add_stmt): Likewise.
16784         (java_complete_expand_method): Disable the use of `this' when
16785         expanding <clinit>.
16786         (enter_a_block): If no current method exist, use
16787         current_static_block to link static initializer blocks.
16788         (exit_block): Rewritten to use current_static_block when no current
16789         method decl exists.
16790         (lookup_name_in_blocks): Use GET_CURRENT_BLOCK.
16791         (patch_return): Forbid the use of `return' in static initializers.
16792         (patch_throw_statement): Fixed indentation. Issue specific error
16793         for uncaught thrown checked exception in static initializer
16794         blocks. Removed FIXME.
16795
16796 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
16797
16798         * java/Make-lang.in: Remove all references to gcj.o/gcj.c.
16799         Link gcj from gcc.o.
16800
16801 1999-03-23  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16802
16803         * parse.y (find_applicable_accessible_methods_list): When dealing
16804         with interface: ensure that a given interface or java.lang.Object
16805         are searched only once.
16806
16807 1999-03-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16808
16809         * gjavah.c (print_c_decl): Remove unused argument `flags'.
16810
16811         * jcf-dump.c (print_access_flags): Add braces around if-else.
16812
16813         * jvspec.c (lang_specific_driver): Wrap variable `len' in macro
16814         COMBINE_INPUTS.
16815
16816         * lex.c (build_wfl_node): Add static prototype.
16817
16818         * lex.h (build_wfl_node): Remove static prototype.
16819
16820         * parse.y: Include lex.c early enough to declare everything needed.
16821         Ensure calls to `build_wfl_node' pass the proper arguments.
16822         (create_class): Remove unused variable `super_decl'.
16823         (get_printable_method_name): Initialize variable `name'.
16824
16825 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16826
16827         * Changelog: Fixed 1999-03-22 typos.
16828         * lang.c (lang_decode_option): Fixed typo in error string in the
16829         XARG section.
16830
16831 1999-03-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16832
16833         * Makefile.in (JAVA_OBJS): Added entry xref.o.
16834         (xref.o): New rule.
16835         * java-tree.h (flag_emit_xref): Declared extern.
16836         * lang.c (xref.h): Included.
16837         (flag_emit_xref): New global variable.
16838         (lang_decode_option): Added support for -fxref.
16839         * xref.c: Created.
16840         * xref.h: Likewise.
16841
16842 1999-03-21  Manfred Hollstein  <manfred@s-direktnet.de>
16843
16844         * Make-lang.in ($(GCJ)$(exeext)): Add intl.o to list of files to be
16845         linked with.
16846
16847 1999-03-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16848
16849         * Makefile.in (jcf-dump.o): Depend on $(CONFIG_H)
16850         $(srcdir)/../system.h and $(JAVA_TREE_H).
16851         (jcf-io.o): Depend on $(JAVA_TREE_H).
16852         (mangle.o): Likewise.
16853
16854         * check-init.c (check_cond_init): Add static prototype.
16855
16856         * class.c (build_java_method_type, hashUtf8String,
16857         make_field_value, get_dispatch_vector, get_dispatch_table,
16858         append_gpp_mangled_type, mangle_static_field): Likewise.
16859         (strLengthUtf8): Hide unused definition.
16860         (hashUtf8String): Const-ify.
16861         (make_field_value): Un-ANSI-fy.
16862
16863         * constants.c: Move inclusion of jcf.h above java-tree.h.
16864         (set_constant_entry, find_class_or_string_constant,
16865         find_name_and_type_constant, get_tag_node,
16866         build_constant_data_ref): Add static prototype.
16867
16868         * decl.c (push_jvm_slot, builtin_function,
16869         lookup_name_current_level): Likewise.
16870         (builtin_function): Const-ify.
16871
16872         * except.c (expand_start_java_handler, expand_end_java_handler):
16873         Add static prototype.
16874
16875         * expr.c (flush_quick_stack, push_value, pop_value,
16876         java_stack_swap, java_stack_dup, build_java_athrow,
16877         build_java_jsr, build_java_ret, expand_java_multianewarray,
16878         expand_java_arraystore, expand_java_arrayload,
16879         expand_java_array_length, build_java_monitor, expand_java_pushc,
16880         expand_java_return, expand_java_NEW, expand_java_INSTANCEOF,
16881         expand_java_CHECKCAST, expand_iinc, expand_java_binop, note_label,
16882         expand_compare, expand_test, expand_cond, expand_java_goto,
16883         expand_java_call, expand_java_ret, pop_arguments, expand_invoke,
16884         expand_java_field_op, java_push_constant_from_pool): Likewise.
16885
16886         (decode_newarray_type, expand_iinc): Un-ANSI-fy.
16887         (build_java_arraynull_check): Mark parameters `node' and `type'
16888         with ATTRIBUTE_UNUSED.
16889         (note_label): Likewise for parameter `current_pc'.
16890         (expand_java_call, expand_java_ret): Hide unused definition.
16891
16892         * java-tree.h (make_class, build_constants_constructor,
16893         java_set_exception_lang_code, pop_labeled_block, emit_handlers,
16894         init_outgoing_cpool, register_class, emit_register_classes,
16895         java_layout_seen_class_methods): Prototype.
16896         (unicode_mangling_length): Const-ify.
16897         (append_gpp_mangled_name, append_gpp_mangled_classtype,
16898         emit_unicode_mangled_name, format_int, format_uint,
16899         jcf_trim_old_input, jcf_print_utf8, jcf_print_char,
16900         jcf_print_utf8_replace, open_class): Prototype.
16901
16902         * jcf-dump.c: Include "config.h", not <config.h>.  Don't include
16903         <stdio.h>.  Include tree.h/java-tree.h.
16904         (utf8_equal_string usage, process_class): Add static prototype.
16905         (open_class): Don't prototype this here.
16906         (utf8_equal_string): Match arguments to format specifiers.
16907         (HANDLE_CODE_ATTRIBUTE, BRANCH, JSR, RET, LOOKUP_SWITCH,
16908         TABLE_SWITCH, disassemble_method): Likewise.
16909
16910         * jcf-io.c: Include tree.h/java-tree.h.
16911         (open_class, find_classfile, jcf_print_utf8,
16912         jcf_print_utf8_replace): Const-ify.
16913
16914         * jcf-parse.c (parse_zip_file_entries, process_zip_dir,
16915         parse_class_file): Add static prototype.
16916         (find_in_current_zip): Match definition to existing static
16917         prototype.
16918
16919         * jcf-write.c: Include jcf.h before tree.h/java-tree.h.
16920         (alloc_chunk, append_chunk, append_chunk_copy, gen_jcf_label,
16921         finish_jcf_block, define_jcf_label, get_jcf_label_here,
16922         put_linenumber, localvar_alloc, localvar_free, get_access_flags,
16923         write_chunks, adjust_typed_op, generate_bytecode_conditional,
16924         generate_bytecode_return, perform_relocations, init_jcf_state,
16925         init_jcf_method, release_jcf_state, generate_classfile):
16926         Add static prototype.
16927         (emit_unop): Mark parameter `type' with ATTRIBUTE_UNUSED.
16928         (make_class_file_name): Const-ify.
16929
16930         * jcf.h (find_classfile): Const-ify.
16931
16932         * jv-scan.c (reset_report): Remove prototype.
16933
16934         * jvgenmain.c: Include jcf.h/tree.h/java-tree.h.
16935         (error): Rewrite to allow varargs.
16936
16937         * lang.c (lang_f_options): Const-ify.
16938
16939         * lex.c (java_parse_escape_sequence): Add static prototype.
16940         (java_allocate_new_line): Match definition to existing static
16941         prototype.
16942
16943         * mangle.c Include tree.h/java-tree.h.
16944         (unicode_mangling_length, emit_unicode_mangled_name,
16945         append_gpp_mangled_name, append_gpp_mangled_classtype): Const-ify.
16946
16947         * parse.h (jdep_code): Remove trailing comma in enumeration.
16948         (java_get_line_col): Move prototype outside of !JC1_LITE test.
16949         (reset_report): Add prototype.
16950
16951         * verify.c (push_pending_label, merge_types): Add static
16952         prototypes.
16953
16954         * zipfile.h (opendir_in_zip, open_in_zip): Prototype.
16955
16956 1999-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16957
16958         * parse.y (find_applicable_accessible_methods_list): Extend the
16959         search to superinterfaces when relevant.
16960         (search_applicable_methods_list): New function.
16961
16962 1999-03-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16963
16964         * class.c (unmangle_classname): Implemented stricter testing
16965         before setting the QUALIFIED_P flag on an identifier.
16966
16967 1999-03-16  Per Bothner  <bothner@cygnus.com>
16968
16969         * parse.y (java_complete_lhs):  Call force_evaluation_order
16970         after patch_newarray.
16971         (patch_binop):  Don't call fold if there are side effects.
16972
16973 1999-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
16974
16975         * parse.y (java_stabilize_reference): Use save_expr instead of
16976         building a SAVE_EXPR node.
16977         (java_complete_lhs): Patch the resulting string of the `+='
16978         operator (if necessary) and complete the RHS after having built
16979         the cast.
16980
16981 1999-03-15  Per Bothner  <bothner@cygnus.com>
16982
16983         * class.c (make_class):  Don't set CLASS_P here (because
16984         this function is also called by build_java_array_type).
16985         (push_class):  Set CLASS_P here instead.
16986         * parse.h (TYPE_CLASS_P):  Check for TYPE_ARRAY_P is redundant.
16987
16988         * jcf-dump.c (print_access_flags):  Take extra parameter to indicate
16989         context.  If the context is class, perfer "super" over "synchronized".
16990         * jcf-write.c (generate_classfile):  Don't add ACC_SUPER if interface.
16991
16992         * parse.y (create_class):  Don't call parser_check_super here;
16993         it is not robust.  Always wait until later.
16994
16995         * parse.y (method_header):  For interfaces, set ACC_ABSTRACT (to
16996         match what JDK 1.2 does), but don't set ACC_PUBLIC.
16997
16998 1999-03-13  Per Bothner  <bothner@cygnus.com>
16999
17000         * lex.c (java_read_char):  UNGET invalid non-initial utf8 character.
17001         * lex.h (UNGETC):  Change misleading macro.
17002
17003 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17004
17005         * parse.y (java_stabilize_reference): Return NODE when patching a
17006         COMPOUND_EXPR.
17007         (java_complete_lhs): Put parenthesis around truth values.
17008
17009 1999-03-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17010
17011         * class.c (layout_class_method): Don't make rtl for interface
17012         methods.
17013         * parse.h (GET_TYPE_NAME): New macro.
17014         * parse.y (if_then_statement:): Fixed indentation.
17015         (if_then_else_statement:): Likewise.
17016         (for_statement:): Fixed spacing.
17017         (try_statement:): Fixed indentation.
17018         (create_interface): Don't force interfaces to be abstract.
17019         (method_header): Abstract methods are OK in interfaces.
17020         (declare_local_variables): Fixed typo in comment.
17021         (java_complete_expand_method): Fixed indentation.
17022         (resolve_qualified_expression_name): Use GET_TYPE_NAME to report
17023         non accessible fields.
17024         (java_stabilize_reference): New function.
17025         (java_complete_lhs): Fixed indentation. Use
17026         java_stabilize_reference in compound assignment. Insert the
17027         cast. If not processing `+' fix string constants before processing
17028         binop.
17029
17030 1999-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17031
17032         * constants.c (find_class_or_string_constant): Cast variable `j'
17033         to a `jword' when comparing against one.
17034
17035         * expr.c (java_lang_expand_expr): Remove unused variables
17036         `has_finally_p' and `op0'.
17037
17038         * gjavah.c (print_field_info): Cast a value to jint when comparing
17039         against one.  Likewise for a jlong.
17040         (add_namelet): Likewise cast a `sizeof' to an int when comparing
17041         against a signed quantity.
17042
17043         * jcf-dump.c (print_signature_type): Remove unused variable `digit'.
17044         (print_signature): Don't needlessly dereference variable `str'
17045
17046         * jcf-reader.c (get_attribute): Mark variables `max_stack' and
17047         `max_locals' with ATTRIBUTE_UNUSED.
17048         (jcf_parse_class): Likewise for variable `index'.
17049
17050         * parse.h (reverse_jdep_list): Remove static prototype.
17051
17052         * parse.y (build_jump_to_finally): Remove prototype and definition.
17053         (reverse_jdep_list): Add static prototype.
17054
17055         * typeck.c (convert_ieee_real_to_integer): Remove unused variables
17056         `assignment' and `expr_decl'.
17057
17058         * verify.c (verify_jvm_instructions): Remove unused label `bad_ldc'.
17059
17060 1999-03-12  Andrew Haley  <aph@cygnus.com>
17061
17062         * jcf-path.c (add_entry): alloca len+2 rather than len+1 bytes;
17063         we'll need a directory separator and a null character.
17064
17065 1999-03-10  Per Bothner  <bothner@cygnus.com>
17066
17067         * jcf-write.c (generate_bytecode_insns):  Handle __builtin_fmod, for %.
17068
17069 Tue Mar  9 11:52:08 1999  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17070
17071         * parse.y (method_header): Don't set ACC_ABSTRACT flags on
17072         interfaces.
17073
17074 1999-03-05  Per Bothner  <bothner@cygnus.com>
17075
17076         * lex.c (java_parse_end_comment):  Take extra parameter (next char).
17077
17078         * class.c (build_utf8_ref):  Fix possible name class/ambiguity.
17079
17080         * class.c (layout_class_method):  A static method in a base class
17081         is never overridden, so treat it like it doesn't exist.
17082         However, do complain about private non-static method overriding
17083         public static method.
17084
17085         * parse.y:  Don't set unused INITIALIZED_P flag.
17086         * java-tree.h (INITIALIZED_P):  Removed no-longer needed flag.
17087
17088         * parse.y (find_expr_with_wfl):  Optimize tail-calls.
17089         (build_array_from_name):  Re-order &index[string] to &string[index].
17090
17091         * parse.y (java_complete_lhs):  Don't call patch_assignment if rhs is
17092         error_mark (it might catch more errors, but it is more likely to lose).
17093
17094 1999-03-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17095
17096         * Makefile.in (jcf-parse.o): Depend on $(PARSE_H).
17097         (parse-scan.o): Depend on toplev.h.
17098
17099         * class.c (make_method_value): Add prototype.  Make it static.
17100         Remove unused second argument, caller changed.
17101
17102         * expr.c (java_lang_expand_expr): Remove unused variable
17103         `return_label'.
17104
17105         * java-tree.h: Don't prototype find_in_current_zip.
17106         Add prototypes for verify_constant_pool, start_java_method,
17107         end_java_method, give_name_to_locals, expand_byte_code,
17108         open_in_zip, set_constant_value, find_constant1, find_constant2,
17109         find_utf8_constant, find_string_constant, find_class_constant,
17110         find_fieldref_index, find_methodref_index, write_constant_pool,
17111         count_constant_pool_bytes and encode_newarray_type.
17112
17113         * jcf-dump.c: Remove unused variable `LONG_temp'.
17114
17115         * jcf-parse.c: Include parse.h.
17116         (jcf_parse_source): Remove unused parameter, all callers changed.
17117         (jcf_figure_file_type): Add static prototype.
17118         (find_in_current_zip): Likewise.  Also remove unused parameter,
17119         all callers changed.
17120         (read_class): Initialize variable `saved_pos'.
17121
17122         * jcf-reader.c (jcf_parse_preamble): Mark variables
17123         `minor_version' and `major_version' with ATTRIBUTE_UNUSED.
17124
17125         * lex.c (java_is_eol): Wrap prototype and definition in !JC1_LITE.
17126         (java_init_lex): Wrap variable `java_lang_imported' in !JC1_LITE.
17127         (java_parse_doc_section): Initialize variable `seen_star'.
17128         (java_lex): Wrap variable `number_beginning' in !JC1_LITE.
17129         (java_lex_error): Mark parameters `msg' and `forward' with
17130         ATTRIBUTE_UNUSED.
17131         (java_get_line_col): Mark parameters `filename' and `line' with
17132         ATTRIBUTE_UNUSED.
17133
17134         * parse-scan.y: Include toplev.h.
17135         (yyerror): Mark parameter `msg' with ATTRIBUTE_UNUSED.
17136
17137         * parse.h: use `struct JCF', not plain `JCF'.
17138         (java_parser_context_save_global, java_expand_classes
17139         java_parser_context_restore_global, java_parse): Add prototypes.
17140
17141         * typeck.c (convert_ieee_real_to_integer): Remove unused variable
17142         `node'.
17143
17144 1999-02-24  Per Bothner  <bothner@deneb.cygnus.com>
17145
17146         *  check-init.c (check_init):  COPYN takes word count, not bit count.
17147
17148 1999-02-26  Per Bothner  <bothner@cygnus.com>
17149
17150         * typeck.c (convert_ieee_real_to_integer):  Use save_expr instead of
17151         explicit build_decl.  (Avoids crash in reload when optimizing.)
17152
17153 1999-02-25  Per Bothner  <bothner@cygnus.com>
17154
17155         * decl.c (complete_start_java_method):  Handle synchronized method
17156         even when compiling from bytecode.
17157
17158 1999-02-26  Tom Tromey  <tromey@cygnus.com>
17159
17160         * gjavah.c (add_class_decl): Only generate `#include' if outer
17161         class is not the name of the class we are processing.  Correctly
17162         append `.h' in #include.
17163         (process_file): Clean up newlines around generated `#include's.
17164         (decode_signature_piece): Correctly handle inner classes.
17165         (struct include): New structure.
17166         (all_includes): New global.
17167         (print_include): New function.
17168         (add_class_decl): Use it.
17169         (process_file): Likewise.
17170         (add_class_decl): Generate include for java-array.h if array
17171         seen.
17172         (process_file): Don't generate java-array.h include.
17173
17174         * gjavah.c (add_namelet): Check for standard package names here.
17175         (add_class_decl): Don't check for standard package names here.
17176
17177 1999-02-25  Tom Tromey  <tromey@cygnus.com>
17178
17179         * parse.y (read_import_dir): Use `|=', not `+=', to set `found'.
17180         When reading a zip file, only use strncmp if both strings are
17181         bigger than the buffer length.  Initialize `k' when looping
17182         through zip file.
17183
17184 1999-02-24  Tom Tromey  <tromey@cygnus.com>
17185
17186         * gjavah.c (struct namelet): New structure.
17187         (add_namelet): New function.
17188         (print_namelet): New function.
17189         (print_class_decls): Use add_namelet and print_namelet to generate
17190         namespaces and not classes.
17191         (method_printed): New global.
17192         (HANDLE_END_METHOD): Examine method_printed.
17193         (print_method_info): Set method_printed when required.  Print
17194         error if function to be ignored is marked virtual.  Handle $finit$
17195         method.
17196         (METHOD_IS_FINAL): New macro.
17197         (print_field_info): Use it.
17198         (HANDLE_METHOD): Clear method_printed.
17199         (method_pass): New global.
17200         (HANDLE_END_FIELD): Call add_class_decl on the first pass.
17201         (process_file): Do two passes over both fields and methods.
17202         (HANDLE_METHOD): Examine method_pass.
17203         (root): New global.
17204         (add_class_decl): New function.
17205         (print_class_decls): Don't scan over entire constant pool.
17206
17207 1999-02-23  Tom Tromey  <tromey@cygnus.com>
17208
17209         * jvspec.c (lang_specific_driver): Recognize -fsyntax-only and
17210         disable linking in that case.
17211
17212 1999-02-20  Tom Tromey  <tromey@cygnus.com>
17213
17214         * jcf.h (UTF8_GET): Mask first byte of 3-byte encoding with 0x0f,
17215         not 0x1f.
17216
17217 1999-02-21  Per Bothner  <bothner@cygnus.com>
17218
17219         * decl.c (build_result_decl), java-tree.h:  New method.
17220         (complete_start_java_method):  Handle synchronized methods.
17221         Don't build DECL_RESULT here.  (Ordering dependency problem.)
17222         (start_java_method):  Call build_result_decl here instead  ...
17223         * parse.y (java_complete_expand_method):  ... and here.
17224         (expand_start_java_method): Don't call complete_start_java_method here.
17225         (java_complete_expand_method):  Call it here instead.
17226         * parse.h (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT):  Moved to ..
17227         * java-tree.h:  ... here.
17228
17229         * expr.c (force_evaluation_order):  Fix typo, don't handle ARRAY_REF.
17230         * parse.y (java_complete_lhs):  Don't call force_evaluation_order
17231         for ARRAY_REF - it doesn't work when array bounds are checked.
17232         (patch_array_ref):  Handle it here instead.
17233
17234         * jcf-write.c (generate_classfile):  Emit "Exceptions" attribute.
17235
17236 1999-02-19  Per Bothner  <bothner@cygnus.com>
17237
17238         Force left-to-right evaluation of binary operations etc.
17239         * expr.c (force_evaluation_order), java-tree.h:  New function.
17240         * parse.y (java_complete_lhs):  Pass binary operations, procedure
17241         calls, and ARRAY_REFs to force_evaluation_order.
17242         (various):  Set TREE_SIDE_EFFECTS more carefully.
17243
17244         Tolerate random (non-UTF8) encoding in comments without complaining.
17245         * lex.c (java_read_char):  Return 0xFFFE if bad UTF8 encoding.
17246         (java_is_eol):  Handle '\r' followed by '\n' instead of vice versa.
17247
17248         * parse.y (resolve_qualified_expression_name):  Handle error_mark.
17249         (java_complete_node case EXPR_WITH_FILE_LOCATION):  Likewise.
17250
17251         * parse.y (java_complete_lhs):  Ignore an empty statement in a
17252         COMPOUND_EXPR.  Don't complain about empty statement after return.
17253
17254 1999-02-19  Per Bothner  <bothner@cygnus.com>
17255
17256         * parse.y (obtain_incomplete_type):  Don't wrap unknown types
17257         in TREE_LIST - just chain the POINTER_TYPEs together.
17258         (resolve_class):  If type already resolved, return decl.
17259         After resolving, update TREE_TYPE(class_type), and name (if array).
17260         * parse.h (do_resolve_class), parse.y:  Make non-static.
17261         * class.c (maybe_layout_super_class):  Take this_class argument.
17262         Do do_resolve_class if necessary.
17263         (layout_class, layout_class_methods): Adjust calls appropriately.
17264         * parse.h (JDEP_TO_RESOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
17265         JDEP_RESOLVED_P):  Redefined for new TREE_LIST-less convention.
17266         * typeck.c (build_java_array_type):  Don't call layout_class.
17267
17268 1999-02-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17269
17270         * parse.y (check_pkg_class_access): Allow private class access
17271         within the same package.
17272         (strip_out_static_field_access_decl): New function.
17273         (patch_unaryop): Call strip_out_static_field_access_decl on ++/--
17274         operator argument before testing its nature.
17275
17276 1999-02-03  Per Bothner  <bothner@cygnus.com>
17277
17278         * java-tree.def (FINALLY_EXPR):  Removed.  (Now uses TRY_FINALLY_EXPR.)
17279         (TRY_EXPR):  Simplify - it no longer has a finally clause.
17280         * check-init.c (check_init):  Handle TRY_FINALLY_EXPR.
17281         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17282         * expr.c (java_lang_expand_expr):  Likewise.
17283         * java-tree.h (CATCH_EXPR_GET_EXPR):  Removed - no longer needed.
17284         * parse.h (java_get_catch_block), parse.y:  Removed - no longer needed.
17285         * parse.y (java_complete_lhs):  Add support for TRY_FIANLLY_EXPR.
17286         (build_try_statement):  Remove finally parameter and handling.
17287         (build_try_finally_statement):  New function.
17288         (patch_try_statement):   No longer need to support finally clause.
17289         (try_statement):  Update grammar action rules.
17290         * jcf-write.c (generate_bytecode_insns):  Handle TRY_FINALLY_EXPR.
17291         Simpler handling of TRY_EXPR, which no longer has a finally clause.
17292
17293 1998-11-26  Andrew Haley  <aph@viagra.cygnus.co.uk>
17294
17295         * jcf-parse.c (get_constant): Add braces around computation of 'd'
17296         when REAL_ARITHMETIC is not defined.  [Oct 26 fix got overwritten -PB]
17297
17298 1999-02-17  Andrew Haley  <aph@cygnus.com>
17299
17300         * class.c (build_utf8_ref): Back out broken patch which was
17301         intended to to output signatures using '.' as a separator.
17302
17303         * class.c (make_class_data): Output signatures using '.' as a
17304         separator, rather than '/'.
17305         (mangled_classname): Likewise.
17306         (make_field_value): Likewise.
17307         (make_method_value): Likewise.
17308         * constants.c (alloc_class_constant): Likewise.
17309         * expr.c (build_invokeinterface): Likewise.
17310
17311 1999-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17312
17313         * parse.y (valid_builtin_assignconv_identity_widening_p): Got rid
17314         of an ancient workaround.
17315
17316 1999-02-10  Jeffrey A Law  (law@cygnus.com)
17317
17318         * jvspec.c (xmalloc): Kill the prototype.  It does not belong
17319         here anymore.
17320
17321 1999-02-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17322
17323         * lex.c (yylex): Encode \0 as UTF8.
17324
17325 1999-02-10  Tom Tromey  <tromey@cygnus.com>
17326
17327         * jvspec.c (lang_specific_driver): Use libgcj, not libjava.
17328         * Makefile.in (jcf-path.o): Define LIBGCJ_ZIP_FILE.
17329         (libgcj_zip): Renamed.
17330         * jcf-path.c (add_entry): Use LIBGCJ_ZIP_FILE, not
17331         LIBJAVA_ZIP_FILE.
17332         (jcf_path_init): Use LIBGCJ_ZIP_FILE.
17333
17334         * jvspec.c (THREAD_NAME): Renamed -lqthreads to -lgcjcoop.
17335         (GC_NAME): Renamed -lgc to -lgcjgc.
17336
17337 1999-02-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17338
17339         * lex.c (java_lang_cloneable): Initialize.
17340         * parse.y (java_lang_cloneable): New static variable.
17341         (qualify_ambiguous_name): Take CONVERT_EXPR into account when
17342         doing one more qualification round.
17343         (valid_ref_assignconv_cast_p): Reject null source or
17344         destination. Allow an array to be cast into java.lang.Cloneable.
17345         (patch_cast): Swapped two first arguments to first call to
17346         valid_ref_assignconv_cast_p.
17347
17348 1999-02-08  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17349
17350         * parse.h: DECL_P renamed JDECL_P.
17351         * parse.y: DECL_P replaced by JDECL_P.
17352         (build_array_from_name): Always use pointer's type.
17353         (patch_bc_statement): Extra code to search continue target in a
17354         for loop. Fixed comments. Continue target is current loop when
17355         unlabeled.
17356
17357 1999-02-05  Andrew Haley  <aph@cygnus.com>
17358
17359         * class.c (make_class_data): The superclass of an interface should
17360         be null, not class Object.
17361
17362         * lex.c (java_lex): Sign extend hex literals.
17363
17364 1999-02-04  Andrew Haley  <aph@cygnus.com>
17365
17366         * class.c (build_utf8_ref): Output signatures using '.' as a
17367         separator, rather than '/'.
17368         (make_class_data): Likewise.
17369
17370 1999-02-03  Marc Espie <Marc.Espie@liafa.jussieu.fr>
17371
17372         * Make-lang.in ($(GCJ)(exeext)): Remove choose-temp.o, pexecute.o and
17373         mkstemp.o.  Get them from libiberty now.
17374
17375 1999-02-02  Jeffrey A Law  (law@cygnus.com)
17376
17377         * jcf-io.c: Do not include sys/stat.h or sys/wait.h
17378
17379 1999-02-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17380
17381         * jvspec.c (xmalloc): Fix the prototype to match the one obtained
17382         from libiberty.h
17383
17384 1999-02-02  Per Bothner  <bothner@cygnus.com>
17385
17386         Optimize: `return (a ? b : c)' as: `if (a) return b; else return c;'.
17387         * jcf-write.c (generate_bytecode_return):  New function.
17388         (generate_bytecode_insns):  Use it, for RETURN_EXPR.
17389
17390         * jcf-write.c (generate_bytecode_insns):  For REAL_CST that is 0 or 1,
17391         generate special [fd]const_[01] instructions.
17392
17393         * jcf-parse.c (yyparse):  Don't emit_register_classes if -fsyntax-only.
17394
17395         * verify.c (verify_jvm_instructions):  Do INVALIDATE_PC after
17396         handling OPCODE_lookupswitch or OPCODE_tableswitch.
17397
17398 1999-02-01  Per Bothner  <bothner@cygnus.com>
17399
17400         * parse.y (patch_method_invocation):  Handle calling static methods,
17401         even in the form EXPR.METHOD(ARGS), not just TYPE.METHOD(ARGS).
17402
17403         * parse.y (java_complete_lhs):  Don't complain about unreachable
17404         exit condition in a do-while statement.
17405
17406 1999-01-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17407
17408         * lex.c (java_read_char): Fixed utf8 decoding.
17409         (java_unicode_2_utf8): Fixed utf8 encoding in the 0x800-0xffff
17410         range.
17411         * parse.y (valid_builtin_assignconv_identity_widening_p): Fixed
17412         comments. Local variable `all_primitive' is gone. Broadened
17413         acceptance of `0' to floating point targets. `long' can now be
17414         widened to `double' or `float'.
17415         (valid_method_invocation_conversion_p): Added leading
17416         comment. Fixed tabulation.
17417         (build_string_concatenation): Optimize out left or right empty
17418         string constants.
17419
17420 1999-01-28  Per Bothner  <bothner@cygnus.com>
17421
17422         * jcf-write.c (localvar_alloc):  Only emit entry for
17423         LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
17424         (generate_bytecode_insns):  Only call put_linenumber if
17425         debug_info_level > DINFO_LEVEL_NONE.
17426         * jvspec.c (lang_specific_driver):  If no -O* or -g* option
17427         is specified, add -g1 (for compatibility wih javac).
17428
17429 1999-01-28  Hans-Peter Nilsson  <hp@axis.se>
17430
17431         * java/Makefile.in: Add missing dependencies for jcf-dump.o,
17432         gjavah.o, check-init.o, jv-scan.o
17433
17434 1999-02-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17435
17436         * Makefile.in (gjavah.o): Depend on $(CONFIG_H) and system.h.
17437
17438         * gjavah.c: Include config.h and system.h.
17439
17440         * javaop.h (inline): Don't define, its handled by system.h.
17441         (WORD_TO_FLOAT, WORDS_TO_LONG, WORDS_TO_DOUBLE): Change these
17442         from `inline' to `static inline'.
17443
17444         * jcf.h (inline): Don't define, its handled by system.h.
17445
17446         * lex.c (inline): Likewise.
17447
17448 1999-01-31  Zack Weinberg  <zack@rabi.columbia.edu>
17449
17450         * lang-specs.h: Map -Qn to -fno-ident.
17451
17452 1999-01-29  Richard Henderson  <rth@cygnus.com>
17453
17454         * check-init.c (check_init): Fix CLEANUP_POINT_EXPR typo.
17455
17456 1999-01-29  Tom Tromey  <tromey@cygnus.com>
17457
17458         * parse.h (BUILD_APPEND): If ARG is a non-String object reference,
17459         then cast it to Object before calling `append' method.
17460
17461 1999-01-28  Per Bothner  <bothner@cygnus.com>
17462
17463         * check-init.c (check_bool2_init, check_bool_init, check_init):
17464         Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR, and TRUTH_XOR_EXPR.
17465         * jcf-write.c (generate_bytecode_insns):  Likewise.
17466
17467 1999-01-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17468
17469         * jcf-parse.c (jcf_parse): Don't parse the same class file twice.
17470         * parse.y (patch_cast): Allow a boolean to be cast into a
17471         boolean.
17472
17473 1999-01-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17474
17475         * parse.y: (class_declaration:): Fixed indentation.
17476         (class_member_declaration:): Extra `;' after field declaration now
17477         accepted.
17478         (interface_declaration:): Removed debug messages in error reports.
17479         (patch_binop): Nodes created and returned inherit the orignal
17480         node's COMPOUND_ASSIGN_P flag value.
17481         (patch_cast): Fix cast from char to floating point.
17482
17483 1999-01-25  Andrew Haley  <aph@cygnus.com>
17484
17485         * except.c, java-except.h (expand_resume_after_catch): new
17486         function.
17487         * expr.c (java_lang_expand_expr): call expand_resume_after_catch
17488         to branch back to main flow of control after a catch block.
17489
17490 1999-01-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17491
17492         * Makefile.in (parse.o): Depend on $(CONFIG_H) and
17493         $(srcdir)/../system.h.
17494         (class.o): Depend on $(PARSE_H) and $(srcdir)/../output.h.
17495         (jcf-parse.o): Depend on $(srcdir)/../toplev.h.
17496         (jcf-write.o): Likewise.
17497         (jv-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17498         (mangle.o): Depend on $(srcdir)/../toplev.h.
17499         (parse-scan.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17500         (zextract.o): Depend on $(CONFIG_H) and $(srcdir)/../system.h.
17501
17502         * class.c: Include output.h and parse.h.
17503         (mangled_classname): Add the `const' keyword to a char*.
17504         (find_named_method): Hide unused function definition.
17505         (build_utf8_ref): Change type of variable `c' to unsigned char.
17506         Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
17507         (build_class_ref): Add the `const' keyword to a char*.
17508         (layout_class_method): Remove unused variable `buf'.
17509
17510         * decl.c (find_local_variable): Remove unused variable `rtl'.
17511         (pushdecl): Likewise for variables `different_binding_level' and
17512         `oldglobal'.
17513         (pushlevel): Mark parameter `unused' with ATTRIBUTE_UNUSED.
17514         (maybe_build_cleanup): Likewise for parameter `decl'.
17515
17516         * except.c (expand_start_java_handler): Mark parameter `range'
17517         with ATTRIBUTE_UNUSED.
17518
17519         * expr.c: Include except.h.
17520         (pop_type): Remove unused variable `i'.
17521         (pop_value): Likewise for variables `n_words' and `i'.
17522         (expand_java_arrayload): Likewise for variable `convert'.
17523         (java_lang_expand_expr): Likewise for variables `op0', `type',
17524         `mode', `unsignedp', `node' and `elements'.
17525         (expand_byte_code): Likewise for variables `prev_eh_ranges' and
17526         `eh_ranges'.
17527         (process_jvm_instruction): Add a `const' qualifier to a char*.
17528
17529         * gjavah.c (output_directory): Add the `const' keyword to a char*.
17530         (temp_directory): Likewise.
17531         (print_c_decl): Likewise.
17532         (print_method_info): Likewise.
17533         (decode_signature_piece): Likewise.
17534         (print_mangled_classname): Likewise.
17535
17536         * java-except.h: Provide prototypes for maybe_start_try,
17537         maybe_end_try and add_handler.
17538
17539         * java-tree.h (mangled_classname): Add the `const' keyword to a char*.
17540         (parse_error_context): Likewise.  Also add ATTRIBUTE_PRINTF_2.
17541         (pushdecl_top_level, alloc_class_constant, unicode_mangling_length,
17542         init_expr_processing, push_super_field, init_class_processing,
17543         can_widen_reference_to, class_depth, verify_jvm_instructions,
17544         maybe_pushlevels, maybe_poplevels, process_jvm_instruction,
17545         set_local_type, merge_type_state, push_type, load_type_state,
17546         add_interface, find_in_current_zip, append_gpp_mangled_classtype,
17547         emit_unicode_mangled_name): Add prototypes.
17548
17549         * jcf-dump.c (print_constant): Add the `const' keyword to a char*.
17550         (print_signature_type): Use ISDIGIT, not isdigit.
17551         (print_signature): Remove unused variable `j'.
17552
17553         * jcf-io.c (jcf_filbuf_from_stdio): Cast the result of `fread' to
17554         int when comparing against one.
17555
17556         * jcf-parse.c: Include toplev.h.
17557
17558         * jcf-write.c: Likewise.  Don't include <string.h> or <sys/stat.h>.
17559         (localvar_free): Remove unused variable `i'.
17560         (generate_bytecode_conditional): Likewise for variable `kind'.
17561
17562         * jv-scan.c: Include config.h and system.h.  Remove redundant
17563         OS header and gansidecl.h includes.
17564         (warning): Add the `const' keyword to a char*.  Also add
17565         ATTRIBUTE_PRINTF_1 to the prototype.  Check ANSI_PROTOTYPES, not
17566         __STDC__, when determining whether to use ANSI-isms.
17567         (fatal): Likewise.  Also add ATTRIBUTE_UNUSED.
17568         (xmalloc): Don't redundantly prototype here.
17569         (main): Remove unused parameter `envp'.  Also fix the arguments
17570         passed to function `fatal' to match the format specifier.
17571
17572         * lang.c (java_tree_code_name): Add the `const' keyword to a char*.
17573
17574         * mangle.c: Include toplev.h.
17575         (emit_unicode_mangled_name): Declare parameter `len'.
17576
17577         * parse.y (parse_warning_context): Add the `const' keyword to a
17578         char*.  Also add ATTRIBUTE_PRINTF_2 to the prototype.  Check
17579         `ANSI_PROTOTYPES' not `__STDC__' for whether to use ANSI-isms.
17580         (issue_warning_error_from_context): Add the `const' keyword to
17581         a char*.
17582         (parse_error_context): Likewise.  Also check `ANSI_PROTOTYPES'
17583         not `__STDC__' for whether to use ANSI-isms.
17584
17585         * typeck.c (incomplete_type_error): Mark parameters `value' and
17586         `type' with ATTRIBUTE_UNUSED.
17587         (parse_signature_type): Use ISDIGIT, not isdigit.
17588
17589         * verify.c (check_pending_block): Add the `const' keyword to a char*.
17590         (verify_jvm_instructions): Likewise.  Remove unused variables
17591         `field_name' and `default_val'.
17592
17593         * zextract.c: Include config.h and system.h.  Remove redundant
17594         OS header includes.
17595
17596         * zipfile.h: Prototype `read_zip_archive'.
17597
17598 1999-01-21  Andrew Haley  <aph@cygnus.com>
17599
17600         * typeck.c (convert): Allow conversions to void type: some
17601         optimizations in gcc do this.
17602
17603 1999-01-21  Andrew Haley  <aph@cygnus.com>
17604
17605         * typeck.c (convert_ieee_real_to_integer): New function.
17606         (convert): When not using fast-math and using hardware fp, convert
17607         an IEEE NaN to zero.
17608
17609 1999-01-18  Andrew Haley  <aph@cygnus.com>
17610
17611         * parse.y (patch_binop): Do a type conversion from signed to
17612         unsigned and then back to signed when a ">>>" is found.
17613
17614 1999-01-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17615
17616         * java-tree.h: (check_for_initialization): Added prototype.
17617         * lex.c (java_parse_doc_section): `\n' breaks the `*/' string.
17618         * parse.y (do_resolve_class): Removed unused locals.
17619         (read_import_dir): Likewise.
17620         (resolve_qualified_expression_name): Array creation
17621         expressions are valid primary expressions.
17622         (qualify_ambiguous_name): Likewise.
17623         (patch_synchronized_statement): Removed unused local.
17624
17625 1999-01-17  Jeffrey A Law  (law@cygnus.com)
17626
17627         * Makefile.in (zextract.o): Add dependencies.
17628
17629         * Makefile.in: Do not put ^Ls at the start of a line.
17630
17631 1999-01-15  Per Bothner  <bothner@cygnus.com>
17632
17633         * expr.c (process_jvm_instruction):  Coerce to correct Throwable
17634         sub-type the result of the call that gets the exception value.
17635
17636         * parse.y (java_complete_expand_methods):  If flags_syntax_only,
17637         don't call finish_class.
17638
17639         * parse.y (java_check_regular_methods):  If METHOD_PRIVATE,
17640         clear found before continuing.
17641
17642         * verify.c (verify_jvm_instructions):  On an array load, allow
17643         and handle top of stack to be TYPE_NULL.
17644
17645         * gjavah.c (generate_access):  Translate Java package private or
17646         protected access to C++ public, but with a comment.
17647
17648 1999-01-13  Andrew Haley  <aph@cygnus.com>
17649
17650         * expr.c (generate_name): Name prefix changed to avoid clashes
17651         with assembler temp labels.
17652
17653         * parse.y (patch_synchronized_statement): Set TREE_SIDE_EFFECTS on
17654         MODIFY_EXPR.  Without this, code for the assignment may not be
17655         generated at all and the synchronized statement will read an
17656         uninitialized variable.
17657
17658 1999-01-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17659
17660         * class.c (maybe_layout_super_class): Fixed returned value.
17661         * lex.c: Added 1999 to the copyright.
17662         (java_init_lex): Initialize java_lang_imported.
17663         * lex.h: Added 1999 to the copyright.
17664         * parse.h: Added 1999 to the copyright.
17665         (REGISTER_IMPORT): Fixed typo in trailing macro.
17666         (CURRENT_OSB): New macro.
17667         (struct parser_ctxt): New fields osb_depth, osb_limit.
17668         * parse.y (java_lang_id): New global variable.
17669         (type_import_on_demand_declaration): Don't import java.lang.* twice.
17670         (array_creation_expression:): Use CURRENT_OSB.
17671         (dims:): Uses a stack to keep track of array dimensions.
17672         (cast_expression:): Use CURRENT_OSB.
17673         (find_expr_with_wfl): Return NULL if node found doesn't meet the
17674         conditions.
17675         (register_fields): Fixed typos in comment.
17676         (check_method_redefinition): Fixed comment indentation.
17677         (java_check_regular_methods): Set saved found wfl to NULL after
17678         having reinstalled it in the previously found DECL_NAME.
17679
17680 1999-01-10  Richard Henderson  <rth@cygnus.com>
17681
17682         * gjavah.c (java_float_finite): Use a union to do type punning.
17683         (java_double_finite): Likewise.
17684
17685 1999-01-09  Per Bothner  <bothner@cygnus.com>
17686
17687         * parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
17688         on CONSTRUCTOR (since that trashes TREE_CST_RTL).
17689         (patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
17690         (register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
17691         CONSTRUCTOR (which causes expand_expr to call output_constant_def).
17692         * expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.
17693
17694 1999-01-08  Per Bothner  <bothner@cygnus.com>
17695
17696         * check-init.c (check_init):  If compiling to native, we don't
17697         see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
17698
17699 1999-01-08  Tom Tromey  <tromey@cygnus.com>
17700
17701         * parse-scan.y (variable_declarator_id): Set or increment
17702         bracket_count.
17703         (bracket_count): New global.
17704         (formal_parameter): Handle case where bracket pairs trail variable
17705         declarator id.
17706
17707 1999-01-07  Andrew Haley  <aph@viagra.cygnus.co.uk>
17708
17709         * jcf-parse.c (yyparse): variable len changed from a char to an
17710         int to prevent overflow.
17711
17712 1999-01-06  Per Bothner  <bothner@cygnus.com>
17713
17714         * java-tree.h:  Declare read_class.
17715         * jcf-parse.c (read_class):  New function.
17716         (load_class):  Now just call read_class.
17717
17718         * java-tree.h (java_parse_abort_on_error):  Only return if new errors.
17719         * jcf-parse.c (parse_source_file):  Declare save_error_count,
17720         which is needed by java_parse_abort_on_error macro,
17721         * parse.y (java_layout_classes, java_expand_classes):  Likewise.
17722
17723         * parse.y (register_fields):  Set TREE_STATIC flag of NEW_ARRAY_INIT
17724         constructor, if initializing a static field.
17725         (patch_new_array_init):  Set TREE_CONSTANT if it is.
17726         * expr.c (java_lang_expand_expr):  For a static array constructor
17727         of primitive elements, allocate the array itself statically.
17728         Disabled until we can set the vtable field statically.
17729
17730         * check-init.c:  New file.  Checks for definite assignment.
17731         * Makefile.in (JAVA_OBJS):  Add check-init.o.
17732         * parse.y (java_complete_expand_method): Call check_for_initialization.
17733         * parse.h (BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY):  Moved to java-tree.h.
17734
17735 1999-01-06  Graham <grahams@rcp.co.uk>
17736
17737         * parse.y : include system.h instead of including
17738         standard headers directly with the exception of <dirent.h>.
17739
17740 1999-01-06  Per Bothner  <bothner@cygnus.com>
17741
17742         * lex.h:  Moved static function declarations to lex.c,
17743         to shut up some -Wall warnings.
17744         * lex.c:  Static function declarations moved here.
17745         * jcf-dump.c:  Small fixes to shut up -Wall warnings.
17746
17747 1999-01-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
17748
17749         * Make-lang.in ($(GCJ).o): Depend on prefix.h.
17750
17751 1998-12-22  Per Bothner  <bothner@cygnus.com>
17752
17753         * expr.c (process_jvm_instruction):  Do load_type_state after JSR.
17754         * verify.c (verify_jvm_instructions):  Fix off-by-one error.
17755
17756         * jcf-write.c (CHECK_PUT):  Add (void) cast to avoid -Wall warnings.
17757         (localvar_alloc):  Change return type to void,
17758         (emit_unop):  Remove unused variable size.
17759
17760         * jcf-write.c (struct jcf_block):  Add new union.
17761         (PENDING_CLEANUP_PC, PENDING_EXIT_PC, UNDEFINED_PC):  New macros.
17762         (call_cleanups):  New functions.
17763         (struct jcf_partial):  New fields num_finalizers and return_value_decl.
17764         (generate_bytecode_insns):  Support CLEANUP_POINT_EXPR and
17765         WITH_CLEANUP_EXPR.  Handle cleanups in RETURN_EXPR and EXIT_BLOCK_EXPR.
17766         * lang.c (lang_init):  Call using_eh_for_cleanups.
17767         * parse.y (java_complete_lhs):  For SYNCHRONIZED_EXPR, defer
17768         completing operands to patch_synchronized_statement.
17769         Support CLEANUP_POINT_EXPR, WITH_CLEANUP_EXPR.
17770         (patch_synchronized_statement): Re-write suing CLEANUP_POINT_EXPR and
17771         WITH_CLEANUP_EXPR instead of TRY_EXPR.
17772
17773 1998-12-20  John F. Carr  <jfc@mit.edu>
17774
17775         * Make-lang.in: Comment out control-Ls; they upset some makes.
17776
17777 1998-12-18  Tom Tromey  <tromey@cygnus.com>
17778
17779         * parse.y (check_class_interface_creation): Use DIR_SEPARATOR
17780         consistently.
17781
17782 1998-12-17  Tom Tromey  <tromey@cygnus.com>
17783
17784         * parse.y (DIR_SEPARATOR): New define.
17785         (check_class_interface_creation): Use it.
17786
17787         * parse-scan.y (report_main_declaration): Recognize
17788         `java.lang.String' in argument to main.
17789
17790 1998-12-16  Per Bothner  <bothner@cygnus.com>
17791
17792         * parse.y (create_interface):  Remove bogus test.
17793
17794 1998-12-16  Per Bothner  <bothner@cygnus.com>
17795
17796         * jcf-parse.c (get_constant):  Set TREE_TYPE for string constants.
17797         (HANDLE_CONSTANTVALUE):  If flag_emit_class_files, call get_constant.
17798
17799 1998-12-16  Tom Tromey  <tromey@cygnus.com>
17800
17801         * parse-scan.y (qualified_name): Use correct sprintf format.
17802
17803 1998-12-15  Tom Tromey  <tromey@cygnus.com>
17804
17805         * gjavah.c (print_field_info): Changed how most negative number is
17806         printed.
17807
17808 1998-12-14  Per Bothner  <bothner@cygnus.com>
17809
17810         * parse.y (fold_constant_for_init):  New function.
17811         (resolve_expression_name):  Don't replace static final
17812         constant-initialized fields by its value.
17813         (java_complete_lhs):  New.  Same as java_complete_tree, except does
17814         not replace static final constant-initialized fields by their values.
17815         (register_fields):  If there is an initializer, set DECL_INITIAL and
17816         MODIFY_EXPR_FROM_INITIALIZATION_P.
17817         (java_complete_tree):  For MODIFY_EXPR, use java_complete_lhs for lhs.
17818         Only call patch_initialized_static_field if
17819         MODIFY_EXPR_FROM_INITIALIZATION_P.
17820         (patch_initialized_static_field):  If not valid constant, clear
17821         DECL_INITIAL.
17822
17823         * parse.y (lookup_field_wrapper):  Fix thinko.
17824
17825         * parse.y (java_complete_tree):  In EXPR_WITH_FILE_LOCATION,
17826         set and restore global lineno.
17827
17828 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17829
17830         * gjavah.c (print_field_info): If value to print is the smallest
17831         value of its size, then print as hex to avoid later warnings from
17832         C++ compiler.
17833
17834 1998-12-14  Tom Tromey  <tromey@cygnus.com>
17835
17836         * gjavah.c (decompile_method): Decompile `return null'.
17837         (process_file): Generate `#pragma interface'.
17838         (method_declared): New global.
17839         (print_method_info): Set it.
17840         (HANDLE_CODE_ATTRIBUTE): Only print it method_declared set.
17841         (print_method_info): Handle abstract methods.
17842
17843 1998-12-13  Per Bothner  <bothner@cygnus.com>
17844
17845         * parse.y (patch_method_invocation):  If class_decl is null
17846         (e.g. an array type), use original type.
17847
17848         * parse.y (check_thrown_exceptions):  Temporary hack to suppress
17849         errors about uncaught exception from clone (of array, specifically).
17850
17851 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17852
17853         * gjavah.c (decompile_method): Handle all types of `return'
17854         opcode.  Decompile `return this' and `return'.
17855         (method_access): New global.
17856         (print_method_info): Set it.
17857         (decompile_method): Don't decompile a synchronized method.
17858
17859 1998-12-13  Tom Tromey  <tromey@cygnus.com>
17860
17861         * jcf-reader.c (jcf_parse_one_method): Recognize
17862         HANDLE_END_METHOD.
17863         * gjavah.c (HANDLE_END_METHOD): New macro.
17864         (HANDLE_CODE_ATTRIBUTE): New macro.
17865         (decompile_method): New function.
17866         (print_method_info): Don't print `;\n' at end of function decl.
17867         Include java-opcodes.h.
17868         (decompiled): New global.
17869
17870 1998-12-12  Per Bothner  <bothner@cygnus.com>
17871
17872         * class.c (build_class_ref):  Handle PRIMTYPE.class if
17873         flag_emit_class_files.
17874         * expr.c (expand_java_field_op):  Don't optimize java.lang.XXX.TYPE
17875         if flag_emit_class_files.
17876         * parse.y (java_complete_tree):  Pre-liminary support for
17877         COMPONENT_REF - only to handle PRIMCLASS.TYPE.
17878
17879         * parse.y (patch_synchronized_statement):   Don't call monitorexit
17880         unless block CAN_COMPLETE_NORMALLY.  Propagate that flag properly.
17881
17882         * java-tree.h (DECL_LOCAL_STATIC_VALUE):  Removed - no longer used.
17883
17884         * zipfile.h (opendir_in_zip):  New declaration.
17885         * jcf-io.c (saw_java_source):  Moved to jcf-parse.c.
17886         (opendir_in_zip):  New function, using code from open_in_zip.
17887         (open_in_zip):  Call opendir_in_zip.
17888         (find_class):  Remove no-longer-used do_class_file parameter,
17889         but add source_ok parameter.  Change logic so if we find a .java file,
17890         we don't look for .class in later classpath emtries.
17891         * jcf-parse.c (load_class):  Pass saw_java_source to find_class.
17892         (jcf_figure_file_type):  Only call open_in_zip if correct magic number.
17893         * gjavah.c: Update call to find_class.
17894         * jcf-dump.c:  Likewise.
17895
17896         * jcf-write.c (put_linenumber):  Handle duplicate line numbers.
17897         (generate_bytecode_insns):  For EXPR_WITH_FILE_LOCATION, do
17898         nothing if body is empty_stmt_node.
17899         Various little fixes so SP gets correctly adjusted.
17900         For NEW_ARRAY_INIT, handle IGNORE_TARGET.
17901         For CALL_EXPR, test if static first.
17902         (generate_classfile):  Ignore fields that are DECL_ARTIFICIAL,
17903         such as the ones we create for Object and Class.
17904         Set and restore current_function_decl.
17905         * parse.y:  Check/set IS_AN_IMPORT_ON_DEMAND_P in read_import_dir.
17906         (note_possible_classname):  New function.
17907         (read_import_entry):  Removed.  Merged with read_import_dir.
17908         (read_import_dir):  Don't call find_class - that only gives us
17909         the first classpath entry having the needed package.
17910         Use the struct buffer data structure from buffer.h.
17911         (read_import_dir, find_in_imports_on_demand):  The remembered
17912         class names now use '.' (not '/') as package separator.
17913
17914         * parse.y (java_complete_expand_methods):  Call write_classfile
17915         here, and not in java_expand_classes (which only gets first class).
17916
17917 1998-12-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17918
17919         * parse.y (<type_declaration>):  Do maybe_generate_clinit last.
17920         (register_fields):  If a static fields has an initializer, just
17921         chain it on ctxp->static_initialized, and handle later.
17922         (java_complete_expand_methods):  Force <clinit> first.
17923         (resolve_expression_name, resolve_field_access):  Just get DECL_INITIAL
17924         - it's already been completed.
17925         (patch_initialized_static_field):  New function.
17926         (java_complete_field):  Call it.
17927
17928 1998-12-12  Per Bothner  <bothner@cygnus.com>
17929
17930         * expr.c (encode_newarray_type, build_new_array):  New functions.
17931         * java-tree.h:  Declare build_new_array.
17932         * jcf-write.c (patch_newarray):  Use build_new_array.
17933
17934         * expr.c (java_lang_expand_exp):  Support NEW_ARRAY_INIT.
17935         * jcf-write.c (generate_bytecode_insns):  Support NEW_ARRAY_INIT.
17936
17937         * parse.y (patch_new_array_init):  Re-organize.
17938         Now is passed the actual array (pointer) type of the value.
17939         Set the type of the CONSTRUCTOR to be an ARRAY_TYPE.
17940         (patch_array_constructor):  Removed - merged into patch_new_array_init.
17941         (java_complete_tree):  Update patch_new_array_init.
17942
17943         * jcf-write.c (find_constant_index):  New function.
17944         (generate_bytecode_insns):  Use find_constant_index.
17945         (generate_classfile):  Use find_constant_index for ConstantValue.
17946
17947 1998-12-11  Tom Tromey  <tromey@cygnus.com>
17948
17949         * expr.c (invoke_build_dtable): Renamed dtable -> vtable.
17950         * decl.c (init_decl_processing): Renamed dtable -> vtable.
17951         * class.c (make_class_data): Renamed dtable -> vtable, and
17952         dtable_method_count -> vtable_method_count.
17953
17954 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17955
17956         * decl.c (long_zero_node, float_zero_node, double_zero_node): New
17957         global variables, initialized.
17958         * java-tree.h (long_zero_node, float_zero_node, double_zero_node):
17959         Declared new global variables.
17960         * lex.c (java_lex): Return long_zero_node, float_zero_node,
17961         double_zero_node, integer_zero_node upon direct matching.
17962         * parse.y (purify_type_name): Added function prototype.
17963         (duplicate_declaration_error_p): Consider new_type as potentially
17964         being a incomplete type. Use purify_type_name on type string.
17965         (method_header): saved_type: unused variable removed. Don't figure
17966         return type if method name is invalid.
17967         (java_complete_tree): Set CAN_COMPLETE_NORMALLY after `node' was
17968         processed by patch_unaryop.
17969         (patch_unaryop): Fixed typo in comment. Re-convert pre/post
17970         increment/decrement node into its original type after binary
17971         numeric promotion on its operands.
17972
17973 1998-12-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17974
17975         * parse.y (array_initializer:): Array init operand is NULL_TREE
17976         instead of a TREE_LIST of NULL_TREEs when parsing `{}'. `{,}' is
17977         now an error. Fixed indentation problems.
17978         (patch_string): Handle error_mark_node as an argument.
17979         (patch_new_array_init): Fixed indentation problems.
17980         (array_constructor_check_entry): Removed check on null wfl_value.
17981         Return an error if wfl_value's walk returns an error.
17982
17983 1998-12-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
17984
17985         * java-tree.def (NEW_ARRAY_INIT): New Java tree code.
17986         * lex.c (java_lex): Remember column position before advancing one
17987         token. Retain location information on OCB_TK.
17988         * lex.h (typedef struct java_lc): Added new field.
17989         * parse.h (GET_SKIP_TYPE): New macro.
17990         (QUAL_DECL_TYPE): Redefined using GET_SKIP_TYPE.
17991         * parse.y (build_new_array_init, patch_new_array_init,
17992         patch_array_constructor, maybe_build_array_element_wfl,
17993         array_constructor_check_entry): New function prototypes.
17994         (switch_block:): Tagged <node>.
17995         (OCB_TK): Tagged <operator>.
17996         (array_initializer:): Installed actions.
17997         (variable_initializer): Build location information on element if
17998         necessary.
17999         (switch_statement:): Fixed indentation typo.
18000         (switch_block:): Redefined default action.
18001         (java_complete_tree): Handle NEW_ARRAY_INIT in MODIFY_EXPR:.
18002         (patch_assignment): Removed duplicate code.
18003         (maybe_build_array_element_wfl, build_new_array_init,
18004         patch_new_array_init, patch_array_constructor,
18005         array_constructor_check_entry): New functions.
18006
18007 1998-12-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18008
18009         * parse.y (array_initializer): Tagged <node>.
18010         (variable_initializer:): Use default rule.
18011         (array_initializer:): Defined actions.
18012         (variable_initializers:): Likewise.
18013         (resolve_qualified_expression_name): Use DECL_CONTEXT to build
18014         non-static field accesses.
18015         (patch_invoke): Fixed indentation typo.
18016         (java_complete_tree): Likewise.
18017         (build_labeled_block): Changed leading comment. Generate an error
18018         in case of duplicate loop labels.
18019         (patch_conditional_expr): Patch results of string concatenation
18020         operations.
18021
18022 1998-12-06  Per Bothner  <bothner@cygnus.com>
18023
18024         * constants.c (find_methodref_index):  When the class is an interface,
18025         generate CONSTANT_InterfaceMethodref instead of a CONSTANT_MethodRef.
18026
18027         * decl.c (finit_identifier_node):  Use "$finit$", rather than
18028         "<finit>" (which Sun's verifier rejects).
18029         * parse.y (maybe_generate_finit):  Leave out meaningless final flag.
18030         (generate_field_initialization_code):  Removed.
18031         (fix_constructors)  Don't add call to $finit$ here (wrong order).
18032         (patch_method_invocation):  Add $finit$ call here.
18033
18034         * java-tree.h (CALL_USING_SUPER):  New macro.
18035         * parse.y (patch_invoke):  Remove im local variable.
18036         (patch_method_invocation, patch_invoke):  Don't pass super parameter.
18037         (patch_invoke):  Use CALL_USING_SUPER instead of from_super parameter.
18038         (resolve_qualified_expression_name):  Maybe set CALL_USING_SUPER.
18039
18040         * jcf-write.c (get_access_flags):  Fix typo ACC_PUBLIC -> ACC_FINAL.
18041
18042         * parse.y (java_complete_tree):  Don't complain about unreachable
18043         statement if it is empty_stmt_node.
18044
18045         * jcf-write.c (find_constant_wide):  New function.
18046         (push_long_const):  Use find_constant_wide.
18047
18048         * jcf-write.c (generate_bytecode_insn):  Fix bug in switch handling.
18049         (generate_bytecode_insn):  Use correct dup variant for MODIFY_EXPR.
18050         Add "redundant" NOTE_PUSH/NOTE_POP uses so code_SP_max gets set.
18051         Emit invokeinterface when calling an interface method.
18052         Emit invokespecial also when calling super or private methods.
18053
18054         * jcf-write.c (generate_classfile):  Emit ConstantValue attributes.
18055
18056 1998-12-06  Per Bothner  <bothner@cygnus.com>
18057
18058         * jcf-dump.c (INVOKE):  If invokeinterface, print number of args.
18059
18060 1998-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18061
18062         * java-tree.h (java_layout_seen_class_methods): New function
18063         prototype.
18064         (LAYOUT_SEEN_CLASS_METHODS): Macro removed.
18065         * jcf-parse.c (parse_class_file): Call java_layout_seen_class_methods.
18066         * parse.h (PROMOTE_RECORD_IF_COMPLETE): New macro.
18067         * parse.y (method_declarator:): Defined action.
18068         (issue_warning_error_from_context): input_filename saved, set to
18069         the appropriate value and restored after java_error is called.
18070         (build_unresolved_array_type): Fixed comment.
18071         (register_fields): Use PROMOTE_RECORD_IF_COMPLETE.
18072         (method_header): Deal with return type the same way type are
18073         handled for fields and method's parameters and local variables
18074         types are handled.
18075         (check_method_redefinition): Removed extra CR.
18076         (declare_local_variables): Use PROMOTE_RECORD_IF_COMPLETE.
18077         (java_layout_seen_class_methods): New function.
18078         (java_layout_classes): Call java_layout_seen_class_methods.
18079
18080 1998-12-03  Per Bothner  <bothner@cygnus.com>
18081
18082         * parse,y (patch_synchronized_statement):  Set CAN_COMPLETE_NORMALLY.
18083
18084 1998-12-03  Per Bothner  <bothner@cygnus.com>
18085
18086         * jcf-dump.c (main):  Fix error message.
18087         * jcf-path.c (add_entry):  Style fix.
18088
18089 1998-12-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18090
18091         * class.c (layout_class_method): Call build_java_argument_signature
18092         on constructors too.
18093         * parse.y (check_method_redefinition): Use TYPE_ARGUMENT_SIGNATURE.
18094         (patch_method_invocation): Define a primary when resolving an
18095         expression name. Augmented comment on code checking illegal `this'
18096         usage. Loosened it test by accepting NEW_CLASS_EXPR.
18097
18098 1998-12-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18099
18100         * class.c (layout_class_method): Don't report error on non-static
18101         overriding static if the method is private.
18102         * java-tree.h (finish_class): Prototype added.
18103         * lex.c (java_get_line_col): Handle col argument -2 value.
18104         * parse.h: All static method declarations moved to parse.y.
18105         * parse.y: Now contains all static method declarations previously
18106         found in parse.h.
18107         (find_expr_with_wfl, missing_return_error,
18108         unreachable_stmt_error): New functions.
18109         (java_get_real_method_name): Identify constructors bearing class
18110         names in source code compiled classes only.
18111         (java_complete_expand_methods): Call missing_return_error.
18112         (invocation_mode): Private methods invoked as static methods.
18113         (java_complete_tree): Call unreachable_stmt_error.
18114
18115 1998-12-01  Tom Tromey  <tromey@cygnus.com>
18116
18117         * Makefile.in (+target): Removed.
18118         (+xmake_file): Likewise.
18119         (+tmake_file): Likewise.
18120         (.NOEXPORT): Removed duplicate.
18121
18122 1998-11-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
18123
18124         * Makefile.in (jc1, jv-scan): Link with $(SUBDIR_OBSTACK).
18125
18126         * jv-scan.c: Fix xmalloc prototype.  Provide an xmalloc definition.
18127
18128         * jvgenmain.c: Remove the xmalloc prototype, we get it from
18129         libiberty.h.  Provide an xmalloc definition.
18130
18131         * jvspec.c: Remove the xmalloc prototype.
18132
18133         * parse-scan.y: Include config.h and system.h.  Don't include
18134         OS headers or gansidecl.h.  Don't prototype xmalloc/xstrdup.
18135         Provide an xstrdup definition.
18136
18137 1998-11-26  Alexandre Oliva  <oliva@dcc.unicamp.br>
18138
18139         * jcf-path.c (add_entry): Recognize ".jar" too.
18140         * lang-specs.h: Likewise.
18141
18142 1998-11-26  Per Bothner  <bothner@cygnus.com>
18143
18144         * jcf-write.c (generate_bytecode_insns):  In Call_EXPR, handle
18145         soft_monitorenter_node, soft_monitorexit_node, throw_node.
18146
18147         * jcf-write.c (generate_bytecode_insns):
18148         Handle pre/post-increment/decrement of long.
18149
18150         * jcf-write.c (generate_bytecode_insns):
18151         Handle missing exception handler (finally for synchronized).
18152
18153 1998-11-25  Per Bothner  <bothner@cygnus.com>
18154
18155         * java-tree.h (end_params_node):  Declare global.
18156         * decl.c (end_params_node):  New global.
18157         (init_decl_processing, start_java_method):  Use end_params_node for
18158         end of list of parameter types.  Follows correct gcc conventions.
18159         * expr.c (pop_argument_types, pop_arguments):  Likewise.
18160         * lang.c (put_decl_node):  Likewise.
18161         * typeck.c (various places):  Likewise.
18162         * class.y (various places):  Likewise.
18163         * parse.y (various places):  Likewise.
18164
18165         * parse.y (java_complete_tree):  Move CAN_COMPLETE_NORMALLY.
18166         (build_jump_to_finally):  Add missing CAN_COMPLETE_NORMALLY.
18167
18168         * class.c:  Add #include flags.h, remove no-longer needed declaration.
18169
18170         * class.c (layout_class_method):  Remove commented-out code, re-format.
18171         Don't add vtable entry (or index) for private methods.
18172         * expr.c (expand_invoke):  A private method is implicitly final.
18173         * class.c (make_class_data):  If inlining or optimizing,
18174         skip private methods.
18175
18176         * class.c (finish_class):  New function.  Calls existing methods,
18177         but alls emits deferred inline functions.
18178         * jcf-parse.c (parse_class_file):  Call finish_class.
18179         * parse.y (java_complete_expand_methods):  Likewise.
18180
18181         * expr.c (build_java_binop):  Explicit default, to silence -Wall.
18182
18183         * expr.c (CHECK_PC_IN_RANGE):  Add void cast to kill warnings.
18184
18185 1998-11-25  Marc Espie <espie@quatramaran.ens.fr>
18186
18187         * jcf-write.c (generate_bytecode_conditional): Fix typo.
18188
18189 1998-11-24  Per Bothner  <bothner@cygnus.com>
18190
18191         * (generate_classfile): Always write class access flag with
18192         ACC_SUPER set.
18193
18194 1998-11-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18195
18196         * class.c (maybe_layout_super_class): New function.
18197         (layout_class): Reorganized. Loop on class methods dispatched into
18198         a new function. Call maybe_layout_super_class.
18199         (layout_class_methods, layout_class_method): New functions.
18200         * expr.c (expand_java_NEW): Call layout_class_methods on loaded
18201         class.
18202         (expand_invoke): Likewise.
18203         * java-tree.h (all_class_list): New global variable declared.
18204         (layout_class_methods, layout_class_method): New function
18205         prototypes.
18206         (LAYOUT_SEEN_CLASS_METHODS): New macro.
18207         * jcf-parse.c (all_class_list): New global variable.
18208         (load_class): Extended what class_or_name can be. Use parser
18209         context mechanism to save globals before calling jcf_parse.
18210         (jcf_parse_source): Don't parse twice if HAS_BEEN_ALREADY_PARSED_P
18211         is set on the file name.
18212         (jcf_parse): Layout class methods when Object is loaded, otherwise
18213         record class in all_class_list for delayed method layout.
18214         (parse_class_file): Use LAYOUT_SEEN_CLASS_METHODS.
18215         * lang.c (put_decl_node): Decode <init> into the decl context
18216         class name.
18217         * lex.c (java_allocate_new_line): Use xmalloc.
18218         * parse.h (INCOMPLETE_TYPE_P): Redefined to work with incomplete
18219         pointers, not TREE_LIST elements.
18220         (struct parser_ctxt): Fixed comment indentations, added comments
18221         and reordered some fields.
18222         (java_check_methods): Function prototype removed.
18223         * parse.y (java_push_parser_context): Use xmalloc.
18224         (java_parser_context_restore_global): Pop extra pushed ctxp only
18225         when there's nothing next.
18226         (maybe_create_class_interface_decl): Fixed comment, add new
18227         created class decl to all_class_list.
18228         (method_header): Use GET_REAL_TYPE on argument's types.
18229         (method_declarator): Use GET_REAL_TYPE, change type to the real
18230         type in TREE_LIST dependency node. Build argument list with the
18231         real type.
18232         (create_jdep_list): Use xmalloc. Removed allocation error message.
18233         (obtain_incomplete_type): Fixed leading comment. Broadened
18234         incoming argument meaning.
18235         (register_incomplete_type): Use xmalloc. Removed allocation error
18236         message.
18237         (safe_layout_class): Fixed leading comment.
18238         (jdep_resolve_class): Reversed if statement condition and switch
18239         if and else bodies.
18240         (resolve_and_layout): Fixed leading comment. Broadened incoming
18241         argument meaning.
18242         (complete_class_report_errors): New local variable name, for
18243         clarity. purify_type_name used for all error cases.
18244         (java_get_real_method_name): Stricter check on constructors.
18245         (java_check_regular_methods): Reverse methods list only if not
18246         already laid out. Layout artificial constructor.
18247         (java_check_methods): Deleted.
18248         (source_start_java_method): Obtain incomplete type for patchable
18249         method arguments.
18250         (java_layout_classes): Fixed leading comment. Use
18251         LAYOUT_SEEN_CLASS_METHODS, use a loop to check methods. Added else
18252         statement to layout operation, reuse LAYOUT_SEEN_CLASS_METHODS
18253         before returning. Fixed comments.
18254         (java_expand_classes): Check for errors up front.
18255         (patch_method_invocation): Class to search is resolved and laid
18256         out.
18257
18258 1998-11-24  Per Bothner  <bothner@cygnus.com>
18259
18260         * expr.c (java_lang_expand_expr):  Add missing emit_queue.
18261
18262         * javaop.h (int8):  Removed - not used.
18263         (jbyte):  Redefine portably with correct signedness.
18264
18265         * jcf-write.c (generate_bytecode_insns):  Don't free sw_state.cases.
18266
18267         * jcf-write.c (generate_bytecode_insns):  Fix typo
18268         OPCODE_getstatic to OPCODE_getfield.
18269
18270         * java-tree.def (CASE_EXPR, DEFAULT_EXPR):  Kind is 'x', not '1'.
18271         * parse.y (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR,
18272         set TREE_SIDE_EFFECTS (otherwise expand_expr may skip them).
18273
18274 1998-11-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18275
18276         * jcf-parse.c (jcf_parse_source): Function returned type is
18277         void. Added prototype.
18278         (jcf_parse): Function returned type is void.
18279         (yyparse): Remove call to fclose on the last parsed file.
18280
18281         * java-tree.h (jcf_parse): Changed jcf_parse prototype.
18282
18283 1998-11-18  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18284
18285         * class.c (unmangle_classname): Set QUALIFIED_P when appropriate.
18286         (layout_class): Cope with methods featuring WFL in decl names.
18287         * decl.c (unqualified_object_id_node): New global variable,
18288         initialized.
18289         (build_decl_no_layout): Removed.
18290         * expr.c (build_primtype_type_ref): Handle Double.
18291         (java_lang_expand_expr): Fixed indentations.
18292         * java-tree.h (CLASS_METHOD_CHECKED_P): Flag deleted.
18293         (flag_wall, flag_redundant, flag_not_overriding,
18294         flag_static_local_jdk1_1, unqualified_object_id_node): Global
18295         variable declarations.
18296         (build_decl_no_layout): Removed prototype.
18297         (java_get_real_method_name): Added prototype.
18298         (IS_UNCHECKED_EXPRESSION_P): Renamed IS_UNCHECKED_EXCEPTION_P.
18299         (java_parse_abort_on_error): Macro now just returns.
18300         * jcf-parse.c (jcf_parse_source): Check fclose returned
18301         value. Call emit_register_classes if java_report_errors returns
18302         zero.
18303         * lanc.c (flag_wall, flag_redundant, flag_not_overriding,
18304         flag_static_local_jdk1_1): New integer flags.
18305         (lang_decode_option): New flags set here.
18306         * parse.h (GET_REAL_TYPE, GET_METHOD_NAME): New macros.
18307         (OBSOLETE_MODIFIER_WARNING): Issue error message conditionally to
18308         the flag_redundant variable.
18309         (SET_TYPE_FOR_RESOLUTION): Consider Object being java.lang.Object
18310         when parsing java.lang.Object class.
18311         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT): Added terminal
18312         NULL_TREE to build.
18313         (resolve_qualified_expression_name): Fixed indentation.
18314         (patch_array_ref): Changed prototype.
18315         (not_initialized_as_it_should_p): Prototype removed.
18316         (java_report_errors): Added function prototype.
18317         * parse.y (formal_parameter:): Changed error message for not yet
18318         supported final parameters.
18319         (class_type_list:): Set both PURPOSE and VALUE of created
18320         TREE_LIST to be class_type.
18321         (primary_no_new_array:): Handle class literals on primitive types.
18322         (parse_warning_context): Reinstalled correct force_error and
18323         do_warning flags setups.
18324         (java_report_errors): Changed prototype. Return java_error_count
18325         value.
18326         (variable_redefinition_error): Consider treating variable type as
18327         a fake pointer.
18328         (create_interface): Warn about redundant abstract modifier if
18329         flag_redundant is set. Changed error message.
18330         (lookup_field_wrapper): Save/restore globals before/after looking
18331         up field.
18332         (duplicate_declaration_error_p): Consider treating declaration
18333         type as a fake pointer.
18334         (register_fields): Extract real type from dependency node. Check
18335         for duplicate field declaration after type adjustment. Use
18336         DECL_INITIAL to store static final initialized values.
18337         (method_header): Extract real function type from dependency node.
18338         (check_abstract_method_header): Use GET_METHOD_NAME.
18339         (obtain_incomplete_type): Layout fake pointer type.
18340         (safe_layout_class): Don't try to check for methods before layout.
18341         (java_complete_class): Don't check for correct throws clause
18342         elements inheritance here.
18343         (resolve_and_layout): Broadened name parameter meaning.
18344         (reset_method_name): Use GET_METHOD_NAME.
18345         (java_get_real_method_name): New function.
18346         (java_check_regular_methods): Don't check methods in
18347         java.lang.Object.  Verify lineage of throws clause elements. Use
18348         flag_no_overriding in warning report.
18349         (check_throws_clauses): Don't check if class was from
18350         bytecode. Use IS_UNCHECKED_EXCEPTION_P macro.
18351         (java_check_methods): Don't set CLASS_METHOD_CHECKED_P flag.
18352         (declare_local_variables): Use flag_static_local_jdk1_1 to report
18353         warning on unsupported final local variables. Use build_decl
18354         instead of build_decl_no_layout. Get real local variable type from
18355         dependency node.
18356         (source_start_java_method): Get real parameter type from
18357         dependency node. Call build_decl instead of build_decl_no_layout.
18358         (java_layout_classes): Reverse tree and layout type and class as
18359         required. Mark class as loaded when done.
18360         (resolve_field_access): Fixed indentation. Restricted condition
18361         leading to static field access code generation. Set field_type
18362         decl's TREE_TYPE if QUAL_DECL_TYPE not available.
18363         (resolve_qualified_expression_name): Initialize type_found to
18364         null. Handle static field resolved during qualification. Fixed
18365         layout on non primitive field decl types.
18366         (not_accessible_p): Fixed typo in comment.
18367         (patch_method_invocation): Resolve and layout class to search from
18368         type.
18369         (lookup_method_invoke): Keep integer constant 0 as is. Resolve and
18370         layout non primitive type, if necessary. Make method node only to
18371         report errors.
18372         (find_applicable_accessible_methods_list): Consider WFL'ed method
18373         decl names. Fixed indentation.
18374         (argument_types_convertible): Resolve and layout target type if
18375         necessary.
18376         (java_complete_tree): Fixed indentation problems. Rewrote
18377         CALL_EXPR thrown exceptions check. Re-installed further processing
18378         of the assignment in certain cases.
18379         (patch_assignment): Call maybe_build_primttype_type_ref to perform
18380         inlining on class literals.
18381         (valid_builtin_assignconv_identity_widening_p): Cope with constant
18382         0 literal.
18383         (valid_method_invocation_conversion_p): Likewise.
18384         (patch_string): Temporary disable forbidden use of `this' in
18385         explicit constructor invocations when doing string concatenation
18386         within their scope.
18387         (patch_unaryop): Added comment. Reinstalled code to disable
18388         further check on assignment operation with cast expression RHS.
18389         (patch_switch_statement): Fixed indentation.
18390         (build_try_statement): Call build_decl instead of
18391         build_decl_no_layout.
18392         (patch_synchronized_statement): Likewise.
18393         (patch_throw_statement): Use IS_UNCHECKED_EXCEPTION_P instead of
18394         IS_UNCHECKED_EXPRESSION_P.
18395         (check_thrown_exceptions_do): Changed leading comment. Resolve and
18396         layout argument exception type.
18397         (purge_unchecked_exceptions): Use IS_UNCHECKED_EXCEPTION_P instead
18398         of IS_UNCHECKED_EXPRESSION_P.
18399
18400 1998-11-18  Anthony Green  <green@cygnus.com>
18401
18402         * jcf-parse.c (yyparse): Open class file in binary mode.
18403
18404 1998-11-15  Per Bothner  <bothner@cygnus.com>
18405
18406         * jvgenmain.c:  Need to #include "gansidecl.h" (to get PROTO).
18407
18408         * jcf-write.c (perform_relocations):  Move check out one loop.
18409
18410 1998-11-15  Anthony Green  <green@hoser.cygnus.com>
18411
18412         * Make-lang.in: Fix reference to srcdir.
18413         * jv-scan.c: Add missing xmalloc prototype.
18414         * jvgenmain.c: Ditto.
18415
18416 1998-11-15  Per Bothner  <bothner@cygnus.com>
18417
18418         * decl.c (error_mark_node), java-tree.h:  New global.
18419         * parse.y:  Use empty_stmt_node instead of size_zero_node.
18420         (build_if_else_statement):  If missing else, use empty_stmt_node.
18421
18422         * parse.y (not_initialized_as_it_should_p):  Removed, with its callers.
18423         (java_complete_expand_method):  Complain if return is missing.
18424         (java_check_regular_methods):  Comment out incorrect error check.
18425         (not_accessible_p):  Fix incorrect handling of protected methods.
18426         (patch_method_invocation):  Pass correct context to not_accessible_p.
18427         (find_applicable_accessible_methods_list):  Likewise.
18428         (qualify_ambiguous_name):  If ARRAY_REF, it's an expression name.
18429         (java_complete_tree):  For CASE_EXPR and DEFAULT_EXPR, set
18430         TREE_TYPE (to void_type_node);  otherwise expand_expr crashes.
18431         (patch_if_else_statement):  Fix setting of CAN_COMPLETE_NORMALLY.
18432
18433         * jcf-write.c (CHECK_OP, CHECK_PUT):  Add some error checking.
18434         (push_int_const):  Remove reundant NOTE_PUSH.
18435         (generate_bytecode_insns - case STRING_CST):  Do NOTE_PUSH.
18436         (- case SWITCH_EXPR):  Fix code generation bug.
18437         (- case PREDECREMENT_EXPR etc):  Remove redundant NOTE_PUSH.
18438         (generate_classfile):  More robust for abstract methods.
18439
18440 1998-11-15  Anthony Green  <green@cygnus.com>
18441
18442         * Makefile.in: jv-scan and jvgenmain all require libiberty.
18443         * Make-lang.in: Ditto.
18444
18445         * jv-scan.c: Remove xmalloc and xstrdup definitions.
18446         * jvgenmain: Ditto.
18447
18448 1998-11-15  Per Bothner  <bothner@cygnus.com>
18449
18450         * jcf-parse.c (HANDLE_EXCEPTIONS_ATTRIBUTE):  New macro.
18451
18452         * jcf-io.c (find_class):  Simpler/cleaner structure fixes a bug.
18453
18454 1998-11-14  Per Bothner  <bothner@cygnus.com>
18455
18456         Allow uses of interface types to verify.  This is not really
18457         type-safe, but it matches what Sun does, and is OK as long as
18458         there are appropriate run-time checks.
18459         * verify.c (merge_types):  If merging two interface types,
18460         just set the result to java.lang.Object.
18461         * expr.c (pop_type):  Any interface is matches by java.lang.Object.
18462
18463 1998-11-13  Tom Tromey  <tromey@cygnus.com>
18464
18465         * gjavah.c (main): Handle --output-class-directory argument.
18466         * jvspec.c (lang_specific_driver): Translate `-d' into
18467         -foutput-class-dir.
18468         * jcf.h (jcf_write_base_directory): Declare.
18469         * lang.c (lang_decode_option): Recognize -foutput-class-dir.
18470         * lang-options.h: Mention -foutput-class-dir.
18471         * jcf-write.c (jcf_write_base_directory): New global.
18472         (make_class_file_name): Put generated .class file into `-d'
18473         directory, or into source directory if -d not given.  Function now
18474         static.
18475         (write_classfile): Free class file name.  Handle case where class
18476         file name is NULL.
18477         (DIR_SEPARATOR): New macro.
18478         Include <sys/stat.h>
18479
18480         * Makefile.in (prefix): New macro.
18481
18482 1998-11-12  Per Bothner  <bothner@cygnus.com>
18483
18484         * parse.y (patch_invoke):  Do less if flag_emit_class_files.
18485         * expr.c (build_known_method_ref):  Don't check flag_emit_class_files
18486         here (done in patch_invoke instead).
18487         (case_identity):  Moved here from parse.y.
18488
18489         * java-tree.h (CAN_COMPLETE_NORMALLY):  New macro.
18490         * parse.y (java_complete_tree etc):  Maybe set CAN_COMPLETE_NORMALLY.
18491         * parse.y (java_complete_tree):  Re-order COMPOUND_EXPR in BLOCK
18492         so they can be efficiently scanned without recursion.
18493         Error it ! CAN_COMPLETE_NORMALLY first part of COMPOUND_EXPR.
18494         * expr.c (java_lang_expand_expr):  Expand statements of COMPOUND_EXPR
18495         in BLOCK iteratively, rather than recursively.
18496
18497         * parse.y (do_unary_numeric_promotion):  New function.
18498         (patch_unaryop, patch_binop, patch_array_ref):  Use it.
18499
18500         * parse.y (patch_newarray):  Various fixes.
18501
18502         Re-do handling of switch statements (for proper block scoping).
18503         * parse.y:  Add just a single block for the enture switch block,
18504         but don't create any "case blocks".
18505         (group_of_labels):  Rmeoved unneeded non-terminal.
18506         CASE_EXPR and DEFAULT_EXPR are added to current block.
18507         * expr.c (java_lang_expand_expr):  Inline SWITCH_EXPR here.
18508         Now also need to handle CASE_EXPR and DEFAULT_EXPR.
18509         * java-tree.h (SWITCH_HAS_DEFAULT):  New macro.
18510         * parse.y (wfl_operator, print_int_node): Make non-static.
18511         (java_complete_tree):  CASE_EXPR and DEFAULT_EXPR are now processed
18512         as part of recursive scan of block.
18513         (java_expand_switch ):  Removed - inlined into java_lang_expand_expr.
18514         (patch_switch_statement):  Most tests move dinto java_complete_tree.
18515
18516         * parse.y:  Make various production be non-typed (void).
18517         * parse.y (parse_error):  Merged into issue_warning_error_from_context.
18518         * parse.y (add_stmt_to_compound):  Don't create/change extra node.
18519         (patch_method_invocation_stmt):  Renamed to patch_method_invocation.
18520
18521         * jcf-write.c (struct jcf_handler):  New type.
18522         (struct jcf_switch_state):  New type.
18523         (SWITCH_ALIGN_RELOC, BLOCK_START_RELOC):  New relocation kinds.
18524         (alloc_handler, emit_unop, emit_reloc):  New functions.
18525         (adjust_typed_op):  Add extra parameter ("max type" offset).
18526         (emit_switch_reloc, emit_case-reloc):  New function.
18527         (generate_bytecode_conditional):  Handle REAL_TYPE comparisons.
18528         (generate_bytecode_insns):  Support REAL_CST, switch statements,
18529         exception handling, method calls, object/array creation, and more.
18530
18531         * class.c:  Remove some unused variables.
18532         * constants.c (find_string_constant):  New function.
18533         (count_constant_pool_bytes):  Fix to correctly handle wide constants.
18534         * decl.c (complete_start_java_method):  Don't _Jv_InitClass
18535         if flag_emit_class_files.
18536
18537 1998-11-12  Tom Tromey  <tromey@cygnus.com>
18538
18539         * jcf-io.c (find_class): Added explanatory comment.
18540
18541         * jcf-path.c (add_entry): Look for `.zip' at end of filename.  Add
18542         trailing slash to `.zip' entries.
18543
18544         * jvspec.c (lang_specific_driver): Correctly handle case where
18545         GC_NAME not defined.
18546
18547 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18548
18549         * jvspec.c (GC_NAME): New define.
18550         (lang_specific_driver): Use GC_NAME.  Add GC_NAME to command line
18551         if required.
18552         * Make-lang.in (jvspec.o): Define WITH_GC_<name>.
18553
18554 1998-11-11  Per Bothner  <bothner@cygnus.com>
18555
18556         * jcf-dump.c (TABLE_SWITCH):  Fix typos.
18557
18558 1998-11-11  Tom Tromey  <tromey@cygnus.com>
18559
18560         * jcf-dump.c (main): Correctly recognize `--'-style long options.
18561
18562 1998-11-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18563
18564         * class.c (is_compiled_class): Call safe_layout_class for class
18565         compiled from source.
18566         * conver.h (convert_to_integer, convert_to_real,
18567         convert_to_pointer): Added prototypes.
18568         * decl.c (init_decl_processing): Non longer push the decls of
18569         `methodtable', `constants', `Class', `Field', `dispatchTable'
18570         `jexception' and `Method'.
18571         * expr.c (build_invokeinterface): New function.
18572         (expand_invoke): static variable CLASS_IDENT now in
18573         build_invokeinterface. Use build_invokeinterface.
18574         (expand_java_field_op): Moved code to inline
18575         java.lang.PRIMTYPE.TYPE into a function.
18576         (build_primtype_type_ref): New function.
18577         * java-tree.def (INSTANCEOF_EXPR): New tree code.
18578         * java-tree.h (CLASS_METHOD_CHECKED_P, METHOD_DEPRECATED,
18579         FIELD_DEPRECATED, CLASS_DEPRECATED): New flag macros.
18580         (DECL_CONSTRUCTOR_P): Fixed typo in comment.
18581         (DECL_LOCAL_STATIC_VALUE): New macro.
18582         (build_invokeinterface, build_primtype_type_ref): New function
18583         prototypes.
18584         (java_parse_abort_on_error): Macro rewritten.
18585         * jcf-parse.c (current_method): Add comment to declaration.
18586         (parse_zip_file_entries, process_zip_dir, void parse_source_file):
18587         Function prototypes fixed.
18588         (jcf_parse_source): push/pop parser context. save/restore global.
18589         (parse_source_file): Fixed leading comment. Now take a
18590         IDENTIFIER_NODE as an argument. Doesn't check methods, layout
18591         classes and pop the parser context anymore.
18592         (yyparse): Push parser context, save globals, parse the source
18593         file, restore globals and pop the parser context when processing a
18594         source file.
18595         * jcf.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG define.
18596         * lex.c (java_parse_doc_section): New function.
18597         (java_lex): Call java_parse_doc_section when appropriate. Build an
18598         operator around INSTANCEOF_TK.
18599         * lex.h (java_lineterminator, java_sprint_unicode,
18600         java_unicode_2_utf8, java_lex_error, java_store_unicode):
18601         Prototypes rewritten.
18602         (java_parse_escape_sequence, java_letter_or_digit_p,
18603         java_parse_doc_section, java_parse_end_comment, java_get_unicode,
18604         java_read_unicode, java_store_unicode, java_read_char,
18605         java_allocate_new_line, java_unget_unicode, java_sneak_unicode):
18606         Added function prototypes.
18607         * parse.h (VERBOSE_SKELETON): Replaces SOURCE_FRONTEND_DEBUG
18608         define.
18609         (JNULLP_TYPE_P, CHECK_METHODS, CHECK_DEPRECATED, REGISTER_IMPORT):
18610         New macros
18611         (struct parser_ctxt): New fields: deprecated,
18612         current_parsed_class_un, gclass_list.
18613         (fix_method_argument_names, issue_warning_error_from_context,
18614         resolve_package, lookup_package_type): New function prototypes.
18615         (resolve_expression_name): Fixed function prototype.
18616         (find_applicable_accessible_methods_list): Fixed indentation, added
18617         extra argument in prototype.
18618         (check_final_assignment, build_null_of_type, check_deprecation,
18619         check_method_redefinition, reset_method_name,
18620         java_check_regular_methods, java_check_abstract_methods,
18621         maybe_build_primttype_type_ref): New function prototype.
18622         * parse.y (conver.h): Include.
18623         (INSTANCEOF_TK): Tagged <operator>.
18624         (single_type_import_declaration): Use REGISTER_IMPORT macro.
18625         (relational_expression:): Build binop for instanceof.
18626         (java_push_parser_context): Remember ctxp->gclass_list across
18627         contexts.
18628         (java_pop_parser_context): Simply return if no context
18629         exists. Remember gclass_list across contexts.
18630         (issue_warning_error_from_context): New function.
18631         (parse_error_context): Don't setup ctxp->elc here. Call
18632         issue_warning_error_from_context instead.
18633         (parse_warning_context): Likewise.
18634         (maybe_create_class_interface_decl): Removed DECL_ARTIFICIAL
18635         setup. Link new class/interface to ctxp->gclass_list.
18636         (add_superinterfaces): Register interface as incomplete if not
18637         loaded.
18638         (create_class): Remember class unqualified name in
18639         ctxp->current_parsed_class_un. Check class deprecation.
18640         (register_fields): Check field deprecation. Remember static final
18641         field value in DECL_LOCAL_STATIC_VALUE. Changed comment in part
18642         processing INIT.
18643         (method_header): New local variable ORIG_ARG. Use unqualified
18644         current class name for check on constructor errors. Promote return
18645         type if of record type. Argument list fix moved in
18646         fix_method_argument_names, called here. Check method deprecation.
18647         (fix_method_argument_names): New function.
18648         (method_declarator): Promote record typed arguments.
18649         (safe_layout_class): Check class methods before layout.
18650         (java_complete_class): Compute field layout when patched.
18651         (do_resolve_class): Try to load class after having it renamed
18652         after the package name.
18653         (get_printable_method_name): Use DECL_CONTEXT.
18654         (reset_method_name): New function.
18655         (check_method_redefinition): Use reset_method_name.
18656         (java_check_regular_methods): New local variable
18657         SAVED_FOUND_WFL. Temporarily reinstall overriding/hiding method
18658         names for error report. Check for compile-time error when method
18659         found has default (package) access.
18660         (java_check_abstract_methods): Now takes an interface DECL node as
18661         an argument. Also reinstall real name on unchecked
18662         overriding/hiding methods for error report.
18663         (java_check_methods): Fixed leading comment. Get classes to verify
18664         from ctxp->gclass_list. Use CHECK_METHODS macro and set
18665         CLASS_METHOD_CHECKED_P on class verification.
18666         (lookup_java_method2): Get real method name if necessary.
18667         (find_in_imports): Don't check package class access here.
18668         (resolve_package, lookup_package_type): New functions.
18669         (java_layout_classes): Fixed leading comment. Take classes to be
18670         laid out from ctxp->gclass_list.
18671         (java_complete_expand_methods): Don't expand native and abstract
18672         methods.
18673         (java_expand_classes): New function.
18674         (resolve_expression_name): Use additional argument ORIG.  Retrieve
18675         values of static final field of primitive types.
18676         (resolve_field_access): Handles static final field of promotive
18677         type.
18678         (resolve_qualified_expression_name): Handle STRING_CST as
18679         primaries and package name resolution. Check deprecation on found
18680         decls. Set where_found and type_found on non static field resolved
18681         during qualification. Layout non primitive field decl types.
18682         (check_deprecation): New function.
18683         (maybe_access_field): Simplified.
18684         (patch_method_invocation_stmt): Local variable CLASS_TYPE
18685         removed. Reverse method's argument when primary is a type. Don't
18686         use CLASS_TYPE to report problems, use IDENTIFIER_WFL
18687         instead. Include abstract class in the list of class searchable
18688         for constructors. Use DECL_CONTEXT of found method for access
18689         checks. Check method deprecation.
18690         (patch_invoke): Pay extra care to NEW_CLASS_EXPR type call when
18691         converting arguments. Handle INVOKE_INTERFACE.
18692         (lookup_method_invoke): Search constructor using existing
18693         infrastructure (don't rely on lookup_java_constructor anymore).
18694         (find_applicable_accessible_methods_list): Extra argument flag
18695         LC. Now include constructor in the search.
18696         (qualify_ambiguous_name): Conditional expression are primaries.
18697         (not_initialized_as_it_should_p): static final are always
18698         initialized.
18699         (java_complete_tree): Pass extra NULL argument to
18700         resolve_expression_name. Stricter test to carry on patching
18701         assignments. New case for INSTANCEOF_EXPR.
18702         (complete_function_arguments): Inline PRIMTYPE.TYPE read access.
18703         (check_final_assignment, maybe_build_primttype_type_ref): New
18704         functions.
18705         (patch_assignment): Detect resolved static finals and carry normal
18706         assignment error check on them. Inline PRIMTYPE.TYPE read access.
18707         (try_builtin_assignconv): Access constant 0 on all primitive
18708         types.
18709         (valid_builtin_assignconv_identity_widening_p): Accept identical
18710         types. Accept all promoted type on int type.
18711         (valid_ref_assignconv_cast_p): Accept a null pointer to be
18712         assigned to a reference.
18713         (valid_method_invocation_conversion_p): Accept to check null
18714         pointers.
18715         (build_binop): Merge declaration and initialization of local
18716         variable BINOP.
18717         (patch_binop): New case for INSTANCEOF_EXPR. NE_EXPR to accept all
18718         numeric types. Improved validity test for qualify operators on
18719         references.
18720         (patch_unaryop): Broadened rejection test for PREDECREMENT_EXPR
18721         and PREINCREMENT_EXPR. Also detect resolved static finals of a
18722         primitive type and issue the appropriate error message.
18723         (resolve_type_during_patch): Mark class loaded when resolved.
18724         (patch_cast): Allow null to be cased to reference types.
18725         (build_null_of_type): New function.
18726         (patch_array_ref): Handle array on references correctly.
18727         (patch_return): Removed unused local variable MODIFY. Force
18728         boolean to be returned as integers. Allows null to be returned by
18729         a function returning a reference.
18730         * typeck.c (convert_to_integer, convert_to_real,
18731         convert_to_pointer): Prototypes moved to convert.h
18732         (lookup_argument_method): Use method real name, if necessary.
18733
18734 1998-10-30  Tom Tromey  <tromey@cygnus.com>
18735
18736         * class.c (build_class_ref): Changed name of primitive classes to
18737         start with `_Jv_'.
18738
18739         * class.c (make_class_data): Renamed fields: nmethods to
18740         method_count, method_count to dtable_method_count.  Always set
18741         `state' field to 0.
18742         * decl.c (init_decl_processing): Likewise.
18743
18744 1998-10-28  Alexandre Petit-Bianco  <apbianco@cygnus.com>
18745
18746         * class.c (layout_class): Don't mangle <finit>, produce
18747         __finit<class> instead. Don't verify artificial methods.
18748         * decl.c (finit_identifier_node): New declared global.
18749         (init_decl_processing): finit_identifier_node initialized.
18750         * java-tree.def (CONDITIONAL_EXPR): New Java tree code.
18751         * java-tree.h (finit_identifier_node): Declared as extern.
18752         (struct lang_decl): New field called_constructor.
18753         (DECL_CONSTRUCTOR_CALLS): Access macro to called_constructor.
18754         (CLASS_HAS_FINIT_P): New macro.
18755         (CALL_CONSTRUCTOR_P): Leading comment changed. Macro now checks
18756         explicit constructor invocation.
18757         (CALL_EXPLICIT_CONSTRUCTOR_P, CALL_THIS_CONSTRUCTOR_P,
18758         CALL_SUPER_CONSTRUCTOR_P): New macros.
18759         (write_classfile): Added prototype.
18760         * jcf-parse.c (jcf_parse_source): Parse and remember for
18761         generation if the file was seen on the command line.
18762         (parse_source_file): Don't write the class file here.
18763         (yyparse): Loop on files rewritten. Set current_jcf.
18764         (parse_zip_file_entries): Parse class file only if it was found.
18765         * lang.c (init_parse): Don't open command line provided filename
18766         here.
18767         (lang_parse): Don't set main_jcf anymore.
18768         * parse.h (ABSTRAC_CHECK): Capitalized arguments.
18769         (JCONSTRUCTOR_CHECK): New macro.
18770         (JBSC_TYPE_P): New macro.
18771         (IN_TRY_BLOCK_P, EXCEPTIONS_P): Fixed leading comment.
18772         (COMPLETE_CHECK_OP_2): New macro.
18773         (struct parse_ctxt): New field explicit_constructor_p.
18774         (check_class_interface_creation): Fixed prototype indentation.
18775         (patch_method_invocation_stmt): Prototype reflects added argument.
18776         (patch_invoke): Likewise.
18777         (complete_method_declaration, build_super_invocation,
18778         verify_constructor_circularity,
18779         build_this_super_qualified_invocation, get_printable_method_name,
18780         patch_conditional_expr, maybe_generate_finit, fix_constructors,
18781         verify_constructor_super, create_artificial_method,
18782         start_artificial_method_body, end_artificial_method_body,
18783         generate_field_initialization_code): New function prototypes.
18784         * parse.y: Fixed leading comment
18785         (constructor_header:, constructor_body:, block_end:): Rules tagged
18786         <node>.
18787         (type_declaration:): Call maybe_generate_finit.
18788         (method_declaration:): Action for method_body: placed in new
18789         function complete_method_declaration, called here.
18790         (constructor_declaration:): Defined actions. Removed leading
18791         FIXME.
18792         (constructor_header:): New rule with action.
18793         (constructor_body:): Rule rewritten using block_begin: and
18794         block_end:. Defined actions.
18795         (constructor_declarator:, explicit_constructor_invocation:):
18796         Defined actions.
18797         (block:): Use new rules block_begin: block_end:.
18798         (block_begin:, block_end:): New rules and actions.
18799         (block_statements:): Fixed error message for explicit
18800         constructors.
18801         (method_invocation:): Call build_this_super_qualified_invocation
18802         if primary is `this' or `super' was seen.
18803         (conditional_expression:): Action defined.
18804         (extra_ctxp_pushed_p): New static global flag.
18805         (java_parser_context_save_global): Create parser context if
18806         necessary. Use extra_ctxp_pushed_p to remember it.
18807         (java_parser_context_restore_global): Pop extra parser context if
18808         one exists.
18809         (build_array_from_name): Array on primitive types are marked
18810         loaded.
18811         (register_fields): Restore new name in field initializer
18812         expression if type was altered. Non static fields initialized upon
18813         declaration marked initialized.
18814         (maybe_generate_finit): New function.
18815         (maybe_generate_clinit): Use create_artificial_method,
18816         start_artificial_method_body, end_artificial_method_body. Generate
18817         debug info for enclosed initialization statements.
18818         (method_header): Fixed leading comment. Check constructor
18819         flags. Detect constructor declarations and set DECL_CONSTRUCTOR_P
18820         accordingly.
18821         (complete_method_declaration, constructor_circularity_msg,
18822         verify_constructor_circularity): New functions.
18823         (get_printable_method_name): New function.
18824         (check_method_redefinition): Don't rename <finit> methods. Fix
18825         declared constructor names. Error message for
18826         constructors modified.
18827         (java_check_regular_methods): Local variable seen_constructor
18828         renamed saw_constructor. Skip verification on constructors. Create
18829         default constructor with create_artificial_method.
18830         (java_check_methods): Removed unnecessary empty line.
18831         (create_artificial_method, start_artificial_method_body,
18832         end_artificial_method_body): New functions.
18833         (java_layout_classes): Changed leading comment. Reverse fields
18834         list if necessary. Always layout java.lang.Object if being
18835         defined.
18836         (java_complete_expand_methods): Verify constructor circularity.
18837         (java_complete_expand_method): Call fix_constructor on
18838         constructors.  Local variable no_ac_found removed. Restore
18839         bindings if method body expansion failed.
18840         (fix_constructors, verify_constructor_super,
18841         generate_field_initialization_code): New function.
18842         (java_expand_classes): Fixed leading comment. Write class file
18843         here.
18844         (resolve_expression_name): Check for illegal instance variable
18845         usage within the argument scope of an explicit constructor
18846         invocation.
18847         (resolve_qualified_expression_name): Pass extra from_super flag
18848         when invoking patch_method_invocation_stmt. New case for
18849         conditional expression when used as a primary. Check for error
18850         when acquiring super.
18851         (patch_method_invocation_stmt): Added extra argument super. New
18852         local variable is_static_flag. Set class_to_search according to
18853         the nature of the constructor invocation. Don't add `this'
18854         argument when expanding NEW_CLASS_EXPR. Check for illegal method
18855         invocation within the argument scope of explicit constructor
18856         invocation. Set is_static according to is_static_flag. Provide
18857         extra `super' argument to patch_invoke invocation.
18858         (patch_invoke): New argument from_super. Loop on arguments
18859         indentation fixed. Pass from_super to invocation_mode. New switch
18860         case INVOKE_SUPER. Fixed error message in switch default case.
18861         Don't use CALL_CONSTRUCTOR_P but rather a test on the tree node
18862         value.
18863         (invocation_mode): Return INVOKE_SUPER mode when appropriate.
18864         (lookup_method_invoke): Fixed prototypes in candidates list. Error
18865         message takes constructors into account.
18866         (find_applicable_accessible_methods_list): Fixed indentation.
18867         (qualify_ambiguous_name): Take explicit constructor invocation
18868         into account. Deal with a conditional expression as a primary to
18869         a method call.
18870         (java_complete_tree): Added local wfl_op3. New CONDITIONAL_EXPR
18871         case. Added extra argument to patch_method_invocation_stmt.
18872         Register calls made to explicit constructor `this'. Don't call
18873         save_expr in ARRAY_REF case when emitting class files. Check for
18874         illegal use of this when expanding explicit constructor invocation
18875         arguments.
18876         (complete_function_arguments): Set and reset parser context
18877         explicit_constructor_p field value when appropriate.
18878         (build_super_invocation, build_this_super_qualified_invocation):
18879         New functions.
18880         (patch_assignment): Fixed typo.
18881         (patch_unaryop): Check on final fields occurs only when a decl
18882         exits.
18883         (patch_return): Take constructors into account.
18884         (patch_conditional_expr): New function.
18885         * typeck.c (build_java_signature): Removed unnecessary empty line.
18886
18887 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18888
18889         * Makefile.in (jcf-dump, gcjh): Link in $(LIBS) too.
18890
18891 1998-10-28  Tom Tromey  <tromey@cygnus.com>
18892
18893         * decl.c (init_decl_processing): Renamed fields.
18894         * class.c (make_class_data): Renamed bfsize, nfields, nsfields,
18895         interface_len, msize fields.
18896
18897         * class.c (make_class_data): Removed subclass_head and
18898         subclass_next fields.
18899         * decl.c (init_decl_processing): Removed subclass_head and
18900         subclass_next fields.
18901
18902 1998-10-28  Jeffrey A Law  (law@cygnus.com)
18903
18904         * jcf-write.c (emit_load_or_store): Avoid implicit int arguments.
18905         * mangle.c (emit_unicode_mangled_name): Similarly.
18906
18907 1998-10-26  Nick Clifton  <nickc@cygnus.com>
18908
18909         * jcf-parse.c (get_constant): Place braces around code to compute
18910         'd' when REAL_ARITHMETIC is not defined.
18911
18912 1998-10-25  H.J. Lu  (hjl@gnu.org)
18913
18914         * Make-lang.in (jv-scan$(exeext)): Add stamp-objlist to
18915         dependency.
18916
18917 1998-10-23  Tom Tromey  <tromey@cygnus.com>
18918
18919         * lang-specs.h: `.zip' files are input to jc1.
18920
18921 1998-10-22  Per Bothner  <bothner@cygnus.com>
18922
18923         * jvspecs.c:  Add (but don't enable) support for combining multiple
18924         .class and .java input filenames to a single jc1 invocation.
18925         Add support for -C flag (copile to .class files).
18926         Translate -classpath and -CLASSPATH arguments.
18927         * lang-specs.h:  Don't set %2 spec.
18928
18929 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18930
18931         * jcf-path.c (add_entry): Don't add trailing separator if entry is
18932         a .zip file.
18933         (add_path): Don't add trailing separator to non-empty path
18934         elements.
18935
18936         * lang.c (lang_decode_option): Check for -fclasspath and
18937         -fCLASSPATH before examining other `-f' options.
18938
18939         * java-tree.h (finalize_identifier_node): Don't declare.
18940         * class.c (make_class_data): Don't push "final" field.
18941         * decl.c (init_decl_processing): Don't push "final" field.
18942         (finalize_identifier_node): Removed.
18943         (init_decl_processing): Don't set finalize_identifier_node.
18944
18945         * config-lang.in (stagestuff): Added jcf-dump and jv-scan.
18946
18947 1998-10-11  Anthony Green  <green@cygnus.com>
18948
18949         * Make-lang.in (java): Depend on jcf-dump and jv-scan.
18950         (JV_SCAN_SOURCES): New macro.
18951         (JCF_DUMP_SOURCES): Likewise.
18952         (jcf-dump$(exeext)): New target.
18953         (jv-scan$(exeext)): New target.
18954
18955 1998-10-22  Tom Tromey  <tromey@cygnus.com>
18956
18957         * Makefile.in (LEX): Removed.
18958         (LEXFLAGS): Likewise.
18959         (SET_BISON): New macro.
18960         (BISON): Removed.
18961         ($(PARSE_C)): Use SET_BISON.  Run bison from srcdir to avoid
18962         spurious diffs in parse.c.
18963         ($(PARSE_SCAN_C)): Likewise.
18964         (PARSE_DIR): New macro.
18965         (PARSE_C): Use it.
18966         (PARSE_SCAN_C): Likewise.
18967         (PARSE_RELDIR): New macro.
18968
18969         * jcf-io.c (saw_java_source): Define here, not in jcf-parse.c.
18970
18971         * jcf-io.c (find_class): Use saw_java_source to determine when to
18972         look for `.java' file.
18973         * jcf-parse.c (saw_java_source): New global.
18974         (yyparse): Set it if `.java' file seen.
18975
18976         * Make-lang.in (JAVA_SRCS): Added jcf-path.c.
18977         (GCJH_SOURCES): Likewise.
18978         * Makefile.in (datadir): New macro.
18979         (libjava_zip): Likewise.
18980         (JAVA_OBJS): Added jcf-path.o.
18981         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
18982         (../gcjh$(exeext)): Likewise.
18983         (jcf-path.o): New target.
18984         * java-tree.h (fix_classpath): Removed decl.
18985         * jcf-parse.c (fix_classpath): Removed.
18986         (load_class): Don't call fix_classpath.
18987         * parse.y (read_import_dir): Don't call fix_classpath.
18988         * lex.h: Don't mention classpath.
18989         * lex.c (java_init_lex): Don't initialize classpath.
18990         * jcf-io.c (classpath): Removed global.
18991         (find_class): Use jcf_path iteration functions.  Correctly search
18992         class path for .java file.
18993         (open_in_zip): New argument `is_system'.
18994         * jcf-dump.c (main): Call jcf_path_init.  Recognize all new
18995         classpath-related options.
18996         * lang.c (lang_decode_option): Handle -fclasspath, -fCLASSPATH,
18997         and -I.
18998         (lang_init): Call jcf_path_init.
18999         * lang-options.h: Mention -I, -fclasspath, and -fCLASSPATH.
19000         * lang-specs.h: Handle -I.  Minor cleanup to -M options.
19001         Correctly put braces around second string in each entry.
19002         * gjavah.c (main): Call jcf_path_init.  Recognize all the new
19003         classpath-related options.
19004         (help): Updated for new options.
19005         * jcf.h: Declare functions from jcf-path.c.  Don't mention
19006         `classpath' global.
19007         * jcf-path.c: New file.
19008
19009         * jcf-depend.c: Include jcf.h.
19010
19011         * jcf-write.c (localvar_alloc): Returns `void'.
19012         (localvar_free): Removed unused variable.
19013
19014         * lang.c (OBJECT_SUFFIX): Define if not already defined.
19015         (init_parse): Use OBJECT_SUFFIX, not ".o".
19016
19017 1998-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19018
19019         * class.c (emit_register_classes): Renamed from
19020         emit_register_class.
19021         * java-tree.h (emit_register_classes): Prototype renamed from
19022         emit_register_class.
19023         * jcf-parse.c (yyparse): Call emit_register_classes once before
19024         returning.
19025         * parse.y (java_expand_classes): No longer register classes.
19026
19027 1998-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19028
19029         * class.c (is_compiled_class): New local variable
19030         seen_in_zip. Identify classes found in currently compiled source
19031         file(s).
19032         * decl.c (complete_start_java_method): Fixed typo.
19033         * java-tree.h (CLASS_FROM_CURRENTLY_COMPILED_SOURCE_P,
19034         HAS_BEEN_ALREADY_PARSED_P, IS_A_COMMAND_LINE_FILENAME_P): New macros.
19035         (CLASS_P): Moved around.
19036         (java_parse_abort_on_error): Macro moved from jcf-parse.c
19037         * jcf-parse.c (java_parse_abort_on_error): Macro moved to
19038         java-tree.h
19039         (jcf_parse_source): Changed leading comment. Removed unnecessary
19040         fclose and CLASS_FROM_SOURCE_P marking.
19041         (parse_source_file): New local variables remember_for_generation
19042         and filename. Mark parsed file name identifier node. Removed block
19043         executed when parse_only was null. Set remember_for_generation.
19044         Use it as an argument to java_pop_parser_context.
19045         (yyparse): New local variables several_files, list, next node and
19046         current_file_list. Split ampersand separated file names into
19047         current_file_list. Iterate through the list and parse accordingly.
19048         * parse.h (java_pop_parser_context): New function prototype.
19049         * parse.y (ctxp_for_generation): New static global variable.
19050         (java_pop_parser_context): New argument generate. Link popped ctxp
19051         to ctxp_for_generation list accordingly.
19052         (java_complete_expand_methods): Fixed indentation.
19053         (java_expand_classes): New function.
19054
19055 1998-10-17  Per Bothner  <bothner@cygnus.com>
19056
19057         * Makefile.in:  Link with libiberty.a instead of memmove.o.
19058
19059 1998-10-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19060
19061         * lex.c (setjmp.h): No longer included.
19062         * lex.h (setjmp.h): Included.
19063         * parse.h (SET_TYPE_FOR_RESOLUTION): New macro.
19064         (duplicate_declaration_error_p): Renamed from
19065         duplicate_declaration_error.
19066         (build_array_from_name): New function prototype.
19067         * parse.y (setjmp.h): No longer included.
19068         (variable_declarator_id): Define action.
19069         (build_array_from_name): New function.
19070         (duplicate_declaration_error_p): Renamed from
19071         duplicate_declaration_error.  Fixed leading comment.
19072         (register_fields): Main `for' loop reorganized. Uses
19073         SET_TYPE_FOR_RESOLUTION and build_array_from_name.
19074         (method_declarator): Uses SET_TYPE_FOR_RESOLUTION and call
19075         build_array_from_name.
19076         (resolve_class): Set CLASS_LOADED_P on newly build array dimension
19077         types.
19078         (read_import_dir): Don't try to skip `.' and `..'.
19079         (declare_local_variables): Uses SET_TYPE_FOR_RESOLUTION and
19080         build_array_from_name. Main `for' loop reorganized.
19081         (resolve_qualified_expression_name): When building access to a
19082         field, use the type where the field was found, not its own type.
19083         (maybe_access_field): Use field DECL_CONTEXT if the type where the
19084         field was found is null.
19085         (qualify_ambiguous_name): Sweep through all successive array
19086         dimensions.
19087
19088 1998-10-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19089
19090         * java-tree.h (pop_labeled_block, lang_printable_name,
19091         maybe_add_interface, set_super_info, get_access_flags_from_decl,
19092         interface_of_p, inherits_from_p, fix_classpath,
19093         complete_start_java_method, emit_handlers, init_outgoing_cpool,
19094         make_class_data, register_class, alloc_name_constant): New
19095         function prototypes.
19096         * lang.c (lang_decode_option): Set argc argument unused. Fixed
19097         indentation. Added cast to remove warning.
19098         (lang_printable_name): Set v argument unused.
19099         (lang_print_error): Added argument to lang_printable_name call.
19100         (java_dummy_print, print_lang_decl, print_lang_type,
19101         print_lang_identifier, lang_print_xnode): All argument marked
19102         unused.
19103         * lex.c (java_unget_unicode): Removed unnecessary argument.
19104         (java_allocate_new_line): Unused local variable is gone.
19105         (java_read_char): Added parenthesis in expressions to remove
19106         warnings.  Added final return statement.
19107         (java_read_unicode): Added parenthesis in expression to remove
19108         warning.
19109         (java_parse_end_comment): Fixed java_unget_unicode invocation.
19110         (java_parse_escape_sequence): Likewise.
19111         (java_lex): Unused local variables are gone. Fixed
19112         java_unget_unicode invocation.
19113         * lex.h (set_float_handler): Prototype added when JC1_LITE not
19114         defined.
19115         * parse.h (ERROR_CANT_CONVERT_TO_BOOLEAN): Fixed
19116         lang_printable_name invocation in macro.
19117         (ERROR_CANT_CONVERT_TO_NUMERIC, ERROR_CAST_NEEDED_TO_INTEGRAL):
19118         Likewise.
19119         (duplicate_declaration_error): Suppressed unused argument in
19120         prototype.
19121         (identical_subpath_p): Function declaration is gone.
19122         (patch_invoke): Suppressed unused argument in prototype.
19123         (patch_cast, build_labeled_block, check_thrown_exceptions):
19124         Likewise.
19125         * parse.y (setjmp.h): Included
19126         (toplev.h): Likewise.
19127         (field_declaration:): Suppressed unused local
19128         (label_decl:): Fixed build_labeled_block invocation.
19129         (java_pop_parser_context): Put extra parenthesis around assignment
19130         in if.
19131         (yyerror): Suppressed unused local variables.
19132         (variable_redefinition_error): Fixed lang_printable_name
19133         invocation.
19134         (create_interface): Suppressed unused local variables.
19135         (create_class): Likewise.
19136         (duplicate_declaration_error): Suppressed unused argument. Fixed
19137         lang_printable_name invocation.
19138         (register_fields): Suppressed unused local variable. Fixed
19139         duplicate_declaration_error invocation.
19140         (method_header): Suppressed unused local variable.
19141         (method_declarator, parser_check_super): Likewise.
19142         (java_complete_class): Suppressed unused local variable. Fixed
19143         fatal error message.
19144         (complete_class_report_errors): Added default: in switch.
19145         (java_check_regular_methods): Fixed lang_printable_name
19146         invocations.
19147         (check_throws_clauses): Likewise.
19148         (java_check_abstract_methods): Suppressed unused local
19149         variable. Fixed lang_printable_name invocation.
19150         (read_import_entry): Added supplemental return statement.
19151         (read_import_dir): Suppressed unused local variables.
19152         (check_pkg_class_access, declare_local_variables): Likewise.
19153         (source_start_java_method): Suppressed unused extern variable
19154         declarations
19155         (expand_start_java_method): Suppressed unused extern and local
19156         variable declarations.
19157         (java_complete_expand_methods): Likewise.
19158         (java_complete_expand_method): Suppressed unused local variables.
19159         (make_qualified_name): Likewise.
19160         (resolve_qualified_expression_name): Added default: in
19161         switch. Fixed lang_printable_name invocation.
19162         (class_instance_creation_expression): Added parenthesis around
19163         expressions.
19164         (patch_method_invocation_stmt): Fixed lang_printable_name and
19165         patch_invoke invocations.
19166         (check_for_static_method_reference): Fixed lang_printable_name
19167         invocation.
19168         (patch_invoke): Suppressed unused arguments and local variables.
19169         (lookup_method_invoke): Suppressed unused local variables.
19170         (qualify_ambiguous_name): Added default: in switch.
19171         (identical_subpath_p): Function removed.
19172         (patch_assignment): Suppressed unused local variables. Suppressed
19173         unnecessary if statement. Fixed lang_printable_name invocations.
19174         (try_builtin_assignconv): Fixed lang_printable_name invocations.
19175         (valid_ref_assignconv_cast_p): Parenthesis around
19176         expression. Suppressed unused local variables.
19177         (build_binop): Suppressed unused local variables. fixed
19178         lang_printable_name invocations.
19179         (string_constant_concatenation): Suppressed unused local
19180         variables.
19181         (patch_unaryop): Fixed lang_printable_name invocation.
19182         (patch_cast): Suppressed unnecessary argument. Fixed
19183         lang_printable_name invocation.
19184         (patch_array_ref): Fixed lang_printable_name invocation.
19185         (patch_newarray, patch_return, patch_if_else_statement): Likewise.
19186         (build_labeled_block): Suppressed unused argument.
19187         (generate_labeled_block): Fixed build_labeled_block invocation.
19188         (build_loop_body): Suppressed unused local variables.
19189         (patch_loop_statement): Likewise.
19190         (patch_exit): Fixed lang_printable_name invocation.
19191         (patch_switch_statement): Likewise.
19192         (case_identity): First argument marked unused.
19193         (patch_try_statement): Fixed lang_printable_name invocations.
19194         (patch_synchronized_statement, patch_throw_statement): Likewise.
19195         (check_thrown_exceptions): Fixed check_thrown_exceptions and
19196         lang_printable_name invocations.
19197         (check_thrown_exceptions_do): Suppressed unused argument.
19198
19199 1998-10-14  Tom Tromey  <tromey@cygnus.com>
19200
19201         * jcf-write.c (write_classfile): Add output class file as target.
19202         * lang-options.h: Added -MD, -MMD, -M, and -MM.
19203         * jcf.h: Added declarations for dependency-tracking functions.
19204         * lang-specs.h: Handle -M, -MM, MD, and -MMD.
19205         * lang.c (lang_decode_option): Recognize -MD and -MMD.
19206         (finish_parse): Call jcf_dependency_write.
19207         (dependency_tracking): New global.
19208         (DEPEND_SET_FILE): New define.
19209         (DEPEND_ENABLE): New define.
19210         (init_parse): Enable dependency tracking if required.
19211         Include "flags.h".
19212         * Makefile.in (JAVA_OBJS): Added jcf-depend.o.
19213         (../jcf-dump$(exeext)): Depend on and link with jcf-depend.o.
19214         (../gcjh$(exeext)): Likewise.
19215         (jcf-depend.o): New target.
19216         * Make-lang.in (JAVA_SRCS): Added jcf-depend.c.
19217         (GCJH_SOURCES): Likewise.
19218         * jcf-io.c (open_class): Call jcf_dependency_add_file.  Added
19219         dep_name argument.
19220         (find_classfile): Added dep_name argument.
19221         (find_class): Compute name of dependency.
19222         (open_in_zip): Call jcf_dependency_add_file.
19223         * gjavah.c (output_file): No longer global.
19224         (usage): Don't mention "gjavah".
19225         (help): Likewise.
19226         (java_no_argument): Likewise.
19227         (version): Likewise.
19228         (main): Recognize and handle -M family of options.
19229         (print_mangled_classname): Return is void.
19230         (process_file): Handle case where output is suppressed.
19231         (HANDLE_END_FIELD): Likewise.
19232         (HANDLE_METHOD): Likewise.
19233         * jcf-depend.c: New file.
19234
19235 1998-10-13  Jeffrey A Law  (law@cygnus.com)
19236
19237         * java-tree.def: Add missing newline at EOF.
19238
19239 1998-10-13  Tom Tromey  <tromey@cygnus.com>
19240
19241         * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
19242         (main): Likewise.  Exit with SUCCESS_EXIT_CODE at end of
19243         function.
19244         Include <config.h> and "system.h".
19245         (disassemble_method): Undefine RET to avoid clash with
19246         config/i386/i386.h.
19247
19248 1998-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19249
19250         * decl.c (runtime_exception_type_node, error_exception_type_node):
19251         New global variables.
19252         (init_decl_processing): Initialized.
19253         * expr.c (java_lang_expand_expr): Set caught exception type to
19254         null if catch handler argument doesn't exit.
19255         * java-tree.def (SYNCHRONIZED_EXPR, THROW_EXPR): New Java specific
19256         tree codes.
19257         * java-tree.h (runtime_exception_type_node,
19258         error_exception_type_node): Global variables declared.
19259         (DECL_FUNCTION_THROWS): New macro.
19260         (DECL_FUNCTION_BODY): Modified comment.
19261         (DECL_SPECIFIC_COUNT): Likewise.
19262         (struct lang_decl): New field throws_list.
19263         (IS_UNCHECKED_EXPRESSION_P): New macro.
19264         * lex.c (java_lex): Generate location information for THROW_TK.
19265         * parse.h (PUSH_EXCEPTIONS, POP_EXCEPTIONS, IN_TRY_BLOCK_P,
19266         EXCEPTIONS_P): New macros.
19267         (enum jdep_code): New value JDEP_EXCEPTION.
19268         (BUILD_MONITOR_ENTER, BUILD_MONITOR_EXIT,
19269         BUILD_ASSIGN_EXCEPTION_INFO, BUILD_THROW, SET_WFL_OPERATOR,
19270         PATCH_METHOD_RETURN_ERROR): New macros.
19271         (patch_method_invocation_stmt): Added new argument to prototype.
19272         (patch_synchronized_statement, patch_throw_statement,
19273         check_thrown_exceptions, check_thrown_exceptions_do,
19274         purge_unchecked_exceptions, check_throws_clauses): New function
19275         prototypes.
19276         * parse.y Fixed typo in keyword section.
19277         (throw:): Rule tagged <node>.
19278         (THROW_TK): Keyword tagged <operator>.
19279         (method_header:): Last argument to call to method_header passed
19280         from throws: rule.
19281         (throws:, class_type_list:, throw_statement:,
19282         synchronized_statement:, synchronized:): Defined actions.
19283         (method_header): New local variable current. Register exceptions
19284         from throws clause.
19285         (java_complete_tree): Complete and verify exceptions from throws
19286         clause.
19287         (complete_class_report_errors): Error message on exceptions not
19288         found
19289         (java_check_regular_methods): Fixed typo. Shortcut on private
19290         overriding methods. Changed error message on method
19291         redefinition. Check for throws clause compatibility.
19292         (check_throws_clauses): New function.
19293         (java_check_abstract_methods): Use DECL_NAME for wfl or current
19294         method. Changed error message on method redefinition.
19295         (currently_caught_type_list): New static variable.
19296         (java_complete_expand_methods): Purge unchecked exceptions from
19297         throws clause list. Call PUSH_EXCEPTIONS before walk and
19298         POP_EXCEPTIONS after.
19299         (resolve_qualified_expression_name): Pass new argument as NULL to
19300         patch_method_invocation_stmt.
19301         (patch_method_invocation_stmt): New argument ref_decl. Invoke
19302         PATCH_METHOD_RETURN_ERROR when returning with error. Reverse
19303         argument list when appropriate. Use new argument if non null to
19304         store selected method decl.
19305         (patch_invoke): Convert if necessary args of builtin types before
19306         forming CALL_EXPR. Argument list no longer reversed here.
19307         (invocation_mode): Treat final methods as static methods.
19308         (java_complete_tree): New cases for THROW_EXPR: and
19309         SYNCHRONIZED_EXPR:. Check thrown exceptions when completing
19310         function call.
19311         (complete_function_arguments): No more RECORD_TYPE
19312         conversion. Function parameter nodes no longer saved.
19313         (valid_ref_assignconv_cast_p): Avoid handling null type.
19314         (patch_binop): Fixed null constant reference handling.
19315         (build_try_statement): Use BUILD_ASSIGN_EXCEPTION_INFO and
19316         BUILD_THROW macros.
19317         (patch_try_statement): Fixed comments. Record caught types in
19318         list, push the list, expand try block and pop the list.
19319         (patch_synchronized_statement, patch_throw_statement,
19320         check_thrown_exceptions, check_thrown_exceptions_do,
19321         purge_unchecked_exceptions): New functions.
19322         * typeck.c (lookup_argument_method): Allow WFL in place of method
19323         DECL_NAME during method definition check
19324
19325 1998-10-09  Tom Tromey  <tromey@cygnus.com>
19326
19327         * gjavah.c (decode_signature_piece): New function.
19328         (print_c_decl): Use it.  Added `name_override' argument.
19329         (print_method_info): Use name_override argument to print_c_decl.
19330         (seen_fields): Removed.
19331         (print_field_info): Don't update seen_fields.
19332         (struct method_name): New structure.
19333         (method_name_list): New global.
19334         (print_method_info): Add new method to list of methods.
19335         (name_is_method_p): New function.
19336         (print_field_info): If field name has same name as method, then
19337         change field name.
19338         (process_file): Parse methods before fields.
19339         (field_pass): New global.
19340         (HANDLE_END_FIELD): Take field_pass into account.
19341
19342 1998-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
19343
19344         * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
19345         (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
19346
19347 1998-10-03  Anthony Green  <green@cygnus.com>
19348
19349         * jvspec.c: Fix bug in jvgenmain_spec patch.
19350
19351 1998-10-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19352
19353         * Makefile.in (lang.o:): Install dependency on java-tree.def.
19354         * decl.c (soft_exceptioninfo_call_node): New global variable.
19355         (init_decl_processing): Fixed indentation. soft_badarrayindex_node
19356         takes extra integer argument. soft_exceptioninfo_call_node
19357         initialized.
19358         * except.c (java_set_exception_lang_code): New function
19359         (method_init_exceptions): Called here.
19360         (prepare_eh_table_type): New function.
19361         (expand_end_java_handler): Called here.
19362         * expr.c (build_java_throw_out_of_bounds_exception): Now features
19363         one argument. Modified generation of call to
19364         soft_badarrayindex_node to use new argument.
19365         (build_java_arrayaccess): Pass faulty index value to
19366         build_java_throw_out_of_bounds_exception.
19367         (generate_name): New function.
19368         (java_lang_expand_expr): New local variables node, current,
19369         has_finally_p. Expand TRY_EXPR node.
19370         (process_jvm_instruction): Replace top of the stack with thrown
19371         object reference when entering exception handler.
19372         * java-tree.def (TRY_EXPR, CATCH_EXPR, FINALLY_EXPR): New Java
19373         specific tree codes.
19374         * java-tree.h (soft_exceptioninfo_call_node): Declaration of new
19375         global.
19376         (DECL_SPECIFIC_COUNT): New macro.
19377         (prepare_eh_table_type, java_set_exception_lang_code,
19378         generate_name): New function declarations.
19379         (match_java_method): Declaration deleted.
19380         (FINALLY_EXPR_LABEL, FINALLY_EXPR_BLOCK, CATCH_EXPR_GET_EXPR): New
19381         macros.
19382         * lex.c (TRY_TK, CATCH_TK): Generate location information.
19383         * parse.h (redefinition_error, refine_accessible_methods_list,
19384         can_cast_to_p): Function declaration removed.
19385         (classitf_redefinition_error, variable_redefinition_error,
19386         parse_jdk1_1_error, find_applicable_accessible_methods_list,
19387         find_most_specific_methods_list, argument_types_convertible,
19388         enter_a_block, valid_builtin_assignconv_identity_widening_p,
19389         valid_cast_to_p, valid_method_invocation_conversion_p,
19390         try_reference_assignconv, add_stmt_to_compound,
19391         build_jump_to_finally, build_tree_list, patch_try_statement,
19392         java_get_catch_block): New function declarations.
19393         * parse.y (string_buffer_type): Global variable deleted.
19394         (group_of_labels, catches, catch_clause, catch_clause_parameter,
19395         finally): Rules tagged <node>.
19396         (TRY_TK, CATCH_TK): Token tagged <operator>.
19397         (class_body_declaration:, class_member_declaration:,
19398         formal_parameter:, explicit_constructor_invocation:,
19399         interface_member_declaration:, constant_declaration:,
19400         primary_no_new_array:, class_instance_creation_expression:,
19401         array_creation_expression:): Issue error on unsuported JDK1.1
19402         features.
19403         (try_statement:, catches:, finally:): Define actions.
19404         (catch_clause_parameter): New rule.
19405         (catch_clause:): Use new rule catch_clause_parameter.
19406         (parse_jdk1_1_error): New function.
19407         (redefinition_error): Renamed classitf_redefinition_error.
19408         (variable_redefinition_error): New function.
19409         (check_class_interface_creation): Call
19410         classitf_redefinition_error.
19411         (java_complete_tree): Added error message on JDEP_TYPE: case.
19412         (complete_class_report_errors): Fixed indentation.
19413         (declare_local_variables): Call variable_redefinition_error.
19414         (source_end_java_method): Call java_set_exception_lang_code and
19415         emit_handlers where appropriate.
19416         (java_method_add_stmt): Call add_stmt_to_block.
19417         (add_stmt_to_block): New function.
19418         (lookup_method_invoke): Fixed outside comment. new local variable
19419         candicates.  Call find_applicable_accessible_methods_list and
19420         find_most_specific_methods_list when searching for a
19421         method. Modified error report to list possible candidates when
19422         applicable.
19423         (find_applicable_accessible_methods_list,
19424         find_most_specific_methods_list, argument_types_convertible): New
19425         function.
19426         (refine_accessible_methods_list): Function deleted.
19427         (java_complete_tree): Handle TRY_EXPR. ARRAY_REF handling: save
19428         expr (if applicable) before calling patch_array_ref.
19429         (build_expr_block): Fixed BLOCK_EXPR_BODY assignment.
19430         (enter_block): Fixed comment.
19431         (enter_a_block): New function.
19432         (patch_assignment): Reorganized. Call try_reference_assignconv for
19433         references. Call valid_cast_to_p instead of can_cast_to_p.
19434         (try_reference_assignconv,
19435         valid_builtin_assignconv_identity_widening_p): New functions.
19436         (valid_ref_assignconv_cast_p): Fixed inverted test on CLASS_FINAL.
19437         (valid_cast_to_p, valid_method_invocation_conversion_p): New
19438         functions.
19439         (build_string_concatenation): Don't resolve StringBuffer.
19440         (patch_cast): Fixed inverted arguments.
19441         (patch_array_ref): Code to save array expr deleted. Call
19442         valid_cast_to_p instead of can_cast_to_p.
19443         (generate_labeled_block): Call generate_name.
19444         (build_jump_to_finally, build_try_statement, java_get_catch_block,
19445         patch_try_statement): New functions.
19446         * typeck.c (match_java_method): Function deleted.
19447
19448 1998-10-02  Anthony Green  <green@cygnus.com>
19449
19450         * jvspec.c: jvgenmain_spec uses different temporary file names.
19451
19452 1998-10-02  Anthony Green  <green@cygnus.com>
19453
19454         * jvspec.c (lang_specific_driver): Fail if user specifies
19455         --main= when not linking.
19456
19457 1998-09-28  Tom Tromey  <tromey@cygnus.com>
19458
19459         * class.c (make_class_data): Push value for `thread' field.
19460         * decl.c (init_decl_processing): Added `thread' field to class.
19461
19462         * class.c (add_field): Always make static fields externally
19463         visible.
19464
19465 1998-09-26  Anthony Green  <green@cygnus.com>
19466
19467         * expr.c (build_java_athrow,
19468         build_java_throw_out_of_bounds_exception, expand_invoke,
19469         build_newarray, expand_java_multianewarray, build_java_monitor):
19470         Update comments to reflect _Jv_* function names.
19471
19472 1998-09-25  Per Bothner  <bothner@cygnus.com>
19473
19474         * decl.c (complete_start_java_method):  DECL_RESULT is always promoted.
19475         * decl.c (start_java_method):  Handle PROMOTE_PROTOTYPES target macro.
19476         * parse.y (expand_start_java_method):  Likewise.
19477
19478 1998-09-24  Per Bothner  <bothner@cygnus.com>
19479
19480         * expr.c (pop_arguments):  Handle PROMOTE_PROTOTYPES target macro.
19481
19482         * class.c (push_class):  IDENTIFIER_SIGNATURE_TYPE is now POINTER_TYPE.
19483         (add_field):  No longer need to convert from RECORD_TYPE to pointer,
19484         * expr.c:  Remove no-longer-needed calls to promote_type.
19485         * decl.c (give_name_to_locals):  Liekwise.
19486         * jcf-parse.c (get_class_constant):  Compensate for new signatures.
19487         * parse.y:  Add/remove promote_type calls as appropriate.
19488         * typeck.c (parse_signature_type):  Returns POINTER_TYPE for objects.
19489         (parse_signature_string):  Likewise.
19490         (build_java_array_type):  Fix for now signature convenions.
19491
19492         * lex.c (java_lex):  Fix (from Alex) for JC1_LITE problem.
19493
19494 1998-09-23  Tom Tromey  <tromey@cygnus.com>
19495
19496         * class.c (init_class_processing): libjava function renamed to
19497         _Jv_RegisterClass.
19498
19499 1998-09-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19500
19501         * expr.c (java_lang_expand_expr): New case for SWITCH_EXPR.
19502         * java-tree.def: Fixed DEFTREECODE third argument.
19503         (UNARY_PLUS_EXPR, NEW_ARRAY_EXPR, NEW_CLASS_EXPR, THIS_EXPR,
19504         CASE_EXPR, DEFAULT_EXPR): New tree codes for Java.
19505         * java-tree.h: (IS_CRAFTED_STRING_BUFFER_P): New macro.
19506         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
19507         JAVA_THIS_EXPR): Now replaced by tree code definitions.
19508         (CALL_CONSTRUCTOR_P): Now uses NEW_CLASS_EXPR.
19509         * lang.c (java_tree_code_type, java_tree_code_length,
19510         java_tree_code_name): New arrays.
19511         (lang_init): Append Java tree node definitions to Gcc ones.
19512         * lex.c (expression_obstack): Declared as extern when JC1_LITE
19513         defined.
19514         (java_init_lex): Initialize wfl_append, wfl_string_buffer,
19515         wfl_to_string.
19516         (java_lex): Allow declaration of empty string constants. Retain
19517         location information on CASE_TK and DEFAULT_TK.
19518         * parse.h (JFLOAT_TYPE_P, JINTEGRAL_TYPE_P, JNUMERIC_TYPE_P,
19519         JPRIMITIVE_TYPE_P, JSTRING_TYPE_P, JSTRING_P, JREFERENCE_TYPE_P):
19520         Modified to be more robust.
19521         (BUILD_APPEND, BUILD_STRING_BUFFER): New macros.
19522         (build_new_invocation, try_builtin_assignconv,
19523         patch_switch_statement, string_constant_concatenation,
19524         build_string_concatenation, patch_string_cst, patch_string,
19525         java_expand_switch): New function declarations.
19526         * parse.y: Rules related to switch and EH tagged <node>.
19527         (label_id): Set to NULL_TREE
19528         (wfl_string_buffer, wfl_append, wfl_to_string): New static global
19529         tree nodes.
19530         (this_or_super:): Fixed indentation.
19531         (statement:, statement_nsi:, statement_without_trailing_substatement:,
19532         statement_expression:): Removed call to RULE on all sub-rules.
19533         (switch_expression:, switch_labels:): New rules.
19534         (switch_statement:, switch_block:, switch_block_statement_groups:,
19535         switch_block_statement_group:, switch_labels:, switch_label:):
19536         Defined actions.
19537         (throw_statement:, synchronized_statement:, try_statement:):
19538         Defined temporary actions.
19539         (class_instance_creation_expression:): Call
19540         build_new_invocation. Fixed indentation.
19541         (field_access): Fixed indentation.
19542         (method_invocation): Likewise.
19543         (make_qualified_primary): Use THIS_EXPR.
19544         (resolve_qualified_expression_name): Use NEW_CLASS_EXPR. When
19545         resolving from SUPER, set *type_found.
19546         (qualify_ambiguous_name): Use NEW_CLASS_EXPR.
19547         (java_complete_tree): Removed unused local variable `location'. Case
19548         for SWITCH_EXPR, sharing code with LOOP_EXPR. Use NEW_ARRAY_EXPR,
19549         NEW_CLASS_EXPR, UNARY_PLUS_EXPR and THIS_EXPR. New string handling
19550         on MODIFY_EXPR: and all binary operator tree code cases. Removed
19551         STRING_CST: case. default: checks for patchable strings.
19552         (complete_function_arguments): Transform string constant or
19553         crafted StringBuffer if necessary.
19554         (build_method_invocation): Fixed comments.
19555         (build_new_invocation): New function.
19556         (patch_assignment): Call try_builtin_assignconv to figure a valid
19557         assignment conversion between builtin types.
19558         (try_builtin_assignconv): New function.
19559         (build_binop): Use URSHIFT_EXPR directly to call build.
19560         (operator_string): Use UNARY_PLUS_EXPR.
19561         (patch_binop): Use UNARY_PLUS_EXPR. Handle string concatenation
19562         operator.
19563         (do_merge_string_cste, merge_string_cste,
19564         string_constant_concatenation, build_string_concatenation,
19565         patch_string, patch_string_cst): New function.
19566         (build_unary_op): Use UNARY_PLUS_EXPR and CONVERT_EXPR.
19567         (patch_unaryop): Likewise. New test of valid ++/-- operands.
19568         (build_newarray_node): Use NEW_ARRAY_EXPR.
19569         (build_this): Use THIS_EXPR.
19570         (build_return): Enable debug information on return statement.
19571         (build_if_else_statement): Likewise.
19572         (complete_labeled_statement): Fixed related comment.
19573         (build_loop_body): Fixed comment.
19574         (build_bc_statement): Enable debug information on break/continue
19575         statements.
19576         (patch_bc_statement): Fixed typos. Handle SWITCH statement
19577         context.
19578         (patch_switch_statement, case_identity, java_expand_switch): New
19579         functions.
19580
19581 1998-09-21  Per Bothner  <bothner@cygnus.com>
19582
19583         * buffer.h (BUFFER_INIT):  New macro.
19584         * jcf-write.c (struct jcf_partial):  New type.  Put global stuff here.
19585         Pass (struct jcf_partial *state) to most functions.
19586         (jcf_block, jcf_relocation):  New types.
19587         Support labels, branches, conditionals, loops.
19588
19589 1998-09-21  Tom Tromey  <tromey@cygnus.com>
19590
19591         * decl.c (INT_TYPE_SIZE): Define as BITS_PER_WORD if not defined.
19592
19593 1998-09-21  Per Bothner  <bothner@cygnus.com>
19594
19595         * decl.c (integer_type_node):  Make it have INT_TYPE_SIZE.
19596         * verify.c (verify_jvm_instructions):  Use int_type_not (32 bits),
19597         not integer_type_node (INT_TYPE_SIZ bits).
19598
19599         * parse.y (patch_if_else_statement):  Accept promoted_boolean_type_node.
19600
19601         * jcf-reader.c (get_attribute):  New HANDLE_EXCEPTION_TABLE hook.
19602         * jcf-dump.c (print_exception_table):  New function.
19603         (disassemble_method):  Better handling of wide instructions.
19604         Make more robust for bad input.
19605
19606 1998-09-30  Jeffrey A Law  (law@cygnus.com)
19607
19608         * jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
19609         FreeBSD.
19610
19611 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19612
19613         * Makefile.in (jcf-dump, jvgenmain): Link in memmove.o too.
19614
19615 1998-09-17  Tom Tromey  <tromey@cygnus.com>
19616
19617         * Makefile.in ($(PARSE_H)): Removed target.
19618
19619 1998-09-17  Jeffrey A Law  (law@cygnus.com)
19620
19621         * Makefile.in (JAVA_OBJS): Add memmove.o
19622         (memmove.o): New target & rules.
19623
19624 1998-09-15  Tom Tromey  <tromey@cygnus.com>
19625
19626         * expr.c (expand_invoke): Don't generate a call to the class init
19627         code.
19628
19629 1998-09-14  Jeffrey A Law  (law@cygnus.com)
19630
19631         * Makefile.in: Add many missing dependencies.
19632         * buffer.c, class.c, constants.c, decl.c: Use system.h and toplev.h
19633         as appropriate.
19634         * except.c, expr.c, jcf-io.c jcf-parse.c, jcf-write.c: Likewise.
19635         * jvgenmain.c lang.c mangle.c typeck.c verify.c: Likewise.
19636
19637 1998-09-11  Per Bothner  <bothner@cygnus.com>
19638
19639         * decl.c (complete_start_java_method):  If method is static (and
19640         not private) call _Jv_InitClass.
19641         * expr.c (expand_invoke):  Don't call build_class_init.
19642
19643         * jvspec.c (jvgenmain_spec):  Fix spec for generated .o file.
19644
19645 1998-09-10  Jeffrey A Law  (law@cygnus.com)
19646
19647         * Make-lang.in (GCJ): Define before using.
19648
19649 1998-09-09  Jeffrey A Law  (law@cygnus.com)
19650
19651         * gjavah.c (java_no_argument): Renamed from no_argument to avoid
19652         losing due to namespace pollution in GNU getopt.h
19653
19654 1998-09-09  Tom Tromey  <tromey@cygnus.com>
19655
19656         * Make-lang.in (java.all.build): Don't mention jvgenmain or gcjh.
19657         (java.all.cross): Likewise.
19658         (java.rest.encap): Likewise.
19659
19660 1998-09-08  Jeffrey A Law  (law@cygnus.com)
19661
19662         * gjavah.c (print_class_decls): Fix thinko in arglist
19663         * jcv-io.c (find_classfile): Similarly.
19664
19665 1998-09-07  Jeffrey A Law  (law@cygnus.com)
19666
19667         * Makefile.in (INCLUDES): Update for recent toplevel gcc changes.
19668
19669 1998-09-05  Tom Tromey  <tromey@cygnus.com>
19670
19671         * Make-lang.in (java.maintainer-clean): Don't remove parse.h.
19672         (java.mostlyclean): Remove parse.c and parse-scan.c, not parse.h.
19673         * Makefile.in (PARSE_C): New macro.
19674         (PARSE_H): Likewise.
19675         (PARSE_SCAN_C): Likewise.
19676         ($(PARSE_C)): Target renamed from parse.c.
19677         ($(PARSE_SCAN_C)): Target renamed from parse-scan.c.
19678         (clean): Remove parse-scan.c as well.
19679         (parse.o): Depend on $(PARSE_C).
19680
19681 1998-09-05  Anthony Green  <green@cygnus.com>
19682
19683         * README, license.terms: Removed.
19684
19685         * Make-lang.in, Makefile.in, class.c, config-lang.in, constants.c,
19686         decl.c, except.c, expr.c, gjavah.c, java-except.h, java-tree.h,
19687         javaop.def, javaop.h, jcf-dump.c, jcf-io.c, jcf-parse.c,
19688         jcf-reader.c, jcf-write.c, jcf.h, jvgenmain.c, jvspec.c,
19689         keyword.gperf, keyword.h, lang-options.h, lang-specs.h, lang.c,
19690         lex.c, lex.h, mangle.c, parse-scan.y, parse.h, parse.y, typeck.c,
19691         verify.c, zextract.c, zipfile.h: Fixed copyright assignment,
19692         and Java trademark attribution.
19693
19694 1998-09-04  Tom Tromey  <tromey@cygnus.com>
19695
19696         * Makefile.in: Use gcjh, not gjavah.
19697         * config-lang.in (stagestuff): Use gcjh, not gjavah.
19698         * Make-lang.in: Changed gjavah to gcjh everywhere.
19699
19700 1998-09-03  Per Bothner  <bothner@cygnus.com>
19701
19702         * gjavah.c:  Support new -prepend -add -append flags.
19703         (print_method_info):  Method is not virtual if class is final.
19704
19705 1998-09-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19706
19707         * jv-scan.c: Fixed copyright assignment.
19708         * keyword.gperf: Likewise.
19709         * keyword.h: Likewise.
19710         * lex.c: Fixed copyright assignment.
19711         (java_lex): Push unicode back when parsing '<'.
19712         * lex.h: Fixed copyright assignment.
19713         * parse-scan.y: Likewise.
19714         * parse.h: Fixed copyright assignment.
19715         (build_debugable_stmt, complete_for_loop): New function prototypes.
19716         * parse.y: Fixed copyright assignment.
19717         (for_statement:): Call complete_for_loop. Set EXIT_EXPR to be
19718         size_zero_node when completing a loop with no exit condition.
19719         (for_statement_nsi:): Define action.
19720         (for_init:, for_update:): Return size_zero_node when empty.
19721         (declare_local_variables): Call build_debugable_stmt.
19722         (build_debugable_stmt): New function.
19723         (build_loop_body): Build debugable statement around loop
19724         condition part.
19725         (complete_loop_body): Take into account the debugable statement
19726         around the EXIT_EXPR.
19727         (complete_loop_body): New function.
19728         (patch_exit_expr): Fixed condition inversion.
19729
19730 1998-09-02  Tom Tromey  <tromey@cygnus.com>
19731
19732         * Make-lang.in (jvspec.o): Use GCC_THREAD_FILE to compute correct
19733         name of thread define.
19734         * jvspec.c (THREAD_NAME): New macro.
19735         (GCLIB): Likewise.
19736         (THREADLIB): Likewise.
19737         (lang_specific_driver): Recognize attempt to link with thread
19738         library or gc library.  Recognize -ljava on command line so it
19739         isn't linked against more than once.
19740
19741 1998-09-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19742
19743         * parse-scan.y (report_main_declaration): Name of the class
19744         containing `main' can be a qualified name.
19745
19746 1998-08-31  Tom Tromey  <tromey@cygnus.com>
19747
19748         * config-lang.in: Changed gjavac to gjc everywhere.
19749         * Make-lang.in: Changed gjavac to gjc everywhere.
19750
19751 1998-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19752
19753         * Make-lang.in (JAVA_TARGET_INDEPENDENT_BIN_TOOLS): New variable.
19754         (java.install-common:): Loop over JAVA_TARGET_INDEPENDENT_BIN_TOOLS
19755         and install the files.
19756         * Makefile.in (JAVA_OBJS_LITE): New variable.
19757         (compiler:): Now include jv-scan as a dependency.
19758         (../jv-scan$(exeext), parse-scan.c): New targets.
19759         (../jcf-dump$(exeext)): Was jcf-dump$(exeext) before.
19760         * config-lang.in (compilers): Removed gcj, gjavah from the list.
19761         * jcf-parse.c (parse_source_file): Call java_layout_classes and
19762         check for errors even if parse_only.
19763         * lex.c (java_init_lex): Reorganized and skip parts if JC1_LITE is
19764         defined.
19765         (yylex): New function. Uses java_lex body.
19766         (java_lex): Removed commented out statement. Remove local variable
19767         literal. Use SET_LVAL_NODE_TYPE and SET_LVAL_NODE where
19768         appropriate.  Use macros FLOAT_TYPE_NODE, DOUBLE_TYPE_NODE,
19769         DCONST0, SET_FLOAT_HANDLER, SET_REAL_VALUE_ATOF,
19770         SET_LVAL_NODE_TYPE and GET_TYPE_PRECISION. Don't create STRING_CST
19771         if JC1_LITE is defined. Use BUILD_ID_WFL to build identifiers. Use
19772         SET_MODIFIER_CTX, SET_LVAL_NODE, BUILD_ID_WFL and GET_IDENTIFIER
19773         where appropriate.
19774         (java_lex_error): Empty if JC1_LITE is defined.
19775         (java_get_line_col): Return 0 if JC1_LITE is defined.
19776         * lex.h (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR,
19777         SET_MODIFIER_CTX): Moved into the section containing the macros
19778         conditionally defined by JC1_LITE.
19779         (BUILD_OPERATOR,BUILD_OPERATOR2): Just return the TOKEN
19780         argument if JC1_LITE is defined.
19781         (HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, REAL_VALUE_ATOF,
19782         REAL_VALUE_ISINF, REAL_VALUE_ISNAN): Preset to values if JC1_LITE
19783         is defined.
19784         (DCONST0, SET_FLOAT_HANDLER, GET_IDENTIFIER, SET_REAL_VALUE_ATOF,
19785         FLOAT_TYPE, DOUBLE_TYPE, SET_MODIFIER_CTX, GET_TYPE_PRECISION,
19786         SET_LVAL_NODE, SET_LVAL_NODE_TYPE, BUILD_ID_WFL): New macros, set
19787         to different values according to JC1_LITE.
19788         * parse.h (int_fits_type_p, stabilize_reference): Prototype not
19789         declared if JC1_LITE set.
19790         (jdep_code, typedef struct _jdep, typedef struct _jdeplist): Not
19791         defined if JC1_LITE not set.
19792         (struct parser_ctx): Reorganized and skip the jc1 front end part
19793         if JC1_LITE set.
19794         (java_layout_classes): New function definition.
19795         (java_push_parser_context, java_init_lex, yyparse, yylex,
19796         yyerror): Prototype always declared. All other static function
19797         prototypes declared only if JC1_LITE is not set.
19798         * parse.y (yyparse, yylex, yyerror): No longer declared here. Now
19799         declared in parse.h.
19800         (java_layout_classes): New function.
19801         (java_complete_expand_methods): No longer layout the class here.
19802         * parse-scan.y: New file.
19803         * jv-scan.c: New file.
19804
19805 1998-08-25  Tom Tromey  <tromey@cygnus.com>
19806
19807         * gjavah.c (main): Handle -friend option.
19808         (friend_specs): New global.
19809         (generate_access): Handle friend_specs.
19810         (process_file): Likewise.
19811         (MAX_FRIENDS): New macro.
19812         (friend_count): New global.
19813         (print_cxx_classname): Added `prefix' argument.  Ignore arrays.
19814         Changed all callers.
19815
19816 1998-08-24  Per Bothner  <bothner@cygnus.com>
19817
19818         * jcf-dump.c (process_class):  Move JCF_FINISH use to main,
19819         (main):  Handle processing all the entries of a named .zip archive.
19820         * jcf-io.c (jcf_trim_old_input):  New function.
19821         * jcf.h (GET_u2_le,GET_u4_le,JCF_readu2_le,JCF_readu4_le):  New macros.
19822
19823 1998-08-24  Per Bothner  <bothner@cygnus.com>
19824
19825         * lang.c (flag_assume_compiled):  Make default be on.
19826
19827 1998-08-21  Per Bothner  <bothner@cygnus.com>
19828
19829         * jcf-dump.c:  Add bunches of flags to control output more.
19830         (process_class):  New function;  support printing more than one class.
19831         (main): Support new --print-main and --javap flags.
19832         * jcf-reader.c (IGNORE_ATTRIBUTE):  New hook.
19833         * jcf.h (CPOOL_INDEX_IN_RANGE):  New macro.
19834
19835 1998-08-20  Per Bothner  <bothner@cygnus.com>
19836
19837         Change mangling of dispatch table to match C++ vtable (w/thunks).
19838         * class.c (build_dtable_decl), java-tree.h:  New function.
19839         (make_class_data):  Call it.
19840         * decl.c (init_decl_processing):  Likewise.
19841
19842 1998-08-19  Warren Levy  <warrenl@cygnus.com>
19843
19844         * decl.c (init_decl_processing): Use _Jv_NewObjectArray, not
19845         soft_anewarray; adjust args passed.
19846         * expr.c (build_anewarray): Adjust args for soft_anewarray_node to
19847         match _Jv_NewObjectArray.
19848
19849 1998-08-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
19850
19851         * decl.c (push_labeled_block, pop_labeled_block): New functions.
19852         * expr.c (loopup_label): Call create_label_decl.
19853         (create_label_decl): New function.
19854         (java_lang_expand_expr): Call expand_start_bindings with argument
19855         set to zero.
19856         * java-tree.h Added space after PROTO in function declarations
19857         when necessary.
19858         (IS_FOR_LOOP_P, IS_BREAK_STMT_P): New macros.
19859         (create_label_decl, push_labeled_block): New function
19860         declarations.
19861         * lex.c (label_id): Initialize.
19862         (SUPER_TK, THIS_TK, RETURN_TK): Merged common actions in final
19863         switch.
19864         * parse.h Added space after PROTO in function declarations when
19865         necessary.
19866         (LOOP_EXPR_BODY_MAIN_BLOCK, LOOP_EXPR_BODY_UPDATE_BLOCK,
19867         LOOP_EXPR_BODY_CONDITION_EXPR, LOOP_EXPR_BODY_LABELED_BODY,
19868         LOOP_EXPR_BODY_BODY_EXPR, LOOP_HAS_LABEL_P, LOOP_HAS_LABEL_SKIP_P,
19869         PUSH_LABELED_BLOCK, POP_LABELED_BLOCK, PUSH_LOOP, POP_LOOP): New
19870         macros.
19871         (struct parser_ctxt): New fields current_loop,
19872         current_labeled_block.
19873         (build_if_else_statement, patch_if_else_statement,
19874         add_stmt_to_compound, patch_exit_expr, build_labeled_block,
19875         generate_labeled_block, complete_labeled_statement,
19876         build_bc_statement, patch_bc_statement, patch_loop_statement,
19877         build_new_loop, build_loop_body, complete_loop_body): New function
19878         declarations.
19879         * parse.y (java_warning_count): New global variable.
19880         (label_id): New static variable.
19881         (BREAK_TK, CONTINUE_TK): Token tagged <operator>.
19882         (block:): Return size_zero_node when block is empty.
19883         (empty_statement:): Return size_zero_node.
19884         (statement:): Implement supplemental action when for_statement: is
19885         reduced.
19886         (label_decl:): New rule.
19887         (labeled_statement:): Rewritten using label_decl. Actions
19888         implemented.
19889         (labeled_statement_nsi:): Likewise.
19890         (if_then_statement): Actions implemented.
19891         (while_expression): New rule.
19892         (while_statement:): Rewritten using while_expression. Actions
19893         implemented.
19894         (while_statement_nsi:): Likewise.
19895         (do_statement_begin:): New rule.
19896         (do_statement:): Rewritten using do_statement_begin. Actions
19897         implemented.
19898         (for_statement:): Rewritten using for_begin. Actions implemented.
19899         (for_statement_nsi:): Likewise.
19900         (for_header:, for_begin:): New rules.
19901         (for_init:): Actions implemented.
19902         (statement_expression_list:, break_statement:,
19903         continue_statement:): Likewise.
19904         (yyerror): Count number of issued warning(s).
19905         (java_report_errors): Report error(s) and/or warning(s).
19906         (java_complete_class): Use build_java_argument_signature to
19907         recompute completed method signature.
19908         (java_check_regular_methods): New locals method_wfl and aflags.
19909         Use method_wfl instead of lookup_cl during error reports. Fixed
19910         indentation and modified some error messages. Use
19911         lang_printable_name in method instead of the DECL_NAME. New code
19912         to issue warnings on methods not overriding corresponding methods
19913         private to a different package.
19914         (java_method_add_stmt): Call add_stmt_to_compound.
19915         (add_stmt_to_compound): New function.
19916         (java_complete_tree): Handle LABELED_BLOCK_EXPR, EXIT_BLOCK_EXPR,
19917         LOOP_EXPR, EXIT_EXPR and COND_EXPR.
19918         (build_if_else_statement, patch_if_else_statement,
19919         build_labeled_block, generate_labeled_block,
19920         complete_labeled_statement, build_new_loop, build_loop_body,
19921         complete_loop_body, patch_loop_statement, build_bc_statement,
19922         patch_bc_statement, patch_exit_expr): New functions.
19923         * typeck.c (build_java_signature): Build argument signature before
19924         enclosing it in between parenthesis.
19925
19926 1998-08-17  Warren Levy  <warrenl@cygnus.com>
19927
19928         * Make-lang.in (JAVA_SRCS): Created for dependencies * Makefile.in
19929         (JAVA_OBJS): Added reminder comment
19930
19931 1998-08-13  Nick Clifton  <nickc@cygnus.com>
19932
19933         * gjavah.c (D_NAN_MASK): Append LL to the constant to force it to
19934         be interpreted as a long long.
19935
19936 1998-08-13  Warren Levy  <warrenl@cygnus.com>
19937
19938         * decl.c (init_decl_processing): Use _Jv_InitClass, not
19939         soft_initialise_class.  Use _Jv_NewMultiArray, not
19940         soft_multianewarray.  Use _Jv_ThrowBadArrayIndex, not
19941         soft_badarrayindex.  Use _Jv_CheckCast, not soft_checkcast.  Use
19942         _Jv_CheckArrayStore, not soft_checkarraystore.  Use
19943         _Jv_LookupInterfaceMethod, not soft_lookupinterfacemethod.
19944
19945 1998-08-12  Per Bothner  <bothner@cygnus.com>
19946
19947         * decl.c, java-tree.h (this_identifier_node, super_identifier_node,
19948         length_identifier_node):  New global tree node constants.
19949         * parse.y (kw_super, kw_this, kw_length):  Removed globals.
19950         Replace uses by super_identifier_node etc.
19951         * lex.c (kw_super, kw_this, kw_length):  Don't initialize.
19952
19953         * parse.y (resolve_field_access):  Don't special-case ".length" if
19954         flag_emit_class_files.
19955         (patch_array_ref):  Leave as ARRAY_REF if flag_emit_class_files.
19956         * jcf-write.c (generate_bytecode_insns):  Handle ARRAY_REF opcode
19957         and ARRAY.length.
19958
19959 1998-08-11  Per Bothner  <bothner@cygnus.com>
19960
19961         * decl.c (init_decl_processing): Remove unused method_type_node fields.
19962         * class.c (make_method_value):  Remove init for removed fields.
19963
19964         * class.c (layout_class):  Use build_java_argument_signature.
19965         * java-tree.h (TYPE_ARGUMENT_SIGNATURE):  New macro.
19966
19967         * typeck.c (push_java_argument_signature):  Removed.  Merged into ...
19968         (build_java_argument_signature):  Use TYPE_ARGUMENT_SIGNATURE cache.
19969         (build_java_signature):  Don't use push_java_argument_signature.
19970
19971         * typeck.c (lookup_argument_method):  New function.
19972         * parse.y (java_check_regular_methods):  Use lookup_argument_method
19973         instead of lookup_java_method2 followed by lookup_java_method.
19974
19975         * parse.y (check_method_redefinition):  Minor optimization.
19976
19977         * jcf-write.c (generate_bytecode_insns):  Handle RETURN_EXPR,
19978         MINUS_EXPR, MULT_EXPR, TRUNC_DIV_EXPR, and RDIV_EXPR.
19979
19980 1998-08-10  Tom Tromey  <tromey@cygnus.com>
19981
19982         * Make-lang.in (jc1$(exeext)): Don't depend on c-common.o or
19983         c-pragma.o.
19984
19985         * gjavah.c (java_float_finite): Use K&R-style definition.
19986         (java_double_finite): Likewise.
19987         (generate_access): Now returns void.  Changed all callers.
19988         (last_access_generated): Removed.
19989         (process_file): Only make a single pass over the .class file.
19990
19991 1998-07-29  Per Bothner  <bothner@cygnus.com>
19992
19993         * class.c (get_dispatch_table):  Add extra dummy vtable entry,
19994         for compatibility for G++ (with -fvtable-thunks).
19995         * expr.c (build_invokevirtual):  Add one for extra dummy vtable entry.
19996
19997         * gjavah.c (process_file):  Use public inheritance for super-class.
19998
19999 1998-07-29  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20000
20001         * lex.c (java_init_lex): Initialize ctxp->package.
20002         * parse.h (struct parser_ctxt): package and package_len replaced
20003         by tree package, an identifier node. Field method_decl_list is
20004         gone. Fixed comments.
20005         (lookup_field_wrapper, merge_qualified_name, not_accessible,
20006         class_in_current_package): New function prototypes.
20007         * parse.y (array_type:): Set class loaded flag on primitive type
20008         arrays.
20009         (package_declaration:): Assign ctxp->package to the
20010         identifier node.
20011         (method_invocation:): Handle invocation of method qualified by
20012         `super'.
20013         (single_type_import_declaration:): Removed ambiguity check.
20014         (java_pop_parser_context): New local variable `next'. Reset and
20015         set IMPORT_CLASSFILE_NAME flags on current and previous import
20016         list.
20017         (java_accstring_lookup): Use new local macro COPY_RETURN.
20018         (lookup_field_wrapper): New function.
20019         (parser_qualified_classname): Use merge_qualified_name.
20020         (parser_check_super_interface): Broaden error message.
20021         (do_resolve_class): Check for qualified class name in the current
20022         compilation unit if appropriate.
20023         (process_imports): Check for already defined classes.
20024         (check_pkg_class_access): Got rid of call to
20025         get_access_flags_from_decl.
20026         (java_complete_expand_methods): Call safe_layout_class based on
20027         the current class size.
20028         (make_qualified_primary): Build a WFL qualification on primary if
20029         none exists.
20030         (merge_qualified_name): New function.
20031         (make_qualified_name): Use merge_qualified_name.
20032         (resolve_expression_name): Use safe_lookup_field.
20033         (resolve_field_access): Got rid of call to get_access_flags_from_decl.
20034         (resolve_qualified_expression_name): Likewise. Check on resolved
20035         element accessibility.
20036         (not_accessible_p, class_in_current_package): New functions.
20037         (maybe_access_field): Got rid of call to get_access_flags_from_decl.
20038         (patch_method_invocation_stmt): Merged common pieces. Check
20039         accessibility of invoked method.
20040         (check_for_static_method_reference): Add returned type in error
20041         message.
20042         (invocation_mode): Get rid of bogus check on PRIVATE methods.
20043         (refine_accessible_methods_list): Merged two conditions in test.
20044         (java_complete_class): Sanity check on stabilize_ref gone.
20045         * zextract.c (read_zip_archive): Cast lseek second argument to long.
20046
20047 1998-07-28  Per Bothner  <bothner@cygnus.com>
20048
20049         * class.c (hashUtf8String):  Fix - use new JavaSoft specification.
20050
20051 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20052
20053         * gjavah.c (F_NAN): Removed.
20054         (F_NAN_MASK): New macro.
20055         (F_POSITIVE_INFINITY): Removed.
20056         (F_NEGATIVE_INFINITY): Likewise.
20057         (java_float_finite): Rewrote.
20058         (D_NAN_MASK): Renamed.
20059         (java_double_finite): Rewrote.
20060         (D_POSITIVE_INFINITY): Removed.
20061         (D_NEGATIVE_INFINITY): Likewise.
20062
20063         * jcf-dump.c (print_constant): [CONSTANT_Double, CONSTANT_Float]
20064         If verbose, print underlying representation of value in hex.
20065
20066 1998-07-24  Per Bothner  <bothner@cygnus.com>
20067
20068         * buffer.h, buffer.c:  New files.
20069         * Makefile.in (JAVA_OBJS):  Add buffer.o.
20070
20071         Support locals variables and writing their debug entries to .class.
20072         * jcf-write.c:  Simplify some by user new buffer type.
20073         (vode_buffer_grow):  Removed.
20074         (struct localvar_info):  New type.
20075         (localsvars, localvartable):  New buffers.
20076         (localvar_alloc, localvar_free):  New functions.
20077         (generate_bytecode_insns):  Handle local variables.
20078         (generate_classfile):  Write LocalVariableTable attribute.
20079
20080 1998-07-24  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20081
20082         * jcf-io.c (open_in_zip): Check the zipfile magic number.
20083         * zipfile.h (ZIPMAGIC): New macro.
20084
20085 1998-07-24  Tom Tromey  <tromey@cygnus.com>
20086
20087         * Makefile.in (gjavah.o): Updated dependencies.
20088         (jcf-dump.o): Likewise.
20089         (all.indirect): Use ../gjavah.
20090         (../gjavah$(exeext)): Likewise.
20091         (clean): Don't remove gjavah.
20092         (clean): Remove parse.c, not java/parse.c.
20093         * Make-lang.in (java): Added gjavah.
20094         (gjavah$(exeext)): New target.
20095         (GJAVAH_SOURCES): New macro.
20096         (java.all.build): Added gjavah.
20097         (java.all.cross): Likewise.
20098         (java.rest.encap): Likewise.
20099         * config-lang.in (compilers, stagestuff): Added gjavah.
20100
20101 1998-07-23  Tom Tromey  <tromey@cygnus.com>
20102
20103         * gjavah.c (java_float_finite): New function.
20104         (java_double_finite): Likewise.
20105         (F_POSITIVE_INFINITY): New macro.
20106         (F_NEGATIVE_INFINITY): Likewise.
20107         (F_NAN): Likewise.
20108         (D_POSITIVE_INFINITY): Likewise.
20109         (D_NEGATIVE_INFINITY): Likewise.
20110         (D_NAN): Likewise.
20111         (print_field_info): Use java_float_finite and java_double_finite.
20112
20113 1998-07-23  Per Bothner  <bothner@cygnus.com>
20114
20115         * parse.y (method_header):  Name "this" implicit argument.
20116
20117 1998-07-22  Per Bothner  <bothner@cygnus.com>
20118
20119         * jcf-write.c:  Write out LineNumberTable attribute in .class file.
20120         (linenumber_buffer, linenumber_ptr, linenumber_limit):  New statics.
20121         (put_linenumber):  New function.
20122         (generate_bytecode_insns, generate_classfile):  Write line numbers.
20123
20124 1998-07-22  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20125
20126         * java-tree.h (CALL_EXPR_FROM_PRIMARY_P): Changed in PRIMARY_P.
20127         (lookup_name, build_known_method_ref, build_class_init,
20128         build_invokevirtual, invoke_build_dtable, match_java_method,
20129         build_field_ref, pushdecl_force_head, build_java_binop,
20130         binary_numeric_promotion, build_decl_no_layout,
20131         build_java_arrayaccess, build_newarray, build_anewarray,
20132         build_java_array_length_access, build_java_arraynull_check): New
20133         extern function prototypes.
20134         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20135         JAVA_THIS_EXPR, CALL_CONSTRUCTOR_P): Macro definition moved in
20136         java-tree.h.
20137         * jcf-parse.c (init_outgoing_cpool): Set current_constant_pool_data_ref
20138         to NULL
20139         * jcf.h (jcf_out_of_synch): New extern function prototype.
20140         * parse.h: Static/global function implemented in parse.y
20141         prototyped and declarations moved at the end of the file.
20142         (DECL_P): Check that the argument isn't null.
20143         (JAVA_UNARY_PLUS_EXPR, JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR,
20144         JAVA_THIS_EXPR): No longer defined here. See java-tree.h
20145         (QUAL_DECL_TYPE): New macro.
20146         (PARAMS): Macro definition removed.
20147         * parse.y: (yyparse, yyerror): Use PROTO instead of PARAMS.
20148         (return_statement:): Call build_return.
20149         (field_access:): Call make_qualified_primary in sub rule.
20150         (method_invocation:): Build method invocation and call
20151         make_qualified_primary when processing primaries.
20152         (java_complete_class): Set IDENTIFIER_SIGNATURE_TYPE by calling
20153         get_type_from_signature.
20154         (java_check_regular_method): Extra integer 0 argument when calling
20155         lookup_java_method2.
20156         (lookup_java_interface_method2): Extra method DECL argument when
20157         calling lookup_java_interface_method2.
20158         (java_method_add_stmt): Set TREE_SIDE_EFFECTS on newly created
20159         COMPOUND_EXPR node.
20160         (java_complete_expand_method): Layout current class iff not
20161         already done. Don't process interface's methods.
20162         (java_complete_expand_method): Use super class only if it
20163         exists. Use current class otherwise.
20164         (make_qualified_primary): New function.
20165         (resolve_expression_name): Process qualified expression or
20166         expression from primary the same way.
20167         (resolve_expression_name): Two last arguments to
20168         resolve_field_access are now NULL_TREEs.
20169         (resolve_field_access): New variable is_static. Local field must
20170         be DECLs. is_static computed on field DECLs only. Append code in
20171         where_found to the field access if necessary. Use QUAL_DECL_TYPE
20172         to initialize field_type.
20173         (resolve_qualified_expression_name): New local variable,
20174         previous_call_static and is_static. Handle primaries with function
20175         calls, casts, array references and `this'. `super' now handled as
20176         `(super_class)this'. Use is_static to clarify boolean expressions.
20177         Added code to handle case where a proper handle is required to
20178         access a field. Use QUAL_DECL_TYPE where applicable.
20179         (maybe_access_field): New function.
20180         (patch_method_invocation_stmt): New arguments primary, where,
20181         is_static. Branch of the test on CALL_EXPR_FROM_PRIMARY_P
20182         deleted. Use `where' as a type to search from if specified. Check
20183         for static method reference where forbidden. Append primary or
20184         current_this to the argument list if not calling constructor nor
20185         static methods.
20186         (check_for_static_method_reference): New function.
20187         (patch_invoke): Layout the class on which new is done if
20188         necessary.
20189         (lookup_method_invoke): Changed format to report errors on
20190         methods.
20191         (qualify_ambiguous_name): New local variable this_found. Now
20192         handle things from primaries. Method call are considered
20193         expression names.
20194         (identical_subpath_p): NULL_TREE arguments to breakdown_qualified
20195         changed into NULLs.
20196         (not_initialized_as_it_should_p): Comply with the new DECL_P.
20197         (java_complete_tree): New case fo RETURN_EXPR. Process function
20198         call arguments in separate function.
20199         (complete_function_arguments): New function.
20200         (build_method_invocation): Don't use CALL_EXPR_FROM_PRIMARY_P
20201         anymore.
20202         (patch_assignment): Take the return function slot into account as
20203         a RHS. Distinguish assignment from a return.
20204         (valid_ref_assignconv_cast_p): Use build_java_argument_signature
20205         when checking methods in interfaces.
20206         (resolve_type_during_patch): NULL argument to unresolve_type_p
20207         instead of NULL_TREE.
20208         (patch_newarray): Fixed typo in comment.
20209         (buid_this): Build a WFL with `kw_this' instead of a FIELD_DECL.
20210         (build_return, patch_return): New functions.
20211         * typeck.c (lookup_java_constructor): Fixed typo in comment.
20212
20213 1998-07-21  Per Bothner  <bothner@cygnus.com>
20214
20215         * constants.c (find_name_and_type_constant, find_fieldref_index,
20216         find_methodref_index):  New methods.
20217         * expr.c (build_invoke_non_interface):  If flag_emit_class_files,
20218         just return given method.  Also, rename to build_known_method_ref.
20219         (expand_invoke):  Rename call to build_invoke_non_interface.
20220         * java-tree.h, parse.h:  Update prototype.
20221         * parse.y, decl.c, jcf-parse.c:  Suppress calls to back-end functions
20222         (such as expand_expr_stmt) if flag_emit_class_files.
20223         * jcf-write.c (RESERVE, OP1, OP2, OP4, NOTE_PUSH, NOTE_POP,
20224         STACK_TARGET, IGNORE_TARGET):  New macros.
20225         (code_buffer, code_ptr, code_limit, code_S, code_SP_max):  New globals.
20226         (generate_bytecode_insn):  New function to generate method's bytecode.
20227         (generate_classfile):  Node generate Code attribute for a method.
20228         (code_buffer_grow, push_constant1, push_constant2, push_int_const,
20229         push_long_const, field_op, adjust_typed_op, maybe_wide):
20230         New functions used by generate_bytecode_insn.
20231
20232         * typeck.c (signature_include_return):  Remove variable.
20233         (push_java_argument_signature, build_java_argument_signature):  New.
20234         (build_java_signature):  Use push_java_argument_signature.
20235         * parse.y:  Use build_java_argument_signature instead of fiddling
20236         with signature_include_return.
20237
20238 1998-07-17  Tom Tromey  <tromey@cygnus.com>
20239
20240         * gjavah.c (print_c_decl): Always generate JArray<>* for array
20241         types.
20242
20243         * Makefile.in (all.indirect): Added gjavah$(exeext).
20244         (gjavah$(exeext)): Added $(exeext).
20245         (clean): Likewise.
20246
20247 1998-07-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20248
20249         * class.c (layout_class): Call to java_layout_parsed_class replace
20250         by safe_layout_class.
20251         * expr.c (build_java_array_length_access): Removed static storage
20252         class in the function definition.
20253         (build_java_arraynull_check): Likewise.
20254         Also fixed typos in two comments.
20255         * lex.c (java_init_lex): Initialize static global kw_length.
20256         (java_lex): Use BUILD_OPERATOR on RETURN_TK.
20257         * lex.h (JAVA_FLOAT_RANGE_ERROR): Add extra argument to
20258         java_lex_error.
20259         (JAVA_INTEGRAL_RANGE_ERROR): Likewise.
20260         * parse.h (resolve_no_layout): New static function declaration.
20261         (get_identifier_in_static): Declaration removed.
20262         (java_layout_parsed_class): Function name declaration changed to
20263         safe_layout_class.
20264         (build_newarray_node, patch_newarray, resolve_type_during_patch,
20265         not_initialized_as_it_should_p, build_this): New static function
20266         declarations.
20267         (pushdecl_force_head, build_java_binop, int_fits_type_p,
20268         binary_numeric_promotion, stabilize_reference,
20269         build_decl_no_layout, build_java_arrayaccess): Extern function
20270         declarations moved into their own section.
20271         (build_newarray, build_anewarray, build_java_array_length_access,
20272         build_java_arraynull_check): New extern function declarations.
20273         (UNARY_PLUS_EXPR): Macro renamed into JAVA_UNARY_PLUS_EXPR.
20274         (JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR, JAVA_THIS_EXPR): New
20275         fake tree codes.
20276         (CALL_CONSTRUCTOR_P): New macro.
20277         * parse.y (kw_length): New static global tree node.
20278         (return_statement): Tagged <node>.
20279         (RETURN_TK): Tagged <operator>.
20280         (variable_declarator_id:): Build variable declaration with an
20281         empty initialization value if a syntax error was found in the
20282         initialization part of the variable declaration.
20283         (statement_without_trailing_substatement:): return_statement: now
20284         uses the default rule.
20285         (return_statement:): Temporarily fixed to return NULL_TREE.
20286         (primary_no_new_array:): Call build_this when THIS_TK was parsed.
20287         (class_instance_creation_expression:): Class creation rules now
20288         call build_method_invocation upon reduction.
20289         (array_creation_expression:): Rules call build_newarray_node upon
20290         reduction.
20291         (dim_exprs:): Build a list of dimension expressions.
20292         (dim_expr:): Store location of the OSB_TK in the dimension
20293         expression node.
20294         (method_invocation:): Added a new error rule.
20295         (build_unresolved_array_type): WFL argument may also be an array
20296         on a primitive type. Name of the argument changed to reflect this.
20297         (method_declarator): Insert argument type at the beginning of the
20298         argument type list and later reverse the list.
20299         (unresolved_type_p): Argument 'returned' may be optionally
20300         NULL_TREE.
20301         (java_layout_class_from_source): Function renamed
20302         safe_layout_class.
20303         (resolve_and_layout): Now call resolve_no_layout and
20304         safe_layout_class.
20305         (resolve_no_layout): New function.
20306         (purify_type_name): New function.
20307         (complete_class_report_errors): Call purify_type_name during error
20308         report on a type not found.
20309         (process_imports): error_found local variable doesn't need to be
20310         initialized to zero.
20311         (declare_local_variables): New local type_wfl. Fixed typo in error
20312         message. type_wfl assigned to unresolved type and used to register
20313         incomplete type. Build a WFL around the variable initialization
20314         statement so that debug info can be generated on it.
20315         (source_start_java_method): Reverse argument list after they've
20316         been processed.
20317         (current_this): New static global variable.
20318         (java_complete_expand_methods): Set current_this when appropriate.
20319         (resolve_expression_name): Build correct static and non static
20320         field access bearing a simple name.
20321         (resolve_field_access): Resolve the length field of arrays. Handle
20322         f.m() cases.
20323         (patch_method_invocation_stmt): Set the type of the method
20324         invocation to error_mark_node. This value is later overridden by a
20325         valid type, if any. Don't handle qualified constructor invocation
20326         as qualified method invocation. Call lookup_method_invoke with its
20327         new flag. It's no longer necessary to access the selected method
20328         as the value of a tree list. Handle constructor invocation.
20329         (patch_invoke): Reverse argument list when invoking non interface
20330         methods. Insert call to new as the first argument of the
20331         constructor.
20332         (invocation_mode): Return a INVOKE_STATIC is the invoked method is
20333         defined within a final class. Return INVOKE_STATIC if the invoked
20334         method is a constructor.
20335         (lookup_method_invoke): New lc argument is a flag to indicate a
20336         constructor lookup. Now handle constructor lookup. Choose the most
20337         specific method in case several were matching the invocation
20338         requirements. Return a method decl instead of a tree list featuring
20339         one single method decl element.
20340         (refine_accessible_methods_list): New lc flag argument to
20341         indicate that a constructor is being looked up.
20342         (not_initialized_as_it_should_p): New function.
20343         (java_complete_tree): Now process fake tree codes
20344         JAVA_NEW_ARRAY_EXPR, JAVA_NEW_CLASS_EXPR and JAVA_THIS_EXPR. Call
20345         save_expr on resolved function call arguments. Case on
20346         UNARY_PLUS_EXPR changed into a case on JAVA_UNARY_PLUS_EXPR.
20347         (patch_assignment): LHS can be a field access expression. When
20348         dealing with reference, lhs_type is the promoted type of the
20349         rhs_type, not the RHS. Use not_initialized_as_it_should_p where
20350         applicable.
20351         (operator_string): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20352         (patch_binop): Use not_initialized_as_it_should_p where
20353         applicable.
20354         (build_unaryop): JAVA_UNARY_PLUS_EXPR replaces UNARY_PLUS_EXPR.
20355         (patch_unaryop): Likewise. And use not_initialized_as_it_should_p
20356         where applicable.
20357         (resolve_type_during_patch): New function.
20358         (patch_cast): Call resolve_type_during_patch to resolve type and
20359         report error accordingly.
20360         (patch_array_ref): Use not_initialized_as_it_should_p where
20361         applicable. Array base expression is saved before being
20362         used. Promote the type of an array elements if it contains non
20363         builtin types.
20364         (build_newarray_node, patch_newarray, build_this): New functions.
20365
20366 1998-07-16  Tom Tromey  <tromey@cygnus.com>
20367
20368         * gjavah.c (print_c_decl): UTF8_GET increments pointer; don't
20369         increment it in `for' statement.
20370         (print_field_info): If number is inf or nan, don't print it.
20371         (print_method_info): If method name is `delete', just ignore it.
20372         (print_c_decl): Special-case jstringArray.
20373
20374         * gjavah.c (help): New function.
20375         (no_argument): New function.
20376         (usage): Changed text.
20377         (main): Rewrote argument handling.  Now handles -v, --help,
20378         --version.
20379         (version): New function.
20380         (found_error): New global.
20381         (main): Return found_error.
20382         (generate_access): Set found_error.
20383         (print_c_decl): Likewise.
20384
20385 1998-07-15  Tom Tromey  <tromey@cygnus.com>
20386
20387         * gjavah.c (print_c_decl): Don't print "," when examining field.
20388         Skip type name when looking at "[L" types.
20389         (process_file): Now static.
20390         (generate_access): Now returns int.
20391         (last_access_generated): New global.
20392         (process_file): Clear last_access_generated; make multiple passes
20393         over the class.
20394         (print_field_info): Just return if generate_access returns true.
20395         (print_method_info): Likewise.  Also, allow <init> functions to
20396         pass through.
20397         (print_c_decl): Added is_init argument.  Print constructors
20398         properly.
20399         (print_cxx_classname): Use UTF8_GET to extract characters from
20400         string.
20401         (print_base_classname): New function.
20402         (print_class_decls): New function.
20403         (process_file): Use it.
20404         (utf8_cmp): New function.
20405
20406 1998-07-13  Nick Clifton  <nickc@cygnus.com>
20407
20408         * lang-options.h: Format changed to match changes in gcc/toplev.c
20409         to implement a --help option.
20410
20411 1998-07-10  Brendan Kehoe  <brendan@cygnus.com>
20412
20413         * decl.c (init_decl_processing): Revert change to dtable_type.
20414
20415 1998-07-09  Per Bothner  <bothner@cygnus.com>
20416
20417         * java-tree.h (CLASS_P):  Changed DECL_LANG_FLAG_7 -> TYPE_LANG_FLAG_4.
20418
20419 1998-07-08  Brendan Kehoe  <brendan@cygnus.com>
20420
20421         * decl.c (init_decl_processing): Set CLASS_LOADED_P on dtable_type.
20422
20423         * lang.c (lang_init): Default flag_exceptions to 1, without
20424         checking to see if it's 2 first.
20425
20426 1998-07-08  Jeffrey A Law  (law@cygnus.com)
20427
20428         * constants.c: Include "system.h".
20429         * decl.c: Likewise.
20430         * lang.c (flag_new_exceptions): Get via extern now.
20431         (lang_init_options): New functions.  Turn on flag_new_exceptions.
20432
20433 1998-07-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20434
20435         * lex.c (java_lex): Return 0 when we see an invalid character in
20436         the input.
20437
20438         * lex.c (java_read_char): Specify extra argument when calling
20439         java_lex_error.
20440         (java_read_unicode, java_parse_end_comment,
20441         java_parse_escape_sequence): Likewise,
20442         (java_lex): Specify extra argument when calling
20443         java_lex_error. Test that IDs are beginning with a legal character
20444         for IDs. Handle invalid characters with an error message and a
20445         call to java_lex_error.
20446         (java_lex_error): Adjust column position by new argument
20447         `forward'. Issue an error even if in the middle of reporting an
20448         other error.
20449
20450 1998-07-07  Brendan Kehoe  <brendan@cygnus.com>
20451
20452         * jcf-io.c (find_class): Zero out BUFFER before we use it, since
20453         we don't explicitly put a null pointer when we're copying it.
20454
20455 1998-07-07  Tom Tromey  <tromey@cygnus.com>
20456
20457         * gjavah.c (print_cxx_classname): New function.
20458         (super_class_name): Likewise.
20459         (print_super_fields): Removed.
20460         (in_super): Removed.
20461         (print_field_info): Never generate #defines.
20462         (print_c_decl): Changed generated types to match JNI.  No longer
20463         print class name before method name.
20464         (print_method_info): Print "static" before static methods.
20465         Print "virtual" before non-final methods.
20466         (usage): Use exit(1), not exit(-1).
20467         (main): Likewise.
20468         (print_field_info): Use %.17g to print a double.
20469         (last_access): New globals.
20470         (process_file): Initialize last_access.
20471         (usage): Now static.
20472         (ACC_VISIBILITY): New define.
20473         (generate_access): New function.
20474         (print_field_info): Call it.
20475         (print_method_info): Likewise.  Also, generate information for all
20476         methods, not just native methods.  Return void.
20477         (print_c_decl): Return void.
20478         (print_field_info): Return void.
20479
20480 1998-07-02  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20481
20482         * Makefile.in (JAVABISONFLAGS): Specific flag for bison when
20483         processing the jc1 grammar file. Prefix bison functions and
20484         variables with java_.
20485         (parse.c): Dependencies on parse.h and lex.h
20486         * expr.c (build_java_arrayaccess): Function now global.
20487         * java-tree.h: Comment reorganized to carry on previous
20488         classification effort.
20489         (RESOLVE_EXPRESSION_NAME_P, RESOLVE_PACKAGE_NAME_P,
20490         RESOLVE_TYPE_NAME_P): New flags on WFLs.
20491         * jcf-parse.c (parse_source_file): java_parse_source_file renamed
20492         java_parse (new prefix java_ generated by bison).
20493         (java_layout_parsed_class, java_register_parsed_class): Function
20494         call removed.
20495         (yyparse): Removed unnecessary call to init_outgoing_cpool.
20496         * lex.c (static tree wfl_op): Variable deleted.
20497         (java_init_lex): Initialize kw_super and kw_this. Initialize more
20498         ctxp fields to NULL_TREE.
20499         (java_lex): No longer create WFL for operators. Filename caching
20500         mechanism deleted. Call BUILD_OPERATOR for `.', '(', '['. Strings
20501         created as STRING_CST and later expanded. Removed extra argument
20502         to BUILD_OPERATOR and BUILD_OPERATOR2. Build operators for THIS
20503         and SUPER.
20504         (build_wfl_node): Removed code in comments.
20505         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): No longer build a WFL but
20506         store token and location data in the current bison token.
20507         * parse.h: Removed pre-processor based symbol prefixes hack. Moved
20508         static/extern function declaration at the beginning of the file.
20509         (struct qualification): Data structure definition deleted.
20510         (RESOLVE_CHAIN_REMAINDER): Macro definition deleted.
20511         (qualify_ambiguous_name): Function declaration modified. Function
20512         now returns nothing.
20513         (build_array_ref, patch_array_ref, make_qualified_name,
20514         resolve_qualified_expression_name, maybe_generate_clinit,
20515         resolve_field_access): New static function declarations.
20516         (build_java_arrayaccess): New extern function declaration.
20517         (enum { RESOLVE_EXPRESION_NAME...}): Enum deleted.
20518         (CALL_EXPR_PRIMARY): Macro deleted.
20519         (EXPR_WFL_QUALIFICATION, QUAL_WFL, QUAL_RESOLUTION): New macros.
20520         (struct parser_ctxt): Field initialized_final
20521         removed. non_static_initialized, static_initialized: New fields.
20522         * parse.y (static tree kw_super, static tree kw_this): New global
20523         static.
20524         (%union): tree wfl field of operator member replaced by int
20525         location. WFLs are non longer created for operators.
20526         (OSB_TK, DOT_TK, THIS_TK, SUPER_TK): Tagged <operator>.
20527         (qualified_name:): Now calls make_qualified_name to build the
20528         identifier.
20529         (type_declaration:): Consider generating <clinit> when class
20530         parsing completed.
20531         (variable_declarator:): Directly build an assignment node when the
20532         variable is initialized when declared.
20533         (this_or_super:): Build a WFL and set current location when THIS
20534         or SUPER are parsed.
20535         (expression_statement:): Wrap statement around a WFL.
20536         (primary_no_new_array:): Fixed typo. Changed value returned by
20537         THIS_TK because of its new type (temporary).
20538         (dim_exprs:): Temporary fix because of OSB_TK's new type.
20539         (field_access:): Build qualified name with SUPER.
20540         (method_invocation:): Fixed returned value because of SUPER's new
20541         type.
20542         (array_access:): Use OSB_TK location information.
20543         (post_increment_expression:, post_decrement_expression:,
20544         unary_expression:, pre_increment_expression:,
20545         pre_decrement_expression:, unary_expression_not_plus_minus:,
20546         cast_expression:, multiplicative_expression:,
20547         additive_expression:, shift_expression:, relational_expression:,
20548         equality_expression:, and_expression:, exclusive_or_expression:,
20549         inclusive_or_expression:, conditional_and_expression:,
20550         conditional_or_expression:, assignment:): Use new location/token
20551         information available on operators.
20552         (create_class): Set super_decl_type to NULL_TREE when processing
20553         java.lang.Object.
20554         (register_fields): Field initialization is now a MODIFY_EXPR
20555         node. Chain initialization code to the matching lists (according
20556         to the field declaration modifiers).
20557         (maybe_generate_clinit): New function.
20558         (method_header): Don't set method's DECL_NAME to a WFL when adding
20559         methods to java.lang.Object.
20560         (resolve_and_layout): Now can return NULL_TREE if the type
20561         resolution fails. Otherwise, return the class DECL instead of its
20562         TYPE.
20563         (check_method_redefinition): Don't patch method DECL_NAME if it
20564         belongs to java.lang.Object.
20565         (process_imports): Simply assign error_found to the value returned
20566         by check_pkg_class_access.
20567         (declare_local_variables): Don't use their init statements (if
20568         any) when parsing error were previously found. Reuse MODIFY_EXPR
20569         build during parsing as an init statement.
20570         (java_method_add_stmt): Now return the current method body.
20571         (java_layout_parsed_class, java_register_parsed_class): Functions
20572         removed.
20573         (java_complete_expand_methods): Initialize the constant pool on a
20574         per class basis. Layout the classes before expanding their method
20575         bodies. Don't try expand artificial constructor code if error were
20576         found. Make the classes data and register them if no error were
20577         found.
20578         (java_complete_expand_method): Retrieve an artificial constructor
20579         argument list before entering its body. Assign the top block to
20580         the artificial constructor function body and set types of declared
20581         blocks and compound statements to void. Walk method body if not an
20582         artificial constructor.
20583         (make_qualified_name, cut_identifier_in_qualified): New functions.
20584         (resolve_expression_name): Fixed comments. Save/restore the
20585         current class CLASS_LOADED_P flag value. Build non qualified
20586         static field access and handle qualified expression names.
20587         (resolve_field_access, resolve_qualified_expression_name): New
20588         functions.
20589         (patch_method_invocation_stmt): Use the new expression resolution
20590         scheme, calling resolve_field_access when the function call is
20591         resolved as an expression.
20592         (qualify_ambiguous_name): Function rewritten to work on qualified
20593         expression produced by make_qualified_name.
20594         (java_complete_tree): Promote type when function's argument are
20595         RECORD_TYPEs. While processing the MODIFY_EXPR case: don't patch
20596         the assignment to discover further errors if RHS is a expression
20597         name that fails to evaluate. Declare LHS initialized even though
20598         the assignment failed. Don't use the location variable and removed
20599         extra argument in patch function calls. Now handle the ARRAY_REF
20600         case and build internal string representation when STRING_CSTs are
20601         walked.
20602         (build_method_invocation): Don't wrap function call around a WFL.
20603         (build_assignment): Likewise. Use the operator location
20604         information.
20605         (patch_assignment): Handle array access LHSs. Handle error
20606         provenance, resulting in a better error report.
20607         (build_binop): Use op_location from operator as binop location
20608         information.
20609         (build_unaryop, build_incdec, build_cast): Likewise.
20610         (patch_binop): Extract location information from the node. Fixed
20611         typo in error message.
20612         (patch_unary_op): Extract location information from the node.
20613         (build_array_ref, patch_array_ref): New functions.
20614
20615 1998-07-01  Tom Tromey  <tromey@cygnus.com>
20616
20617         * expr.c (expand_java_INSTANCEOF): Changed calling convention to
20618         match _Jv_IsInstanceOf.
20619         * decl.c (init_decl_processing): Use _Jv_NewArray, not
20620         soft_newarray.  Use _Jv_IsInstanceOf, not soft_instanceof.
20621
20622 1998-06-30  Tom Tromey  <tromey@cygnus.com>
20623
20624         * decl.c (init_decl_processing): Functions are now named
20625         _Jv_MonitorEnter and _Jv_MonitorExit, and return jint.
20626
20627 1998-06-29  Per Bothner  <bothner@cygnus.com>
20628
20629         * java-tree.h (load_class):  Add prototype.
20630         * class.c (is_compiled_class):  Add missing arg to load_class.
20631         * expr.c (expand_java_NEW):  Call load_class.
20632         * parse.y (process_import):  Removed bogus use of void return value.
20633
20634 1998-06-25  Per Bothner  <bothner@cygnus.com>
20635
20636         * decl.c, java-tree.h (soft_athrow_node):  Renamed to soft_node.
20637         Function name is "_Jv_Throw" instead of "soft_athrow".
20638         * decl.c, java-tree.h (soft_new_node):  Renamed to alloc_object_node.
20639         Function name is "_Jv_AllocObject" instead of "soft_new".
20640         Takes an extra parameter (object size).
20641         * expr.c:  Update calls.
20642
20643 1998-06-24  Per Bothner  <bothner@cygnus.com>
20644
20645         * lex.c (java_get_line_col):  Handle end-of-file.
20646         * except.c (expand_end_java_handler):  Handle null type (i.e. finally).
20647
20648 1998-06-24  Andrew MacLeod  <amacleod@cygnus.com>
20649
20650         * lang.c (lang_init): Make -fexceptions the default.
20651         * except.c (maybe_start_try, maybe_end_try): Don't do anything if
20652         exception handling is not turned on.
20653
20654 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
20655
20656         * lang.c (flag_new_exceptions): Make this this default.
20657         * decl.c (end_java_method): Call emit_handlers.
20658         * except.c (method_init_exceptions): Set language code and version.
20659         (expand_start_java_handler): Enable exception, and call
20660         expand_eh_region_start.
20661         (expand_end_java_handler): Enable exception, and set up catch blocks.
20662         (emit_handlers): New routine to generate the saved handlers.
20663         * java-except.h (emit_handlers): Add prototype.
20664
20665 1998-06-12  Per Bothner  <bothner@cygnus.com>
20666
20667         We used to have three different representations of the constant pool:
20668         the CPool structure, the tree_constant_pool, and the constructures
20669         used to build the Class object (which may need class and string
20670         constants) in compiled code.  None were appropriate for compiling
20671         to .class files, so I did a major overhaul.
20672
20673         First, the tree_constant_pool array was removed.  Things were
20674         modified to the CPool structure in the JCF could be used.
20675         Second, a "capacity" field was added to the CPool, and functions
20676         written to search for a matching constant, adding one if not found.
20677         The code that generated the Class object was changed to use a CPool.
20678         The actual TREE_LISTs used to build the CONSTRUCTORs used for
20679         the static Class object are now only in build_constants_constructor.
20680         Finally, I wrote code which can generate a .class file (including its
20681         constant pool) from the RECORD_TYPE of a class.  This is a big step
20682         on the way to compiling Java source into .class files.
20683
20684         * jcf-write.c:  New file. Writes out a RECORD_TYPE as a .class file.
20685         * Makefile.in (JAVA_OBJS):  Added jcf-write.o.
20686
20687         * java-tree.h (CPOOL_UTF, CONSTANT_ResolvedFlag,
20688         CONSTANT_ResolvedString, CONSTANT_ResolvedClass):  New macros.
20689         (NAME_AND_TYPE_NAME, NAME_AND_TYPE_SIGNATURE, COMPONENT_REF_NAME,
20690         COMPONENT_REF_NAME_AND_TYPE, COMPONENT_REF_SIGNATURE): Redefined.
20691         (COMPONENT_REF_CLASS):  Replaced by COMPONENT_REF_CLASS_INDEX.
20692         (lang_type):  Removed constant_pool field.
20693         * jcf.h (CPool):  Renamed size to count.  Added field capacity.
20694         (CPOO_COUNT, CPOOL_UINT, CPOOL_USHORT1, CPOOL_USHORT2,
20695         CPOOL_FINISH, CPOOL_INIT, CPOOL_REINIT):  New macros.
20696         Rewrite some of the old JCF_XXX in terms of CPOOL_XXX macros.
20697
20698         * constants.c (current_constant_pool_tags, current_constant_pool_data,
20699         current_constant_pool_length), java-tree.h: Replaced by outgoing_cpool.
20700         * constants.c (build_constants_constructor):  Use new outgoing_cpool.
20701         (set_constant_entry, find_constant1, find_constant2,
20702         find_class_constant, count_constant_pool_bytes, write_constant_pool,
20703         find_utf8_constant, find_class_or_string_constant):  New functions.
20704
20705         * jcf-parse.c (load_class):  Don't save/restore tree-constant_pool.
20706         (get_constant):  Use current_jcf.cpool instead of tree_constant_pool.
20707         (give_name_to_class, get_class_constant):  Likewise.
20708         * jcf-parse.c, java-tree.h (tree_constant_pool):  Removed.
20709         (get_name_and_type_constant, get_ref_constant):  Removed.
20710         * parse.h (parser_ctxt):  Remove field tree_constant_pool.
20711         * parse.y:  Don't save/restore tree_constant_pool.
20712         * verify.c (verify_jvm_instructions):  Update for new approach.
20713         * expr.c (expand_invoke, expand_java_field_op): Likewise.
20714
20715         * lang-options.h:  Added -femit-class-file, -femit-class-files.
20716         * lang.c (flag_emit_class_files), java-tree.h:  New flag.
20717         (lang_f_options):  Added "emit-class-file(s)".
20718
20719         * expr.c (build_java_arrayaccess):  Generate more efficient array
20720         bounds checking, by using unsigned compare.
20721
20722         * expr.c (expand_invoke):  Re-arrange error checks to make more robust.
20723
20724 1998-06-10  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20725
20726         * parse.h: New comment on the handling of unresolved type
20727         identifiers. JDEPs are now part of the jdep_code enum.
20728         (typedef struct jdep): Now use enum jdep_code or int, depending on
20729         availability. Both are narrowed down to an 8 bits bitfield.
20730         (CALL_EXPR_PRIMARY): Fixed comment.
20731
20732 1998-06-10  Tom Tromey  <tromey@cygnus.com>
20733
20734         * Make-lang.in (java): Added gjavac and jvgenmain.
20735         (java.start.encap): Depend on gjavac.
20736         (java.rest.encap): Depend on jvgenmain.
20737
20738         * Make-lang.in (JAVA_INSTALL_NAME): Name is gjavac, not c++.
20739         (JAVA_CROSS_NAME): Likewise.
20740         (java.all.build): Depend on jvgenmain and gjavac.
20741         (java.all.cross): Depend on jvgenmain and gjavac-cross.
20742         (jvgenmain$(exeext)): New target.
20743         (java.install-common): Wrote.
20744         * config-lang.in (compilers, stagestuff): Added gjavac and
20745         jvgenmain.
20746
20747 1998-06-10  Dave Brolley  <brolley@cygnus.com>
20748
20749         * lang.c (lang_decode_option): New argc/argv interface.
20750
20751 1998-06-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20752
20753         * ChangeLog: Fixed entries not compliant with the Gnu Coding Standard.
20754         * decl.c (build_decl_no_layout): New function.
20755         * expr.c (java_lang_expand_expr): Layout declarations found in
20756         blocks before they're pushed.
20757         * jcf-parse.c (load_class): Save current line when parsing class
20758         file.
20759         (parse_source_file): Register class before expanding their
20760         methods.
20761         * lang.c (put_decl_node): Produce `null' when `void *' is
20762         processed.
20763         * lex.c (static tree wfl_op): New static global, for error report
20764         on casts.
20765         (java_init_lex): wfl_operator and wfl_op initialized
20766         here. Filename caching added for wfl_op. Return wfl_op when `(' is
20767         parsed.
20768         * parse.h (build_unaryop, build_incdec, patch_unaryop, build_cast,
20769         patch_cast, valid_ref_assignconv_cast_p, can_cast_to_p,
20770         build_unresolved_array_type): New static function definitions.
20771         (build_decl_no_layout): New extern function declared.
20772         (OBSOLETE_MODIFIER_WARNING): Report error only if the WFL of the
20773         faulty modifier exists.
20774         (TYPE_INTERFACE_P, TYPE_CLASS_P): New macros.
20775         (ERROR_CAST_NEEDED_TO_INTEGRAL): Error message tuned.
20776         (UNARY_PLUS_EXPR): New fake operator.
20777         (struct parser_ctxt): New field osb_number.
20778         * parse.y (static tree wfl_operator): New static WFL for operator
20779         bound error messages.
20780         (DECR_TK, INCR_TK): Moved.
20781         (OP_TK): Tagged <operator>.
20782         (array_type:): Now call build_unresolved_array_type.
20783         (dim_expr:): Count the number of '[' seen.
20784         (post_increment_expression, post_decrement_expression,
20785         pre_increment_expression, pre_decrement_expression,
20786         unary_expression_not_plus_minus, unary_expression:): Actions are
20787         now building the corresponding unary expressions.
20788         (cast_expression:): Actions are now building cast expressions.
20789         (build_unresolved_array_type): New function.
20790         (create_interface): Reset the number of declared interfaces.
20791         (create_class): Likewise.
20792         (method_header): Methods declared within the scope of an interface
20793         are now implicitly set public and abstract.
20794         (java_complete_class): Variable's and parameter's type are patched
20795         with a promoted type.
20796         (declare_local_variables): Resolved non builtin types are promoted
20797         before being used to build a variable decl. Removed type patch
20798         posted on variable initialization statement.
20799         (source_start_java_method): Use build_decl_no_layout to build the
20800         decl of a parameter of incomplete type.
20801         (java_register_parsed_class): Process interfaces too. Call
20802         rest_of_decl_compilation on each processed class declarations.
20803         (java_complete_expand_methods): Don't attempt to expand things in
20804         interfaces.
20805         (java_complete_tree): Process CONVERT_EXPR, even though it always
20806         has a type. Propagate error_mark_node to node's type too. Promote
20807         method's call argument type and return error_mark_node if
20808         argument's completion didn't work. MODIFY_EXPR can have a WFL as a
20809         RHS. Fixed bug in the handling of bogus RHS of a fixed type. Now
20810         handle unary operator nodes.
20811         (build_assignment): Added comment.
20812         (print_int_node): New function.
20813         (patch_assignment): New second argument. New error handling. Use
20814         print_int_node. Handle references. Use can_cast_to_p to issue
20815         different error message according to the context and check upon
20816         the initialization of the RHS.
20817         (can_cast_to_p, valid_ref_assignconv_cast_p): New functions.
20818         (operator_string): Handle more operators.
20819         (patch_binop): No longer use a function static
20820         wfl_operator. Improved error message on shift distance.
20821         (build_unaryop, build_incdec, build_cast, patch_unaryop,
20822         patch_cast): New functions.
20823
20824 1998-06-05  Per Bothner  <bothner@cygnus.com>
20825
20826         * jvspec.c:  New file.
20827         * Make-lang.in:  New rules to build gjavac from jvspec.c and ../gcc.c.
20828
20829         * java-tree.h (identifier_subst):  Add declaration.
20830
20831 1998-06-04  Tom Tromey  <tromey@cygnus.com>
20832
20833         * jvgenmain.c (main): Generate call to JvRunMain.
20834
20835         * class.c (make_class_data): Push value for "sync_info" field.
20836         * decl.c (init_decl_processing): Push "sync_info" field.
20837
20838 1998-06-03  Per Bothner  <bothner@cygnus.com>
20839
20840         * typeck.c (build_java_array_type):  Set TYPE_NAME to actual
20841         Java (source) name, not signature.
20842         Set TYPE_ALIGN to (at least) that of element_type.
20843
20844 1998-06-02  Per Bothner  <bothner@cygnus.com>
20845
20846         * class.c:  Moved classname-mangling-rekated code to ...
20847         * mangle.c:  ... this new file.
20848         * jvgenmain.c:  New program (needs mangle.c) to generate main program.
20849         * Makefile.in:  Update for above changes.
20850
20851 1998-06-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20852
20853         * expr.c (truthvalue_conversion): Convert integer and floating
20854         point value to their truth value.
20855         * lex.c (java_lex): Handle the `null' literal.
20856         * parse.h (JREFERENCE_TYPE_P, DECL_P): New macros.
20857         (ERROR_CANT_CONVERT_TO_BOOLEAN, ERROR_CANT_CONVERT_TO_NUMERIC,
20858         ERROR_CAST_NEEDED_TO_INTEGRAL, ERROR_VARIABLE_NOT_INITIALIZED):
20859         New macros.
20860
20861         * parse.y: Reorganization/documentation on token declaration.
20862         (binop_lookup[]): New added new tree codes.
20863         (relational_expression): Build corresponding binary operators.
20864         (equality_expression, conditional_and_expression,
20865         conditional_or_expression): Likewise.
20866         (java_complete_class): Fix crash in debug message.
20867         (java_complete_tree): Check initialization of method call
20868         arguments. Further bogus node evaluation to detect more error
20869         during assignments. Handles more binary operators.
20870         (patch_assignment): Use DECL_P.
20871         (build_binop): Fix crash when using URSHIFT_EXPR, a Java only tree
20872         code.
20873         (operator_string): Handle more case. Compacted source.
20874         (patch_binop): Changed function comment. Checking for
20875         uninitialized first operand takes the compound assignment into
20876         account and uses DECL_P. Checking for uninitialized second operand
20877         delayed to routine's end. Use macros to issue type bound error
20878         messages and issue messages on both operands if their types are
20879         different. Force fixed type into node. Handle all binary
20880         operators.
20881
20882 1998-05-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20883
20884         * java-tree.h (COMPOUND_ASSIGN_P, INITIALIZED_P): New macros.
20885         * lex.c (java_lex): Use BUILD_OPERATOR and BUILD_OPERATOR2 to
20886         build operator node and return tokens.
20887         * lex.h (BUILD_OPERATOR, BUILD_OPERATOR2): New macros.
20888         * parse.h (java_complete_tree): Changed returned type in prototype.
20889         (build_method_invocation, build_assignment, patch_assignment,
20890         patch_binop): New static function declarations.
20891         (JFLOAT_TYPE_P, JNUMERIC_TYPE_P, JPRIMITIVE_TYPE_P, JSTRING_P,
20892         BUILD_EXPR_WFL): New macros.
20893         * parse.y (enum tree_code binop_lookup[]): New static for token to
20894         TREE_CODE lookup.
20895         (%union): Parser union has new sub-structure `operator'.
20896         (ASSIGN_TK, MULT_ASSIGN_TK, DIV_ASSIGN_TK, REM_ASSIGN_TK,
20897         PLUS_ASSIGN_TK, MINUS_ASSIGN_TK, LS_ASSIGN_TK, SRS_ASSIGN_TK,
20898         ZRS_ASSIGN_TK, AND_ASSIGN_TK, XOR_ASSIGN_TK, OR_ASSIGN_TK,
20899         ASSIGN_ANY_TK): Tokens tagged `operator'.
20900         (EQ_TK, GTE_TK, ZRS_TK, SRS_TK, GT_TK, LTE_TK, LS_TK, BOOL_AND_TK,
20901         AND_TK, BOOL_OR_TK, OR_TK, INCR_TK, PLUS_TK, DECR_TK, MINUS_TK,
20902         MULT_TK, DIV_TK, XOR_TK, REM_TK, NEQ_TK, NEG_TK, REL_QM_TK,
20903         REL_CL_TK, NOT_TK, LT_TK): Tokens tagged `operator'.
20904         (assignment_operator:): Rule tagged `operator'.
20905         (expression_statement:): Re-installed default rule.
20906         (method_invocation:): Sub rules call build_method_invocation.
20907         (postfix_expression:): Don't attempt to resolve name here. Just
20908         return an ID.
20909         (multiplicative_expression:): Sub-rules build corresponding binop
20910         expression node.
20911         (additive_expression:, shift_expression:, and_expression:,
20912         exclusive_or_expression:, inclusive_or_expression:): Likewise.
20913         (assignment:): Sub rule invoke build_assignment.
20914         (assignment_operator:): Default rules on sub rules.
20915         (force_error): Added documentation on this variable.
20916         (declare_local_variables): Build initialization calling
20917         build_assignment.
20918         (expand_start_java_method): Removed unused rtx declaration. Mark
20919         arguments as already initialized.
20920         (java_method_add_stmt): Type of built COMPOUND_EXPR set to NULL.
20921         (java_complete_expand_methods): Don't process next method if
20922         completion of the previous one triggered errors.
20923         (java_complete_expand_method): Call source_end_java_method if no
20924         error were found during completion.
20925         (resolve_expression_name): Use IDENTIFIER_LOCAL_VALUE to retrieve
20926         locals declaratilon. Handle names found within a class. Return
20927         error_mark_node when things aren't found.
20928         (patch_method_invocation_stmt): Return error_mark_node on failures.
20929         (patch_invoke): Removed unused local. Return the correct node.
20930         (java_complete_tree): Now returns a value. The BLOCK section binds
20931         local identifiers and the type of a BLOCK is now void. Assign the
20932         result of operand completion on COMPOUND_EXPR. Assign the
20933         encapsulated node of a WFL to the result of its completion, except
20934         when the node is an identifier. Now handle MODIFY_EXPR and several
20935         binary operators. Return error_mark_node on errors.
20936         (build_method_invocation, build_assignment, patch_assignment,
20937         build_binop, operator_string, patch_binop): New functions.
20938         * typeck.c (binary_numeric_promotion): New function.
20939
20940 1998-05-21  Per Bothner  <bothner@cygnus.com>
20941
20942         * class.c (identifier_subst):  New convenience wrapper for ident_subst.
20943         Replace most uses of ident_subst by identifier_subst.
20944
20945         * class.c (push_class_static_dummy_field):  Removed function.
20946         (build_class_ref):  Find Class object decl by looking up "CNAME.class",
20947         instead of looking got "class" static field.  Create that decl here.
20948         (class_identifier_node):  Removed;  no longer needed.
20949         (init_class_processing):  Don't init class_identifier_node.
20950         * jcf-parse.c (jcf_parse):  Don't call push_class_static_dummy_field.
20951         Do nreverse 0 times (instead of twice) for Object and Class.
20952         * parse.y (java_layout_parsed_class): No push_class_static_dummy_field.
20953
20954 1998-05-20  Per Bothner  <bothner@cygnus.com>
20955
20956         * jcf-parse.c (parse_class-file):  Set lino to smallest line number,
20957         while initializing linenumber_count and linenumber_table.
20958         Do it before init_function_start (which calls emit_line_note).
20959         * expr.c (expand_byte_code):  Don't need to clear lineno here.
20960
20961 1998-05-18  Tom Tromey  <tromey@cygnus.com>
20962
20963         * class.c (append_gpp_mangled_type): If `qualifications' is >=9,
20964         then mangle number as _N_.
20965
20966         * class.c (mangle_class_field): New function.
20967         (build_class_ref): Set assembler name of class reference using
20968         mangle_class_field.
20969         (push_class_static_dummy_field): Likewise.
20970
20971 1998-05-17  Michael Tiemann <tiemann@cygnus.com>
20972
20973         * parse.y (source_start_java_method): Use TREE_SET_CODE instead
20974         of assigning to TREE_CODE.  The latter method exploits a feature
20975         of GCC that is not ANSI compliant.
20976
20977 1998-05-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
20978
20979         * decl.c (pushdecl_force_head): New function.
20980         (pushlevel): Removed conditional printf.
20981         (complete_start_java_method): Don't enter local variable scope if
20982         function is compiled from source code.
20983         * expr.c: parse.h now included
20984         (java_lang_expand_expr): New function.
20985         * jcf-io.c (find_class): Use SOURCE_FRONTEND_DEBUG instead of
20986         printf. Terminate buffer when doing directories.
20987         * jcf-parse.c (parse_source_file): Call lang_init_source before
20988         parsing and before code generation.
20989         * jcf.h (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally
20990         use printf if the macro is defined.
20991         * lang.c (lang_init): Install lang_expand_expr hook on
20992         java_lang_expand_expr.
20993         (java_dummy_print): New function.
20994         (lang_init_source): New function.
20995         * lex.c (java_lex): Remember location of an opening brace at the
20996         second nesting level.
20997         (java_is_eol): Unget character seen after a CR if it is EOF.
20998         * parse.h: Now includes lex.h
20999         (SOURCE_FRONTEND_DEBUG): Macro redefined to conditionally use
21000         printf if the macro is defined.
21001         (expand_start_java_method, build_expr_block, enter_block,
21002         exit_block, lookup_name_in_blocks, maybe_absorb_scoping_blocks):
21003         New static function declarations.
21004         (pushdecl_force_head): New extern function declaration.
21005         (INCOMPLETE_TYPE_P): New macro.
21006         (JDEP_PARM, JDEP_TYPE): New entries in JDEPs enum.
21007         (BLOCK_CHAIN_DECL, BLOCK_EXPR_DECLS, BLOCK_EXPR_BODY,
21008         BLOCK_EXPR_ORIGIN): New macros.
21009         (DECL_SOURCE_LINE_MERGE, DECL_SOURCE_LINE_FIRST,
21010         DECL_SOURCE_LINE_LAST): New macros.
21011         (struct parser_ctxt): Removed field current_method_decl, redundant
21012         with the field current_function_decl. Added fields
21013         first_ccb_indent1 and pending_block.
21014         * parse.y (method_body, literal, INT_LIT_TK, FP_LIT_TK,
21015         BOOL_LIT_TK, CHAR_LIT_TK, STRING_LIT_TK, NULL_TK, VOID_TK): Rules
21016         tagged <node>
21017         (SOURCE_FRONTEND_DEBUG): Used as macro accepting varargs.
21018         (compilation_unit:): Cosmetic on sub rule.
21019         (type_declaration:): Cosmetic on sub rules. Added an error rule.
21020         (variable_initializer:): Installed default rule on expression:.
21021         (method_declaration:): method_header: starts a new
21022         method. method_body: installs the function body, absorbs blocks
21023         emitted for temporary variable scopings, pops function's body block
21024         and merges function's last statement lineno in DECL_SOURCE_LINE.
21025         (method_body:): Installed default rules.
21026         (block:): Call enter_block when an opening brace is seen.  Absorb
21027         scoping blocks and call exit_block when a closing brace is seen.
21028         (block_statement:): Cosmetic changes.
21029         (method_invocation:): Create WFL around CALL_EXPR node.
21030         (patch_stage): Added comment around definition.
21031         (method_header): Try to use first_ccb_indent1 as the first line of
21032         the method, so BP debug info are emitted at the first opening
21033         brace of the function. If the function has no body, use the
21034         location of the function's name. Override currently defined method
21035         name with the matching WFL so we can point redefinition errors
21036         using the location where the function's name was declared.
21037         (check_abstract_method_header): Interprets DECL_NAME as an
21038         identifier or as a WFL, accordingly.
21039         (java_complete_class): New cases for JDEP_TYPE and JDEP_PARM.
21040         (check_method_redefinition): Use DECL_NAME as a WFL. Extract
21041         location and name information out of it and reinstall DECL_NAME to
21042         its original identifier node value.
21043         (lookup_cl): Use DECL_SOURCE_LINE_FIRST (first line of the
21044         function's source code).
21045         (read_import_dir): Test the value returned by find_class and issue
21046         a fatal accordingly.
21047         (declare_local_variables): Push a new block for the scope of the
21048         new variable(s) if code has been already generated at that nesting
21049         level. Pinpoint redefinition errors using the variable id
21050         WFLs. Generate initialization code if necessary. If the variable
21051         type is incomplete, register a patch on its decl.
21052         (source_start_java_method): Rewritten. Define a new block for the
21053         function's parameters. Build parameter decl out of function's
21054         arguments and register them for a patch if their types are
21055         incomplete.
21056         (expand_start_java_method): Includes the part of
21057         source_start_java_method that was pushing the parameter decls and
21058         completing the method start code.
21059         (source_end_java_method): Removed call the expand_end_bindings and
21060         poplevel (already taken care of). Reinstall function's arguments
21061         and get function's last line of code before calling
21062         expand_function_end.
21063         (java_method_add_stmt): New comment before the function's
21064         code. Complement the second operand of the current COMPOUND_EXPR
21065         if necessary.
21066         (java_complete_expand_methods): Don't generate debug info on line
21067         zero when expanding a generated constructor.
21068         (java_complete_expand_method): Set start and end line numbers for
21069         a artificially generated constructor to one and manually call
21070         enter_block and exit_block when defining it. For all methods:
21071         expand function's start calling the new expand_start_java_method
21072         and invoke java_complete_tree on the effective method's body, if
21073         any.
21074         (resolve_expression_name): Now use lookup_name_in_blocks to search
21075         local variable decls and print out an error when variables are
21076         undefined.
21077         (patch_method_invocation_stmt): Inserted comment before the
21078         function's code.
21079         (lookup_method_invoke): Chain method's arguments using chainon
21080         with the current arg list as a second argument. Inserted missing
21081         IDENTIFIER_POINTER when reporting an error on methods not found.
21082         (refine_accessible_methods_list): Don't retain constructors.
21083         (patch_arguments): Function removed.
21084         (java_complete_tree): Inserted comment before the function's
21085         code. New case for BLOCKs. Moved the WFL case a bit
21086         further. Complete function's arguments.
21087         (build_expr_block, enter_block, exit_block, lookup_name_in_blocks,
21088         maybe_absorb_scoping_blocks): New functions.
21089
21090 1998-04-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21091
21092         * jcf-io.c (find_class): Reset jcf->java_source after JCF_ZERO, if
21093         previously set.
21094         * jcf-parse.c (parse_source_file, java_error_count): New forward
21095         and extern declarations.
21096         (java_parse_abort_on_error): Macro moved.
21097         (jcf_parse_source): fatal called if fopen fails. Now calls
21098         parse_source_file.
21099         (parse_source_file): New parse_only parameter. Reflects the
21100         elimination of the second pass.
21101         (yyparse): parse_source_file called with argument set to 0.
21102         * jcf.h (JCF_ZERO): Sets java_source to zero.
21103         * lex.c (java_init_lex): pass argument is gone. Function modified
21104         to be called once during the analysis of a file.
21105         (java_unget_unicode): Fixed typo in fatal message.
21106         (java_get_line_col): Likewise.
21107         (java_lval): Likewise. String literals no longer built during
21108         second pass.
21109         * lex.h (JAVA_COLUMN_DELTA): Take the tabulation character into
21110         account.
21111         * parse.h (MODIFIER_WFL): New macro.
21112         (parse_check_super, parser_check_super_interface): Now return int.
21113         (parser_chain_incomplete_item, not_builtin_p,
21114         complete_method_decl): Declarations removed.
21115         (build_method_invocation_stmt, build_invoke): Renamed using the
21116         `patch' instead of `build'
21117         (register-incomplete_type, obtain_incomplete_type,
21118         java_complete_tree, java_complete_expand_method,
21119         unresolved_type_p, create_jdep_list): New function declarations.
21120         (IC_TYPE, IC_DEPEND, DEPEND_DECL, DEPEND_WFL, BEGIN_ONLY_PASS,
21121         END_ONLY_PASS, ELSE_ONLY_PASS): Macro deleted.
21122         (jdep): New typedef on new struct _jdep.
21123         (JDEP_DECL, JDEP_DECL_WFL, JDEP_KIND, JDEP_SOLV, JDEP_WFL,
21124         JDEP_MISC, JDEP_APPLY_PATCH, JDEP_GET_PATCH, JDEP_CHAIN,
21125         JDEP_TO_REVOLVE, JDEP_RESOLVED_DECL, JDEP_RESOLVED,
21126         JDEP_RESOLVED_P): New macros.
21127         (JDEP_NO_PATCH, JDEP_SUPER, JDEP_FIELD, JDEP_METHOD,
21128         JDEP_METHOD_RETURN, JDEP_METHOD_END, JDEP_INTERFACE,
21129         JDEP_VARIABLE): New enum values and jdep kinds.
21130         (jdeplist): New typedef on struct _jdeplist.
21131         (CLASSD_FIRST, CLASSD_LAST, CLASSD_CHAIN, JDEP_INSERT): New
21132         macros.
21133         (CALL_EXPR_PRIMARY): New macro.
21134         (struct parser_ctxt): Fields java_pass, current_method_decl,
21135         method_decl_list deleted. New field jdeplist.
21136         (INCOMPLETE_P): Macro deleted.
21137         * parse.y (single_type_import_declaration:): Removed pass switch.
21138         (type_import_on_demand_declaration): Likewise.
21139         (field_declaration:): Removed pass switch on all sub rules.
21140         (class_declaration:): Call the complete_class_decl removed on
21141         class_body rules.
21142         (method_declaration:): Removed second pass switch. No longer chain
21143         methods decl when method_header reduced.
21144         (method_header:): Sub rules no longer depend on pass switch.
21145         (method_declarator:): Likewise.
21146         (method_body:): Likewise.
21147         (abstract_method_declaration:): Likewise.
21148         (block_statement:): Likewise.
21149         (local_variable_declaration:): Likewise.
21150         (argument_list:): Likewise.
21151         (method_invocation:): Likewise. Call to build_method_invocation_stmt
21152         removed. Partial CLASS_EXPR tree node built instead.
21153         (postfix_expression:): Removed pass switch on all sub rules.
21154         (java_pop_parser_context): Free classd_list content.
21155         (yyerror): Call obstrack_grow0 to finalize error message.
21156         (check_class_interface_creation): Comment modified to reflect new
21157         returned value meaning. Removed second pass switch. Return 1 if an
21158         error was found, 0 otherwise. Adjust pointer on filename if a
21159         leading path separator was found.
21160         (maybe_create_class_interface_decl): Removed first pass switch
21161         when linking the class decl to the class_list. Install a new
21162         jdep_list for the class.
21163         (add_superinterfaces): List of unresolved interfaces is
21164         gone. Unresolved interfaces are directly added to the current
21165         dependencies list.
21166         (create_interface): Second pass shortcut removed.
21167         ctpx->modifier_ctx access through MODIFIER_WFL.
21168         (create_class): Second pass shortcut removed. Call to
21169         register_incomplete_type replaces the call to
21170         parser_chain_incomplete_item.
21171         (complete_class_decl): Function removed.
21172         (duplicate_declaration_error): New way of retrieving redeclared
21173         item type.
21174         (register_fields): Call to lookup_modifier_cl replaced by
21175         MODIFIER_WFL. New way of handling unresolved type, using
21176         unresolved_type_p and obtain_incomplete_type.
21177         register_incomplete_type replaces call to parser_chain_incomplete_item.
21178         (patch_stage): New static global variable.
21179         (method_header): New way of handling unresolved type, using
21180         unresolved_type_p and obtain_incomplete_type. patch_stage used to
21181         indicates that the method decl needs to be patched.
21182         (check_abstract_method_header): Call to lookup_modifier_cl
21183         replaced by MODIFIER_WFL.
21184         (method_declarator): Incomplete argument type are registered
21185         calling register_incomplete_type. Patch on the declared method is
21186         issued in that case.
21187         (unresolved_type_p): New function.
21188         (parser_check_super_interface): New comment to reflect function's
21189         modified returned type (int). Function and has a new argument
21190         this_wfl. Call to parse_error_context uses this_wfl instead of
21191         relying on lookup_cl.
21192         (parser_check_super): Comment reflects function's new returned
21193         type (int). Function returns nonzero value on error.
21194         (create_jdep_list, reverse_jdep_list, obtain_incomplete_type,
21195         register_incomplete_type, jdep_resolve_class): New functions to
21196         handle incomplete types in declarations.
21197         (java_complete_class): Rewritten to work with the new incomplete
21198         type handling scheme.
21199         (complete_class_report_errors): Likewise.
21200         (complete_method_decl): Removed: it jobs is now handled by
21201         java_complete_class.
21202         (do_resolve_class): Class loaded in not already loaded and not
21203         found in Java source code.
21204         (java_check_regular_methods, java_check_abstract_methods): Don't
21205         call complete_method_decl anymore.
21206         (lookup_modifier_cl, not_builtin_p): Functions deleted.
21207         (read_import_dir): Got rid of the pass number dependency.
21208         (declare_local_variables): New handling of unresolved types (patch
21209         issued).
21210         (source_start_java_method): New parameter level. Function called
21211         with level set to 1 when argument types are potentially
21212         unresolved.  Called to complete the job with level set to 2 once
21213         types are complete.
21214         (source_end_java_method): Call to permanent_allocation
21215         removed. Waiting to be replaced by a more suitable obstack
21216         management.
21217         (java_complete_expand_methods, java_complete_expand_method,
21218         java_expand_finals): New functions.
21219         (build_method_invocation_stmt): Renamed
21220         patch_method_invocation_stmt. Extracts function call expression
21221         (wfl) and arguments (args) from CALL_EXPR tree operands.
21222         (build_invoke): Renamed patch_invoke. Fixed typo in fatal
21223         call. Patch the function and argument operand of the CALL_EXPR
21224         tree argument.
21225         (patch_argument, java_complete_tree): New functions.
21226
21227 1998-04-20  Per Bothner  <bothner@cygnus.com>
21228
21229         Recover from missing fields and methods (i.e. error instead of fatal).
21230         * decl.c, java-tree.h (TYPE_identifier_node):  New global constant.
21231         * expr.c (expand_invoke):  Recover from missing method.
21232         (expand_java_field_op):  Recover from missing field.
21233         Inline references to java.lang.{Integer,Char,...}.TYPE.
21234         * typeck.c (get_type_from_signature), java-tree.h:  New function.
21235         * class.c (add_method):  Use get_type_from_signature.
21236         (build_class_ref):  Handle a class that was not found.
21237         * typeck.c (convert):  Handle conversion to pointers (for convenience).
21238         * verify.c (verify_jvm_instructions):  Use get_type_from_signature
21239         instead of lookup_field to handle missing fields.
21240
21241         * jcf-parse.c (process_zip_dir):  Set java_source.
21242
21243 1998-04-20  Brendan Kehoe  <brendan@cygnus.com>
21244
21245         * jcf-parse.c (set_source_filename): Use TYPE_NAME, not DECL_NAME.
21246
21247 1998-04-14  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21248
21249         * jcf-parse.c (load_class): Don't change input_filename before
21250         calling jcf_parse_source (but still do it before calling
21251         jcf_parse).
21252         (jcf_parse_source): Assign input_filename after having saved the
21253         parser context.
21254         * lex.c (java_init_lex): Chain a WFL node to the import on demand
21255         list. ctxp->modifier_ctx zeroed according to its new
21256         definition. ctxp->filename initialized. Removed
21257         JAVA_MODIFIER_CTX_UNMARK.
21258         (java_unget_unicode): Update the character based column position.
21259         (java_allocate_new_line): ref_count not used anymore. Always free
21260         ctxp->p_line. Initialize c_line->char_col to 0.
21261         (java_get_unicode): Update the character based column position.
21262         (java_lex): Use ctxp->elc to store current position in source
21263         file, at the beginning of the parsed token. Set modifier_ctx entry
21264         corresponding to the parse modifier to a WFL node. Return a WFL
21265         node when an identifier is parsed.
21266         (java_lex_error): Now uses ctxp->elc to store current position in
21267         source.
21268         (build_wfl_node, java_is_eol, java_get_line_col): New functions.
21269         * lex.h (build_wfl_node): New function definitions.
21270         (struct java_line): ref_count and next fields are gone. New field
21271         char_col.
21272         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21273         JAVA_LINE_UNMARK, ID_NAME, ID_CL): Macro definitions deleted.
21274         (JAVA_COLUMN_DELTA): New macro.
21275         (java_lc): New typedef on new struct _java_lc.
21276         * parse.h (lookup_cl, lookup_modifier_cl): Changed returned types.
21277         (parse_error_context, parse_warning_context): Changed prototypes.
21278         (java_get_line_col): Added as an available global function.
21279         (JAVA_MODIFIER_CTX_UNMARK): Macro removed.
21280         (IC_DECL): Replaced by macro IC_TYPE
21281         (DEPEND_WFL): New macro.
21282         (THIS_MODIFIER_ONLY): Now works with WFL and only remembers the first
21283         wrong modifier.
21284         (exit_java_complete_class): Removed a commented out statement.
21285         (struct parser_ctxt): Added comments on fields. modifier_ctx is
21286         now an array of tree nodes. Deleted fields line_list and
21287         e_line. New field elc, to replace e_line.
21288         * parse.y (array_type:): Build WFL node.
21289         (qualified_name:): Build a single WFL node out of two. Retain
21290         the location information of the first node in the resulting node.
21291         (package_declaration:): Use package name as a WFL node
21292         (single_type_import_declaration:): Use imported name as a WFL node.
21293         (type_import_on_demand_declaration:): Use root of the imported
21294         packages as a WFL node.
21295         (field_declaration:): Removed unused local variable cl.
21296         (method_declaration:): Don't call JAVA_MODIFIER_CTX_UNMARK.
21297         (yyerror): New static elc. Removed static error_line, error_pos.
21298         New local code_from_source. Save ctxp->elc into elc at the first
21299         pass. Call java_get_line_col to get a string of the line where
21300         the error occurred.
21301         (debug_line): Removed static function.
21302         (parse_error_context, parse_warning_context): Parameter cl is now
21303         a WFL node. Use its value to initialize ctxp->elc.
21304         (redefinition_error): Parameter cl is now a WFL node.
21305         (parse_add_interface): New parameter wfl. No longer call
21306         lookup_cl, use wfl instead.
21307         (check_class_interface_creation): Parameter cl is now a WFL node.
21308         (maybe_create_class_interface_decl): Likewise.
21309         (add_superinterfaces): New function.
21310         (create_interface): Removed local cl, node, super_decl,
21311         super_decl_type.  Function now uses id as a WFL node. Better
21312         warning/error report on obsolete or forbidden mix of
21313         modifiers. Now calls add_superinterfaces to register interfaces.
21314         (create_class): Removed local cl, node. Local variable id is used
21315         as a WFL node. Better error report on forbidden modifier
21316         mix. Uses add_superinterfaces to register interfaces.
21317         (find_field): Argument cl is now a WFL node. Now store the WFL
21318         node of a fields that needs to be checked for their
21319         initialization.
21320         (method_header): Local variable node non longer used. Local
21321         variable id replaces cl.
21322         (check_modifiers_consistency): Local variable cl is now a WFL
21323         node.
21324         (method_declarator): Local variable cl replaced by parameter id.
21325         (parser_qualified_name): Now uses parameter name as a WFL node.
21326         (parser_check_super_interface): New parameter wfl, for achieve
21327         greater accuracy during error reports.
21328         (parser_chain_incomplete_item): New parameter named location. Used,
21329         along the decl, to construct the incomplete item node.
21330         (java_complete_class): resolve_class now uses WFL node extracted
21331         from the incomplete item node. Macro IC_TYPE replaces TREE_PURPOSE
21332         where appropriate.
21333         (complete_method_decl): Unresolved function's argument types are WFL.
21334         (resolve_class): Parameter cl is now a WFL node.
21335         (resolve_and_layout): Likewise.
21336         (do_resolve_class): Likewise. Try first to use cl and then do the
21337         lookup on the decl when calling check_pkg_class_access.
21338         (complete_class_report_errors): Use IC_TYPE in place of
21339         TREE_PURPOSE where appropriate. Use DEPEND_WFL on dependency
21340         instead of doing a lookup over the decl.
21341         (java_check_final): Use WFL info from field tree list.
21342         (lookup_cl): Rewritten and returns a statically defined WFL node.
21343         (lookup_modifier_cl): Now uses information from WFL nodes.
21344         (process_imports): Likewise.
21345         (read_import_dir): name and cl arguments replaced by a single WFL
21346         node. Function modified accordingly.
21347         (find_in_imports_on_demand): Now uses WFL node.
21348         (check_pkg_class_access): cl argument is now a WFL node.
21349         (declare_local_variables): Fixed to use WFL nodes.
21350         (resolve_expression_name): Likewise.
21351         (build_method_invocation_stmt): name_combo argument renamed
21352         wfl. Function modified to use WFL nodes.
21353         (build_invoke): cl used as a WFL node when calling build_expr_wfl.
21354         (lookup_method_invoke): cl is now a WFL node. Added missing
21355         IDENTIFIER_POINTER to class type decl name.
21356
21357 1998-04-14  Dave Brolley  <brolley@cygnus.com>
21358
21359         * lang.c (init_parse): Now returns char* containing the filename.
21360
21361 1998-04-10  Per Bothner  <bothner@cygnus.com>
21362
21363         * class.c (layout_class):  Mangle repeated arg types to match cc1plus.
21364
21365         * decl.c, java-tree.h (integer_four_node):  New INTEGER_CST node.
21366         * class.c (make_class_data):  If flag_assume_compiled, initial class
21367         state is CSTATE_PREPARED; make superclass and interfaces direct
21368         references, rather than constant pool indexes.
21369
21370 1998-04-09  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21371
21372         * parser.y: Include flags.h. Removed debug variable pl.
21373         (method_declaration:): Uses ctxp->parser_ccb_indent instead of pl.
21374         (block:): Likewise.
21375         (labeled_statement_nsi:): Generate debug info when reducing
21376         expression_statement:.
21377         (check_pkg_class_access): get_access_flags_from_decl invocation
21378         fixed for new CLASS_* flags location.
21379         (source_end_java_method): Save/restore parser context when
21380         entering/leaving this routine. Restore lineno to its right value
21381         before calling expand_end_bindings.
21382         (build_method_invocation_stmt): build_invoke called with the
21383         current line information.
21384         (build_invoke): New argument cl. Wrap the function call around a
21385         wfl node.
21386         (refine_accessible_methods_list): Changed comment, removed
21387         unnecessary code.
21388         * parse.h: Fixed typo in comments.
21389         (CLASS_OR_INTERFACE): Handle the new CLASS_* flags location.
21390         (JAVA_MAYBE_GENERATE_DEBUG_INFO): New macro.
21391         (struct parser_ctxt): New fields ccb_indent, last_ccb_indent1,
21392         parser_ccb_indent.
21393         * lex.c (java_lex): Record the last closing curly bracket of a
21394         function.
21395         * jcf-parse.c (jcf_parse_source): Now calls
21396         java_check_methods. Clarified comment, fixed typo.
21397
21398 1998-04-09  Dave Brolley  <brolley@cygnus.com>
21399
21400         * lang.c (init_parse): Expose for non USE_CPPLIB builds.
21401         (finish_parse): Expose for non USE_CPPLIB builds.
21402
21403 1998-04-08  Jeffrey A Law  (law@cygnus.com)
21404
21405         * lang.c (lang_print_xnode): New function.
21406
21407 1998-04-03  Per Bothner  <bothner@cygnus.com>
21408
21409         * decl.c (class_dtable_decl), java-tree.h:  New tree node.
21410         * class.c (get_dispatch_vector, get_dispatch_table):  New functions
21411         used to build a class's dispatch table.
21412         (make_class_data):  Generate dispatch table if flag_assume_compiled.
21413         Set dtable of class object to address of class_dtable_decl.
21414
21415         * decl.c (int_decl_processing):  Make soft_badarrayindex_node
21416         be volatile and have side effects - generates better code.
21417
21418         * class.c, expr.c, parse.y:  CLASS_INTERFACE, CLASS_FINAL, etc:
21419         These flags were defined for TYPE_DECLs, but used on RECORD_TYPEs.
21420
21421         * expr.c (expand_invoke):  If class is final, method is
21422         effectively final, so can call it directly.
21423
21424         * java-tree.h (TYPE_NVIRTUALS, TYPE_VTABLE):  New macros.
21425
21426         * Makefile.in, Make-lang.in:  Add missing $(exeext)s.
21427
21428 1998-03-19  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21429
21430         * parse.y (build_method_invocation_stmt): Removed extra argument
21431         to build_invoke.
21432
21433 1998-03-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21434
21435         * expr.c (dtable_indent): Now static global.
21436         (expand_invoke): Now call invoke_build_dtable and
21437         build_invokevirtual.
21438         (invoke_build_dtable, build_invokevirtual): New functions.
21439         * jcf-io.c (find_class): Defer issuing a warning by setting
21440         jcf->outofsynch to 1.
21441         * jcf-parse.c (jcf_out_of_synch): New function.
21442         (load_class): Test this_jcf.outofsynch flag and call
21443         jcf_out_of_synch accordingly.
21444         * jcf.h: (typedef struct JCF): New flag outofsynch. Fixed typo in
21445         comment indentation.
21446         * lex.c (java_get_unicode): Fixed code indentation.
21447         (java_lex): Create string literal. Fixed typo. Removed several
21448         premature obstack_free.
21449         * parse.h: New enums for name resolution and invocation mode.
21450         (struct qualification): New data structure.
21451         (RESOLVE_CHAIN_REMAINDER, BUILD_PTR_FROM_NAME): New macros.
21452         (do_resolve_class, build_method_invocation_stmt,
21453         breakdown_qualified, qualify_ambiguous_name, resolve_and_layout,
21454         debug_line, identical_subpath_p, invocation_mode,
21455         refine_accessible_methods_list, build_invoke,
21456         lookup_method_invoke): New functions declared.
21457         (build_invokevirtual, invoke_build_dtable, match_java_method,
21458         build_field_ref, jcf_out_of_synch): New references to external
21459         functions.
21460         (struct parse_ctxt): Removed artificial_constructor field.
21461         * parse.y: (array_type:): Type defined for this rule.
21462         (class_type:): Installed default rule for interface_type:.
21463         (array_type:): Now build Java array type.
21464         (qualified_name:): Now use obstack_grow0.
21465         (method_declaration:): Skip the artificial constructor added to
21466         the list, if any.
21467         (abstract_method_declaration:): Execute the code only during pass 1.
21468         (block:): Installed default rule in block_statements:.
21469         (block_statement:): Add the statement to the method during pass 2.
21470         (statement_expression): Installed default rule for
21471         method_invocation:.
21472         (argument_list:): Added code to build the argument list.
21473         (method_invocation:): Added call to create the method invocation
21474         node.
21475         (yyerror): Now use obstack_grow0. Removed bogus obstack_free.
21476         (debug_line): New function for debug.
21477         (complete_class_decl): No longer do something during pass 1.
21478         (method_header): Use BUILD_PTR_FROM_NAME.
21479         (parser_qualified_classname): Use obstack_grow0. Removed bogus
21480         obstack_free.
21481         (parser_chain_incomplete_item): Use BUILD_PTR_FROM_NAME. Modified
21482         function's main comment.
21483         (java_complete_class): Set CLASS_LOADED_P on all fixed incomplete
21484         classes.
21485         (complete_method_decl): Use BUILD_PTR_FROM_NAME and promote types.
21486         (resolve_class): Now works with arrays.
21487         (do_resolve_class, resolve_and_layout): New functions.
21488         (java_check_regular_methods): Reverse method list before and after
21489         having processed it. No longer set ctxp->artificial_constructor.
21490         (read_import_dir): Test jcf->outofsynch and call jcf_out_of_synch
21491         accordingly. Fixed typo in issued error message. Now use
21492         obstack_grow0.
21493         (find_in_imports_on_demand): Now use obstack_grow0.
21494         (declare_local_variables): Use BUILD_PTR_FROM_NAME.
21495         (source_end_java_method): Call expand_expr_stmt instead of
21496         expand_expr. Calls it before calling expand_function_end.
21497         (java_method_add_stmt): Do nothing if errors were found during
21498         parsing.
21499         (java_layout_parsed_class): Set CLASS_LOADED_P and fixed typo.
21500         (build_method_invocation_stmt, build_invoke, invocation_mode,
21501         lookup_method_invoke, refine_accessible_methods_list,
21502         qualify_ambiguous_name, breakdown_qualified, identical_subpath_p):
21503         New functions.
21504         * typeck.c (build_java_signature): Properly end method signature
21505         if return type skipped.
21506         (match_java_method): New function.
21507
21508 1998-03-16  Per Bothner  <bothner@cygnus.com>
21509
21510         * jcf-io.c (find_classfile):  If USE_JCF_STDIO, fopen in binary mode.
21511
21512 1998-02-25  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21513
21514         * expr.c (build_invoke_non_interface): New function.
21515         (methods_ident, ncode_ident): Now static globals.
21516         (expand_invoke): Use build_invoke_non_interface.
21517         * java-tree.h (struct lang_decl): New field function_decl_body.
21518         (DECL_FUNCTION_BODY): New macro.
21519         * jcf-parse.c (jcf_parse_source): Deeper check before setting
21520         CLASS_FROM_SOURCE_P.
21521         (parse_source_file): Fixed typos. Call java_layout_parsed_class
21522         before starting pass 2. Call to java_generate_parsed_class replaced
21523         by java_register_parsed_class.
21524         * lex.c: Fixed typo in header. Some line width related formating.
21525         * lex.h: Some line width related formating.
21526         * parse.h (source_end_java_method, resolve_expression_name,
21527         complete_class_decl, maybe_create_class_interface_decl,
21528         check_class_interface_creation): New static function declarations.
21529         (java_layout_parsed_class, java_method_add_stmt): New function
21530         declarations.
21531         (struct parser_ctxt): Field mark_class_generate removed. New
21532         fields class_list and artificial_constructor.
21533         * parse.y: Fixed typo in header.
21534         (class_declaration:): Call complete_class_decl when class body
21535         parsed.
21536         (method_declaration:): Call source_end_java_method in pass 2 when
21537         the method body is defined.
21538         (postfix_expression:): Do expression name resolution on sub-rule
21539         name during pass 2.
21540         (create_class, create_interface): Merged common pieces.
21541         (check_class_interface_creation, maybe_create_class_interface_decl):
21542         New functions.
21543         (complete_class_decl): New function.
21544         (register_fields): Fixed line width related typo.
21545         (method_header): Correctly skip first argument when fixing
21546         argument line. Changed the loop.
21547         (java_check_circular_reference): Now use ctxp->class_list.
21548         (java_complete_class): Removed start/stop marking.
21549         (java_check_regular_methods): Now takes a class decl as an
21550         argument.  Add default constructor if none were encountered.
21551         (java_check_methods): Now use ctxp->class_list. Changed call to
21552         java_check_regular_methods.
21553         (source_start_java_method): Set DECL_ARG_TYPE for each function
21554         arguments.
21555         (source_end_java_method, java_method_add_stmt): New functions.
21556         (java_generate_parsed_class): No longer exists.
21557         (java_layout_parsed_class, java_register_parsed_class): New functions.
21558         (resolve_expression_name): New function.
21559
21560 1998-02-12  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21561
21562         * jcf-parse.c: (parse_source_file): Check on errors after init lex.
21563         * lex.c: (java_init_lex): Defer ctxp->java_pass initialization
21564         until pass initializations are done. Call read_import_dir with
21565         pass set to 0.
21566         * parse.h: (lookup_modifier_cl): New function declared.
21567         (INTERFACE_FIELD_MODIFIERS): New macro.
21568         (OBSOLETE_MODIFIER_WARNING): New macro.
21569         * parse.y: (register_fields): Class type and current field name in
21570         local variables. Check modifier(s) if adding field(s) to an interface.
21571         (check_abstract_method_header): Now use OBSOLETE_MODIFIER_WARNING
21572         and report errors using the faulty modifier line context.
21573         (lookup_modifier_cl): New function.
21574         (read_import_dir): Detect and report default import processing
21575         failure.
21576
21577 1998-02-11  Brendan Kehoe  <brendan@cygnus.com>
21578
21579         Add a pair of -fassume-compiled/-fno-assume-compiled options.
21580         * class.c (is_compiled_class): Return 1 after making sure it
21581         qualifies as loaded, if FLAG_ASSUME_COMPILED is set.
21582         * lang-options.h: Add -fassume-compiled/-fno-assume-compiled.
21583         * java-tree.h (flag_assume_compiled): Add decl.
21584         * lang.c (lang_f_options): Add the flag.
21585         (flag_assume_compiled): Add decl, default to 0.
21586
21587 1998-02-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21588
21589         * class.c (class_depth): Call to load_class uses extra VERBOSE arg.
21590         (is_compiled_class): Likewise.
21591         (layout_class): Likewise.
21592         (layout_class): Detect and lay out classes defined in source code.
21593         (interface_of_p, add_interface_do, may_add_interface): New
21594         function.
21595         (add_interface): Now use add_interface_do.
21596         (add_method_1): New function.
21597         (add_method): Now use add_method_1.
21598         (pushlevel): Debug message conditional to SOURCE_FRONTEND_DEBUG.
21599         (complete_start_java_method): New function.
21600         (start_java_mehod): Now call complete_start_java_method.
21601         * expr.c (lookup_field): Call to load_class uses extra VERBOSE arg.
21602         (expand_invoke): Likewise and fixed typo.
21603         *gjava.c: (print_super_field): Use new argument to find_class
21604         DO_CLASS_FILE.
21605         (main): Likewise.
21606         *java-tree.h: (CLASS_FROM_SOURCE_P): New flag on RECORD_TYPE.
21607         (IS_A_SINGLE_IMPORT_CLASSFILE_NAME_P, IS_A_CLASSFILE_NAME,
21608         QUALIFIED_P, IS_AN_IMPORT_ON_DEMAND_P): New flags on
21609         IDENTIFIER_NODE.
21610         (CLASS_COMPLETE_P): New flag on TYPE_DECL.
21611         (add_method_1, push_class): New prototypes.
21612         *jcf-dump.c: find_class now uses new DO_CLASS_FILE argument.
21613         *jcf-io.c: (open_in_zip): jcf now stores a pointer to the Zip
21614         directory where the class was found.
21615         (find_class): New argument DO_CLASS_FILE. Function find_class
21616         modified accordingly.
21617         *jcf-parse.c: (fix_class_path): New function.
21618         (load_class): Use new VERBOSE argument. load_class now finds and
21619         loads/parses .class/.java files. Save read_state of current_jcf
21620         if necessary.
21621         (java_parser_abort_on_error): New macro.
21622         (jcf_parse_source, parse_source_file): New function.
21623         (jcf_parse): Fixed typo.
21624         (yyparse): Call parse_source_file () only.
21625         (process_zip_dir): Fixed typo, fix zdir->filename_length when
21626         writing the real class name back in the zip directory entry.
21627         (find_in_current_zip): IDENTIFIER_CLASS_VALUE may be null.
21628         (jcf_figure_file_type): Fixed bogus alloc and bcopy.
21629         *jcf.h: (typedef struct JCF): New fields java_source and zipd.
21630         (find_class): Prototype fixed.
21631         *lex.c: Added 1998 time stamp.
21632         Removed all static global variables, moved into the parser
21633         context data structure.. Now include unistd.h if SEEK_SET not
21634         defined.
21635         (java_init_lex): Rewritten.
21636         (java_sneak_unicode): Modified current unicode access in current line.
21637         (java_unget_unicode): Likewise.
21638         (java_allocate_new_line): New allocation management.
21639         (java_read_char): Modified access and storage of unget_utf8_value.
21640         New way of processing current unicode.
21641         (java_store_unicode, java_read_unicode): Fixed typo in declaration.
21642         (java_get_unicode): Now use the parser context.
21643         (java_lineterminator): Likewise.
21644         (java_lex): Now used java_lval argument (pointer to YYSTYPE), part
21645         of the reentrant parser implementation. Function now use the
21646         parser context data structure and java_lval. Fixed production of
21647         the float and double constant "out of range" error message. Fixed
21648         obstack use. Return integer value when hitting a modifier. Now
21649         return type for TRUE, FALSE and other predefined types. Return
21650         identifier as a TREE_LIST list containing the current line context
21651         as the TREE_VALUE sub-node.
21652         (java_unicode_2_utf8): Fixed typo in declaration.
21653         (java_lex_error): Now use the parser context data structure.
21654         *lex.h: Added 1998 time stamp.
21655         (struct java_line): New fields ref_count and next.
21656         (JAVA_LINE_CHECK, JAVA_LINE_MARK, JAVA_LINE_CHAIN,
21657         JAVA_LINE_UNMARK, ID_NAME, ID_CL): New macros.
21658         (JAVA_FLOAT_RANGE_ERROR, JAVA_INTEGRAL_RANGE_ERROR, UNGETC): Fixed.
21659         *parse.h: Added 1998 time stamp.
21660         (java_parse_source_file): Renamed from parse_source_file.
21661         (YYERROR_NOW, YYNOT_TWICE): Fixed.
21662         (CLASS_MODIFIERS, FIELD_MODIFIERS, METHOD_MODIFIERS,
21663         INTERFACE_MODIFIER, INTERFACE_METHOD_MODIFIERS,
21664         JAVA_MODIFIER_CTX_UNMARK, IC_DECL, IC_DEPEND, DEPEND_DECL,
21665         THIS_MODIFIER_ONLY, ABSTRACT_CHECK, BEGIN_ONLY_PASS,
21666         END_ONLY_PASS, ELSE_ONLY_PASS, exit_java_complete_class,
21667         CLASS_OR_INTERFACE, INCOMPLETE_P): New macros.
21668         (struct parser_ctxt): New data structure to keep the parser context.
21669         *parse.y: Added 1998 time stamp, got rid of static global variables.
21670         (java_error_count, ctxp): New global variables.
21671         (%union): New value field.
21672         (numeric_type, integral_type): Rules removed.
21673         (primitive_type): Rule defined to handle integral, float, double and
21674         boolean types.
21675         (qualified_name, package_declaration,
21676         single_type_import_declaration, type_import_on_demand_declaration,
21677         modifiers, class_declaration, super, interfaces,
21678         interface_type_list, class_body, field_declaration,
21679         field_declaration, variable_declarators, variable_declarator,
21680         variable_declarator_id, method_declaration, method_header,
21681         formal_parameter_list, formal_parameter, method_body, block,
21682         static, interface_declaration, extends_interfaces,
21683         abstract_method_declaration, local_variable_declarators): Rules now
21684         define actions.
21685         (force_error, do_warning): New global statics.
21686         (push_parser_context, parser_context_save_global,
21687         parser_context_restore_global, pop_parser_context): New functions.
21688         (yyerror): Now uses the global parser context. Fixed use of obstack.
21689         (parse_error, parse_error_context, parse_warning_context,
21690         java_accstring_lookup, redefinition_error, check_modifiers,
21691         parser_add_interface, create_interface, create_class, find_field,
21692         duplicate_declaration_error, register_fields, method_header,
21693         check_modifiers_consistency, check_abstract_method_header,
21694         method_declarator, parser_qualified_classname,
21695         parser_check_super_interface, parser_check_super,
21696         parser_chain_incomplete_item, java_check_circular_reference,
21697         layout_class_from_source, java_complete_class,
21698         complete_method_decl, resolve_class, complete_class_report_errors,
21699         java_check_final, check_method_redefinition,
21700         java_check_regular_methods, java_check_abstract_methods,
21701         java_check_methods, lookup_java_interface_method2,
21702         lookup_java_method2, lookup_cl, find_name_in_single_imports,
21703         process_imports, find_in_imports, read_import_entry,
21704         read_import_dir, find_in_imports_on_demand,
21705         check_pkg_class_access, not_builtin_p, declare_local_variables,
21706         source_start_java_method, java_generate_parsed_class): New
21707         functions.
21708         *typeck.c: (signature_include_return): New global variable.
21709         (build_java_signature): Use SIGNATURE_INCLUDE_RETURN figure whether
21710         to add the function returned type in the signature.
21711
21712 1998-02-09  Brendan Kehoe  <brendan@cygnus.com>
21713
21714         * jcf-io.c (open_in_zip): Use strncmp and LEN.
21715
21716 1998-01-29  Dave Brolley  <brolley@cygnus.com>
21717
21718         * Make-lang.in (java.info): Added.
21719         (java.install-info): Added
21720
21721 1998-01-27  Brendan Kehoe  <brendan@cygnus.com>
21722
21723         * Makefile.in (clean): Also remove java/parse.c.
21724
21725 1998-01-26  Brendan Kehoe  <brendan@cygnus.com>
21726
21727         Add a pair of -fbounds-check/-fno-bounds-check options.
21728         * lang.c (lang_decode_option): Add code to grok arguments.
21729         (flag_bounds_check): Add decl.
21730         (lang_f_options): New array w/ the option in it.
21731         * java-tree.h (flag_bounds_check): Add decl.
21732         * lang-options.h: New file.
21733         * expr.c (build_java_arrayaccess): Use flag_bounds_check instead
21734         of a static macro value.
21735         (JAVA_ARRAY_EXCEPTION): Delete macro.
21736
21737 1998-01-23  Per Bothner  <bothner@cygnus.com>
21738
21739         * typeck.c (build_java_array_type):  Fix two bugs in previous change.
21740         * expr.c (build_anewarray):  Add missing promote_type.
21741
21742 1998-01-22  Per Bothner  <bothner@cygnus.com>
21743
21744         Add array types with known length to optimize bounds checking.
21745         * typeck.c (build_java_array_type):  Take length parameter.
21746         (java_array_type_length, build_prim_array_type):  New functions.
21747         * java-tree.h:  Update for new functions.
21748         * expr.c, typeck.c, verify.c: Update build_java_array_type calls.
21749         * class.c:  Use build_prim_array_type.
21750         * expr.c (can_widen_reference_to):  Handle known-length array types.
21751         (verify_jvm_instructions):  Keep track of integer push instructions
21752         followed by newarray/anewarray, so we can build known-length arrays.
21753         (JAVA_ARRAY_DATA_OFFSET):  Replace by ...
21754         (java_array_data_offset):  New function.
21755         (build_java_array_length_access):  New function.  Optimize if constant.
21756         (build_java_arrayaccess):  Constant fold bounds check.
21757         (expand_java_newarray, expand_java_anewarray):  Replaced by ...
21758         (build_newarray, build_anewarray):  New functions.
21759         (ARRAY_NEW_NUM, ARRAY_NEW_PTR):  Use build_{a,}newarray.
21760         * verify.c (merge_types):  Handle known-lengh array types.
21761
21762 1998-01-19  Per Bothner  <bothner@cygnus.com>
21763
21764         * expr.c (expand_byte_code):  Fix performace bug, which caused
21765         searching linenumber_table to be linear rather than constant.
21766
21767 1997-12-12  Per Bothner  <bothner@cygnus.com>
21768
21769         * Makefile.in (BISON, BISONFLAGS):  Add missing macros.
21770
21771         * decl.c, java-tree.h (soft_fmod_node):  New global.
21772         * decl.c (init_decl_processing):  Define __builtin_fmod.
21773         * expr.c (build_java_binop):  Implement TRUNC_MOD_EXPR for REAL_TYPE
21774         using __builtin_fmod.
21775
21776 1997-12-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21777
21778         * keyword.h: New file, output of keyword.gperf as processed by
21779         gperf.
21780         * lex.c (java_lex_init): Initialize java_error_flag.
21781         * parse.c (YYERROR_NOW): Uses java_error_flag.
21782         * parse.y: New static java_error_flag. Useless definition of
21783         buffer_error gone.
21784         * parse.y (java_error): Portable error recovery using
21785         java_error_flag (not yet completely tuned).
21786
21787 1997-12-04  Brendan Kehoe  <brendan@lisa.cygnus.com>
21788
21789         * Makefile.in (parse.c): Use $(srcdir) for parse.y.
21790
21791 1997-12-03  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21792
21793         * Makefile.in: (JAVA_OBJS): New object jcf-parse.o.
21794         (parse.c, lex.c, keyword.h): New rules for Java source code
21795         front-end.
21796         * parse.c: Renamed into jcf-parse.c.
21797         * jcf-parse.c (yyparse): Invoke the parser to process Java source code.
21798         * keyword.gperf: New file, Java keywords.
21799         * parse.y: New file, Java language grammar.
21800         * parse.h: New file, Java language grammar definitions.
21801         * lex.c: New file, Java language lexer.
21802         * lex.h: New file, Java language lexer definitions.
21803
21804 1997-12-03  Per Bothner  <bothner@cygnus.com>
21805
21806         * decl.c (clinit_identifier_node), java-tree.h:  New global.
21807         * java-tree.h (IS_METHOD_INIT_P, IS_METHOD_CLINIT_P):  Removed.
21808         * verify.c (verify_jvm_instructions):  Inline use of removed macros.
21809         * expr.c (expand_java_field_op):  Check for invalid assignment
21810         to final field.
21811
21812         * jcf-reader.c (get_attribute):  Test for wrong attribute length.
21813
21814 1997-10-27  Per Bothner  <bothner@cygnus.com>
21815
21816         * verify.c (verify_jvm_instructions):  When processing a handler,
21817         attempt to set the current_subr to the right value.
21818         (More complicated code combines Sep 17 and Oct 22 versions.)
21819
21820 1997-10-24  Per Bothner  <bothner@cygnus.com>
21821
21822         * class.c (push_class):  Figure out (guess) name of source file.
21823         * parse.c  (set_source_filename):  Set DECL_SOURCE_FILE of class decl.
21824         (give_name_to_class):  Don't guess source name;  use DECL_SOURCE_FILE.
21825         (parse_class_file):  Change return type from int to void.
21826         Call debug_start_source_file/debug_end_source_file.
21827
21828         * expr.c (build_java_binop):  Fix masking 2nd operand.
21829         * decl.c (init_decl_processing):  Set sizetype first.
21830
21831 1997-10-22  Per Bothner  <bothner@cygnus.com>
21832
21833         * verify.c (verify_jvm_instructions):  Don't set current_subr to NULL.
21834         (Revert Sep 17 change.)
21835
21836 1997-10-21  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21837
21838         * parse.c (process_zip_dir): Skip ZIP entries not bearing the
21839         .class extension in their name and fix thing so we don't process
21840         them parse_zip_file_entries().
21841         (parse_zip_file_entries): Cleaned unused local variables.
21842
21843 1997-10-20  Per Bothner  <bothner@cygnus.com>
21844
21845         * expr.c (can_widen_reference_to):  Allows equal array element types.
21846         (expand_byte_code):  PRE_RET must expand OPERAND_VALUE (to get index).
21847         * jcf-dump.c (RET):  Get (and print) index.
21848
21849         * verify.c (verify_jvm_instructions case OPCODE_anewarray):
21850         Promote element type to POINTER_TYPE.
21851
21852 1997-10-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21853
21854         * jcf-reader.c, parse.c: (parse_zip_file, process_zip_dir,
21855         find_in_current_zip, jcf_figure_file_type): Moved from
21856         jcf-reader.c to parse.c.
21857         * zextract.c: (read_zip_archive): takes file_comment_length possible
21858         field into account.
21859
21860 1997-10-20  Per Bothner  <bothner@cygnus.com>
21861
21862         * verify.c (verify_jvm_instructions):  Var can also be promoted to int.
21863
21864         * verify.c (merge_types):  Handle array types even better ...
21865
21866 1997-10-17  Per Bothner  <bothner@cygnus.com>
21867
21868         * expr.c (java_stack_pop):  Fix use of NULL_TREE for TYPE_SECOND.
21869
21870         * java-tree.h (PUSH_FIELD):  Set DECL_ARTIFICIAL.
21871         * class.c (make_class_data):  Don't build fields_decl if no fields.
21872         When building fields_decl, skip if DECL_ARTIFICIAL.
21873
21874         * expr.c (java_stack_swap):  Update stack_type_map.
21875         * verify.c (merge_types):  Handle array types better.
21876
21877 1997-10-15  Per Bothner  <bothner@cygnus.com>
21878
21879         * class.c (add_field):  Don't promote short integral fields to
21880         int any more (unless JAVA_PROMOTE_TO_INT), since Kaffe doesn't.
21881         * expr.c (push_value):  Promote and convert short integral values.
21882
21883         * decl.c, java-tree.h (integer_two_node):  New constant node.
21884         * verify.c (merge_types):  Check for TYPE_RETURN_ADDR.
21885
21886 1997-10-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21887
21888         * class.c (append_gpp_mangled_type): Use function argument
21889         unpromoted type to generate mangled name.
21890
21891 1997-10-13  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21892
21893         * constants.c (build_constant_data_ref): Now uses current_class
21894         instead of main_class.
21895         (build_constants_constructor): Now uses current_class instead of
21896         main_class.
21897         * zipfile.h: (struct ZipFileCache): Now defined here. Declaration
21898         of the global variable SeepZipFiles done here.
21899         * zextract.c (read_zip_archive): extra_field optional field taken
21900         into account while computing the position of the class file in the
21901         archive.
21902         * verify.c (verify_jvm_instructions): Use current_jcf to search
21903         the constant pool.
21904         * parse.c (load_class): First search for the class to load in the
21905         current zip file. Saves current_jcf (restored before returning
21906         from that function). Don't call JCF_FINISH in the class was found
21907         in the current ZIP file.
21908         (jcf_parse): If the class was found in the current ZIP file, save
21909         its tree_constant_pool (for later reuse).
21910         (parse_class_file): New function. Process each method defined in
21911         the current class and record the class as to be later registered.
21912         (yyparse): Rewritten. Figure the type of the current file and switch
21913         accordingly.
21914         * lang.c: New global variable current_jcf.
21915         (lang_init): Removed compiling_from_source test (done later, in
21916         yyparse). Removed call the jcf_parse ().
21917         * jcf.h (JCF_ZIP, JCF_CLASS, JCF_SOURCE): New defined values.
21918         (typedef struct JCF): New fields seen_in_zip (to mark a class found
21919         in the current ZIP file) and zip_offset (offset to the class data in
21920         the current zip file).
21921         * jcf-reader.c: zipfile.h included.
21922         localToFile: New ZipFileCache static global variable
21923         (parse_zip_file_entries): New function. Browse the current ZIP
21924         file directory and process each class found.
21925         (process_zip_dir): New function. Register each class found in the
21926         ZIP file directory. The class aren't parsed but a valid JCF is
21927         link to each of them.
21928         (find_in_current_zip): New function. Search for a class in the
21929         current ZIP file directory. If found, prepare the class so that it
21930         can be loaded.
21931         (jcf_figure_file_type): New function. Examine the file structure
21932         to figure a class file, a ZIP file. If none of these categories are
21933         matched, a source file is assumed.
21934         * jcf-io.c: Removed definition of ZipFileCache (moved in zipfile.h).
21935         SeenZipFile: New global variable.
21936         (open_in_zip): Use zipmember's length to accelerate the search for
21937         a member. If zipmember was NULL and zip file successfully read,
21938         return 0.
21939         * java-tree.h: New global variable current_jcf declared.  Added
21940         declaration for current_constant_pool_tags, current_constant_pool_data,
21941         current_constant_pool_length, current_constant_pool_data_ref.
21942         (struct lang_type): Augmented with two fields. struct JCF *jcf (to
21943         store the JCF of classes seen in a zip file) and tree *constant_pool
21944         (to save a loaded class constant pool). current_class declared here.
21945         * expr.c (expand_invoke): Use current_jcf instead of main_jcf to
21946         retrieve method_ref_constant.
21947         (PUSHC): java_push_constant_from_pool now uses current_jcf.
21948         (OBJECT): get_class_constant now uses current_jcf.
21949         (ARRAY_NEW_PTR): get_class_constant now uses current_jcf.
21950         (ARRAY_NEW_MULTI): get_class_constant now uses current_jcf.
21951         (expand_invoke): Now uses current_class instead of main_class
21952         (build_class_init): Now uses current_class instead of main_class
21953         * class.c: New static global variable registered_class.
21954         (register_class): New function.
21955         (emit_register_class): Modified to use registered_class instead of
21956         main_class
21957         (is_compiled_class): Now take into account class seen in the archive.
21958
21959 1997-10-06  Per Bothner  <bothner@cygnus.com>
21960
21961         * except.h:  Renamed to: java-except.h.
21962         * parse.c, except.c, expr.c, verify.c:  Update #include accordingly.
21963         * except.c:  Add semi-working (commented out) implementation.
21964
21965         * expr.c (expand_iinc):  Add needed flush_quick_stack.
21966         * parse.c (set_source_filename):  New function.
21967         (give_name_to_class):  Set input_filename from package.classname.java.
21968
21969         * jcf-io.c (find_class):  Don't look first in ".".
21970
21971 1997-10-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21972
21973         * zextract.c (read_zip_archive): Now takes into account the
21974         extra_field field.
21975         * expr.c (can_widen_reference_to): Modified to handle sub-interfaces.
21976
21977 1997-09-20  Per Bothner  <bothner@cygnus.com>
21978
21979         * constants.c, java-tree.h (build_internal_class_name):  New function.
21980         (alloc_class_constant):  Re-implement using build_internal_class_name.
21981         * class.c (make_class_data):  Likewise.
21982         * class.c (hashUtf8String):  Make hash algorithm match String.hashCode.
21983
21984 1997-09-17  Per Bothner  <bothner@cygnus.com>
21985
21986         * verify.c (verify_jvm_instructions):  Temporarily set current_subr
21987         to NULL before pushing an exception handler target.
21988
21989         * expr.c (flush_quick_stack):  Save from low stack indexes to high.
21990         (java_stack_swap, java_stack_dup):  Re-write to be safe from
21991         clobbering registers.
21992         (build_class_init):  New function.
21993
21994 1997-09-17  Alexandre Petit-Bianco  <apbianco@cygnus.com>
21995
21996         * typeck.c (build_java_array_type): Temporary use
21997         permanent_obstack to create the array 'length' field.
21998         * expr.c (lookup_label): Temporay use permanent_obstack to create
21999         label if not found.
22000         * class.c (push_super_field): Tempory use permanent_obstack.
22001
22002 1997-09-15  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22003
22004         * typeck.c (type_for_mode): Now handles double_type_node and
22005         float_type_node.
22006         * verify.c (verify_jvm_instructions): The instruction following
22007         the wide bytecode is checked. OPCODE_ret added to the list of
22008         wide.
22009
22010 1997-09-11  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22011
22012         * class.c (make_class): Temporary use permanent_obstack. Set the
22013         class CLASS_P field to 1.
22014         (push_class): Temporary use permanent_obstack.
22015         (set_super_info): Temporary use permanent_obstack.
22016         (add_method): Temporary use permanent_obstack, set
22017         METHOD_TRANSIENT().
22018         (add_field): Temporary use permanent_obstack. Sets
22019         FIELD_VOLATILE() and FIELD_TRANSIENT().
22020         (build_class_ref): Temporary use permanent_obstack if the class
22021         isn't compiled.
22022         (build_static_field_ref): Temporary use permanent_obstack when
22023         creating field's rtl.
22024         (get_access_flags_from_decl): Handle ACC_VOLATILE, ACC_TRANSIENT,
22025         ACC_SYNCHRONIZED, ACC_NATIVE, ACC_ABSTRACT flags for methods
22026         and fields. Function finalized, as far as flag handling.
22027         (push_class_static_dummy_field): Temporary use permanent_obstack.
22028         (emit_register_class): Force generation of class registration at
22029         -O3 or deeper.
22030         * decl.c (end_java_method): Call permanent_allocation() before
22031         returning.
22032         * expr.c (can_widen_reference_to): Added comment to interface
22033         handling, fixed typo.
22034         (lookup_field): Now uses CLASS_P() to correct FIXME
22035         (expand_invoke): Verification on public && !static &&
22036         !abstract moved into soft_lookupinterfacemethod (kaffe).
22037         Use Object class dtable if objectref is an array when expanding
22038         invokeinterface.
22039         (java_push_constant_from_pool): Temporary use permanent_obstack
22040         for CONSTANT_string
22041         * parse.c (get_ref_constant): Temporary use permanent_obstack to
22042         create constant references.
22043         (get_constant): Temporary use permanent_obstack to create constant.
22044         (load_class): Temporary use permanent_obstack to load class.
22045         (jcf_parse): Temporary use permanent_obstack to perform class
22046         layout.
22047         * typeck.c: (parse_signature_string): Temporary use permanent_obstack.
22048         (build_java_signature): Temporary use permanent_obstack.
22049         * verify.c: (verify_jvm_instruction): removed unnecessary verification
22050         on ACC_SUPER flag.
22051         * java-tree.h (METHOD_NATIVE, METHOD_TRANSIENT): Defined.
22052         (FIELD_VOLATILE, FIELD_TRANSIENT): Defined.
22053         (CLASS_P): Defined
22054
22055 1997-09-11  Per Bothner  <bothner@cygnus.com>
22056
22057         * class.c (append_gpp_mangled_type):  Fix typo.
22058         (emit_register_class):  Use main_class to get class object, rather
22059         than looking for no-longer-existing static decl starting with _CL.
22060         * typeck.c (parse_signature_type):  Promote array element type
22061         if it is a RECORD_TYPE.
22062
22063 1997-09-10  Per Bothner  <bothner@cygnus.com>
22064
22065         * class.c (push_class_static_dummy_field):  New function.
22066         (mangle_static_field):  New. Do G++-style mangling of static fields.
22067         (layout_class):  Mandle static fields here, not in add_field.
22068         (build_class_ref):  The class object is now a dummy static field.
22069         * decl.c (find_local_variable):  Look for best, instead of first match.
22070         * expr.c (push_type):  Always promote_type, not just for RECORD_TYPE.
22071         (build_java_athrow):  Don't check here if exception is Throwable.
22072         * java-tree.h (TYPE_UNSET):  Renamed to TYPE_UNKNOWN.
22073         (TYPE_USED):  Removed.  No longer used ...
22074         * parse.c (jcf_parse):  Call push_class_static_dummy_field.
22075         * verify.c (push_pending_label):  New function.
22076         (push_pending_block):  Renamed to check_pending_block.
22077         (merge_types):  Remove unneeded suuport for TYPE_UNUSED.
22078         (verify_jvm_instructions):  Only reset prev_eh_ranges (to force
22079         re-checking possible handlers) after a store (less wasted work).
22080         Check for null handler (finally) before calling add_handler.
22081         Various changes to (finally?) correctly handle try/finally.
22082
22083 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
22084
22085         * class.c: Include stdio.h.
22086
22087 1997-09-04  Per Bothner  <bothner@cygnus.com>
22088
22089         * expr.c (expand_invoke):  Use COMPOUND_EXPR (and TREE_SIDE_EFFECTS)
22090         to make sure class is initialized before static/special invoke.
22091
22092         * verify.c (verify_jvm_instructions):  On a store instruction,
22093         call find_local_variable to force pre-allocation of decl and rtx.
22094         * decl.c (push_jvm_slot):  Set DECL_REGISTER on stack slots.
22095
22096 1997-09-03  Per Bothner  <bothner@cygnus.com>
22097
22098         * class.c (build_class_ref):   Strip off "promoted_" if need be.
22099         (make_field_value): Call build_java_signature when needed.
22100         (layout_class):  Don't make_function_rtl if METHOD_ABSTRACT.
22101         * expr.c (build_java_athrow):  Don't push_value of exception.
22102         (build_java_binop):  Implement COMPARE_L_EXPR and COMPARE_G_EXPR to
22103         match specification of [fd]cmp[lg] for NaNs.
22104         (expand_byte_code):  Add support for exception handler ranges.
22105         * except.c:  Add skeleton for EH code-generation.
22106         * verify.c (merge_types):  Treat all promoted integral types as equal.
22107         * constants.c (build_constants_constructor):  To force creation of
22108         current_constant_pool_data_ref, call build_constant_data_ref.
22109
22110         * javaop.def (lload):  Fix typo.
22111         * jcf-dump.c (main):  Clear filename to prevent possibly-bad free.
22112
22113 1997-09-02  Brendan Kehoe  <brendan@lisa.cygnus.com>
22114
22115         * parse.c: Don't include function.h.
22116
22117 1997-08-27  Per Bothner  <bothner@cygnus.com>
22118
22119         * except.[ch]:  New files.
22120         * Makefile.in (JAVA_OBJS):  Add except.o
22121         * expr.c:  Temporary warning about unimplemented exceptions.
22122         * verify.c:  Verify exception handlers.
22123
22124         * jcf-dump.c (disassemble_method):  Print exception table.
22125
22126 1997-08-27  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22127
22128         * expr.c (verify_jvm_instructions): Started a thorough
22129         verification of invoke* bytecodes.
22130         (expand_byte_code): flush quick stack if PC is the target of a
22131         branch.  and undef RET (conflicting with config/i386/i386.h).
22132         (expand_java_arrayload): Fixed bogus cast, when Boolean type is
22133         used.
22134         (expand_invoke): Now handles invokeinterface and do more
22135         verification according to the bytecode.
22136         (lookup_field): Don't try to load the class if processing
22137         dtable_type.
22138         (can_widen_reference_to): Now handles interfaces.
22139         * decl.c (init_decl_processing): New global variable
22140         soft_lookupinterfacemethod_node, declared in java-tree.h.
22141         Call set_super_info on string_type_node.
22142         * java-tree.h (CLASS_INTERFACE, CLASS_ABSTRACT, CLASS_SUPER): Now
22143         defined.
22144         * class.c (set_super_info): Fills the CLASS_* flags according to
22145         access_flags.
22146         (get_access_flags_from_decl): Handles all class flags.
22147
22148 1997-08-26  Per Bothner  <bothner@cygnus.com>
22149
22150         * class.c (add_method):  Zero out newly-allocated DECL_LANG_SPECIFIC.
22151         * parse.c (yyparse):  Check for abstract method, and missing code.
22152         * expr.c (expand_byte_code):  Change interface.
22153         * lang.c (put_decl_node):  Print promoted types prettier.
22154         * verify.c (verify_jvm_instruction):  Change interface.
22155         Partial support for scanning exception table.
22156         For load instructions, handle promoted integral types.
22157
22158 1997-08-21  Per Bothner  <bothner@cygnus.com>
22159
22160         * verify.c:  New file, with contents moved from expr.c.
22161         * expr.c:  Bunch of stuff (mostly verification) moved to verify.c.
22162         * typeck.c (is_array_type_p):  Moved here from expr.c.
22163         * java-tree.h:  Add some now-needed function declarations.
22164         * Makefile.in (JAVA_OBJS): Added verify.o.
22165
22166 1997-08-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22167
22168         * class.c (add_method): Sets the METHOD_SYNCHRONIZED flag, sets the
22169         METHOD_ABSTRACT flag.
22170
22171         * java-tree.h (METHOD_SYNCHRONIZED): Set to DECL_LANG_FLAG_4.
22172         (IS_METHOD_CLINIT_P, IS_METHOD_INIT_P): New macros.
22173         (METHOD_ABSTRACT): Set to DECL_LANG_FLAG_5
22174
22175         * decl.c (soft_monitorenter_node, soft_monitorexit_node): New global
22176         variables.
22177         (start_java_method): Hook for SYNCHRONIZED methods.
22178
22179         * expr.c (build_java_jsr, build_java_ret): New functions
22180         (JSR,PRE): New macros
22181         (PRE_TABLE_SWITCH, PRE_LOOKUP_SWITCH): Fixed and secured.
22182         (verify_jvm_instructions): tableswitch, lookupswitch,
22183         monitorenter, monitorexit, goto_w: verified.
22184         (LOOKUP_SWITCH, TABLE_SWITCH): Fixed generation of default: label
22185         (build_java_monitor): New function.
22186         (MONITOR_OPERATION): Modified to call build_java_monitor()
22187         (verify_jvm_instructions): Started a thorough verification of
22188         invoke* bytecodes.
22189
22190 1997-08-19  Per Bothner  <bothner@cygnus.com>
22191
22192         Support verification of jsr/ret subroutines (used for try/finally).
22193         * decl.c (return_address_type_node):  New type node.
22194         * java-tree.h (LABEL_RETURN_LABEL, LABEL_RETURN_TYPE_STATE,
22195         RETURN_MAP_ADJUSTED, LABEL_RETURN_LABELS, LABEL_IN_SUBR,
22196         LABEL_SUBR_START, LABEL_SUBR_CONTEXT, BCODE_VERIFIED):  New macros.
22197         (TYPE_UNSET, TYPE_SECOND, TYPE_NULL, TYPE_RETURN_ADDR, TYPE_UNUSED,
22198         TYPE_USED):  New macros for special types in type_map.
22199
22200         * java-tree.h (BCODE_JUMP_TARGET):  Renamed to BCODE_TARGET.
22201         (BCODE_BACKWARDS_TARGET, CODE_FORWARDS_TARGET):  Replaced by
22202         BCODE_JUMP_TARGET.
22203         * expr.c (expand_byte_code):  Fix logic to warn of unused instructions.
22204
22205         * expr.c (can_widen_reference_to):  New function.
22206         (pop_type):  Use it.
22207         (merge_type_state):  Support handling start of subroutine.
22208         (push_pending_block):  Return char* error message, instead of calling
22209         fatal on an error.  Also handle subroutines.
22210         (verify_jvm_instructions):  Handle errors from push_poending_block.
22211         Support jsr and ret instructions.
22212
22213 1997-08-19  Per Bothner  <bothner@cygnus.com>
22214
22215         * jcf-io.c (find_classfile):  Fix thinko.
22216         * jcf-dump.c:  Add CONVERT2 (to match changed javaop.def).
22217
22218 1997-08-12  Jason Merrill  <jason@yorick.cygnus.com>
22219
22220         * Makefile.in (BISON): Remove.
22221
22222 1997-08-07  Per Bothner  <bothner@cygnus.com>
22223
22224         * Makefile.in:  Convert to autoconf.
22225         * config-lang.in (outputs):  Added java/Makefile.
22226
22227         * Make-lang.in, lang-specs.h, config-lang.in, Makefile.in:
22228         Rename cc1java to jc1.
22229
22230         * lang.c (init_parse, finihs_parse):  New functions #ifdef USE_CPPLIB.
22231         * Makefile.in (INTERNAL_CFLAGS):  Add @extra_c_flags.
22232
22233         * class.c (class_depth):  Do load_class if needed.
22234
22235         Mostly better verification.
22236         * decl.c (pushdecl):  Set TYPE_STUB_DECL for a type.
22237         (init_decl_processing):  Change return type of soft_checkcast.
22238         * expr.c (expand_java_CHECKCAST):  Do push_value of the "casted" value.
22239         * lang.c (put_decl_string, put_decl_node, lang_printable_name,
22240         lang_print_error):  New functions.
22241         (lang_init):  Set global hook print_error_function to lang_print_error.
22242         * expr.c:  In the type_map ptr_type_node is only used for null now.
22243         (pop_type, merge_types):  Hence ptr_type_node matches any reference.
22244         (merge_types):  Dererence pointer to record types before comparing.
22245         (decode_newarray_type, merge_types):  On error just return NULL.
22246         (build_java_binop):  Add preliminary implementation (with warning)
22247         for COMPARE_L_EXPR and COMPARE_G_EXPR (i.e. [fd]cmp[lg]).
22248         (lookup_label):  Set DECL_IGNORED_P (for dwarf2out).
22249         (expand_compare, expand_java_goto, expand_java_call):  Don't
22250         push_pending_block, since that only makes sense when verifying.
22251         (merge_type_state):  Different return codes.
22252         (push_pending_block):  A block may need to be verified more than once.
22253         (expand_byte_code):  Warn about unused code at code generation time.
22254         (verify_jvm_instruction):  Changed logic, since code may need to be
22255         re-verified if type-state has changed.  Also, better error handling.
22256         Implement acmpeq, acmpne, pop, pop2, swap, checkcast, instanceof.
22257         Improve newarray, anewarray, ?aload, athrow,
22258         * java-tree.h (LABEL_CHANGED):  New macro.
22259
22260 1997-08-05  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22261
22262         * decl.c (soft_athrow_node): New global variable initialized.
22263         * javaop.def (i2b, i2c, i2s): Invoke CONVERT2
22264         * typeck.c (convert): Added support for REAL_TYPE.
22265         (convert_to_char): New function.
22266         (convert): Handle CHAR_TYPE.
22267         * expr.c (expand_java_arraystore): Modified because CHAR/BYTE/BOOLEAN/
22268         SHORT now expect INT but store as CHAR/BYTE/BOOLEAN/SHORT.
22269         (expand_java_arrayload): CHAR/BYTE/BOOLEAN/SHORT now convert result to
22270         promoted type.
22271         (verify_jvm_instructions): Added break a the end of bogus unop: label.
22272         (OPCODE_<b|c|s>astore): Pop an int operand from the type stack
22273         (OPCODE_<b|c|s>astore): Push the promoted type onto the stack
22274         (process_jvm_instruction): New macro CONVERT2 for i2c, i2s and i2b.
22275         (JAVA_ARRAY_LENGTH_OFFSET, JAVA_ARRAY_DATA_OFFSET): Modified
22276         to Use The Right Things.
22277         (pop_type): Accept CHAR/BYTE/BOOLEAN/SHORT promoted type as
22278         compatible with INT. BOOLEAN is made equivalent to BYTE.
22279         (OPCODE_athrow, OPCODE_aconst_null, OPCODE_ifnull,
22280         OPCODE_ifnonnull): Now supported.
22281         (build_java_athrow): New function.
22282
22283 1997-08-04  Per Bothner  <bothner@cygnus.com>
22284
22285         Rename method name <init> to match G++ (and fix mangling).
22286         * class.c (layout_class):  Replace method name of <init> by class name.
22287         (make_method_value):  Do inverse renaming of constructor from <init>.
22288         * java-tree.h (DECL_CONSTRUCTOR_P):  New macro.
22289         * typeck.c (lookup_java_constructor):  New function.
22290         * expr.c (expand_invoke):  If method_name is <init>, call
22291         lookup_java_constructor to find constructor.
22292
22293         * parse.c (get_constant):  Handle CONSTANT_Float and CONSTANT_Double.
22294
22295 1997-08-01  Alexandre Petit-Bianco  <apbianco@cygnus.com>
22296
22297         * parse.c (get_class_constant): Modified to handle array "classes"
22298         * typeck.c (set_local_type): Bug fixed when filling type_map[] with
22299         wide type.
22300         (convert): Modified to handle real type.
22301         * java-tree.h (soft_badarrayindex_node, soft_anewarray_node,
22302         soft_multianewarray, soft_newarray_node, soft_throw_node): New global
22303         variables declared.
22304         * decl.c (soft_badarrayindex_node, soft_anewarray_node,
22305         soft_multianewarray, soft_newarray_node, soft_throw_node): New
22306         global variables initialized.
22307         (find_local_variable): Handles the case of a pointer
22308         (end_java_method): Restore the use of one more scope
22309         * expr.c (build_java_arraynull_check, build_java_arrayaccess,
22310         build_java_array_length_access, expand_java_arrayload,
22311         expand_java_arraystore, expand_java_array_length,
22312         expand_java_multianewarray, expand_java_anewarray,
22313         build_java_check_indexed_type, is_array_type_p,
22314         build_java_throw_out_of_bound_exception): New functions.
22315         (STORE_INTERNAL): Now forces type of the decl to be type of the value.
22316         (OPCODE_arraylength, OPCODE_newarray, OPCODE_<t>astore,
22317         OPCODE_<t>aload): Implemented code for verification.
22318         (ARRAY_STORE, ARRAY_LOAD, ARRAY_LENGTH, ARRAY_NEW_PTR, ARRAY_NEW_NUM
22319         ARRAY_NEW_MULTI): Macro defined.
22320         (CONVERT): Modified to invoke convert().
22321         (case OPCODE_aload2): Fixed index typo from 2 to 1.
22322
22323 1997-07-31  Per Bothner  <bothner@cygnus.com>
22324
22325         * class.c (push_class):  Set DECL_ARTIFICIAL (for dbxout.c).
22326         (build_class_ref, is_compiled_class):  Handle pointer-to-record types.
22327         (make_class_data):  Field name needs '/' as package prefix.
22328         * expr.c (type_stack_dup, java_stack_dup):  Fix fencepost errors.
22329
22330 1997-07-25  Per Bothner  <bothner@cygnus.com>
22331
22332         Implement debug information for local variables.
22333         * java-tree.h (DECL_CODE_LENGTH, DECL_ARG_SLOT_COUNT,
22334         DECL_LOCAL_SLOT_NUMBER, DECL_LOCAL_START_PC, DECL_LOCAL_END_PC,
22335         DECL_LOCAL_SLOT_CHAIN):  New macros.
22336         (struct lang_decl_var):  New type.
22337         * parse.c (give_name_to_locals):  Move to decl.c.
22338         * decl.c (give_name_to_locals):  Re-written to Do The Right Thing.
22339         (start_java_method):  Re-write parameter handling.
22340         (pending_local_decls):  New global variable.
22341         (push_jvm_slot, maybe_pushlevels, maybe_poplevels):  New functions.
22342         (find_local_variable):  Accept pc so we can skips decls not in range.
22343         (struct binding_level):  Add end_pc field.
22344         * expr.c (expand_byte_code): Call maybe_pushlevels and maybe_poplevels.
22345         (various):  Change so current pc gets passed to find_local_variable.
22346
22347         * decl.c (init_decl_processing):  Re-arrange fields in
22348         class_type_node and and method_type_node to match kaffe 0.9.1.
22349         * class.c (make_method_value, make_class_data):  Update
22350         initializations to match.
22351
22352 1997-07-16  Per Bothner  <bothner@cygnus.com>
22353
22354         * class.c (unicode_mangling_length, emit_unicode_mangled_name,
22355         append_gpp_mangled_name, append_gpp_mangled_type):  New functions.
22356         (push_super_field):  New function.
22357         (make_class_data):  Handle inheritance of class static initializer.
22358         (layout_class):  New name mangling.
22359         * constants.c (build_constant_data_ref):  Init type of data array
22360         to a one-element array.
22361         (build_constants_constructor):  Set DECL_SIZE from complete array type.
22362         * decl.c:  Rename class_type, object_type etc to class_type_node,
22363         object_type_node etc.  Make former inherit from latter.
22364         * expr.c (expand_invoke):  Add cast of function address.
22365         * java-tree.h (TYPE_ARRAY_ELEMENT, PUSH_SUPER_VALUE):  New.
22366         * parse.c (yyparse):  Don't call layout_class here.
22367         * typeck.c (build_java_array_type):  Set TYPE_ARRAY_ELEMENT.
22368
22369 1997-06-14  Per Bothner  <bothner@cygnus.com>
22370
22371         * decl.c, class.c:  Update method type to match latest Kaffe snapshot.
22372         * constants.c (lookup_name_constant):  Renamed to alloc_name_constant.
22373         (alloc_class_constant):  New.
22374         * expr.c (expand_invoke):  Make sure method's class is initialized.
22375         * class.c (interits_from_p, emit_register_class):  New functions.
22376         * parse.c (yyparse):  Call emit_register_class.
22377
22378 1997-06-09  Per Bothner  <bothner@cygnus.com>
22379
22380         * constants.c:  New file, to handle constant pool.
22381         * Makefile.in (JAVA_OBJS):  Add constants.o.
22382         * decl.c (init_decl_processing):  Update, fix, finish various structs.
22383         (pushdecl_top_level):  New.
22384         * parse.c (layout_class):  Moved to class.c.
22385         * expr.c (java_push_constant_from_pool):  New function.
22386         * class.c (build_class_ref):  Make work fully
22387         (make_class_data):  Emit super-class, constant pool, interface vector.
22388
22389 1997-06-03  Per Bothner  <bothner@cygnus.com>
22390
22391         java-tree.h (DECL_SIGNATURE, BCODE_EMITTED):  Remove.
22392         (LABEL_VERIFIED, BCODE_EXCEPTION_TARGET, TYPE_ARRAY_P):  New.
22393         * class.c (class_depth):  New function.
22394         (lookup_named_class):  Replaced by new function lookup_class.
22395         * decl.c (object_type_node, string_type_node):  New.
22396         Remove various types that we no longer need.
22397         * expr.c (verify_jvm_instructions):  New separate verifier pass.
22398         (push_type, pop_type):  New functions for verifier.
22399         (type_stack_dup, pop_argument_types, merge_types):  Likewise.
22400         (expand_byte_code):  Simplify, since we assume already verified.
22401         (expand_invoke):  Now mostly works.
22402         * javaop.def:  Rename ldc1->ldc, ldc2->ldc_w, ldc2w->ldc2_w.
22403         * lang.c (main_class):  Move to parse.c.  Don't make_class yet.
22404         * parse.c:  Wait to allocate class object until we know its name.
22405         (layout_class):  Calculate DECL_VINDEX for each virtual method.
22406         * typeck.c (get_array_type):  Rename to ...
22407         (build_java_array_type):  ... and provide working implementation.
22408         (build_java_signature):  New function - build Java signature of type.
22409         (set_java_signature):  New function - cache signature with type.
22410         (lookup_java_method):  New function.
22411
22412 1997-05-06  Per Bothner  <bothner@deneb.cygnus.com>
22413
22414         * class.c (ident_subst):  Take extra SUFFIX parameter.
22415         (add_field):  Set DECL_ASSEMBLER_NAME of static fields;  more.
22416         (set_constant_value, build_static_field_ref, is_compiled_class):  New.
22417         (build_class_ref):  Actually implement.
22418         * decl.c, java-tree.h:  Renamed some xx_type to xx_type_node.
22419         * decl.c (builtin_function):  New.
22420         (init_decl_processing):  Update for current Kaffe.  Declare some
22421         builtin Kaffe functions.
22422         * expr.c (build_address_of):  New.
22423         (expand_java_NEW, expand_java_INSTANCEOF, expand_java_CHECKCAST):
22424         Renamed (from expand_java_new etc), and added working implementations.
22425         (build_field_ref):  Now also handle static fields.
22426         (expand_invoke):  Implement invokestatic, and start implement rest.
22427         * java-opcodes.h:  Use javaop.def to avoid duplicated list.
22428         * javaop.def:  Rename invokevirt -> invokevirtual.
22429         * lang.c (use_handles):  Removed.
22430         * parse.c:  Add support for ConstantValue attribute.
22431         Handle nested loading of a class.  (JPOOL_UTF):  New.
22432
22433 1997-03-11  Per Bothner  <bothner@deneb.cygnus.com>
22434
22435         * expr.c (expand_java_pushc):  Support #ifndef REAL_ARITHMETIC case.
22436
22437 1997-02-27  Per Bothner  <bothner@deneb.cygnus.com>
22438
22439         * Make-lang.in (java.install-man):  New empty rule.
22440         * typeck.c (set_local_type):  New function.
22441         * expr.c (STORE_INTERNAL):  Call find_local_variable,
22442         not find_stack_slot.  Call set_local_type.
22443
22444 1997-02-12  Per Bothner  <bothner@kalessin.cygnus.com>
22445
22446         * java-tree.h:  Various new macros for constructing RECORD_TYPEs,
22447         and building RECORD_TYPE CONSTRUCTORs.
22448         Also support for creating Utf8Const objects from an INDETIFIER_NODE.
22449
22450         * lang.c (use_handles):  Change the default to 0.
22451         * decl.c:  Define and build class_type, field_type, utf8const_type.
22452         * class.c (make_class_data, make_field_value,
22453         get_access_flags_from_decl, build_class_ref, build_utf8_ref,
22454         hashUtf8String, strLengthUtf8, mangled_classname:
22455         Functions to build reflective data structures.
22456         * parse.c (yyparse):  Call make_class_data.
22457
22458         * jcf-io.c (open_class, find_classfile):  New functions.
22459         * jcf-dump.c:  Support reading classfile from explicitly-named
22460         class file (without CLASSPATH searching).
22461
22462 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22463
22464         * jcf-reader.c:  Add parameter list to HANDLE_CONSTANT_Utf8.
22465         * parse.c (JPOOL_UTF_LENGTH, JPOOL_UTF_DATA, HANDLE_CONSTANT_Utf8):
22466         Override jcf-reader macros so CONSTANT_Utf8 becomes tree node here.
22467         (get_constant):  Now trivial for CONSTANT_Utf8.
22468
22469         * jcf.h:  Make NEW_CPOOL the default.
22470         * jcf.h, jcf-reader.c, parse.c:  Remove support for !NEW_CPOOL.
22471
22472 1996-10-24  Per Bothner  <bothner@deneb.cygnus.com>
22473
22474         New directory.
22475
22476 \f
22477 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
22478 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
22479
22480 Copying and distribution of this file, with or without modification,
22481 are permitted in any medium without royalty provided the copyright
22482 notice and this notice are preserved.